- Introduced by
- Han, J., Pei, J., & Yin, Y. (FP-Growth); XAI augmentation from the interpretable ML community
- Year
- 2000 (FP-Growth); XAI augmentation emerged ~2018–present
- Type
- Explainable frequent pattern mining
- Family
- Machine learning
What does it do?
Explainable FP-Growth is a non-standard extension of the FP-Growth frequent-pattern mining algorithm (Han, Pei and Yin, 2000).
It adds interpretability layers to the mined patterns, such as ranking rules by several quality metrics, a view of the FP-tree structure and, where the implementation provides them, links from each rule back to its supporting transactions. Han et al. (2000) describe only the mining procedure; the explanation components are additions without a single standard definition, so any report that uses them should state exactly how they are defined.
The intuition behind the method
FP-Growth already produces human-readable if-then rules. The explainable variant keeps that output and adds ways to check each rule: ranking by several metrics such as support, confidence and lift, inspecting the FP-tree structure, and tracing a rule back to the transactions that support it. The aim is that a reviewer can see why a pattern was reported, not only that it was reported.
History
FP-Growth was introduced by Jiawei Han, Jian Pei and Yiwen Yin in 2000 as a method for mining frequent patterns without generating candidate sets. It stores the transaction database in a compressed prefix-tree structure, the FP-tree, and mines it by recursive divide-and-conquer on conditional databases. Explainable FP-Growth is not a single standardised algorithm with an identified originator or date; it refers to explanation layers added on top of FP-Growth by different implementations to support transparency requirements.
When to use it
Choose this method when your data are transactional or binary item-set data, the goal is to find frequent co-occurrence patterns, and the results must be reviewed by people who need the basis for each rule, for example in clinical, regulatory or retail reporting. It suits datasets with many items and a substantial number of transactions, where candidate-based methods become costly. Do not use it on continuous numeric data without prior binarisation or discretisation, on very small transaction sets where frequency counts are unstable, or when the goal is predictive accuracy; supervised models are better suited to prediction.
Limitations and considerations
- Continuous or categorical features must be binarised before mining, and the choice of bins changes which patterns appear.
- Lowering the minimum support threshold can produce very large numbers of itemsets and rules, which the explanation layer must then filter.
- The explanation components, such as item-contribution scores and counterfactual analysis, are not defined by a formula on this page and add their own computation and parameter choices.
- Co-occurrence rules describe association, not cause; the method cannot distinguish a causal link from a shared underlying factor.
- The compactness of the FP-tree depends on transactions sharing items; where transactions overlap little, the tree is less compressed and its advantage over candidate-based methods shrinks.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Builds a compact FP-tree and mines frequent itemsets by pattern-fragment growth, avoiding the candidate-generation step that makes Apriori costly when patterns are long or numerous (Han et al., 2000).
- The output is a set of if-then rules with support, confidence and lift values, which can be read and checked without knowledge of the algorithm.
- Rules can be ranked by several metrics, so a rule that looks strong on confidence can be screened against lift before it is reported.
- Where the implementation provides them, links from each rule to supporting transactions let a reviewer inspect the evidence behind the pattern.
Applications
- Market-basket analysis where the rules behind bundle or product suggestions must be reported and justified.
- Clinical datasets in which co-occurring diagnoses or prescriptions are reviewed by clinicians before any use.
- Compliance and audit settings where each reported association needs traceable supporting transactions.
- Educational data mining where co-occurrence patterns in learner records are reviewed by instructional staff.
How it works
How it works
All transactions in the dataset are scanned twice: first to count item frequencies and prune those below the minimum support threshold, and second to compress the remaining transactions into a compact FP-tree structure. The FP-tree stores co-occurrence relationships in a prefix-tree form, avoiding the costly candidate-generation step used by Apriori.
Frequent itemsets are extracted by recursively building conditional pattern bases and conditional FP-trees for each frequent item. Support is computed as the fraction of transactions containing the itemset. Only itemsets meeting the minimum support threshold are retained.
Formula
support(X) = count(X) / |D|
Association rules are derived from the frequent itemsets by splitting each itemset into an antecedent and a consequent, and keeping the rule only if its confidence meets the minimum confidence threshold. Lift, leverage and conviction are standard rule metrics that can be computed for each rule to support ranking; this page does not give formulas for leverage or conviction.
Formula
confidence(X \Rightarrow Y) = support(X \cup Y) / support(X)
The explanation layer is not part of the original FP-Growth algorithm, and this page does not define it with a formula. In the form described here, rules are ranked and filtered by several quality metrics and the FP-tree structure is made available for inspection. The item-contribution and counterfactual components are described only in general terms, so their exact definitions must be checked against the implementation used.
The final output lists the rules with their quality metrics and the explanation information attached to each, such as item-level contributions and links to supporting transactions where the implementation provides them. The reviewer can then accept or reject each rule by checking this evidence against domain knowledge.
Common pitfalls
- Setting minimum support too low and reviewing thousands of rules without filtering, which leaves the explanation layer uninformative.
- Reading a high-confidence rule as a strong association when the consequent is simply common in the data; confidence rises with consequent frequency, so lift should be checked alongside it.
- Ignoring item-frequency imbalance, so that very common items appear in many rules without a specific co-occurrence signal.
- Reporting support and confidence without lift, which can make chance co-occurrence look meaningful.
- Treating rules as causal without domain review or checks for confounding items.
Frequently asked questions
How is Explainable FP-Growth different from standard FP-Growth?
Standard FP-Growth returns frequent itemsets and association rules with support and confidence values. Explainable FP-Growth adds an explanation layer on top of the same mining: rules ranked by several metrics, a view of the FP-tree, and, where implemented, links to supporting transactions and item-level contribution information. The mining itself is unchanged.
What minimum support threshold should I use?
There is no general value; the threshold depends on the size of the dataset and on how many rules you can realistically review. Run the method at several levels, check how many itemsets and rules each produces, and lower the threshold only if meaningful patterns appear to be missing. Filter the final rule set by lift to remove spurious associations.
Can Explainable FP-Growth handle continuous variables?
Not directly. Continuous variables must be discretised into binary or ordinal bins before mining. The choice of bin boundaries affects which patterns are found, so record and justify the binning strategy as part of the explanation.
Is lift a reliable explainability metric?
Lift compares the observed co-occurrence of antecedent and consequent with what independence would predict, so it is more informative than confidence alone. It is unstable for rare items, where small counts can produce large values. Consider leverage or conviction alongside it, using the definitions in your implementation, and validate the top rules against domain knowledge.
When should I prefer Apriori over Explainable FP-Growth?
Apriori's step-by-step candidate generation is easier to follow, which can make it preferable for teaching. For larger datasets, FP-Growth avoids candidate generation and is the usual choice, as the original performance study reports. The explanation layer does not change this mining trade-off.
Related methods
Sources
Han, J., Pei, J., & Yin, Y. (2000). Mining frequent patterns without candidate generation. ACM SIGMOD Record, 29(2), 1–12.
Open DOI referenceAssociation rule learning. Wikipedia.
Open publication reference