TL;DR
Evaluating large language models (LLMs) on multiple-choice questions (MCQA) often fails because models struggle with formatting and token biases, not because they lack knowledge. This paper discovers that specific "select-and-copy" attention heads in the middle layers pick the correct answer semantically before later layers corrupt the output. By extracting predictions directly from these heads using raw Query-Key dot products, the authors dramatically boost zero-shot MCQA accuracy and permutation robustness across diverse model scales.
What Problem Does This Paper Address?
Multiple-choice question answering (MCQA) is a standard benchmark paradigm for LLMs (e.g., MMLU). Typically, researchers evaluate models by feeding the question and options, then measuring the next-token probability over option labels (e.g., A, B, C, D).
However, this metric conflates domain knowledge with format compliance. Models—especially smaller, base, or zero-shot models—often suffer from severe surface biases, such as favoring specific letters (e.g., "A" or "D") or being sensitive to option order. Even when the model "knows" the answer, its final output logits may predict the wrong letter. While techniques like few-shot prompting and instruction tuning alleviate this, they introduce their own sample-order and semantic biases.
Methods
The authors conduct a mechanistic interpretability study to extract decisions directly from the model’s internal states:
- Attention as a Select-and-Copy Operation: A causal attention head can act as a lookup table: the query at the prompt's final token attends to keys at preceding option tokens, copying their corresponding value vectors into the output embedding.
- Option-Representative Tokens: Because autoregressive models accumulate semantic meaning as a phrase progresses, the authors use the end-of-line token (
\n) following each option's text as the option's representation (outperforming the option label or average pooling). - QK-Score and Attention-Score:
- QK-score: The raw dot product $q_N^\top k_{t_i}$ between the query of the final prompt token and the key of the $i$-th option's representative token. Crucially, this score is computed before applying Rotary Position Embeddings (RoPE), isolating semantic similarity from positional distance shifts.
- Attention-score: The post-RoPE, post-softmax attention weight $a_{N, t_i}$.
- Head Identification: The single best head is identified either using a tiny validation split (5%) or via an unsupervised metric (selecting heads with high total attention on option-representative tokens and high answer variability across samples).
Datasets
The authors evaluated their approach on four standard MCQA benchmarks and one new synthetic dataset:
- Standard Benchmarks: MMLU (knowledge), CosmosQA (reading comprehension / commonsense), HellaSwag (sentence completion), and HaluDialogue (dialogue consistency from HaluEval).
- Modification: To measure uncertainty and filter spurious heads, every question was augmented with two unchosen distractor options:
"E. None of the above."and"F. I don't know." - Simple Synthetic Dataset (SSD): A novel benchmark introduced by the authors containing 2,500 questions in the format: "Which of the following options corresponds to '<word>'?" with one exact match and random distractors. SSD tests pure format/selection competence without requiring external factual knowledge, including multilingual variants (Italian, French, Russian) and up to 24 options.
Key Insights and Ideas
- Knowledge Peaks in the Middle Layers: Logit lens and head-ablation analyses show that semantic selection happens primarily in the middle layers (e.g., layers 12–21 in LLaMA2-7B). Later layers often revise or overwrite this correct signal due to formatting constraints or option-letter distribution priors.
- Universal Select-and-Copy Heads: The best-performing heads (notably
(14, 24)and(14, 20)in LLaMA2-7B) are remarkably consistent across datasets, few-shot demonstration counts, and even prompt languages. - RoPE Introduces Unwanted Inductive Bias: Removing positional encodings via the un-rotated QK-score prevents relative token distances from warping the model's semantic choice, yielding cleaner predictions than post-softmax attention weights.
- Complementary Bias Profiles: Different heads exhibit opposite label biases (e.g., head
(14, 20)leans toward "A" and "D", while(14, 24)leans toward "B" and "C"), suggesting specialized functional sub-circuits within the same layer.
Key Results
- Significant Zero-Shot Gains: On LLaMA2-7B, QK-scoring outperforms standard baseline logit evaluation by 7–16% across all four standard benchmarks.
- Scaling Across Architectures: Gains held across models from 1.5B to 70B parameters (LLaMA 2/3, Qwen 2.5, Gemma 2, Phi-3.5, and Dolly V2). For example, LLaMA3-8B achieved an accuracy jump of up to 27% on HellaSwag zero-shot.
- Permutation Robustness: Permutation Accuracy (PA)—the rate at which a model stays correct before and after shuffling choices—was consistently higher, proving the scores do not rely on option ordering.
- Synthetic Benchmark Diagnostic: On the SSD dataset, LLaMA2-7B's standard zero-shot baseline achieved near-random accuracy (~20–30%), whereas QK-scores reached ~80–99% accuracy, demonstrating an ability to overcome rigid MCQA output format limitations.
Limitations and Future Work
- White-Box Requirement: The approach requires internal access to query and key projection vectors and attention weights, making it unusable for closed API models (e.g., OpenAI or Anthropic endpoints).
- Fluency vs. Knowledge Trade-offs: The method underperforms cloze-style evaluation on continuous text-continuation tasks (like HellaSwag), where text fluency is more predictive than explicit query-option semantic matching.
- Single-Head Selection: The authors only score from one individual head at a time; future work could explore ensemble methods or multi-head circuit aggregation to combine complementary heads.
Summary updated