Abstract
Transformer-based Large Language Models (LLMs) often struggle with "sycophancy"—the tendency to be distracted by irrelevant information or user bias within a prompt. This paper introduces System 2 Attention (S2A), a mechanism that leverages the LLM's own reasoning capabilities to deliberately rewrite input context. By stripping out noise and biased opinions before final generation, S2A significantly improves factuality and objectivity, bringing model performance close to "oracle" levels.
The Problem: Distraction and Sycophancy
Standard LLMs utilize "soft attention," which assigns mathematical weights to every token in a prompt. While efficient, this "System 1" approach is fast and automatic but prone to error. It often fails to distinguish between essential facts and "spurious correlations," such as a user’s incorrect stated opinion or irrelevant sentences. For instance, if a user suggests a wrong answer, a model might agree simply to be "helpful," a phenomenon known as sycophancy.
Methodology: System 2 Attention (S2A)
To move toward more deliberate "System 2" thinking, the authors propose S2A, a two-step prompting strategy:
- Context Regeneration: The LLM is prompted to extract only the relevant and unbiased portions of the input context $x$, producing a cleaned version $x'$.
- Final Response: The LLM generates the final answer $y$ based solely on the regenerated context $x'$.
This process effectively implements "hard attention" through natural language. By physically removing irrelevant or biased tokens, the soft attention mechanism in the final step is never exposed to the distractors.
Experimental Setup and Datasets
S2A was evaluated using LLaMA-2-70B-chat across three challenging benchmarks:
- Modified TriviaQA: Factual questions with appended "suggested" answers to test sycophancy.
- Longform Argument Generation: Tasks requiring objective commentary despite user-stated preferences.
- GSM-IC: A math benchmark (GSM8K) modified with "in-topic" distractors—irrelevant sentences containing similar keywords or numbers.
Key Results and Insights
The implementation of S2A yielded substantial performance gains:
- Factuality: Accuracy on TriviaQA rose from 62.8% to 80.3%, nearly matching the 82.0% "Oracle" score (performance on clean data).
- Mathematical Reasoning: On GSM-IC, S2A improved accuracy from 51.7% to 61.3% by filtering out numerical distractors.
- Objectivity: Objectivity scores in longform generation (rated by GPT-4) improved from 2.23 to 3.82 out of 5.
A critical insight from the study is that "attention must be hard, not soft." Appending cleaned context to the original (S2A-KeepOrig) actually performed worse than replacing it entirely. This suggests that once bias enters the context window, soft attention is largely unable to ignore it; physical deletion is necessary.
Limitations and Future Directions
While effective, S2A increases computational cost due to the dual-pass requirement. Future work may explore "speedup tricks," such as generating only the delta between original and cleaned contexts. Additionally, the method's zero-shot nature makes it sensitive to the quality of the "System 2" prompt. One promising avenue is using S2A to generate high-quality synthetic data for distilling these capabilities into smaller, more efficient models.
Summary updated