MAnchors: Memorization-Based Acceleration of Anchors via Rule Reuse and Transformation

MAnchors: Memorization-Based Acceleration of Anchors via Rule Reuse and Transformation
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

Anchors is a popular local model-agnostic explanation technique whose applicability is limited by its computational inefficiency. To address this limitation, we propose a memorization-based framework that accelerates Anchors while preserving explanation fidelity and interpretability. Our approach leverages the iterative nature of Anchors’ algorithm which gradually refines an explanation until it is precise enough for a given input by storing and reusing intermediate results obtained during prior explanations. Specifically, we maintain a memory of low-precision, high-coverage rules and introduce a rule transformation framework to adapt them to new inputs: the horizontal transformation adapts a pre-trained explanation to the current input by replacing features, and the vertical transformation refines the general explanation until it is precise enough for the input. We evaluate our method across tabular, text, and image datasets, demonstrating that it significantly reduces explanation generation time while maintaining fidelity and interpretability, thereby enabling the practical adoption of Anchors in time-sensitive applications.


💡 Research Summary

**
The paper tackles the well‑known computational bottleneck of the Anchors algorithm, a popular model‑agnostic local explanation method that produces rule‑based “anchors” describing sufficient conditions for a model’s prediction. Anchors works by iteratively sampling perturbed versions of a target instance, estimating the precision (the probability that the model’s prediction stays the same for inputs satisfying a rule) and coverage (the proportion of perturbed inputs that satisfy the rule), and progressively adding predicates until a rule meets a user‑specified precision threshold τ with high confidence δ while maximizing coverage. This iterative sampling is expensive, especially for high‑dimensional data such as text, images, or large language models (LLMs), where generating a single explanation can take minutes or even hours.

Key Insight and Contributions
The authors observe that most of Anchors’ runtime is spent on sampling, and that the algorithm naturally produces intermediate, low‑precision but high‑coverage rules during its refinement process. These intermediate rules already capture useful, coarse‑grained information about the model’s local behavior. Leveraging this, they propose MAnchors, a memorization‑based acceleration framework that stores such intermediate rules in a memory bank and reuses them for new inputs through two transformation operations:

  1. Horizontal Transformation (HT) – adapts a cached rule to a new instance by substituting each predicate with the most similar feature in the new input. Similarity is measured in the perturbation space: absolute difference for tabular features, semantic distance in a fine‑tuned BERT space for words, and embedding distance between super‑pixel vectors for images.

  2. Vertical Transformation (VT) – refines the horizontally‑adapted, still‑coarse rule into a high‑precision anchor. VT mimics the original Anchors refinement: it iteratively adds new predicates, evaluates precision using a small number of additional samples, and stops once the precision threshold τ is satisfied. The final rule is then selected as the one with maximal coverage among those meeting the precision requirement.

Algorithmic Flow
When an explanation request arrives, the system first embeds the input using the same perturbation model that Anchors employs and performs a nearest‑neighbor search in the memory bank. If the similarity to the closest stored instance exceeds a configurable threshold τ_sim, a memory hit occurs; otherwise, a memory miss triggers the standard Anchors routine. In the miss case, the algorithm runs Anchors to obtain both the final anchor r and an intermediate rule r_mid (the first rule that reaches a lower precision threshold τ_mid). The pair (input, r_mid) is then cached. In the hit case, HT maps r_mid onto the new input, producing a provisional rule r₁. VT then refines r₁ until the desired precision τ is achieved, after which the rule with the highest coverage is returned.

Complexity and Empirical Results
HT and VT are linear in the number of features and require only a handful of additional perturbation samples, making their overhead negligible compared to the full sampling phase of Anchors. Across a suite of benchmarks—tabular datasets (Adult, Credit), text sentiment datasets (SST‑2, IMDB), and image classification (CIFAR‑10, ImageNet subsets)—MAnchors achieves:

  • Speed‑up ranging from 5× to 9× (average ≈ 6.5×).
  • Sample reduction of about 87 % relative to vanilla Anchors.
  • Fidelity: precision differences below 0.02 and coverage comparable to the original method. Human evaluations on interpretability showed no statistically significant degradation.
  • LLM case study: Explaining Llama‑2 (7 B) predictions on a set of prompts yields an 8.74× speed‑up while preserving a precision of ≥ 0.95.

Memory size experiments (10 k, 50 k, 100 k stored rules) demonstrate that hit rates increase with memory but plateau once the space adequately covers the data manifold; storage overhead remains modest (≈ 5‑10 % of the raw dataset size) because only low‑precision rules are cached.

Limitations and Future Directions
The approach relies on a similarity metric that must be tailored to each modality; poor metric choice can reduce hit rates. Extremely rare inputs still trigger full Anchors runs, so the method does not eliminate worst‑case latency. The paper does not explore sophisticated memory management (e.g., eviction policies, compression) or online adaptation of the similarity function. Future work could integrate meta‑learning to predict useful intermediate rules for unseen regions, investigate multi‑model sharing of cached rules, and extend the framework to support batch explanation requests with shared memory queries.

Conclusion
MAnchors introduces a practical, theoretically grounded acceleration technique for Anchors by exploiting its iterative nature and reusing intermediate explanations through horizontal and vertical transformations. The method delivers substantial runtime gains across diverse data modalities while maintaining the interpretability and precision guarantees that make Anchors valuable for high‑stakes domains such as healthcare, finance, and AI safety. This work paves the way for deploying faithful, local explanations in real‑time or large‑scale AI systems where computational budget is a critical constraint.


Comments & Academic Discussion

Loading comments...

Leave a Comment