Skip to content

Understand

Counterfactual Explanation

What would have changed the outcome?

Shows the smallest realistic change that would have produced a different result, making the decision boundary visible.

  • Evidence: research-based (Wachter et al. 2017, Karimi et al. 2021)
  • Tested: concept only, mock data

Overview

Why it matters

The question after “why” is always “what if”.

Attribution shows what mattered. A counterfactual shows what would have changed the outcome: “With €500 more income per month, this application would have been approved.” It answers the question people ask right after an adverse decision.

It’s not the same as Actionable Recourse. A counterfactual describes the decision boundary. Recourse filters it down to what this person can realistically do.

What does it look like?

Understanding a borderline decline

  1. Applicant sees their declined decision.
  2. Below the attribution: “What would have changed this?” section.
  3. System shows: “If your monthly debt payments had been €150 lower, the application would have been approved.”
  4. Applicant clicks through to: “How can I improve this?”: recourse section explains debt reduction options and reapplication timeline.

Caseworker assessing an edge case

  1. Caseworker reviews a case at the exact threshold: score 48, referral threshold 50.
  2. Counterfactual panel shows: “This case is 2 points below the approval threshold. The closest factor to the boundary is employment verification: if confirmed by a third-party source, the score would reach 52.”
  3. Caseworker requests employment verification before making the override decision.

Multi-factor case

  1. Applicant with several borderline factors asks what would change the result.
  2. System shows: “No single factor change would change the outcome. However, if both of these changes were in place: [income ratio below 38%] AND [employment gap under 6 months], the application would be approved.”
  3. Applicant understands the full picture and assesses whether both changes are achievable.

When does it fit?

Use it when

  • The decision was adverse and people want to know what would have changed it
  • Some of the factors are within the person’s control
  • Professionals need to see where the decision boundary lies

Skip it when

  • Showing the boundary would invite gaming
  • Nothing that would change it is within the person’s control
  • The model is too unstable for the answer to hold

Design

How do I apply it?

  • Lead with the most plausible change.

    The mathematically smallest change can be practically impossible. Prefer what people can act on.

  • Use everyday terms.

    “€200 less in monthly debt” beats “a ratio of 0.43 instead of 0.51”.

  • Be honest about combinations.

    If two or three things would have to change together, say so.

  • Don’t promise outcomes.

    It describes this decision, not a guarantee for the next one.

  • Connect it to recourse.

    The next question is “so what can I do?” Don’t make it a dead end.

For your technical team

Counterfactual generators often return the minimal-distance change in feature space, which can be implausible or involve immutable features. Constrain the search to actionable features and plausible values, and check that the counterfactual is stable for nearby inputs before showing it.

How can I show it?

Lighter Richer
Content Block / Statement

Minimum change statement

One sentence on the smallest change that would have mattered.

Data Visualization / Highlight

Near miss highlight

How close it was, and what was missing.

Data Visualization / Comparison

Controllable vs. fixed factors

What the person can change, and what is fixed.

Data Visualization / Visualization

Threshold visualization

Where the score sits relative to the decision line.

Content Block / Card

Counterfactual comparison card

Current profile and changed profile, side by side.

Content Block / Card

Multi-factor counterfactual

When several factors would need to change together.

Further left for a quick answer, further right for complex, multi-factor decisions.

What does it cost?

Transparency vs. gaming

Counterfactuals reveal thresholds. Where gaming is a risk, show direction rather than exact values.

Helpfulness vs. false promise

Models and policies change. Qualify the statement.

Simplicity vs. completeness

A single-factor answer is easy, but misleading when several things must change.

Connections

Which patterns work with it?

Attribution

Why did the system make this decision?

Attribution and counterfactual explanation are complementary. Attribution answers “what mattered.” Counterfactuals answer “what would have changed it.” Together they form a complete explanation.

Actionable Recourse

What can I do to change this outcome?

Counterfactuals describe the decision boundary. Recourse translates that boundary into practical steps. Use counterfactual as the explanation, recourse as the action plan.

Inspection Dialogue

Can I ask the system follow-up questions?

“What if I had X instead of Y?” is a counterfactual question phrased as an inspection dialogue query. The two patterns overlap and can be combined.

Example-Based Explanation

What similar cases influenced this result?

The “near miss” counterfactual case is also a form of example: a real or illustrative case that was similar but different in outcome. The patterns reinforce each other.

Sources (3)

Wachter et al. (2017) — Counterfactual Explanations without Opening the Black Box

introduces counterfactual explanations as a legally grounded approach to explaining algorithmic decisions. The paper directly motivates the GDPR-aligned use of counterfactuals for adverse decisions

Karimi et al. (2021) — Algorithmic Recourse: from Counterfactual Explanations to Interventions

makes the critical distinction between counterfactuals (what would change the outcome) and recourse (what the person can actually do). Essential for designing honest counterfactual interfaces

Ustun et al. (2019) — Actionable Recourse in Linear Classification

proposes recourse as a measurable property of classification systems and develops methods for identifying actionable changes. Provides the technical basis for distinguishing controllable from non-controllable factors in the counterfactual display

Sounds familiar?

You tell people why they were declined, not what would have made the difference.

Common in financial services, benefits and hiring. That’s where this pattern starts. Let’s look at your interface together.

Work with me