TL;DR
This paper introduces XCount, a novel tool designed to quantify the sensitivity (and by extension, individual unfairness) of Decision Tree Ensembles (DTEs) by counting vulnerable input regions. By combining Algebraic Decision Diagrams (ADDs) with a compositional, streaming-based approximate counting algorithm, XCount provides strong theoretical guarantees (PAC bounds) while outperforming state-of-the-art model counters by an order of magnitude.
What Problem Does This Paper Address?
Decision Tree Ensembles (DTEs), such as Random Forests and Gradient Boosted Trees (e.g., XGBoost), are highly popular for tabular data in safety-critical and regulated domains like finance. While checking if a model is locally robust around a single specific input is relatively straightforward, checking global sensitivity is much harder. Global sensitivity asks: Does there exist any pair of inputs that differ only on a small subset of "sensitive" features (like race, age, or gender) but yield significantly different model predictions?
Prior verification tools could only check for the existence of at least one such sensitive pair (an NP-hard problem). However, to truly evaluate a model's fairness or safety, engineers need to quantify it—i.e., count how many input regions are actually susceptible to these sensitivity violations. This is a model counting problem, which is complexity-theoretically much harder (#P-hard). Standard exact or approximate counters quickly run out of memory or time when faced with large ensembles.
Methods
The authors present XCount, an algorithm tailored specifically to the structural properties of DTEs:
- Discretization: DTEs naturally split the input space into a finite number of regions defined by the thresholds (guards) in their decision nodes. The authors map these regions to Boolean vectors.
- Subproblem Division: Instead of building a massive, monolithic representation of the entire ensemble, XCount breaks the problem into independent subproblems. Each subproblem focuses on a specific pair of bit-masks for the sensitive features that fall within a allowed distance.
- Symbolic Encoding (ADDs & BDDs): For each subproblem, the trees are pruned—removing branches rendered unreachable by the fixed sensitive features. The pruned trees are encoded as Algebraic Decision Diagrams (ADDs) to compute prediction differences efficiently, which are then converted to Binary Decision Diagrams (BDDs) by applying the target prediction gap threshold.
- Compositional Approximate Counting: To avoid the exponential explosion of merging these subproblems exactly, the authors adapt a streaming algorithm technique from database theory (Pepin counting). This allows them to statistically estimate the size of the union of overlapping sensitive regions, providing Probably Approximately Correct (PAC) guarantees (within a $(1\pm\epsilon)$ factor of the true count with at least $1-\delta$ confidence).
Datasets
The authors evaluated XCount on a comprehensive suite of 3,194 benchmark instances generated from 10 standard tabular datasets:
- Diabetes, Adult, Covtype, Protein-structure, Mnist, Webspam, Wine-quality, Supersymmetry, Higgs, and Fashion-MNIST.
For each dataset, they trained multiple distinct ensemble models, varying the size (10 to 100 trees) and depth (3 to 6) to rigorously test scalability.
Key Insights and Ideas
- Exploiting Tree Structure for Pruning: Fixing the sensitive features for a given subproblem makes large portions of the decision trees completely unreachable. Pruning these branches before building the symbolic ADDs prevents the memory explosion that typically plagues monolithic verification approaches.
- Cross-Disciplinary Synergy: Adapting streaming algorithms designed for estimating the size of the union of sets in database theory to formal model counting is a powerful connection. It elegantly bypasses the need to compute exact intersections of complex BDDs.
- Regularization Validation: The authors used XCount to empirically validate a common machine learning intuition: increasing L1 regularization ($\alpha$) during training directly reduces the number of sensitive regions in the resulting model, effectively smoothing the model's decision boundaries without sacrificing standard predictive accuracy.
Key Results
- Higher Completion Rates: Out of 3,194 benchmark instances, XCount successfully solved 1,552, compared to only 721 for Ganak (an exact CNF model counter) and 579 for ApproxMC (a standard approximate CNF counter).
- Speedups: XCount achieved a 33% improvement in Penalized Average Runtime (PAR2) over the next best approach and a 43% improvement over a naive monolithic ADD baseline.
- High Fidelity: The approximation error remained exceptionally low in practice; the majority of solved instances exhibited negligible error, well within the tight 10% prescribed error margin ($\epsilon = 0.1$).
Limitations and Future Work
- Scalability Bottlenecks: Performance still degrades as the total complexity of the ensemble grows. Specifically, when the total number of internal split nodes (guards) across the ensemble exceeded 400, XCount's completion rate dropped below 50%.
- Model Scope: The current implementation focuses primarily on additive tree ensembles (like XGBoost). While the theory naturally extends to random forests, it has not yet been adapted for other non-linear models or deep neural networks.
- Future Directions: The authors propose using these quantitative sensitivity counts to rank different DTE models during hyperparameter tuning and exploring broader applications in group fairness verification.
Summary updated