An anchor is a model-agnostic, local explanation method that identifies a decision rule with extremely high precision. Formally, an anchor rule A satisfies P(premise | A) ≥ τ, meaning that when the rule's conditions are met, the model's prediction is fixed with a user-specified confidence level τ, regardless of perturbations to non-anchor features. This provides a sufficiency condition for a specific prediction.
Glossary
Anchors

What is Anchors?
Anchors are high-precision, if-then rules that sufficiently 'anchor' a prediction locally, ensuring the decision remains fixed regardless of changes to other feature values.
Unlike LIME, which learns a linear surrogate model, Anchors uses a multi-armed bandit algorithm to efficiently search for the shortest rule with maximal coverage. The resulting IF-THEN rules are intuitive and state that if certain feature conditions hold, the prediction is guaranteed to remain stable. This makes Anchors particularly valuable for high-stakes auditing where understanding the exact boundary conditions of a decision is critical.
Key Features of Anchors
Anchors provide if-then rules that sufficiently 'anchor' a prediction locally, ensuring the decision remains fixed regardless of changes to other feature values.
High-Precision Guarantee
Anchors are designed to maximize precision—the proportion of instances covered by the rule where the prediction holds. Unlike LIME, which optimizes for fidelity, Anchors explicitly guarantee that a rule achieves a user-specified precision threshold (e.g., 95%) with high probability. This is achieved through a PAC (Probably Approximately Correct) learning framework that provides statistical guarantees.
- Precision target: User-defined, typically 90-99%
- Confidence level: Statistical bound on the precision estimate
- Coverage trade-off: Higher precision often reduces the number of instances the rule applies to
If-Then Rule Structure
Anchors generate human-readable logical rules composed of feature predicates. Each rule takes the form: "IF condition A AND condition B THEN prediction Y." These conditions are expressed in natural, domain-relevant terms rather than abstract feature weights.
- Predicate types: Categorical thresholds (e.g.,
age > 30), categorical values (e.g.,education = Masters) - Rule sparsity: Rules typically contain 1-5 conditions for interpretability
- Example: "IF
income > $50KANDcredit_score > 700THENloan_approved = Yes"
Perturbation-Based Construction
Anchors are built using a bottom-up construction algorithm that iteratively adds feature predicates to maximize coverage while maintaining the precision constraint. The algorithm generates synthetic perturbations of the instance being explained and evaluates candidate rules against the model's behavior on these perturbations.
- Multi-armed bandit: Efficiently explores the space of candidate rules using KL-LUCB algorithm
- Perturbation strategy: Samples from a perturbation distribution around the instance
- Beam search: Maintains a beam of candidate rules, expanding the most promising ones
Local Sufficiency Condition
The core principle behind Anchors is local sufficiency: a rule is sufficient if, when the rule conditions are met, changes to other features do not change the prediction. This formalizes the intuition that the identified features are the "anchors" that fix the prediction in place.
- Invariance property: Prediction remains stable under perturbations of non-anchor features
- Neighborhood definition: Defined by the perturbation distribution around the instance
- Contrast with LIME: LIME approximates the decision boundary locally; Anchors identify a region where the prediction is invariant
Coverage Optimization
While precision is the primary constraint, Anchors optimize for coverage—the proportion of instances in the perturbation space that satisfy the rule conditions. Higher coverage means the explanation applies more broadly, making it more useful for understanding model behavior across similar cases.
- Coverage-precision trade-off: Relaxing precision requirements increases achievable coverage
- Global insight: High-coverage anchors reveal systematic model behaviors
- Submodular optimization: Coverage exhibits diminishing returns, guiding efficient rule construction
Model-Agnostic Applicability
Anchors are fully model-agnostic, requiring only query access to the model's prediction function. This makes them applicable to any black-box classifier, including deep neural networks, gradient-boosted trees, and ensemble methods. No gradient information or internal model access is needed.
- Input types: Tabular data, text (via word presence predicates), and images (via superpixel predicates)
- Output types: Works with any classification model producing probability scores
- Limitation: Computational cost scales with the number of model queries required for perturbation evaluation
Frequently Asked Questions
Clear answers to common questions about high-precision rule-based explanations that guarantee locally consistent predictions.
Anchors are high-precision, if-then rules that sufficiently 'anchor' a prediction locally, ensuring the decision remains fixed regardless of changes to other feature values. Introduced by Ribeiro et al. in 2018, an anchor explanation takes the form: 'If condition A holds, then the prediction is B with high probability.' Unlike LIME, which provides linear approximations, anchors guarantee that for any instance satisfying the anchor conditions, the model's prediction will be the same with a specified level of precision (typically ≥95%). This makes them particularly valuable in high-stakes domains like credit scoring or medical diagnosis, where you need to know exactly which feature ranges lock in a decision.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Understanding Anchors requires familiarity with the broader landscape of local explainability, rule-based extraction, and the metrics used to validate high-precision justifications.
Local Interpretable Model Explanations (LIME)
A foundational local explainability technique that approximates a complex model's decision boundary around a specific prediction using an interpretable surrogate model. Unlike Anchors, which generates high-precision if-then rules, LIME focuses on feature importance weights. The key distinction is that LIME's explanations are local linear approximations, while Anchors provide decision rules that guarantee the prediction remains stable when the rule conditions hold, offering stronger formal guarantees for coverage and precision.
Counterfactual Explanations
A method that identifies the minimal changes to an input feature vector required to flip a model's prediction to a desired alternative outcome. While Anchors define the sufficient conditions for a prediction to remain fixed, counterfactuals define the necessary changes to alter it. Together, they form a complete explanatory picture: Anchors tell the user 'why this decision stands,' and counterfactuals tell them 'what to change to get a different result,' which is critical for recourse in automated decision systems.
Faithfulness Metrics
Quantitative measures designed to automatically score how accurately a generated explanation reflects the model's true internal decision process. For Anchors, faithfulness is measured by the precision metric—the fraction of instances covered by the anchor rule where the model's prediction remains consistent. High precision is the defining characteristic of an anchor; a rule with low precision fails to 'anchor' the prediction and is not a valid explanation. This contrasts with plausibility metrics, which measure human acceptance rather than mechanistic fidelity.
Minimal Sufficient Explanations
The principle of providing the shortest possible justification that is still complete enough to justify a model's decision. Anchors directly operationalize this concept by searching for minimal sufficient rules—the smallest set of feature conditions that guarantee a prediction with high probability. The algorithm uses a beam search to balance rule length (complexity) against coverage (generality), ensuring the resulting explanation is both concise and statistically robust. This makes Anchors ideal for high-stakes domains where operators need quick, unambiguous decision rules.
Coverage
A critical metric in the Anchors framework that measures the proportion of instances in a dataset to which an anchor rule applies. While precision ensures the rule is correct when it fires, coverage ensures it is useful across a meaningful subset of the data. The Anchor algorithm explicitly optimizes for coverage subject to a precision constraint, formalized as: maximize coverage(A) subject to precision(A) ≥ τ, where τ is a user-defined precision threshold. This trade-off is central to generating practical, high-impact explanations.
Perturbation-Based Explanations
A class of model-agnostic interpretability methods that probe a black-box model by systematically perturbing input features and observing the resulting prediction changes. Anchors belong to this family, extending the neighborhood sampling approach used by LIME. However, Anchors introduce a multi-armed bandit formulation to efficiently explore the perturbation space and construct rules with formal precision guarantees. This statistical rigor distinguishes Anchors from simpler perturbation methods that lack confidence bounds on their explanations.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us