Data-Aware and Scalable Sensitivity Analysis for Decision Tree Ensembles

Namrita Varshney, Ashutosh Gupta, Arhaan Ahmad, Tanay Vineet Tayal, S. Akshay

Decision tree ensembles, such as XGBoost and Random Forests, are the workhorses of tabular data in high-stakes fields like banking, healthcare, and criminal justice. Because these models often inform critical decisions, ensuring they are robust and fair is essential. A key metric for this reliability is sensitivity: Can a small change in a specific subset of features (e.g., altering a protected attribute like "gender" or "age" while keeping everything else constant) flip the model's prediction?

While researchers have developed formal verification tools to audit this sensitivity, existing approaches face two major hurdles: the generation of unrealistic counterexamples and severe scalability limits. To address these challenges, researchers have introduced ENSENSE, a novel framework that combines optimized Mixed-Integer Linear Programming (MILP) with data-distribution constraints to find realistic, "data-aware" counterexamples up to 15x faster than existing methods.

The "Meaningless Blob" Problem and Scalability

Standard formal verification tools are designed to find any mathematical solution that flips a model's prediction. Unfortunately, this often results in "counterexamples" that look like random noise or impossible data points. Because these points lie far outside the actual training distribution, they are practically useless for debugging real-world model behavior.

Comparison of standard sensitivity counterexamples (left, resembling random noise) versus data-aware counterexamples generated by ENSENSE (right, resembling actual MNIST digits).

For example, in an MNIST digit classifier, a "sensitive pair" is much more informative if both images actually look like the number 3, rather than one being a 3 and the other being a cloud of random pixels.

Furthermore, sensitivity verification is computationally NP-hard. Existing tools struggle to scale, often timing out when analyzing large ensembles (hundreds of trees) or multi-class classification problems. The authors of ENSENSE closed a theoretical gap by proving that sensitivity verification remains NP-hard even for "decision stumps" (trees with a depth of only 1), underscoring the need for highly optimized solvers.

The ENSENSE Framework: Methods and Innovations

To overcome these hurdles, ENSENSE combines formal verification with data-driven heuristics through several key innovations:

1. Optimized MILP Encoding

ENSENSE builds upon standard Mixed-Integer Linear Programming (MILP) but introduces a novel structural optimization called "Unaffected and Affected Leaves." By identifying which parts of the decision trees are mathematically unreachable when a specific feature is changed, the framework drastically prunes the search space for the solver. This explicit encoding leads to an order-of-magnitude speedup.

To ensure counterexamples are realistic and actionable, ENSENSE employs two distinct strategies to keep the solver close to the actual data distribution:

  • Product of Marginals (Prob): An objective function that steers the solver toward regions where the training data is most dense. While this assumes feature independence (a trade-off), it serves as a highly effective proxy for finding realistic points.
  • Clause Summaries (Clause): The framework uses Satisfiability Modulo Theories (SMT) solvers to identify "cavities"—empty regions in the feature space where no data exists—and explicitly instructs the solver to avoid them.
Illustration of feature space bounding to identify regions with and without training data, helping the solver avoid unrealistic 'cavities'.

3. Multi-class Extension

Moving beyond simple binary "yes/no" classifications, ENSENSE provides the first scalable MILP formulation for sensitivity in multi-class ensembles, significantly broadening its applicability to complex real-world tasks.

Experimental Evaluation and Key Results

The researchers evaluated ENSENSE extensively across 18 datasets and 36 different tree ensembles, including binary classifiers (e.g., Adult Census, German Credit) and multi-class classifiers (e.g., MNIST, Covtype). The models were trained using XGBoost, with some ensembles containing up to 800 trees and depths up to 8.

The results demonstrate substantial improvements over the state of the art:

  • Unprecedented Speed: ENSENSE achieved an average 8x speedup over the baseline MILP method (KANT) and a 5x speedup over the state-of-the-art pseudo-Boolean method (SENSPB) for binary classification.
  • Multi-class Dominance: In multi-class settings, ENSENSE was roughly 15x faster than the baseline, successfully handling large-scale benchmarks where other tools simply timed out.
  • Massive Scalability: The tool successfully verified ensembles with up to 800 trees, representing a significant jump in scale compared to previous literature.
  • Proximity to Real Data: By combining both data-aware methods (the "Probclause" strategy), ENSENSE consistently found counterexamples with much lower $l_2$ distances to the training set. This provides human-interpretable evidence of model sensitivity rather than mathematical anomalies.

Limitations and Future Directions

While ENSENSE marks a significant step forward, the authors note that its current utility function assumes feature independence. In datasets with extremely high feature correlations, the effectiveness of the "Product of Marginals" approach may diminish.

Looking ahead, this research lays the groundwork for moving from detection to mitigation. The realistic counterexamples generated by ENSENSE could be used to retrain or "harden" models against specific weaknesses. Additionally, future work could expand from finding individual pairs of sensitive points to quantifying the total "sensitive volume" across the entire input space, providing a more holistic measure of model robustness.

Summary updated

BibTeX
@inproceedings{varshney2026data,
  author = {Namrita Varshney and Ashutosh Gupta and Arhaan Ahmad and Tanay Vineet Tayal and S. Akshay},
  title = {{Data-Aware and Scalable Sensitivity Analysis for Decision Tree Ensembles}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=q8KqAvdfZK},
}
Figure