- Introduced by
- Agrawal, R., Imielinski, T., & Swami, A. (foundational); XAI framing: broader community (2010s–present)
- Year
- 1993 (rules); 2010s (XAI framing)
- Type
- Interpretable pattern mining / XAI technique
- Family
- Machine learning
What does it do?
Explainable Association Rules applies association rule mining, whose outputs are if-then statements, to produce human-readable explanations of data patterns.
Each rule states an antecedent and a consequent together with support, confidence, and lift, so it can be read directly as a candidate explanation, subject to checks of its coverage and fidelity. When rules are instead mined from a black-box model's input-output behaviour, they act as a post hoc surrogate, and their fidelity to that model has to be checked separately.
The intuition behind the method
Association rules describe co-occurrence patterns as simple logical statements, such as 'customers who buy bread and butter also buy milk 72% of the time.' Unlike neural networks or boosted ensembles, whose decisions are spread across many internal weights, these rules show their reasoning directly. In the explainability context, this property is used deliberately: rules are mined either from the data or from the prediction outputs of a black-box model, and then presented to stakeholders as compact justifications. The trade-off is coverage for clarity, because each rule applies only to the subset of instances that match its antecedent.
History
Agrawal, Imielinski, and Swami (1993) presented an efficient algorithm that generates all significant association rules between items in large databases of customer transactions, and reported results on sales data from a large retailing company. The sales-data application corresponds to market-basket analysis. Using such rules to explain machine-learning models is a later extension of the method. Murdoch et al. (2019) provide a framework for discussing interpretation methods, including the distinction between model-based and post hoc approaches; rules mined from a black-box model's behaviour fall into the post hoc category.
When to use it
Choose Explainable Association Rules when the audience needs symbolic, human-readable justifications for data patterns or model predictions, for example where decisions must be reviewed or audited. It suits transactional or binary feature data, and categorical data where co-occurrence patterns are meaningful. It is less suitable for continuous numeric data that cannot be discretised sensibly, for tasks that require coefficient-level statistical inference, and for very small datasets, where support estimates become unstable. If the question is about how individual features contribute to one prediction, instance-level attribution methods may be a better fit. Rules capture correlation, not causation, so they should not be presented as causal evidence.
Limitations and considerations
- Continuous features must be discretised before mining, and the binning decisions can change which rules are found.
- The number of rules can be very large; aggressive pruning may discard patterns that are genuinely useful.
- Rules capture correlation, not causation, so their results cannot be read as causal without additional design.
- Coverage per rule is limited; some instances may match no rule above the minimum support threshold.
- When used as a surrogate, fidelity to a target black-box model can be imperfect, so agreement with the original model has to be measured rather than assumed.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Each rule is an explicit if-then statement, so the logic behind an explanation can be read directly without being reconstructed.
- Support, confidence, and lift are three separate measures of how often and how strongly a pattern holds, which makes rules straightforward to rank and compare.
- Rules can be mined from a categorical or binary table, or from a black-box model's input-output pairs, so one rule format serves both pattern discovery and surrogate explanation.
- Frequent-itemset algorithms such as Apriori and FP-growth prune the search space, which is what makes mining practical on large transactional data.
- The rules depend only on co-occurrence counts, so no distributional assumptions about the features are required.
Applications
- Market-basket analysis: explaining purchasing co-occurrence patterns to retail stakeholders.
- Clinical decision support: generating readable co-morbidity and treatment-association explanations for clinicians.
- Fraud detection: surfacing readable rule-based justifications for flagged transactions in compliance audits.
- Surrogate explanation: mining rules from a black-box classifier's predictions to create a globally interpretable surrogate.
- Recommender systems: producing transparent 'customers who viewed X also viewed Y' explanations.
- Bioinformatics: discovering co-expressed gene patterns with interpretable rule outputs.
How it works
How it works
Frequent itemsets are identified from the dataset using frequent-itemset algorithms such as Apriori or FP-growth, which are described on the related pages. An itemset is frequent if its support, the fraction of transactions containing it, meets a user-defined minimum threshold. This step finds which combinations of features or outcomes co-occur often enough to be worth examining.
From each frequent itemset, candidate if-then rules A→B are formed. Each rule is scored by its confidence, which is the conditional probability that B appears given A, and by its lift, which compares how often A and B co-occur with how often they would co-occur if independent. Lift equals confidence(A→B) divided by support(B), which is the same as support(A ∪ B) / (support(A) · support(B)). Only rules that exceed the minimum confidence and lift thresholds are kept.
Formula
\text{confidence}(A \Rightarrow B) = \frac{\text{support}(A \cup B)}{\text{support}(A)}The retained rules are pruned to remove redundant or weak ones. Common strategies include removing rules that are subsumed by stronger rules, imposing a maximum rule length, or applying a statistical test such as Fisher's exact test to filter out spurious associations. The test is one option, not a fixed requirement of the method.
In the XAI usage, mined rules are mapped to the predictions or decisions of a target model or dataset. Each instance to be explained is matched against the rule antecedents, and the highest-ranked matching rule is presented as the explanation. Rules can also be mined directly from a black-box classifier's input-output pairs to produce a global surrogate. In that case the rules are a post hoc approximation, so their agreement with the original model must be measured.
Explanations can be assessed on fidelity, meaning how accurately the rules reproduce the model's or the data's behaviour, and on interpretability, which depends on rule length, number of rules, and coverage. Support, confidence, and lift describe each rule's frequency and strength. Fidelity to a target model is measured as the proportion of held-out instances for which the rule-based prediction agrees with the black-box model's prediction, and it should be reported together with coverage, the share of instances matched by at least one retained rule. Stability of the rules across different data samples can also be checked.
Common pitfalls
- Setting minimum support too low, producing thousands of spurious rules that overwhelm the analyst.
- Treating high-confidence rules as causal without randomised or quasi-experimental validation.
- Forgetting to discretise continuous variables before mining, or choosing arbitrary bin widths without sensitivity analysis.
- Ignoring rule coverage: reporting only the strongest rules without checking what fraction of the data they actually cover.
- Using association rules as a black-box model replacement without verifying fidelity to the original model's predictions.
Frequently asked questions
Are association rules already explainable without any extra steps?
Yes. Standard association rules produce symbolic if-then outputs that are readable without further processing. The 'Explainable' framing refers to deliberately using this property in an XAI context, particularly when rules are used as surrogates to explain black-box model decisions rather than for pure pattern discovery.
How do I handle continuous features?
Discretise them into bins (e.g., equal-width, equal-frequency, or domain-driven cuts) before mining. The choice of binning can materially affect which rules are found, so a sensitivity analysis across different bin configurations is recommended.
What support and confidence thresholds should I use?
There is no universal setting. Choose thresholds by inspecting how many rules each setting produces and whether the resulting rules are practically meaningful, and check how sensitive the results are to small changes. In sparse datasets, low support thresholds tend to produce many spurious rules.
Can association rules replace LIME or SHAP for explainability?
They complement rather than replace LIME and SHAP. Association rules provide global, population-level pattern explanations while LIME and SHAP provide instance-level feature attributions. The best choice depends on whether stakeholders need to understand individual predictions or overall data patterns.
What is the difference between lift and confidence?
Confidence measures the conditional probability P(B|A); lift normalises confidence by the base rate of B, so lift > 1 indicates A and B co-occur more often than expected by chance. High confidence with lift near 1 means the rule adds little beyond the marginal frequency of B.
Related methods
Sources
Agrawal, R., Imielinski, T., & Swami, A. (1993). Mining association rules between sets of items in large databases. Proceedings of the 1993 ACM SIGMOD International Conference on Management of Data, 207–216.
Open DOI referenceMurdoch, W. J., Singh, C., Kumbier, K., Abbasi-Asl, R., & Yu, B. (2019). Definitions, methods, and applications in interpretable machine learning. Proceedings of the National Academy of Sciences, 116(44), 22071–22080.
Open DOI reference