Case-Based Reasoning (CBR)

Decision Sciences
Introduced by
Janet Kolodner; Agnar Aamodt & Enric Plaza (R4 cycle)
Year
1994
Type
Experience-based (analogical) problem solving
Family
Case-based reasoning

What does it do?

Case-based reasoning (CBR) solves a new problem by retrieving similar problems solved in the past and adapting their solutions, rather than deriving an answer from first principles or from a fitted statistical model.

Aamodt and Plaza (1994) set out the Retrieve-Reuse-Revise-Retain cycle in a review of the field's foundational issues, methodological variations and system approaches, building on Janet Kolodner's 1992 introduction. The method learns by storing each newly solved case in its case base.

The intuition behind the method

A doctor faced with a difficult patient does not re-derive medicine from scratch; she recalls similar patients and what worked for them, then adjusts for this patient's differences. CBR encodes exactly this: it keeps a library of past cases (problem plus its solution), finds the most similar past case to the new problem, reuses that solution with adaptations, checks whether it worked, and files the new experience away for next time. Knowledge is therefore concrete and example-based, not a set of abstract rules, which makes CBR natural for domains where experience matters more than theory.

History

Janet Kolodner's 1992 introduction to case-based reasoning in Artificial Intelligence Review is one of the early key references for the field. Aamodt and Plaza's 1994 paper set out the Retrieve-Reuse-Revise-Retain cycle, which is the description of the method used on this page. CBR is closely related to nearest-neighbour and instance-based learning, as the related methods listed here indicate.

When to use it

Choose CBR when past cases with recorded solutions exist and can plausibly be reused for new problems, when the domain is hard to express as explicit rules or a parametric model, and when a recommendation should be justified by a concrete precedent. Typical domains include medical diagnosis, legal precedent, help-desk support, design and configuration. It suits data that accumulate case by case, because each solved case is usable as soon as it is retained. CBR rests on several assumptions: similar problems have similar solutions; the case base is representative of the problems that will be met; the features in the similarity measure are those that determine the solution; and the environment does not change so much that old cases become invalid. Avoid CBR when no meaningful similarity measure can be defined over the problem features, when adaptation is needed but no procedure for it exists, or when the case base is sparse or biased. For large, smooth numerical datasets, a statistical learner may generalise better.

Limitations and considerations

  • Output quality depends on the similarity measure and the adaptation knowledge, both of which can be difficult to engineer.
  • A biased or sparse case base produces poor or skewed recommendations, because retrieval can only return cases that exist.
  • Retrieval cost grows with the size of the case base unless the case base is indexed.
  • On large, smooth numerical datasets, CBR may generalise worse than statistical models.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Learns incrementally by retaining solved cases, so no batch retraining is required.
  • Recommendations can be explained by pointing to the specific analogous case they were drawn from.
  • Applies in domains where knowledge is held as experience and resists explicit rules or parametric models.
  • The case base can grow and change as new cases are solved and confirmed.

Applications

  • Medical diagnosis and treatment recommendation from similar past patients.
  • Legal reasoning and precedent retrieval.
  • Technical support, help desks, and fault diagnosis.
  • Engineering design and product configuration by analogy.
  • Recommendation and planning where past solutions can be adapted.

How it works

How it works

1

Given a new problem (the query), find the stored case that is most similar to it, using a similarity measure over the problem's features. The measure is chosen by the designer rather than fixed by CBR; a common choice is a weighted combination of per-feature similarities, or a weighted distance as in nearest-neighbour methods. Indexing may be used to speed up the search. The retrieved case carries a solution that worked in an analogous situation.

Formula
c^* = \arg\max_{c \in \text{CaseBase}} \ \text{sim}(q, c)
2

Adapt the retrieved solution to fit the new problem. Adaptation can range from none (copying the solution as it is), to substituting parameter values, to transformations guided by domain rules. This step turns a past solution into a candidate solution for the current problem.

Formula
\hat{s} = \text{adapt}\big(\text{solution}(c^*),\ q\big)
3

Evaluate the candidate solution by simulation, expert review or observed outcome, and repair it if it fails. Revision addresses the fact that the retrieved case was only similar to the new problem, not identical to it.

Formula
s = \text{repair}(\hat{s})\ \text{after evaluating outcome}
4

Store the new problem together with its confirmed solution back into the case base, so that later retrievals can draw on it. This retention is the learning step: the case base grows as problems are solved, with no separate training phase. Only confirmed solutions should be retained, since an unverified solution stored in the case base would be reused in future reasoning.

Formula
\text{CaseBase} \leftarrow \text{CaseBase} \cup \{(q, s)\}

Common pitfalls

  • Treating retrieval of the nearest case as the whole method and omitting adaptation and revision.
  • Using an unweighted similarity measure that gives the same importance to features that do not determine the solution.
  • Letting the case base grow without maintenance, so that redundant or obsolete cases accumulate.
  • Retaining solutions that have not been verified, which carries errors into future reasoning.

Frequently asked questions

How is CBR different from k-nearest neighbours?

Nearest-neighbour classification stops at retrieval: it predicts from the most similar stored instances. CBR also adapts the retrieved solution to the new problem (reuse), evaluates and repairs it (revise), and stores the confirmed result (retain). In that sense, kNN resembles only the retrieval step of CBR, without adaptation, revision or retention of new cases.

Does CBR need a training phase?

No. CBR has no separate training step; it reasons directly from stored cases and learns by retaining each newly solved case. This suits domains where knowledge accrues incrementally and where retraining a model after each new case would be impractical.

What makes a good similarity measure for CBR?

A good measure reflects which problem features actually determine the right solution. It is usually a weighted combination of feature distances, with weights set from domain knowledge or learned from data. An unweighted measure can rank cases as similar on features that do not matter for the solution, which leads to poor retrievals.

Related methods

Sources

  1. Aamodt, A., & Plaza, E. (1994). Case-based reasoning: Foundational issues, methodological variations, and system approaches. AI Communications, 7(1), 39–59.

    Open DOI reference
  2. Kolodner, J. L. (1992). An introduction to case-based reasoning. Artificial Intelligence Review, 6(1), 3–34.

    Open DOI reference