NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Logit-Contribution Scoring Identifies Non-Literal Retrieval Heads

Aryo Gema, Beatrice Alex, Pasquale Minervini

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: LLM Reasoning, Memory & RAG › Masked Diffusion Generation · Type: new method · Keywords: non-literal retrieval, attention head detection, language model interpretability, long-context QA, write-aware scoring

Areas: LLM Reasoning › Efficient Reasoning › Sparse Attention; Long Context › Long-context mechanisms › Long-context attention mechanisms; Evaluation & Benchmarks › Model Capability Diagnostics › Language Model Reliability

Summary

Logit-Contribution Scoring (LOCOS) is a write-aware detector that identifies attention heads responsible for non-literal retrieval in long-context language models.

Explained to a 5-year-old

When we ask a big computer brain a question, it sometimes makes up an answer by thinking about what the story means, not just copying words. This is called non-literal retrieval. To understand how it does this, we need to find the special parts of the brain that do the thinking. Existing ways only look at parts that copy words, so they miss the thinking parts. We came up with a new method that looks at how the brain writes its answer, not just what it reads. This helps us see how the brain works better.

Explained to a 5-year-old, longer

When we ask a big computer brain a question, it sometimes makes up an answer by thinking about what the story means, not just copying words. This is called non-literal retrieval. To understand how it does this, we need to find the special parts of the brain that do the thinking. Existing ways only look at parts that copy words, so they miss the thinking parts. We came up with a new method that looks at how the brain writes its answer, not just what it reads. It measures the contribution of each part to the answer’s direction. By comparing answers that come from the right place and from the wrong place, we can rank the parts. The most important parts are then removed to see how much the answer gets worse. Removing just a few of these parts can make the answer disappear completely. The parts we found are specific to answering, not to other skills like remembering facts or doing math. This gives us a clearer picture of how the brain understands and answers questions.

For a technical reader

The paper addresses the problem that language models often answer by understanding context rather than copying text, and current detectors only capture copying. It proposes a write-aware scoring technique that evaluates each attention head’s contribution to the answer by projecting its output onto the answer token’s embedding direction. This scoring contrasts heads that retrieve from the correct context with those that retrieve from irrelevant context in a single forward pass. Ablation experiments show that removing the top-scoring heads dramatically reduces performance on a non-literal retrieval benchmark, while leaving other capabilities intact. The approach provides a more accurate way to locate the heads responsible for synthesis in long-context models.

Problem

Large language models often answer by synthesizing meaning rather than copying text, and existing detectors only capture literal copying, missing the heads that actually write the answer.

Method

The approach scores each attention head by projecting its output-value circuit output onto the answer token’s unembedding direction, contrasting needle and off-needle source positions in a single forward pass.

Results

Mean-ablating the top heads identified by the approach collapses ROUGE-L at lower head counts than baselines; on Qwen3-8B, ablating 50 heads drops ROUGE-L from 0.401 to 0.000 while the best baseline remains at 0.292.

Contributions

A write-aware detection method that identifies non-literal retrieval heads and a systematic evaluation across multiple model families showing superior performance and head specificity.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction