atlas

Research map / Architectures and efficiency / Attention and transformers

Emergence of Linear Truth Encodings in Language Models

NeurIPS 2025 · Architectures and efficiency › Attention and transformers · approach: Attention head mechanisms · 0 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 the Truth Co-occurrence Hypothesis and a one-layer transformer toy model showing that linear truth subspaces can emerge from training on data where true/false statements co-occur, with a two-phase (memorize then encode truth) dynamic.

Problem

Why and how linear subspaces separating true from false statements emerge in language models during training, which remains mechanistically unexplained.

Approach

Truth Co-occurrence Hypothesis: true statements co-occur with true statements and false with false, so inferring a latent truth bit lowers LM loss; a minimal attention+layer-norm transformer trained on such synthetic data learns a linear truth direction via key-value memorization followed by normalization-driven sharpening.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add normalization after attention (ablation)Toy one-layer transformer · Synthetic true and false sequenceslinear truth separabilityHelped
Use two false preceding sentences instead of one true preceding sentenceLlama3-8B · CounterFact SpeaksLanguagenegative log likelihood: 1.52Hurt
Steer representations toward the truth direction with α=3.0 at layer l=11Llama3-8B · CounterFact SpeaksLanguage with false contextcorrect-attribute probabilityHelped
Increase the true-attribute rate (ablation)Synthetic transformer · Synthetic data, up to ρ=0.999time to linear truth separabilityHurt
Set the true-attribute rate to ρ=1.0 (ablation)Fully trained synthetic transformer · Synthetic datalinear truth separabilityHurt
Train the key-query matrix when ρ=1 (ablation)Synthetic transformer · False sequenceshandling false sequencesHurt
Train input embeddings instead of freezing them (ablation)Dense-embedding transformer · Synthetic memorization and truth encodingsimilarity to the idealized OV patternHurt
Use a 3-layer model instead of a 1-layer model (ablation)Synthetic transformer · Synthetic truth encodingtruth encoding location: 4/5 random initializationsMixed
Train with frozen dense embeddings and freely learned KV matrices (ablation)Synthetic transformer · Synthetic truth encodingsimilarity to the idealized mechanismHelped
Use a model dimension of 32 (ablation)Synthetic transformer · Synthetic truth separability at the second-subject tokenlinear separabilityHurt

Surprising findings

Limitations

Experimental setup

Datasets: MAVEN-FACT CounterFact synthetic subject-attribute corpus

Benchmarks: CounterFact MAVEN-FACT

Metrics: linear probe AUC negative log-likelihood of correct attribute probability of correct attribute after steering chi-squared test of co-occurrence

Builds on: key-value associative memory in transformers persona hypothesis of factual inconsistency CounterFact

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