Tracking Representation Dynamics in Large Language Models with Persistent Homology

📅 2026-06-17
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
The internal representational dynamics of large language models during alignment fine-tuning remain poorly understood. This work introduces persistent homology to investigate the topological evolution of activation spaces in 1B–7B parameter Transformer models throughout supervised fine-tuning, leveraging dense checkpoint analysis. The study reveals that substantial topological reorganization occurs predominantly in the early training phase, and distinct alignment objectives—such as instruction tuning—produce discernible topological trajectories. These emergent patterns markedly differ from those observed during pretraining and are not captured by conventional behavioral metrics, offering a novel perspective on early-stage alignment mechanisms at the representational level.
📝 Abstract
Large language models are commonly aligned through supervised fine-tuning, yet little is known about how their internal representations evolve during this process. We study alignment dynamics using persistent homology by tracking the topology of activation spaces throughout fine-tuning. Across four transformer language models ranging from 1B to 7B parameters and three alignment objectives corresponding to helpful, harmless, and mixed training data, we find that the majority of topological reorganization occurs during the earliest stages of training. A dense checkpoint analysis reveals a transient peak in topological activity followed by rapid stabilization. We further show that different alignment objectives induce distinguishable topological trajectories, while instruction-tuned and pretrained models exhibit qualitatively different patterns of evolution. Our results suggest that persistent homology provides a complementary perspective on alignment, revealing representation-level changes that are not apparent from behavioral metrics alone.
Problem

Research questions and friction points this paper is trying to address.

representation dynamics
large language models
alignment
persistent homology
activation spaces
Innovation

Methods, ideas, or system contributions that make the work stand out.

persistent homology
representation dynamics
alignment
topological data analysis
large language models
N
Naman Malhotra
Department of Mathematics, Imperial College London, UK; Department of Computing, Imperial College London, UK
J
Jay Ambadkar
Department of Mathematics, Imperial College London, UK; Department of Computing, Imperial College London, UK
A
Abhinav Gupta
Department of Mathematics, Imperial College London, UK; Department of Computing, Imperial College London, UK
K
Kushal Kasivel
Department of Mathematics, Imperial College London, UK; Department of Computing, Imperial College London, UK
A
Abbas Schwarz
Department of Mathematics, Imperial College London, UK; Department of Computing, Imperial College London, UK
K
Kamillo Ferry
Department of Mathematics, Imperial College London, UK; Department of Computing, Imperial College London, UK
Anthea Monod
Anthea Monod
Associate Professor, Department of Mathematics, Imperial College London
Applied Algebraic GeometryTopological Data AnalysisMathematical Biology