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

Samuel Marks, Max Tegmark
10/10/2023
881 citations
cs.AI

Official code: saprmarks/geometry-of-truth (119 stars, HTML, last commit 2024-08-08).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

11933HTML, Jupyter NotebookOct 6, 20232 years ago

Similar Papers

Cite this paper

@article{marks2023geometry,
  title  = {The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasets},
  author = {Samuel Marks and Max Tegmark},
  year   = {2023},
  eprint = {2310.06824},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.06824v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.06824.svg)](https://codeofpaper.com/paper/2310.06824)

Discussion