about
A Mathematical Perspective on Transformers (arxiv.org)
82 points by georgehill on Dec 19, 2023 | hide | past | pdf | 6 comments on HN

In plain words: Treating each token's representation as a particle that pushes and pulls on the others, this framework gives a mathematical way to study how Transformers process information. It shows that over time the particles naturally gather into distinct clusters.

Abstract · A mathematical perspective on Transformers

Transformers play a central role in the inner workings of large language models. We develop a mathematical framework for analyzing Transformers based on their interpretation as interacting particle systems, which reveals that clusters emerge in long time. Our study explores the underlying theory and offers new perspectives for mathematicians as well as computer scientists.

Borjan Geshkovski, Cyril Letrouit, Yury Polyanskiy, Philippe Rigollet
arXiv:2312.10794 · cs.LG, math.AP, math.DS · submitted Dec 17, 2023 · updated Aug 21, 2025
abstract · pdf · html

add comment on HN

Beautiful piece of math. Similar work: Traveling Words: A Geometric Interpretation of Transformers https://arxiv.org/abs/2309.07315
That was an interesting abstract, looking forward to read it!
Would this kind of understanding aid in extracting 'skills' from an LLM by identifying the relevant topology and isolating that part? Then we could have a toolbox of skills to assemble into what we needed?
Maybe the right title would be a (statistical) physics perspective...
Disappointed that this wasn't about robots in disguise.
It is.