ResearchPod Summary
Large language models (LLMs) often retrieve information from long contexts by synthesizing answers from the meaning of a passage rather than performing literal copy-pasting. Existing methods for identifying these retrieval heads rely on attention-based heuristics, which reward heads that attend to tokens matching the generated answer. This approach fails for non-literal retrieval, where a head might attend to a semantically relevant phrase but write an answer-aligned update through its output-value (OV) circuit that does not lexically match the answer.
To address this, the authors introduce Logit-Contribution Scoring (LOCOS). LOCOS is a write-aware detector that scores each attention head by projecting its OV-circuit output onto the unembedding vector of the correct answer. By contrasting the logit contribution from needle positions against off-needle positions within a single forward pass, LOCOS identifies heads that specifically contribute to the answer, regardless of whether they perform literal copying.
Across six model configurations (Qwen3, Gemma-3, and OLMo-3.1), LOCOS consistently identifies a sparse set of retrieval-specific heads. Mean-ablating the top-ranked LOCOS heads leads to a steeper degradation in ROUGE-L on the NoLiMa non-literal retrieval benchmark compared to all attention-based baselines. For instance, in Qwen3-8B, ablating 50 LOCOS heads reduces ROUGE-L from 0.401 to 0.000, whereas the strongest baseline retains 0.292. Crucially, these heads are retrieval-specific; ablating them does not degrade parametric factual recall or arithmetic reasoning, confirming that LOCOS isolates retrieval circuitry rather than generically important model components.
This work provides a more faithful mechanistic account of long-context retrieval in LLMs. By moving beyond attention-based observables, LOCOS enables researchers to map the specific circuits responsible for synthesizing information from long contexts. This has significant implications for model interpretability and downstream optimizations, such as more efficient KV cache compression, where identifying the truly causal heads allows for more aggressive pruning without sacrificing factual accuracy.
Alex: Welcome to another episode of ResearchPod. Today, we're looking at a paper about how large language models find information in long documents.
Sam: We're discussing a method called Logit-Contribution Scoring, or LOCOS. The central puzzle is this: while researchers thought they understood how these models "look" for answers, they'd been ignoring what the models actually write.
Alex: So this paper is asking whether we've been looking at the wrong part of the model's brain?
Sam: Exactly. The standard approach identifies important components by seeing where the model "reads." But this study argues that reading isn't the same as producing an answer.
Alex: Okay, so if I'm reading a book, I might glance at a page, but that doesn't mean I'm writing down a useful summary. Is that the distinction?
Sam: That's it. Think of it this way: inside a language model, there are many small processing units called attention heads. Each one has two jobs. The first job is deciding where to look in the text — scanning for relevant words, like your eyes moving across a page. The second job is deciding what to do with what it found — actually writing something useful into the model's internal workspace. Most existing methods only track the first job. LOCOS tracks both.
Alex: And if we only track where it looks, we miss the heads that are actually synthesizing information into an answer?
Sam: Precisely. Existing methods assume that if a model looks at a word, it must be copying that word into its answer. But for complex questions, it reasons. It might look at "Eiffel Tower" but write "France" into its internal state — because it understood the connection, rather than just copying the text.
Alex: So if we only look for the "copy-pasters," we're completely blind to the "synthesizers." How does LOCOS actually see those other heads?
Sam: LOCOS asks a direct question about each head: does this head's output actually push the model toward the correct answer? It does this by comparing what the head writes against the direction of the right answer in the model's internal space. If a head's contribution lines up with the correct answer, it gets a high score.
AI-generated third-party summary by ResearchPod. Not official content or an endorsement by the paper authors or affiliated organizations.
Alex: But what if a head just happens to write something that accidentally points toward the right answer? Doesn't that risk giving credit where it isn't due?
Sam: That's where spatial contrast comes in. The researchers don't just look at the score in isolation — they compare it against the background noise from the rest of the text. If a head only scores highly when it's focused on the relevant piece of information, and not otherwise, that's strong evidence it's doing genuine retrieval work. It's like checking whether a librarian actually handed you the right book, rather than just noticing they were standing near the right shelf.
Alex: And when they tested this — when they removed the heads LOCOS identified as important — what happened?
Sam: The model's ability to answer questions collapsed much faster than when they used older methods to select which heads to remove. That's the key validation. It shows LOCOS is finding the heads that genuinely matter, not just the ones that look busy.
Alex: Did removing those heads affect anything else, like basic arithmetic or general knowledge?
Sam: The effect was specific to retrieval. The model's ability to do arithmetic or recall facts it already knew stayed intact. That specificity is meaningful — it suggests LOCOS is isolating a distinct piece of machinery, not just disrupting the model broadly.
Alex: You mentioned a benchmark called NoLiMa. What makes that test particularly useful here?
Sam: NoLiMa is designed to test exactly the cases where copy-pasting fails. The answer to a question doesn't share any words with the relevant part of the source text — so the model genuinely has to reason rather than pattern-match. Older methods that rely on token-matching struggle badly on these tasks. LOCOS, because it tracks what the model writes rather than just where it looks, successfully identifies the heads doing that underlying reasoning.
Alex: So the older tools were essentially blind to an entire category of thinking the model was doing.
Sam: That's a fair way to put it. And the practical implications go beyond just understanding the model better. If you can precisely identify which components handle retrieval, you can start to optimize how models use memory, or improve how you diagnose failures — figuring out why a model got something wrong, rather than just observing that it did.
Alex: That shift from observation to diagnosis feels like it matters quite a bit for building more reliable systems.
Sam: It does. There's a meaningful difference between knowing a model gave a wrong answer and knowing which part of its reasoning broke down. LOCOS is a step toward that second kind of understanding — and that's what makes it worth paying attention to.
Alex: Thanks for listening to ResearchPod.