mlsanityData to 14 Oct 2026

Optimal Counterfactual Search in Tree Ensembles: A Study Across Modeling and Solution Paradigms

arXiv 2605.06561 ↗First posted 7 May 2026cs.LGcited by 1

Not on the map. Why?

Abstract (arXiv)

Trust in counterfactual explanations depends critically on whether their recommended changes are truly minimal: suboptimal explanations may vastly overshoot the actual changes needed to alter a decision, and heuristic errors can affect individuals unevenly, giving some users relevant recourse while assigning others unnecessarily costly recommendations. Consequently, we study the problem of computing optimal counterfactual explanations for tree ensembles under plausibility and actionability constraints. This is a combinatorial problem: for a fixed model, counterfactual search boils down to selecting consistent branching decisions and threshold-defined regions under a distance objective. We exploit this structure through CPCF, a constraint programming (CP) formulation in which numerical features are encoded as interval domains induced by split thresholds, while discrete features retain native finite-domain representations. This yields a compact finite-domain formulation that supports multiple distance objectives without continuous split-boundary search. We then place CPCF in a broader comparison across mathematical programming paradigms: we extend a maximum Boolean satisfiability (MaxSAT) formulation, originally designed for hard-voting random forests, to soft-voting ensembles, and compare against the current state-of-the-art mixed-integer linear programming (MILP) optimal approach. Across ten datasets and three types of tree ensembles, we analyze scalability, anytime performance, and sensitivity to distance metrics. We observe that CP achieves the best overall performance. More importantly, our results identify regimes in which the specific strengths of each paradigm make it best suited: CP is most versatile overall, MaxSAT handles hard-voting ensembles particularly well, and MILP remains competitive in amortized inference settings with a moderate number of split levels.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 12 of its 28 references that are in the map. First posted on arXiv 7 May 2026.

Builds on

12 of 28 references.

References · 12

  1. 2016XGBoost: A Scalable Tree Boosting Systemcited by 5,166
  2. 2019FACE: Feasible and Actionable Counterfactual Explanationscited by 233
  3. 2019Interpretable Counterfactual Explanations Guided by Prototypescited by 223
  4. 2019Model-Agnostic Counterfactual Explanations for Consequential Decisionscited by 204
  5. 2020Counterfactual Explanations and Algorithmic Recourses for Machine Learning: A Reviewcited by 174
  6. 2019Towards Realistic Individual Recourse and Actionable Explanations in Black-Box Decision Making Systemscited by 131
  7. 2017Interpretable Predictions of Tree-based Ensembles via Actionable Feature Tweakingcited by 76
  8. 2019FOCUS: Flexible Optimizable Counterfactual Explanations for Tree Ensemblescited by 43
  9. 2021Optimal Counterfactual Explanations in Tree Ensemblescited by 36
  10. 2022Optimal Decision Diagrams for Classificationcited by 10
  11. 2023Very fast, approximate counterfactual explanations for decision forestscited by 4
  12. 2026Counterfactual Maps: What They Are and How to Find Themcited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.