NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Optimal ablation for interpretability

Maximilian Li, Lucas Janson

TL;DR

Researchers have developed Optimal Ablation (OA), a principled method for measuring the importance of neural network components by replacing them with a constant that minimizes task loss. Unlike traditional methods like "zeroing out" neurons, OA isolates the actual loss of information from the "noise" of broken internal logic, leading to much more precise circuit discovery and factual localization in models like GPT-2.

What Problem Does This Paper Address?

To understand how a Large Language Model (LLM) "thinks," researchers often use activation patching (or ablation). If you want to know if a specific attention head is responsible for grammar, you "turn it off" and see if the model breaks.

However, "turning it off" is harder than it sounds. Standard techniques—like replacing an activation with zero, its mean value, or random noise—often suffer from spoofing. Spoofing happens when the replacement value is so far outside the model's normal experience that it essentially "shocks" the downstream layers, causing a performance drop that has nothing to do with the missing information. This makes it difficult to tell if a component is truly important or if we just broke the model's internal plumbing.

Methods

The authors propose Optimal Ablation (OA). Instead of choosing a heuristic value like zero, they use optimization (Stochastic Gradient Descent) to find a specific constant value ($a^*$) for each component. This constant is chosen to minimize the model's loss on a specific subtask.

The logic is elegant: if a model can still perform well when a component is replaced by a constant, then that component wasn't providing unique, input-specific information. OA represents the "best-case scenario" for the model after losing that part.

Beyond the core OA method, the paper introduces:

  • Uniform Gradient Sampling (UGS): A new search algorithm to find "circuits" (sparse subsets of the model) that are sufficient for a task.
  • Optimal Constant Attention (OCA) Lens: A way to predict a model's final output using only intermediate layers by ablating all subsequent attention layers optimally.

Datasets

The researchers evaluated their methods on several classic interpretability benchmarks:

  • Indirect Object Identification (IOI): A task where the model must complete sentences like "Alice and Bob went to the store, Alice gave the bag to..." (Answer: Bob).
  • Greater-Than: Completing number sequences based on context (e.g., "The conflict started in 1715 and ended in 17__").
  • Factual Recall: A dataset of thousands of facts (e.g., "The Eiffel Tower is located in the city of...") used to test where specific knowledge is stored in GPT-2-XL.
  • Text Classification: 15 different datasets (like DBpedia and MRPC) used to test the "elicitation" of knowledge from internal layers.

Key Insights and Ideas

  • Spoofing is the dominant signal: In many cases, the performance drop seen in "zero ablation" is almost entirely due to spoofing. On the IOI task, the "loss gap" created by OA was only about 11% of the gap created by zero ablation. This suggests that 89% of the "importance" we previously attributed to certain neurons might just have been the model reacting to weird input values.
  • Manual circuits are better than we thought: Human researchers have spent years manually mapping out "circuits" for tasks like IOI. Previous automated tools suggested these manual maps were suboptimal. However, when evaluated with OA, these manual circuits are shown to be nearly perfect for their size, proving that human intuition was right—our measurement tools were just noisy.
  • Granularity matters in factual recall: Previous methods for locating facts (like Causal Tracing) used Gaussian noise, which produced "blurry" results across many layers. OA-based tracing (OAT) shows that facts are often localized to very specific, sharp peaks in the model, allowing for much more precise "brain surgery" on LLMs.

Key Results

  • Circuit Discovery: Using UGS with OA, the authors found circuits that were 52% smaller than those found by previous state-of-the-art methods (like ACDC) while maintaining the same level of performance.
  • Latent Prediction: Their OCA lens outperformed the popular "tuned lens" method. It achieved significantly lower predictive loss and showed higher "causal faithfulness," meaning the lens actually captures how the model uses information, rather than just finding accidental correlations.
  • Elicitation Boost: On the DBpedia dataset, the OCA lens increased the accuracy of "extracting" the model's internal knowledge from 2.9% to 18.0% in cases where the model was being intentionally misled by false examples in the prompt.

Limitations and Future Work

  • Computational Cost: Finding the "optimal" constant requires a separate optimization loop (SGD), which is more expensive than simply plugging in zeros or means.
  • Not a Total Cure for Spoofing: While OA minimizes spoofing, it doesn't eliminate it. If every possible value for a component conveys some weird signal to the rest of the model, the "best" constant will still be slightly "spoofy."
  • Scaling: While tested on GPT-2 variants, the authors note that more work is needed to see how these optimization-heavy methods scale to frontier models with hundreds of billions of parameters.
  • Downstream Editing: The paper focuses on locating information; the next step is proving that OA-based localization leads to more effective model editing (e.g., fixing a wrong fact without breaking the rest of the model).

Summary updated

BibTeX
@inproceedings{li2024optimal,
  author = {Maximilian Li and Lucas Janson},
  title = {{Optimal ablation for interpretability}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=opt72TYzwZ},
}
Figure