arXiv:2610.37656cs.LGOct 2026

Manuscript Offprint

arXiv:2610.37656

Attention as Lattice Gauge Theory: Relations Interact Only Through Wilson Loops

Aakash Sarkar, Ananya Mukherjee, Motoshige Sato

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Relations compose through the entity they share—Alice is Bob’s mother and Bob is Carol’s father, so Alice is Carol’s grandmother—and the order matters, since a father’s mother is not a mother’s father; verifying a composed relation means closing the loop. We show that if each entity’s coordinate frame may be rotated independently (per-entity frame freedom [1]), three things follow. In the pure-gauge sector, relations that share no cycle cannot interact at all. The only gauge-invariant score of a triangle is a class function of its holonomy H=TijTjkTkiH=T_{ij}T_{jk}T_{ki}—a Wilson loop. And the only equivariant update of an edge is U=Ψ(H)TijU=\Psi(H)T_{ij} with Ψ\Psi conjugation-equivariant. Edge attention by Wilson loops is therefore not one design among many but the unique form the symmetry permits. Three communities hold pieces of this form: the commuting-operator embeddings of knowledge graphs [32, 33] are its abelian (commuting) sector; AlphaFold’s triangle update [2] and the Edge Transformer [3] have its shape—an edge updated through the third vertex—without its constraints; and lattice QCD builds it equivariantly on lattices [22, 27]. We instantiate the equivariant sub-family on general relational graphs as holonomy attention. With no training and composition alone, it infers unobserved S4S_4 relations on sparse graphs at 0.88 with a fifth of the edges corrupted, at or slightly below specialist synchronization algorithms, where every commutative architecture is capped at 0.083; its holonomy score flags corrupted triangles at AUC 0.99 where commuting scores are capped at 0.76 by a second selection rule, and it separates clusters without labels.

1 Frame freedom and the transport sector

In a lattice gauge theory, matter fields live at sites and gauge fields on links; comparing matter across sites requires parallel transport, and the gauge field interacts only around plaquettes, the elementary closed loops [19]. We show this structure is forced in attention: per-entity frame freedom requires transported scores between entities and plaquette-mediated interaction between relation operators. The dictionary is direct: sites map to entities, link variables to relation transports TijT_{ij}, plaquette holonomies to Wilson loops of relation triangles, flat connections to standard attention [1], and the gauge self-coupling to the forced form proved here.

Holonomy and frame freedom. Transporting a vector around a closed path multiplies it by the holonomy, the net rotation the loop accumulates; its trace, the Wilson loop, is a number independent of the coordinate system at every vertex. Entities introduced on the fly—a name in a story, a variable in a program—have no intrinsic coordinate system: rotating their embedding alone does not change

Preprint. Accepted at the 9th Workshop on Machine Learning and the Physical Sciences (ML4PS 2026).

(a) the forced update

Figure

(b) S4S_{4}, 14 entities, zero-shot

Figure

(c) corruption detection, p = 0.3

(d) two clusters, no labels

Figure 1: Holonomy attention, zero-shot. (a) The forced update. (b) Accuracy on unobserved S4S_{4} relations versus corrupted fraction (14 entities, degree 8, four rounds; mean and sd, 10 instances). (c) Holonomy score tr H/d of observed triangles at p=0.3 (discrete: permutation traces are integers). (d) The same score separates within- from cross-cluster triangles with no labels.

the task. A recent study [1] proves that under this O(d)nO(d)^n symmetry any admissible attention score depends on the entities only through xix_i and TijxjT_{ij}x_j (for isometries, through ⟨xi,Tijxj⟩\langle x_i, T_{ij}x_j \rangle), and that because any equivariant map is rank one, the transport cannot be computed from the two entities and must be supplied by relation data outside the pair. The symmetry is the task's, not a network's: a fresh entity's frame carries no information, so any predictor must be invariant to it; a shared-basis model meets that only by learning transports. The flat limit. When every loop's holonomy is trivial, a shared frame exists and the forced score reduces to plain dot-product attention; a standard head realizes exactly this form with a constant per-head transport composed only through depth, so standard attention is the flat-connection limit of a richer theory [1].

Prior work. On lattices the form is known: gauge-equivariant flows, smearing, Wilson-loop attention, and gauge-covariant message passing all realize conjugation-equivariant plaquette updates [22–24, 27, 28], and such layers are known to suffice [12, 13]. In synchronization, holonomy classifies edge potentials [29] and cycle inconsistency is the standard diagnostic [11, 30]. In ML more broadly, gauge structure appears through frames on meshes [6, 7], operator readings of attention [4], orthogonal state models [5], and sheaf networks [20, 21, 35], none with interaction between edge maps. What we add is the derivation from per-entity frame freedom on general relational graphs—the closed-form O(d)O(d) statement, where the reflections matter—its reading across three literatures, and the measurements below. Each edge carries Tij∈O(d)T_{ij} \in O(d) with Tji=Tij−1T_{ji} = T_{ij}^{-1}, and a gauge transformation (an independent change of coordinates at each entity) acts by Tij↦giTijgj−1T_{ij} \mapsto g_i T_{ij} g_j^{-1}.

References (29)