Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Machine learning›Counterfactual Explanations
Machine learningExplainable AI

Counterfactual Explanations

Also known as: Algorithmic Recourse, Contrastive Explanations, What-If Explanations, Karşıolgusal Açıklamalar

Counterfactual explanations, introduced by Wachter, Mittelstadt, and Russell in 2017, answer the question: 'What is the smallest change to the input that would have produced a different model output?' Rather than explaining why a model made a decision, they describe what would need to change for that decision to be reversed, making them particularly valuable for high-stakes applications such as credit scoring, medical diagnosis, and hiring decisions under frameworks like the EU GDPR.

ScholarGate
  1. Machine learning
  2. v1
  3. 1 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

Counterfactual Explanations
LIMELogistic Regression

When to use it

Use counterfactual explanations when stakeholders need actionable, individual-level explanations for automated decisions—especially in regulated domains (credit, insurance, medicine, hiring) where subjects have a right to explanation. The method is model-agnostic and requires only black-box query access, though gradient-based variants need a differentiable model. Avoid using this method as a primary auditing tool for detecting global model bias; for that, prefer global methods such as SHAP or partial dependence plots. Also consider that multiple valid counterfactuals may exist and the choice among them requires explicit criteria.

Strengths & limitations

Strengths
  • Model-agnostic: works with any classifier or regressor that can be queried
  • Actionable and human-interpretable: directly tells users what to change to obtain a different outcome
  • Legally relevant: aligns with GDPR Article 22 right-to-explanation requirements for automated decisions
  • No need to expose model internals, preserving intellectual property and privacy
Limitations
  • May produce counterfactuals with unrealistic or immutable feature combinations (e.g., changing age or race)
  • Multiple counterfactuals can exist with no principled way to choose among them without additional criteria
  • Proximity alone does not guarantee feasibility or causally valid recourse for the affected individual
  • Gradient-based search is limited to differentiable models; black-box search can be computationally expensive

Frequently asked

Do counterfactual explanations reveal the model's internal parameters?

No. The method requires only query access to the model's predictions, not its weights or architecture. This makes it safe to deploy when the model is proprietary, and it remains applicable to any black-box system. However, repeated queries can, in theory, be used to reconstruct approximate model behavior, so deployment contexts should consider query-rate controls.

How is a counterfactual different from a sensitivity analysis or LIME explanation?

Sensitivity analysis and LIME explain how the model's output changes as inputs vary locally, providing feature importance scores. Counterfactual explanations instead identify a specific alternative input that achieves a particular target outcome. The counterfactual is prescriptive and contrastive ('change these features to get this result'), whereas LIME is descriptive ('these features were most influential for this prediction').

What does 'actionable' mean for a counterfactual, and why does it matter?

An actionable counterfactual suggests changes to features that the individual can realistically alter, such as income, savings, or debt, rather than immutable attributes such as age or nationality. Actionability matters because the primary value of counterfactual explanations is to provide recourse. If the suggested changes are impossible, the explanation is technically valid but practically useless and may even cause harm by raising false hope or implying that protected attributes influenced the decision.

Sources

  1. Wachter, S., Mittelstadt, B., & Russell, C. (2017). Counterfactual explanations without opening the black box: Automated decisions and the GDPR. Harvard Journal of Law & Technology, 31, 841–887. link ↗

How to cite this page

ScholarGate. (2026, June 2). Counterfactual Explanations. ScholarGate. https://scholargate.app/en/machine-learning/counterfactual-explanations

Related methods

LIMELogistic Regression

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • LIMEMachine learning↔ compare
  • Logistic RegressionResearch Statistics↔ compare
Compare side by side →

Referenced by

LIME

Similar methods

LIMEExplainable K-Nearest NeighborsExplainable GANExplainable Reinforcement LearningExplainable XGBoostExplainable Image ClassificationExplainable Sentiment AnalysisExplainable Variational Autoencoder

Related reference concepts

Counterfactual ReasoningSensitivity AnalysisAlgorithmic Fairness and BiasCausal InferenceCounterfactuals and CausationHyperparameter Optimization

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — Counterfactual Explanations (Counterfactual Explanations). Retrieved 2026-07-21 from https://scholargate.app/en/machine-learning/counterfactual-explanations · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
Sandra Wachter, Brent Mittelstadt & Chris Russell
Year
2017
Type
Post-hoc, model-agnostic explanation
Subfamily
Explainable AI
Scope
Individual prediction (local explanation)
Output
Minimal feature change to flip model decision
Related methods
LIMELogistic Regression
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account