NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Listening to the Wise Few: Query–Key Alignment Unlocks Latent Correct Answers in Large Language Models

Eduard Tulchinskii, Kristian Kuznetsov, Laida Kushnareva, Anastasia Voznyuk, Andrei Andriiainen, Irina Piontkovskaya, Evgeny Burnaev, Serguei Barannikov

NeurIPS page · OpenReview · Open on the map

Category: LLM Reasoning, Memory & RAG › Masked Diffusion Generation · Type: new method · Keywords: query-key alignment, latent knowledge extraction, attention head analysis, multiple-choice question answering, unsupervised head ranking

Areas: LLM Reasoning › Efficient Reasoning › Sparse Attention; Evaluation & Benchmarks › Model Capability Diagnostics › Language Model Reliability

Summary

The paper introduces the Query-Key (QK) score and an unsupervised HeadScore to reveal latent correct answers in large language models, achieving higher MCQA accuracy than the models' own outputs.

Explained to a 5-year-old

Big computer programs called language models sometimes know the right answer to a question but don't say it. We looked inside the program and found a special way to listen to a few tiny signals that point to the answer. By paying attention to these signals before the program mixes them up with positions, we can figure out which answer is correct. This helps us get better answers than the program does on its own, without needing extra labeled data. Now anyone can use a simple tool to do this listening and get hidden answers from the models.

Explained to a 5-year-old, longer

Big computer brain models called language models are really good at writing text. Sometimes they know the answer to a multiple-choice question but they just pick a random option. Inside these models there are little parts called attention heads that help decide which answer to choose. We discovered that some of these heads line up the question’s request with the answer’s clue in a special way. This lining up works even when we ignore the usual position numbers that the model uses. By looking at this lining up before the model mixes everything together, we can see which answer the model really thinks is correct. This hidden correct answer is often better than the answer the model would normally give. We also created a simple method that can find these helpful heads without needing any extra labeled data. The method works on many different language models, from small ones to huge ones. It gives a big boost in accuracy on tasks like reading comprehension and dialogue. Because the method is easy to run, other people can quickly try it on their own models. This makes it possible to get more useful information from the models we already have.

For a technical reader

The work computes an alignment score between the query of a question and the key of each answer option before rotary positional embedding, identifying heads that select the correct answer via semantic matching. An unsupervised ranking recovers these heads without any labeled validation data, achieving up to 27.4 pp and 49.8 pp gains over the model’s zero-shot performance on HellaSwag and HaluDialogue. Ablating the identified heads collapses MCQA accuracy to near random, confirming their critical role. The authors release a one-line script and per-model head indices for easy reproducibility across many models and benchmarks.

Problem

Large language models often fail to output the correct answer in multiple-choice questions despite having encoded the answer internally. There is a need to reliably extract this latent knowledge without relying on labeled validation data.

Method

The approach computes an alignment score between the query representation of the question and the key representation of each answer option, evaluated before rotary positional embedding, and uses an unsupervised ranking to select the most aligned heads for extracting latent answers.

Results

A single attention head's alignment score exceeds the model's zero-shot accuracy by up to 27.4 pp on HellaSwag and 49.8 pp on HaluDialogue, and ablating the head drops MCQA performance to near random. An unsupervised ranking recovers the top-k heads without any labeled validation data.

Contributions

The paper identifies a universal class of select-and-copy heads that solve MCQA via semantic query-key alignment, independent of label symbols, and shows this requires removing rotary positional embeddings. It also provides an unsupervised head-ranking technique that finds these heads without any labeled validation data.

Practical relevance

The release of a simple, reproducible script enables researchers and practitioners to easily extract latent knowledge from any large language model for improved question answering.

Research questions this paper is counted under

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