Loading patterns…
Contrastive Explanations(CE)
Explain AI decisions by showing what would change the outcome
In 30 seconds
- What
- Shows what input changes would flip an AI decision by finding minimal modifications to cross the decision boundary.
- When to use
- Users need to understand why they were rejected and what concrete actions could change the outcome, especially in high-stakes decisions.
- Watch out
- Counterfactuals may suggest unrealistic or unfair changes, misleading users about what's actually achievable or appropriate to attempt.
Ask the AI expert about this pattern
Opens the assistant with your question prefilled. You review it before sending.
Contrastive Explanations: Overview
Explain AI decisions by showing what would change the outcome
- Counterfactual analysis
- Decision boundary exploration
- Alternative pathway generation
- Minimal change identification
- Feature importance ranking
- Causal relationship mapping
The Agent Architect
One pattern, one tradeoff, one production failure story. A short weekly briefing for people building agentic systems.
Weekly email, one-click unsubscribe. We only use your address to send the briefing.
References
The papers, specifications, and repositories this pattern is based on.
- Explanations based on the Missing: Towards Contrastive Explanations with Pertinent Negatives - Dhurandhar et al. (NeurIPS 2018)arXiv:1802.07623
- Counterfactual Explanations without Opening the Black Box - Wachter et al. (2017)arXiv:1711.00399
- Explanation in Artificial Intelligence: Insights from the Social Sciences - Miller (2017)arXiv:1706.07269
From the engineer behind this catalog
Get your agent architecture reviewed
This page documents one pattern. Your system runs dozens, and most failures live in how they fit together. Have the whole design reviewed against the 288 patterns in this catalog: architecture, reliability, evaluation and cost, every finding mapped to the pattern that fixes it.
€750 instead of €1,500, one week, written report and walkthrough call, until 30 September