Skip to content

Understand

Example-Based Explanation

How did similar cases turn out?

Explains a result by comparing it to cases the user can recognise, building intuition through analogy rather than abstraction.

Version 1.3 · Published · Updated

In practice

Coming soon

Overview

Many people find comparisons easier than weights.

Factor lists and probabilities are hard work for most people. “Your application resembles cases where employment records were missing” 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 easier to understand.

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 be presented as the model’s reasoning

Design

How do I apply it?

  1. Say what the comparison is based on.

    Name the attributes used, and leave protected attributes and close proxies out.

  2. Use real cases only if truly anonymized.

    Detailed financial or health cases are hard to anonymize. Otherwise aggregate, or use clearly labeled illustrative cases.

  3. Explain why a case is similar.

    “Similar” means nothing without saying in what way.

  4. Show variety, not just the closest match.

    Two or three cases with different outcomes give a more honest picture.

  5. Don’t let examples replace explanation.

    Three similar declines can feel like fate. Link to the factors behind this case and to Actionable Recourse.

For your technical team

If the model is not case-based (unlike, for example, a nearest-neighbour model), similar cases are found separately from the model’s reasoning and may not reflect what drove this result. Prototype and criticism pairs from interpretable machine learning show both a typical case and a hard-to-classify one.

How can I show it?

Quick to read More detail
  • Inline Signal / Label

    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.

  • Content Block / Narrative

    Cases like yours narrative

    One sentence on how cases like this usually go.

    A short plain-language description: “Applications like this one, with incomplete employment records, were usually approved once the records arrived.” Translates the comparison into a readable statement rather than a visual.

  • Content Block / Summary

    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 resolved in the past. Say that past outcomes reflect past decisions.

  • Content Block / Card Set

    Similar case cards

    Two to four comparable cases with their outcomes.

    Cards showing 2 to 4 comparable cases with the key attributes that make them similar, the outcome, and a brief explanation of relevance. Anonymized, or illustrative and labeled as such.

  • Content Block / Card

    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 close to yours that was approved: the main difference was that employment records were on file.”

  • Data Visualization / Comparison

    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.

  • Content Block / Card Pair

    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 (caseworkers, analysts) who reason by analogy and benefit from understanding both the rule and its exceptions.

Similarity labels go with any of the others.

What are the trade-offs?

  • Explanation vs. privacy

    Real cases convince, but detailed financial or health records are hard to anonymize. A few details can be enough to recognize a person.

    So: aggregate or use labeled illustrative cases unless real cases can be truly anonymized.

  • Similarity vs. misleading analogy

    Two cases can look alike and differ where it matters. A match on visible attributes can hide the factor that drove the outcome.

    So: show the differences as well as the matches.

  • Intuition vs. false precedent

    Past outcomes reflect past decisions, including past bias. A typical outcome does not show that this one is right.

    So: say that past outcomes are context, not a rule.

Connections

Works with other patterns

Sources (3)

Sounds familiar?

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