Understand
Example-Based Explanation
What similar cases influenced this result?
Explains a result by comparing it to cases the user can recognise, building intuition through analogy rather than abstraction.
- Evidence: research-based (Aamodt & Plaza 1994, Molnar 2022)
- Tested: concept only, mock data
Overview
Why it matters
People understand by comparison, not by weights.
Factor lists and probabilities are hard work for most people. "Your application resembles cases where income stability was the main issue" often means more than a chart of feature weights.
Lawyers reason by precedent, doctors by comparison, and everyone asks "has this happened before?" This pattern uses that habit to make a complex decision feel understandable.
What does it look like?
Understanding a declined application
Understanding a declined application
- User sees their declined decision.
- Below the attribution section, a "Similar cases" section shows 3 anonymized case cards.
- Each card shows: key matching attributes, outcome, and a one-sentence similarity note.
- One card is a "near-miss" case that was approved: showing what was different.
- User understands their outcome in context of a recognizable pattern.
Expert review
Expert review
- Clinician reviews an AI-assisted diagnosis recommendation.
- "Similar patients" panel shows 5 historical cases with matching symptoms and test results.
- Clinician can view the full treatment path and outcome for each case.
- Clinician uses the precedent cases to validate or challenge the AI recommendation.
Population context
Population context
- User asks "Is my situation unusual?"
- System shows: "Of 240 similar cases in the past 12 months, 78% received the same recommendation."
- User understands their outcome is typical for their profile, not an anomaly.
When does it fit?
Use it when
- The decision space has recurring patterns people recognize
- Experts benefit from precedent, as in clinical, legal or risk work
- Showing past cases is legally and privacy-wise possible
Skip it when
- Past cases can't be anonymized properly
- Cases are too unique for meaningful comparison
- The model isn't case-based and the comparison would mislead
Design
How do I apply it?
-
Explain why a case is similar.
"Similar" means nothing without saying in what way.
-
Show variety, not just the closest match.
Two or three cases with different outcomes give a more honest picture.
-
Prefer real cases, anonymized.
Real cases are more credible. Say clearly that they've been anonymized.
-
Don't let examples replace explanation.
Three similar declines can feel like fate. Pair with Actionable Recourse.
-
Say what the comparison is based on.
All attributes, a subset, or one focus area.
For your technical team
If the model isn't case-based internally (for example nearest neighbours), similar-case explanations are a post-hoc approximation and can mislead. Prototype and criticism pairs from interpretable machine learning show both a typical case and a hard-to-classify one.
How can I show it?
Cases like yours narrative
One sentence on how cases like this usually go.
A short plain-language description: "Applications with similar income levels and employment gaps are typically referred for manual review." Translates the comparison into a readable statement rather than a visual.
Outcome distribution summary
"Of 84 similar cases, 61 were approved."
Instead of individual cases, a summary view: "Of 84 similar applications, 61 were approved, 23 were declined." Gives a population-level sense of how cases like this typically resolve.
Similarity score or label
How similar the example really is.
A signal showing how similar the example case is: "very similar" or "moderately similar", so users can calibrate how much weight to give the comparison.
Similar case cards
Two to four comparable cases with their outcomes.
Cards showing 2–4 comparable cases with the key attributes that make them similar, the decision outcome, and a brief explanation of relevance. Anonymized where needed.
Side-by-side comparison
This case and a similar one, differences visible.
A two-column layout placing the current case alongside a similar one. Key matching attributes are highlighted; differences are also visible, not hidden.
Counterfactual case
A case alike in all but one factor, with a different outcome.
A specific example showing a case that is similar except for one key factor, and had a different outcome. This is a bridge between Example-Based Explanation and Counterfactual Explanation: "Here's a case nearly identical to yours that was approved: the main difference was verified income documentation."
Prototype and criticism pair
A typical case next to an unusual one.
A two-example format drawn from interpretable machine learning: a prototype is a representative case that shows what a typical outcome of this type looks like; a criticism is a case that is unusual or hard to classify: one that the prototype does not fully explain. Showing both together gives users a richer sense of the decision space than any single comparison. Useful for professional audiences (clinicians, analysts) who reason by analogy and benefit from understanding both the rule and its exceptions.
Further left for lay readers, further right for experts reviewing precedent.
What does it cost?
Explanation vs. privacy
Real cases convince, but raise data protection questions. Decide: anonymize, aggregate or synthesize.
Similarity vs. misleading analogy
Two cases can look alike and differ where it matters. Show differences, not just matches.
Intuition vs. false precedent
Past outcomes don't guarantee future ones. Say so.
Connections
Which patterns work with it?
Attribution
Why did the system make this decision?
Attribution explains factors within a case. Example-based explanation explains the decision by reference to other cases. They answer the same underlying question through different cognitive approaches.
Counterfactual Explanation
What would have changed the outcome?
The "near-miss" variant of example-based explanation is functionally a counterfactual. The two patterns overlap and can be combined.
Actionable Recourse
What can I do to change this outcome?
Showing a case that was approved due to one different factor creates a natural bridge to recourse: "here's what that person had that you could also provide."
Role-Based Explanations
Is this explanation appropriate for me?
Expert users (clinicians, analysts) benefit from richer case detail; lay users benefit from summary comparisons. The same underlying case data can be presented at different depths by role.
Sources (3)
Sources (3)
Lipton (2018) — The Mythos of Model Interpretability
argues that interpretability is not a single property and that different users need different forms of explanation. Example-based approaches are identified as naturally aligned with how domain experts (clinicians, lawyers) already reason
Aamodt & Plaza (1994) — Case-Based Reasoning: Foundational Issues, Methodological Variations, and System Approaches
foundational paper establishing case-based reasoning as a cognitive model and AI methodology. The pattern draws on this tradition: humans solve new problems by retrieving and adapting solutions from similar past cases, a process CBR formalizes. Published in AI Communications, 7(1), pp. 39–59
Molnar (2022) — Interpretable Machine Learning
comprehensive reference covering example-based methods including influential instances, prototypes, and counterfactuals. Provides the technical context for the UI decisions in this pattern
Your users have no statistics background, and your explanations assume they do.
Especially in health, benefits and legal settings, comparison is how people reason. That's where this pattern starts. Let's look at your interface together.
Work with me