The Geometry of Thought: Disclosing the Transformer as a Tropical Polynomial Circuit
Faruk Alpay, Bilge Senturk
TL;DR
The paper addresses how Transformer self-attention computes in the high-confidence regime, showing that the tropical limit ($β → ∞$) of softmax attention yields a tropical matrix–vector product. By applying Maslov dequantization, it formalizes that a single attention layer performs a max-plus operation, and multiple layers correspond to a dynamic programming accumulation along a path in a latent token graph, akin to Bellman-Ford updates. Key contributions include a rigorous demonstration of the tropical limit, explicit expressions for multi-layer outputs $Y^{(L)} = A^{⊗L} ⊗ V^{(0)}$ with a path-based expansion, and a geometric interpretation via tropical polytopes and hypersurfaces that links to chain-of-thought reasoning. The work provides a principled bridge between idempotent mathematics and neural reasoning, offering insights into why step-by-step prompting can aid internal reasoning and outlining future directions to relate finite-$β$ regimes to tropical optimization in practical models.
Abstract
We prove that the Transformer self-attention mechanism in the high-confidence regime ($β\to \infty$, where $β$ is an inverse temperature) operates in the tropical semiring (max-plus algebra). In particular, we show that taking the tropical limit of the softmax attention converts it into a tropical matrix product. This reveals that the Transformer's forward pass is effectively executing a dynamic programming recurrence (specifically, a Bellman-Ford path-finding update) on a latent graph defined by token similarities. Our theoretical result provides a new geometric perspective for chain-of-thought reasoning: it emerges from an inherent shortest-path (or longest-path) algorithm being carried out within the network's computation.
