On the Origins of Linear Representations in Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Jiang, Yibo, Rajendran, Goutham, Ravikumar, Pradeep, Aragam, Bryon, Veitch, Victor
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909129762668544
author Jiang, Yibo
Rajendran, Goutham
Ravikumar, Pradeep
Aragam, Bryon
Veitch, Victor
author_facet Jiang, Yibo
Rajendran, Goutham
Ravikumar, Pradeep
Aragam, Bryon
Veitch, Victor
contents Recent works have argued that high-level semantic concepts are encoded "linearly" in the representation space of large language models. In this work, we study the origins of such linear representations. To that end, we introduce a simple latent variable model to abstract and formalize the concept dynamics of the next token prediction. We use this formalism to show that the next token prediction objective (softmax with cross-entropy) and the implicit bias of gradient descent together promote the linear representation of concepts. Experiments show that linear representations emerge when learning from data matching the latent variable model, confirming that this simple structure already suffices to yield linear representations. We additionally confirm some predictions of the theory using the LLaMA-2 large language model, giving evidence that the simplified model yields generalizable insights.
format Preprint
id arxiv_https___arxiv_org_abs_2403_03867
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle On the Origins of Linear Representations in Large Language Models
Jiang, Yibo
Rajendran, Goutham
Ravikumar, Pradeep
Aragam, Bryon
Veitch, Victor
Computation and Language
Machine Learning
Recent works have argued that high-level semantic concepts are encoded "linearly" in the representation space of large language models. In this work, we study the origins of such linear representations. To that end, we introduce a simple latent variable model to abstract and formalize the concept dynamics of the next token prediction. We use this formalism to show that the next token prediction objective (softmax with cross-entropy) and the implicit bias of gradient descent together promote the linear representation of concepts. Experiments show that linear representations emerge when learning from data matching the latent variable model, confirming that this simple structure already suffices to yield linear representations. We additionally confirm some predictions of the theory using the LLaMA-2 large language model, giving evidence that the simplified model yields generalizable insights.
title On the Origins of Linear Representations in Large Language Models
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2403.03867