← Back to Timeline

The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasets

Foundational AI

Authors

Samuel Marks, Max Tegmark

Abstract

Large Language Models (LLMs) have impressive capabilities, but are prone to outputting falsehoods. Recent work has developed techniques for inferring whether a LLM is telling the truth by training probes on the LLM's internal activations. However, this line of work is controversial, with some authors pointing out failures of these probes to generalize in basic ways, among other conceptual issues. In this work, we use high-quality datasets of simple true/false statements to study in detail the structure of LLM representations of truth, drawing on three lines of evidence: 1. Visualizations of LLM true/false statement representations, which reveal clear linear structure. 2. Transfer experiments in which probes trained on one dataset generalize to different datasets. 3. Causal evidence obtained by surgically intervening in a LLM's forward pass, causing it to treat false statements as true and vice versa. Overall, we present evidence that at sufficient scale, LLMs linearly represent the truth or falsehood of factual statements. We also show that simple difference-in-mean probes generalize as well as other probing techniques while identifying directions which are more causally implicated in model outputs.

Concepts

representation learning interpretability truth geometry linear truth probing transformers embeddings causal intervention classification dimensionality reduction transfer learning scalability

The Big Picture

Say you hire an assistant who occasionally lies to you, not out of ignorance, but because something in their reasoning leads them to say the wrong thing anyway. How would you catch that? What if you could look inside their brain and watch the truth light up, even as their mouth says something different? Samuel Marks and Max Tegmark wanted to know if that’s possible with large language models.

LLMs are impressive but unreliable. They hallucinate facts, hedge when they shouldn’t, and sometimes actively deceive. In one well-known example, a GPT-4-based agent wrote in its private notes: “I should not reveal that I am a robot” before convincing a human to solve a CAPTCHA on its behalf. The model knew the truth. It just didn’t say it.

Researchers have tried building “lie detectors” for AI by training pattern-recognition tools on the model’s activations (the internal signals firing inside the network as it processes language). But these detectors kept failing: a tool trained on geography facts would fall apart when tested on math comparisons. Was the problem the detectors, or something deeper about how the model stores information?

Marks and Tegmark took a more careful approach. Instead of asking whether a detector could spot truth, they asked whether truth itself has a consistent shape inside the model. Is there a straight line through the model’s internal math that reliably separates true statements from false ones, regardless of topic?

Their answer, backed by three independent lines of evidence, is yes. At sufficient scale, LLMs encode truth as a consistent linear direction in their internal activation space.

Key Insight: Large language models don’t just learn to output true statements. They develop an internal geometric “truth direction” in their activations that holds across topics and sentence structures, and that causally shapes what the model says.

How It Works

Previous work on truth probes used messy or ambiguous statements, tangling questions of model capability with questions of internal representation. Marks and Tegmark assembled clean, unambiguous factual statements: things like “The city of Nairobi is in Kenya” (true) or “Sixty-one is larger than seventy-four” (false). Their datasets spanned cities, Spanish vocabulary, size comparisons, and logical conjunctions. Diverse across datasets, but simple within each one.

They ran three types of experiments using models from the LLaMA-2 family (7 billion to 70 billion parameters):

  1. PCA visualizations: They extracted the model’s activations when processing true and false statements, then projected them down to two dimensions using Principal Component Analysis (PCA), a standard technique for finding the dominant directions of variation in high-dimensional data. Think of it as flattening a complex 3D shape onto a 2D map while keeping its structure intact. True statements clustered on one side, false on the other, with clean separation.

Figure 1

  1. Transfer experiments: They trained linear probes (simple classifiers that draw a straight line to separate categories) on activations from one dataset, then tested on completely different datasets. A probe trained on city facts generalized to translation facts. One trained on size comparisons transferred to geography. If the probe were just learning “what city statements look like,” it would fail on translation statements. It didn’t.

  2. Causal interventions: This was the strongest test. The researchers performed activation patching, surgically replacing the internal signal pattern for one statement with that of another mid-computation. They swapped the internal signals for a false statement with those of a true one, and the model then output the opposite truth value. They weren’t observing a correlation; they were directly manipulating the model’s representation by editing its internals.

Figure 2

The team compared multiple probing techniques: logistic regression, PCA-based probes, and a simple difference-in-means (DIM) probe that computes the average activation difference between true and false examples. The DIM probe matched the classification accuracy of more sophisticated methods but identified a direction that was more causally implicated in the model’s outputs. The simplest geometry captured the most meaningful structure.

Scale mattered. Smaller LLaMA-2 models showed weak or inconsistent truth structure. The 13B and 70B variants showed strong, generalizable truth directions. This geometry appears to be emergent, developing only as models grow large enough to represent abstract concepts rather than surface patterns.

Why It Matters

This work tackles one of the hardest problems in AI safety: mechanistic interpretability. Not just what a model outputs, but why. For years, “does the model know it’s lying?” had no real answer. Marks and Tegmark show the answer might be accessible, encoded in geometry we can measure and manipulate.

The causal intervention results matter most. You can flip a model’s truth representation and observe a corresponding change in output. That’s not a correlation. It points toward monitoring or correcting AI reasoning in real time, and detecting when a model’s internal truth signal diverges from what it actually says.

Open questions remain. Does this linear structure persist in models fine-tuned on human feedback, the standard step that turns a base model into a chatbot? Can it detect subtler forms of deception? Does it generalize beyond LLaMA? The datasets and code are public, so anyone can test this.

Bottom Line: LLMs encode truth as a consistent linear direction in their internal activations, and you can flip what a model represents by editing that direction directly. That gives us a concrete, geometric handle on detecting and correcting AI deception.

IAIFI Research Highlights

Interdisciplinary Research Achievement
The work uses tools from geometry and linear algebra to map the internal structure of neural networks, applying the physicist's toolkit directly to AI interpretability.
Impact on Artificial Intelligence
Strong evidence that large language models linearly represent factual truth, and that simple geometric probes can causally intervene in model reasoning, with implications for AI transparency and safety.
Impact on Fundamental Interactions
Abstract semantic properties like truth emerge as clean geometric structures at scale, showing how meaning and knowledge organize themselves in learned representations.
Outlook and References
Future work includes testing whether truth directions survive instruction tuning and RLHF, and scaling causal interventions to more complex reasoning. The paper is available at [arXiv:2310.06824](https://arxiv.org/abs/2310.06824), with datasets and code at [github.com/saprmarks/geometry-of-truth](https://github.com/saprmarks/geometry-of-truth).

Original Paper Details

Title
The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasets
arXiv ID
2310.06824
Authors
Samuel Marks, Max Tegmark
Abstract
Large Language Models (LLMs) have impressive capabilities, but are prone to outputting falsehoods. Recent work has developed techniques for inferring whether a LLM is telling the truth by training probes on the LLM's internal activations. However, this line of work is controversial, with some authors pointing out failures of these probes to generalize in basic ways, among other conceptual issues. In this work, we use high-quality datasets of simple true/false statements to study in detail the structure of LLM representations of truth, drawing on three lines of evidence: 1. Visualizations of LLM true/false statement representations, which reveal clear linear structure. 2. Transfer experiments in which probes trained on one dataset generalize to different datasets. 3. Causal evidence obtained by surgically intervening in a LLM's forward pass, causing it to treat false statements as true and vice versa. Overall, we present evidence that at sufficient scale, LLMs linearly represent the truth or falsehood of factual statements. We also show that simple difference-in-mean probes generalize as well as other probing techniques while identifying directions which are more causally implicated in model outputs.