Source-linked AI summary
Leaf Values as Coordinates: Exact Contrastive Explanation for Gradient-Boosted Ensembles
Emanuele Luzio
TL;DR
Recourse explanations for gradient-boosted models are often evaluated without asking whether a person can carry out the recommended changes. This paper represents leaf values as exact coordinates and builds recourse by retrieving nearby accepted instances, reconstructing the model’s decision to 6.2 × 10−15 while degrading more gracefully under feasibility constraints.
Problem
Standard recourse evaluation tests whether a modified profile is approved but not whether the subject could actually reach it.
Method
The method treats leaf values as exact coordinates, making the model linear in that space and recourse a retrieval of a nearby accepted instance.
Results
6.2 × 10−15 maximum reconstruction error across 2,060 queries verifies that reported coordinates account for the model’s margin gap.
Takeaways & Limitations
Recourse built on this representation is competitive on conventional metrics and degrades more gracefully when recommendations are restricted to feasible changes.
Takeaways & Limitations
Constrained recourse is measured rather than solved, and COACH’s constrained validity is 0.572, which the authors say should not be deployed.
Abstract
from arXiv · showhide
A gradient-boosted ensemble predicts by summing one leaf value per tree. Read those values as coordinates rather than as intermediate results, and every instance becomes a point in R^M on which the model acts linearly: the score is the sum of the coordinates. This small change of view makes contrastive explanation exact. The difference between two instances is a vector that is identically zero wherever they share a leaf, so the gap between a rejected applicant and an accepted one is carried by a handful of coordinates, each traceable to a real split in a real tree. Nothing is fitted, sampled, or assumed additive in features -- the additivity is already there, in the right space. We build a recourse method on this representation and evaluate it on five tabular datasets under repeated cross-validation. Its recommendation reconstructs the model's own decision to 6.2 x 10^-15, so an auditor can re-check the arithmetic without the model. On the credit datasets it is Pareto-non-dominated on effort against realism. And when recommendations are restricted to changes the subject could actually make -- not their age, not a settled delinquency -- it retains 58% of its validity where the strongest baseline retains 41%, a distinction the standard evaluation cannot see because it never asks whether a recommendation can be carried out.
1 Introduction
The paper represents each instance by its leaf values, making gradient-boosted models linear in that space and contrastive differences exact and sparse. It develops COACH as neighbour retrieval in this space and verifies that its reported coordinates reconstruct model margin gaps to 6.2 × 10^-15 across 2,060 queries.
- Leaf-value representation: Leaf-value coordinates make the ensemble linear as an unweighted sum, while all input-feature nonlinearity remains in an exactly known, piecewise-constant map.The model is nonlinear in input features but linear in the leaf-value representation.
- Exact contrastive explanation: Contrastive differences are exactly sparse: coordinates vanish for shared leaves, so score gaps come only from trees where the instances diverge.This provides an exact account rather than an approximation.
- Exact contrastive explanation: Reading non-zero coordinate differences explains score gaps without fitting a surrogate, choosing a reference distribution, or assuming additivity in features.The explanation is expressed in tree-level units that sum to the gap.
- COACH recourse: COACH reduces recourse to retrieving an accepted neighbour in leaf-value space whose difference from the query is small, decisive, and reachable.The method is developed for tabular gradient-boosted models and evaluated on five datasets.
- COACH recourse: 6.2 × 10^-15: across 2,060 queries, the reported coordinates reconstruct the model’s margin gap to this error.This directly verifies the representation’s promise of exact accounting.
2 The Representation
The representation treats gradient-boosted predictions as coordinates indexed by trees, making instance differences exact and sparse wherever leaf paths diverge. It then attributes those coordinate differences to decisive feature splits, yielding recommendations whose arithmetic reproduces the model’s own prediction gap.
- Exact contrastive differences: For diverging instances, the coordinate difference is zero in every tree where they share a leaf.Only trees in G(x,y), where the leaf assignments differ, contribute to the contrast.
- Exact contrastive differences: Equation 3 is an identity requiring no feature linearity, independence, sampling, or locality.It compares two instances under one model using exact arithmetic.
- From coordinates to features: Diverging tree coordinates are attributed to the feature at each decisive split and summed into feature-level rows with thresholds, tree counts, and contributions.The decisive split is where the two root-to-leaf paths first separate.
- From coordinates to features: Because the attribution partitions the diverging trees, the feature rows remain a complete recommendation and justification that sums to the exact prediction gap.The resulting table is simultaneously the recommendation and its justification.
- Similarity in this space: Unlike leaf co-occurrence indicators, leaf-value coordinates encode sign and magnitude, showing how an instance difference produces the decision.Similarity reflects shared leaves, while the coordinate difference explains the prediction change.
3 COACH
COACH selects an accepted model-approved comparator for a rejected query, ranks eligible comparators by sparse, concentrated impact and feature proximity, and organizes them into score-based tiers. It then filters recommendations by feature-level feasibility while retaining immutable-feature contributions in the audit trail.
- Comparator selection: COACH pairs each rejected query x_q with an accepted comparator x_+ and returns the Section 2 feature table.Comparators are selected from training instances the model accepts, rather than instances merely labelled positive.
- Eligibility: An eligibility margin ε requires f̂(x_+) to clear the decision threshold with surplus, accounting for feature actions that can alter tree leaf assignments.The representation is linear in φ, but changing one feature can change assignments in trees whose decisive split lies elsewhere.
- Ranking: Among eligible comparators, COACH favors differences with small support, concentrated impact, and nearby feature-space distance.The distance is the mean standard-deviation-normalised L1 distance, and the ranking does not change eligibility.
- Tiers: Eligible comparators are divided into terciles of their own score distribution to provide a progression of targets.Terciles avoid fixed probability bands that may contain one instance or none on confident, imbalanced problems.
- Feasibility: COACH drops recommendation rows whose permitted feature moves cannot be performed, while retaining their tree contributions in the audit trail.Features are marked mutable, increase-only, decrease-only, or immutable; gaps resting on immutable attributes such as age receive w≈0.
4 Experimental Setup
The study evaluates 300-tree depth-4 XGBoost models on five tabular datasets against four recourse baselines. It defines validity, sparsity, and manifold distance explicitly, and uses 20 repeated cross-validation splits with corrected statistical testing.
- Datasets and models: Five tabular datasets are evaluated with XGBoost models using 300 trees of depth 4, against NICE, FACE, Feature Tweaking, SHAP-driven greedy recourse, and LIME-driven greedy recourse.The datasets are FICO HELOC, Taiwan Credit Default, Adult Income, and Polish Bankruptcy at 1- and 2-year horizons.
- Evaluation metrics: Validity is the fraction of all queries accepted by the model, while sparsity is the fraction of changed features and manifold distance is normalized L2 distance to five nearest accepted training instances.Genuine accepted instances lie 0.76–1.96σ from their own neighbours, providing context for manifold-distance results.
- Statistical analysis: 20 repeated cross-validation splits are analyzed with the Nadeau–Bengio corrected resampled t-test and Holm correction, treating the paired-difference interval as primary.With five splits, the smallest attainable two-sided Wilcoxon p is 0.0625, above α before correction.
5 Results
Across five datasets, the leaf-coordinate representation reconstructs model decisions exactly enough for independent verification and supports recourse with strong unconstrained and actionable validity. Results also show that feasibility constraints, rather than ranking heuristics, determine much of practical validity.
- 5.1 Exact reconstruction: 6.2 × 10^-15 maximum margin reconstruction error across 2,060 queries makes recommendations independently auditable without the model or training data.Rows accounted for 1.0000–1.0000 of each decision gap, consistent with the representation’s prediction.
- 5.2 Unconstrained recourse: COACH achieved coverage 1.000 and validity of 0.977–1.000 across datasets, while improving realism over NICE on HELOC and Taiwan.On HELOC it was 22% closer to accepted instances than NICE (1.83 vs. 2.36), and on Taiwan 39% closer.
- 5.2 Unconstrained recourse: COACH and NICE were non-dominated on effort against realism across all five datasets, while every other baseline was dominated or failed the validity gate somewhere.The two methods occupied opposite ends of the same Pareto frontier, so no weighting-free argument selected one.
- 5.3 Comparator ablation: Validity remained essentially unchanged with an arbitrary eligible comparator, at ≥0.965 versus ≥0.967, showing eligibility drives validity rather than ranking.The λ term narrows recommendations, while the β penalty supplies proximity to the data manifold.
- 5.4 Actionable recourse: 58% of COACH’s validity survived actionable-feature projection, versus 41% for NICE and 44% for FACE, reversing the unconstrained ordering.Immutable features and infeasible directions were restored to their original values before rescoring.
- 5.4 Actionable recourse: 0.572 validity from constraint-aware comparator selection exceeded 0.447 from post-retrieval filtering, while acting on the three highest-impact changes retained 0.703–1.000 validity.At k=8, retained validity rose to 0.972–1.000, showing breadth can be reduced without requiring every recommended change.
6 Related Work
This work distinguishes leaf-value coordinates from prior leaf-based similarity and recourse methods by using signed, magnitude-bearing values to exactly decompose model decisions. It also contrasts exact accounting and feasibility evaluation with optimisation, attribution, instance-based, and actionability-aware approaches.
- Tree representations: Leaf-value coordinates extend prior leaf co-occurrence representations by retaining signed values and magnitudes that sum to the model output.Random-forest proximities and prior counterfactual search record only whether instances share a leaf; Equation 2 instead enables an exact decision decomposition.
- Tree-aware recourse: Prior tree-aware methods search tree structure for points, whereas this work retrieves an existing accepted instance and reports exact accounting.The related methods include nearest-positive-leaf adjustment, integer programming, mixed-integer manifold formulations, and differentiable surrogates.
- Model-agnostic recourse and its evaluation: Attribution-driven recourse can fail because tree additivity does not imply feature additivity, while instance-based methods ground recommendations in real accepted examples without explaining them.Optimisation methods may treat the classifier as an oracle, whereas attribution methods assume per-feature scores predict feature effects.
- Model-agnostic recourse and its evaluation: Actionability- and causality-constrained methods restrict generation, while this work quantifies the evaluation cost of omitting such constraints and uses a projection as a benchmarking check.Pawelczyk et al. standardise recourse benchmarking, and the projection is described as the kind of check such a framework supports.
7 Limitations
The paper’s limitations concern uncertain mutability labels, constrained recourse that remains imperfect, an audit trail whose practical benefit is unvalidated, and a representation tied to one trained model. These constraints limit deployment, validation, and transferability.
- Mutability labels: Mutability labels are judgments rather than data facts; marking uncertain features mutable makes reported constrained costs lower bounds, and Polish Bankruptcy’s 64 ratios lack defensible labels.Consequently, constrained analysis covers three datasets.
- Constrained recourse: 0.572 is COACH’s constrained-recourse result, but constrained recourse is measured rather than solved and should not be deployed.Further progress requires retrieval that searches for feasible comparators instead of down-weighting infeasible ones.
- Audit trail: The audit trail is exact and independently checkable, but its benefit to compliance officers has not been demonstrated.Until such a study exists, that benefit remains a design argument.
- Representation: The representation is M-dimensional and tied to one trained model, so it is an interpretation device rather than a transferable embedding.Retraining the ensemble induces a different φ.
8 Conclusion
Treating leaf values as coordinates makes gradient-boosted models exactly linear in an explicit space, enabling exact contrastive explanation by subtraction. Recourse built on this representation remains competitive conventionally and better reflects actionable changes than standard evaluation.
- Exact contrastive explanation: 6.2 x 10^-15 verification over 2,060 queries demonstrates that subtraction yields exact contrastive explanations by construction.Leaf values serve as coordinates, making the model linear in a space that can be written down exactly.
- Actionable recourse: Recourse built on the coordinate representation is competitive on conventional metrics and degrades gracefully when recommendations are restricted to actionable changes.The method is designed around changes a person can actually make.
- Evaluation: Standard evaluation cannot compare performance under actionable-change restrictions, and making that comparison reverses the field’s ranking.The conclusion identifies this restriction as a distinction conventional evaluation misses entirely.