The structure of the token space for large language models

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Robinson, Michael, Dey, Sourya, Sweet, Shauna
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866910645517025280
author Robinson, Michael
Dey, Sourya
Sweet, Shauna
author_facet Robinson, Michael
Dey, Sourya
Sweet, Shauna
contents Large language models encode the correlational structure present in natural language by fitting segments of utterances (tokens) into a high dimensional ambient latent space upon which the models then operate. We assert that in order to develop a foundational, first-principles understanding of the behavior and limitations of large language models, it is crucial to understand the topological and geometric structure of this token subspace. In this article, we present estimators for the dimension and Ricci scalar curvature of the token subspace, and apply it to three open source large language models of moderate size: GPT2, LLEMMA7B, and MISTRAL7B. In all three models, using these measurements, we find that the token subspace is not a manifold, but is instead a stratified manifold, where on each of the individual strata, the Ricci curvature is significantly negative. We additionally find that the dimension and curvature correlate with generative fluency of the models, which suggest that these findings have implications for model behavior.
format Preprint
id arxiv_https___arxiv_org_abs_2410_08993
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle The structure of the token space for large language models
Robinson, Michael
Dey, Sourya
Sweet, Shauna
Differential Geometry
Artificial Intelligence
53Z50, 58Z05
Large language models encode the correlational structure present in natural language by fitting segments of utterances (tokens) into a high dimensional ambient latent space upon which the models then operate. We assert that in order to develop a foundational, first-principles understanding of the behavior and limitations of large language models, it is crucial to understand the topological and geometric structure of this token subspace. In this article, we present estimators for the dimension and Ricci scalar curvature of the token subspace, and apply it to three open source large language models of moderate size: GPT2, LLEMMA7B, and MISTRAL7B. In all three models, using these measurements, we find that the token subspace is not a manifold, but is instead a stratified manifold, where on each of the individual strata, the Ricci curvature is significantly negative. We additionally find that the dimension and curvature correlate with generative fluency of the models, which suggest that these findings have implications for model behavior.
title The structure of the token space for large language models
topic Differential Geometry
Artificial Intelligence
53Z50, 58Z05
url https://arxiv.org/abs/2410.08993