Description

ANCHOR explains one prediction of a black-box classifier with an if-then rule, called an anchor, such as 'age > 30 AND income < £50k'. An anchor names a small set of feature conditions under which the model keeps giving the same prediction, whatever the other features are. To find one, the method fixes the conditions, varies the other features by sampling, asks the model for a prediction each time, and searches for the broadest rule that holds in at least a chosen share of the samples, commonly 95%. Each anchor comes with its estimated precision and its coverage, the share of cases to which it applies. Both figures describe the model's behaviour on the sampled variations, not on real cases, and continuous features are first grouped into ranges.

Example Use Cases

Explainability

A model-validation team at a lender computes anchors for a sample of declined applications from a gradient-boosted credit model. It checks that the conditions holding each decision, such as a low credit-score band together with recent missed payments, match credit policy, and reads each rule's coverage to see how many other applications it applies to.

A hospital data team explains individual alerts from a tabular sepsis-risk model with anchors, and a clinician checks whether the conditions in each rule, such as raised temperature and white-cell count, are clinically sensible or point to an artefact such as the ward an admission came from.

Transparency

An employer's compliance team gives a reviewer the anchor behind a shortlisting prediction, with its precision and coverage. The reviewer tests the rule on other applications and can challenge it if it leans on an attribute that should not matter, such as age.

Limitations

  • The stated precision is measured on perturbed samples from a chosen sampling distribution, not on real cases. If that distribution produces unrealistic inputs, or is skewed by an unbalanced training set, the figure can overstate how far the rule can be relied on.
  • An anchor covers only the inputs its conditions match, often a small share. In the original experiments average coverage ranged from about 1% to 29% on tabular data, so one anchor says little about the model as a whole. Choosing a set of anchors helps but adds effort.
  • Predictions close to the model's decision boundary, or of rare classes, need long, very specific rules with little coverage, which add little insight. Strict precision thresholds make this more likely.
  • Continuous features must be grouped into ranges before rules can be stated, and the grouping changes which anchors are found. Too coarse hides boundaries, and too fine gives narrow rules with little coverage.
  • Each anchor needs many queries to the model, so run time depends on how fast the model is and on the number of features. The method is built for classifiers, so a numeric output must first be turned into classes.

Resources

Research Papers

Anchors: High-Precision Model-Agnostic Explanations
Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin•Jan 1, 2018

We introduce a novel model-agnostic system that explains the behavior of complex models with high-precision rules called anchors, representing local, "sufficient" conditions for predictions. We propose an algorithm to efficiently compute these explanations for any black-box model with high-probability guarantees. We demonstrate the flexibility of anchors by explaining a myriad of different models for different domains and tasks. In a user study, we show that anchors enable users to predict how a model would behave on unseen instances with less effort and higher precision, as compared to existing linear explanations or no explanations.

Software Packages

anchor
Feb 2, 2018

Code for "High-Precision Model-Agnostic Explanations" paper

alibi
Feb 26, 2019

Algorithms for explaining machine learning models

Tutorials

Interpretable Machine Learning - Anchors
Jan 1, 2019
Anchors examples — Alibi Explain documentation
Sep 23, 2025

Documentations

Anchors — Alibi Explain documentation
Jul 8, 2024

Tags

Explainability Dimensions

Surrogate Models:
Explanatory Scope:

Transparency Dimensions

Other Categories

Applicable Models:
Data Requirements:
Data Type:
Evidence Type:
Expertise Needed:
Technique Type: