atlas

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

Attention Satisfies: A Constraint-Satisfaction Lens on Factual Errors of Language Models

ICLR 2024 · Large language models › Language, safety and interpretability · approach: Pruning and circuits in LLMs · 3 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.

Proposes modeling factual queries as constraint satisfaction problems and a linear probe (SAT Probe) on attention to constraint tokens that predicts factual errors in Llama-2 models, comparable to model confidence.

Problem

Understanding the internal mechanisms behind LLM factual errors, which prior mechanistic work (focused on correct recall) has scarcely examined, and predicting such errors without multiple generations.

Approach

Frame factual queries as CSPs with constraint tokens and show that attention to constraint tokens correlates with factual correctness; train a logistic-regression probe on constraint-token attention weights to predict per-constraint satisfaction, enabling fine-grained and early error prediction.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Probe attention weights to constraint tokens rather than use model confidenceLlama-2 7B factual-error prediction · CounterFact - Cit, CounterFact - MTAUROC: 0.51 ± 0.01 -> 0.71 ± 0.01; 0.89 ± 0.00 -> 0.98 ± 0.00Helped
Probe attention weights to constraint tokens rather than use model confidenceLlama-2 7B factual-error prediction · CounterFact - HQ, Movies, SongsAUROC: 0.77 ± 0.01 -> 0.75 ± 0.01; 0.90 ± 0.00 -> 0.80 ± 0.00; 0.93 ± 0.00 -> 0.88 ± 0.00Hurt
Probe attention weights to constraint tokens rather than use model confidenceLlama-2 7B factual-error prediction · Basketball Players, Football TeamsAUROC: 0.82 ± 0.00 -> 0.81 ± 0.00; 0.81 ± 0.00 -> 0.79 ± 0.00No clear effect
Probe attention weights to constraint tokens rather than use model confidenceLlama-2 13B factual-error prediction · CounterFact - Cit, CounterFact - MTAUROC: 0.58 ± 0.00 -> 0.72 ± 0.01; 0.80 ± 0.00 -> 0.96 ± 0.00Helped
Probe attention weights to constraint tokens rather than use model confidenceLlama-2 13B factual-error prediction · Basketball Players, CounterFact - HQ, Football Teams, Movies, SongsAUROC: 0.86 ± 0.00 -> 0.85 ± 0.00; 0.77 ± 0.00 -> 0.70 ± 0.01; 0.83 ± 0.00 -> 0.81 ± 0.00; 0.87 ± 0.00 -> 0.79 ± 0.00; 0.93 ± 0Hurt
Use attention contribution features instead of attention weights (ablation)SAT Probe, Llama-2 7B · CounterFact - CitAUROC: 0.71 ± 0.01 -> 0.76 ± 0.01Helped
Use attention contribution features instead of attention weights (ablation)SAT Probe, Llama-2 7B · CounterFact - HQ, MoviesAUROC: 0.75 ± 0.01 -> 0.76 ± 0.01; 0.80 ± 0.00 -> 0.81 ± 0.00Mixed
Use attention contribution features instead of attention weights (ablation)SAT Probe, Llama-2 7B · Basketball Players, CounterFact - MT, Football Teams, SongsAUROC: 0.81 ± 0.00 -> 0.81 ± 0.00; 0.98 ± 0.00 -> 0.98 ± 0.00; 0.79 ± 0.00 -> 0.81 ± 0.00; 0.88 ± 0.00 -> 0.88 ± 0.00No clear effect
Stop inference early using intermediate-layer attention (ablation)Llama-2 7B and 13B failure prediction · Single-constraint datasetsprediction performanceNo clear effect
Stop inference early using intermediate-layer attention (ablation)Llama-2 70B failure prediction · Single-constraint datasetsprediction performanceHurt

Surprising findings

Limitations

Experimental setup

Datasets: WikiData basketball players WikiData football teams WikiData movies WikiData songs CounterFact WikiData books Nobel Prize Winners dataset hand-curated words

Benchmarks: 10 constraint datasets (basketball players, football teams, movies, songs, CounterFact citizenship/HQ/mother tongue, boo

Metrics: AUROC Risk Top 20% Risk Bottom 20%

Baselines: Confidence Constant Popularity

Builds on: mechanistic factual recall analysis (attention transfers subject information) selective classification Grouped-Query Attention

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