Simple Steps to Success: A Method for Step-Based Counterfactual Explanations

Jenny Hamer, Nicholas Perello, Jake Valladares, Vignesh Viswanathan, Yair Zick

TL;DR

StEP (Stepwise Explainable Paths) is a novel, model-agnostic framework for algorithmic recourse that guides users toward positive outcomes via iterative, directional steps rather than a single massive leap. By leveraging data clustering and an axiomatically justified direction formula, StEP provides robust, diverse, and privacy-preserving counterfactual explanations that outperform traditional optimization-based methods.

What Problem Does This Paper Address?

When an automated system denies someone a loan, a credit card, or a job, algorithmic recourse aims to provide the user with actionable steps to change the system's decision. Traditionally, this is framed as finding a "counterfactual explanation"—a single point in the feature space that results in a positive prediction.

However, existing methods suffer from several major drawbacks:

  1. High Information Requirements: They often require full access to the underlying model's architecture or causal graphs, which is unrealistic in proprietary or black-box settings.
  2. Off-Manifold Recommendations: Optimization objectives can easily recommend unrealistic feature combinations that don't align with real-world data distributions.
  3. Rigidity: They assume a user can perfectly execute a massive, one-time leap in their feature values. If a user deviates even slightly, the recourse plan fails.

StEP addresses these challenges by shifting the paradigm from searching for destinations to searching for promising directions along the actual data manifold.

Figure 2: (Left) The training dataset that the loan approval algorithm uses, and (Right) Offmanifold (⃗d1) and On manifold (⃗d2) directions.

Methods

StEP is a data-driven, model-agnostic algorithm that operates in an iterative loop:

  1. Clustering: It first partitions the positively labeled training data into $k$ clusters using standard algorithms like $k$-means. This ensures that recommendations target real, dense regions of successful historical examples.
  2. Direction Generation: For a rejected user (the Point of Interest, or PoI), StEP calculates a direction vector $\vec{d}_c$ toward each cluster $X_c$ using the following formula: $$\vec{d}_c = \sum_{\vec{x}' \in X_c} (\vec{x}' - \vec{x})\alpha(\|\vec{x}' - \vec{x}\|)\mathbf{1}(f(\vec{x}') = 1)$$ Here, $\alpha$ is a distance-decaying function (such as a "volcano" or "sloped" function) that ensures closer successful points exert a stronger pull on the direction vector than distant ones.

  3. Iterative Interaction: The system presents these $k$ directions to the user. The user modifies their features accordingly and reapplies. If still rejected, StEP computes new directions from the user's updated state.

Figure 1: (Left) The training dataset that the loan approval algorithm uses, (Middle) Plotting possible recourse directions for Example 2.1 and (Right) plotting a stakeholder path toward loan acceptance.

Theoretical Guarantees

  • Axiomatic Uniqueness: The authors prove that StEP's direction formula is the only one that satisfies a set of six natural properties, including Shift Invariance, Continuity, and Positive Classification Monotonicity.
  • Differential Privacy: By bounding the sensitivity of the direction selection, StEP can be made $(\epsilon, \delta)$-differentially private by adding Gaussian noise, ensuring that user recourse queries do not leak sensitive training data.

Datasets

The framework was rigorously evaluated using three real-world benchmark datasets across three base models (Logistic Regression, Random Forests, and 2-layer Deep Neural Networks):

  • Credit Card Default: Financial dataset predicting payment defaults.
  • Give Me Some Credit: Financial dataset predicting financial distress.
  • UCI Adult: Demographic dataset predicting whether an individual's income exceeds $50k/year.

Key Insights and Ideas

  • Directions Over Destinations: Providing a vector direction gives the user agency and flexibility. If they cannot increase their "bank balance" by the exact amount a traditional counterfactual demands, any positive progress in that direction is still valuable.
  • Clustering Prevents "Dead Zones": Without clustering, averaging paths to all positive points can result in a vector that points directly into an unpopulated, off-manifold region. Clustering isolates distinct profiles of success.
  • Noise as a Feature: Simulating "user interference" (where users fail to follow the direction perfectly) revealed that small amounts of stochasticity actually helped users escape local minima in the decision boundary, occasionally improving recourse success rates.

Key Results

StEP was cross-compared with three popular recourse baselines: DiCE, FACE, and C-CHVAE.

  • Success Rate: StEP achieved near-perfect success rates ($\sim 1.00$) across almost all tasks, matching or beating the optimization-heavy baselines.
  • The Distance-Diversity Balance: StEP consistently struck the best trade-off between proximity (how much effort the user must exert) and diversity (offering distinct alternative paths). For instance, while DiCE offered high diversity, its recommended changes required $\ell_2$ distances up to 10 times larger than StEP, making them highly impractical for users.
  • Computational Efficiency: StEP's complexity is linear with respect to the dataset size, making it a lightweight alternative to methods requiring gradient descent or SAT solvers.

Limitations and Future Work

  • Distance Metric Dependency: StEP relies heavily on the choice of distance metric (e.g., $\ell_2$ norm on scaled data). Developing better encoding schemas and distance metrics specifically for mixed categorical and continuous data is an open area of research.
  • Clustering Granularity: Setting $k$ too high can isolate outliers into their own clusters, leading to ineffective recourse paths for those specific directions.
  • Algorithmic Fairness: The authors note that future work must explicitly evaluate whether step-based recourse methods offer equitable performance across protected demographic groups.

Summary updated

BibTeX
@article{hamer2024simple,
  author = {Jenny Hamer and Nicholas Perello and Jake Valladares and Vignesh Viswanathan and Yair Zick},
  title = {{Simple Steps to Success: A Method for Step-Based Counterfactual Explanations}},
  journal = {Accepted by TMLR},
  year = {2024},
  url = {https://openreview.net/forum?id=R6ey5DKaoX},
}
Figure