Published July 28, 2025 | Version v0.1

Vanilla Transformers Are Discrete GL(d) Connections on the Token Graph

Authors/Creators

Description

This draft proposes a geometric view of vanilla transformer layers as discrete GL(d) connections on the token graph when the connection is defined by the cross-Jacobian at frozen activations. Under per-token basis changes Ri ∈ GL(d), the edge maps Γij = ∂Yi/∂Xj transform covariantly (Ri-1ΓijRj). Residual addition acts as a forward-Euler integrator; LayerNorm fixes an affine gauge slice ℝd/(ℝ+ × ℝ·1) ≅ Sd-2.

We define discrete curvature and Wilson loops for short cycles, give a multi-head corollary, and contrast the exact Jacobian connection with the common "values-only" proxy. The appendix provides efficient JVP/VJP recipes to probe Γij without forming full Jacobians, plus an experiments template (curvature heatmaps, canonicalized pruning, transport-aware distillation).

Key Findings
We define discrete curvature and Wilson loops to measure the "non-integrability" of the transformer's path. Empirical validation (included) confirms that while gradient connections are flat (||H - I|| < 10-9), Transformer connections exhibit significant curvature (||H - I|| ≈ 8.0), identifying a geometric source of hallucination and path-dependence.

Availability
This is a technical report/preprint. Full repository access (JVP/VJP implementation) is available on request.

Keywords: transformers; gauge theory; GL(d); Jacobian; LayerNorm; Neural ODE; discrete connection; Wilson loops; token graph; attention mechanisms; mechanistic interpretability; geometric deep learning

Files

Transformers are Gauges.pdf

Files (317.7 kB)

Name Size Download all
md5:6a9b115d77e7cde1bf53b3bedb2f3b05
317.7 kB Preview Download