Emergence of Linear Truth Encodings in Language Models
Abstract
A one-layer transformer model demonstrates how linear subspaces separating true from false statements can emerge in language models through memorization and subsequent linear separation.
Recent probing studies reveal that large language models exhibit linear subspaces that separate true from false statements, yet the mechanism behind their emergence is unclear. We introduce a transparent, one-layer transformer toy model that reproduces such truth subspaces end-to-end and exposes one concrete route by which they can arise. We study one simple setting in which truth encoding can emerge: a data distribution where factual statements co-occur with other factual statements (and vice-versa), encouraging the model to learn this distinction in order to lower the LM loss on future tokens. We corroborate this pattern with experiments in pretrained language models. Finally, in the toy setting we observe a two-phase learning dynamic: networks first memorize individual factual associations in a few steps, then -- over a longer horizon -- learn to linearly separate true from false, which in turn lowers language-modeling loss. Together, these results provide both a mechanistic demonstration and an empirical motivation for how and why linear truth representations can emerge in language models.
Community
We propose a tractable toy model for linear truth encoding in transformers.
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Training-free Truthfulness Detection via Value Vectors in LLMs (2025)
- Attention Sinks and Compression Valleys in LLMs are Two Sides of the Same Coin (2025)
- The Mechanistic Emergence of Symbol Grounding in Language Models (2025)
- The Impossibility of Inverse Permutation Learning in Transformer Models (2025)
- Language Models are Injective and Hence Invertible (2025)
- Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic Insight (2025)
- LLM Knowledge is Brittle: Truthfulness Representations Rely on Superficial Resemblance (2025)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper