paper-with-me

Papers

The Geometry of Tokens in Internal Representations of Large Language Models

2025-01-17 · Karthik Viswanathan, Yuri Gardinazzi, Giada Panerai, Alberto Cazzaniga, Matteo Biagetti

We investigate the relationship between the geometry of token embeddings and their role in the next token prediction within transformer models. An important aspect of this connection uses the notion of empirical measure, which encodes the distribution of token point clouds across transformer layers and drives the evolution of token representations in the mean-field interacting picture. We use metrics such as intrinsic dimension, neighborhood overlap, and cosine similarity to observationally probe these empirical measures across layers. To validate our approach, we compare these metrics to a dataset where the tokens are shuffled, which disrupts the syntactic and semantic structure. Our findings reveal a correlation between the geometric properties of token embeddings and the cross-entropy loss of next token predictions, implying that prompts with higher loss values have tokens represented in higher-dimensional spaces.

📄 PDF Abstract BibTeX arXiv:2501.10573

Code (1)

ritareasciencepark/token_geometry 공식 구현 pytorch

Similar Papers 제목 키워드 기반

The cell as a token: high-dimensional geometry in language models and cell embeddings

2025-03-26 · William Gilpin

Single-cell sequencing technology maps cells to a high-dimensional space encoding their internal activity. This process mirrors parallel developments in machine learning, where large language models ingest unstructured t…

Language ModelingLanguage Modelling

A Markov Categorical Framework for Language Modeling

2025-07-25 · Yifan Zhang arxiv

Autoregressive language models achieve remarkable performance, yet a unified theory explaining their internal mechanisms, how training shapes representations, and why these representations support complex behavior remain…

GeoWeaver: Grounding Visual Tokens with Geometric Evidence before Scene Reasoning

2026-05-21 · Deshui Miao, Xingsen Huang, Yameng Gu, Xin Li 외 arxiv

Spatio-temporal reasoning in vision-language models requires visual representations that preserve physical geometry rather than merely semantic appearance. Recent multimodal models incorporate geometric information throu…

Spatial Reasoning

A Shared Geometry of Difficulty in Multilingual Language Models

2026-01-19 · Stefano Civelli, Pietro Bernardelle, Nicolò Brunello, Gianluca Demartini arxiv

Predicting problem-difficulty in large language models (LLMs) refers to estimating how difficult a task is according to the model itself, typically by training linear probes on its internal representations. In this work,…

When Graph Tokens Sink: A Mechanistic Analysis of Graph Language Models

2026-06-02 · Ding Zhang, Runtao Zhou, Wenqing Zheng, Rizal Fathony 외 arxiv

Graph Language Models (GLMs) have become a promising direction for adapting Large Language Models (LLMs) to graph learning tasks. By transforming graph topology and node information into graph tokens, GLMs allow LLMs to …

Graph Learning