atlas

Research map / Large language models / Language, safety and interpretability

Unveiling and Harnessing Hidden Attention Sinks: Enhancing Large Language Models without Training through Attention Calibration

ICML 2024 · Large language models › Language, safety and interpretability · approach: Task vectors and steering · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows attention sinks appear in later tokens (not just the initial token) and that reducing them in selected heads improves LLM accuracy, proposing ACT, a training-free attention calibration method.

Problem

Attention sinks have only been studied at the initial token; it is unclear whether sinks exist elsewhere in the input and whether preserving them helps or hurts LLM accuracy, and whether accuracy can be improved by calibrating attention without weight updates.

Approach

Identifies attention sinks at later tokens (e.g., '.', ':', newline) in intermediate layers, finds that reducing them in selected heads can improve accuracy, and proposes ACT, which filters heads offline on a small held-out set and then, at inference, scales down sink attention and redistributes the mass across other tokens while keeping rows summing to one.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply ACT to calibrate attention sinks during inferenceLlama-30B · Domain-specific multiple choice, 0-shotaccuracy (Avg.): 61.89 -> 69.19; 7.30Helped
Apply ACT to calibrate attention sinks during inferenceLlama2-7B-chat · Text classification, 0-shotaccuracy (Avg.): 65.07 -> 66.36; 1.29Helped
Apply ACT to calibrate attention sinks during inferenceLlama2-7B-chat · MT-Benchscore: 6.272 -> 6.406; 0.134Helped
Reduce attention at middle-input sinks and redistribute it to other tokens rather than using temperature scaling (ablation)Llama2-7B-chat · MMLUaccuracy: 44.89 -> 46.82Helped
Reverse the calibration by increasing sink attention at the expense of other tokens (ablation)Llama2-7B-chat · MMLUaccuracy: 46.82 -> 46.21Hurt
Redistribute recovered attention only to question tokens instead of across all tokens (ablation)Llama2-7B-chat · MMLUaccuracy: 46.82 -> 46.10Hurt
Redistribute recovered attention only to choice tokens instead of across all tokens (ablation)Llama2-7B-chat · MMLUaccuracy: 46.82 -> 45.24Hurt
Vary attention-sink threshold α among 3, 5, and 7 (ablation)Llama2-7B-chat · Text classification datasetsaccuracyNo clear effect
Vary sink attention reduction factor β from 0.7 to 0.1 (ablation)Llama2-7B-chat · MMLUaccuracy: 46.77; 46.81; 46.82; 46.79; 46.65No clear effect
Increase the number of head-filtering samples M (ablation)Llama2-7B-chat · MMLUaccuracy: 46.50 -> 46.56 -> 46.82 -> 46.91Helped
Calibrate only a subset rather than all selected attention heads (ablation)Llama2-7B-chat · SST2, AGNews, PIQA, ARCCaccuracy (Avg.): 71.57 -> 73.34 -> 72.88 -> 73.44 -> 73.84Helped
Reduce attention sinks in individual heads (ablation)Llama2-7B-chat · MMLUaccuracyMixed

Surprising findings

Limitations

Experimental setup

Datasets: Hellaswag ARC-E PIQA OpenBookQA ARC-C COPA CommonsenseQA MMLU SST2 SST5 MR AGNews

Benchmarks: Hellaswag ARC-E PIQA OpenBookQA ARC-C COPA CommonsenseQA MMLU SST2 SST5 MR AGNews

Metrics: accuracy F1 exact match MT-Bench score

Baselines: Vanilla inference Temp (temperature scaling) Inv-temp Inv-ours in-context learning (1/3/5-shot)

Builds on: StreamingLLM attention sink

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy