NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Counterfactual Maps: What They Are and How to Find Them

Awa Khouna, Julien Ferry, Thibaut Vidal

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: Causality, Privacy & Learning Theory › Tree Ensemble Interpretability and Inference · Type: new method · Keywords: counterfactual explanations, tree ensembles, nearest-region search, volumetric KD trees, optimal recourse, interpretability

Areas: Interpretability › Model Explanations › Model explanations

Summary

Counterfactual Maps provide an exact, amortized algorithm for generating globally optimal counterfactual explanations for tree ensembles using volumetric KD trees.

Explained to a 5-year-old

When a computer makes a decision, sometimes we want to know what would have to change to get a different answer. For a kind of computer model that splits data into boxes, finding that change is hard. We made a new way to look at all possible changes at once, like drawing a map of where you could go. This map lets the computer quickly tell you the best change in just a few milliseconds. It helps people understand why the computer made a choice, especially in important situations.

Explained to a 5-year-old, longer

When a computer gives an answer, we often want to know what would have to be different to get a different answer. This is called a counterfactual explanation, and it helps us understand the computer's decision. For many computer models, finding the best change is difficult and slow. Tree ensembles are a type of model that works by splitting data into simple boxes. In these models, the prediction stays the same inside each box, but can change when you move to a different box. The challenge is to find the nearest box that would give a different prediction, using a simple measure of distance. Existing methods either guess the answer without being sure, or they take a very long time to compute the exact answer. Our new idea is to create a big map that shows all the boxes and how they are related to each other. This map is called a counterfactual map, and it works like a special kind of tree that stores the boxes efficiently. By building this map once, we can answer many questions very quickly, almost instantly. When we need a new explanation, we just look up the map and find the closest box with a different label. The result is an exact answer that is guaranteed to be the best possible, and it happens in just a few thousandths of a second.

For a technical reader

The paper addresses the problem of generating optimal counterfactual explanations for tree ensembles, which are piecewise constant models. It introduces counterfactual maps, a global partition of labeled hyperrectangles that enables nearest-region queries via volumetric KD-trees. By preprocessing the ensemble into this structure, the approach can answer each query with branch-and-bound search, providing optimality certificates and sub-linear query time. Experiments on real datasets show millisecond-level latency, orders of magnitude faster than existing exact optimization methods. This makes it practical for high-stakes applications where fast, reliable explanations are needed.

Problem

Generating optimal counterfactual explanations for tree ensembles is challenging because existing methods either lack optimality guarantees or are computationally infeasible for interactive use.

Method

The approach compresses a tree ensemble into a partition of labeled hyperrectangles and casts counterfactual search as a nearest-region query using volumetric KD trees with branch-and-bound and optimality certificates.

Results

The approach provides globally optimal explanations with millisecond query latency, far faster than existing exact methods.

Contributions

It introduces counterfactual maps as a global recourse representation for tree ensembles and an exact amortized algorithm based on volumetric KD trees that offers optimality certificates and sublinear query time.

Practical relevance

Enables fast, reliable counterfactual explanations for critical decision-making systems where interpretability is essential.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction