Lune

ICML2026Top-tier venue

Symmetry Reveals the In-Context Classifier: Transformers Implement Mean-Shift Dynamics

Patrick Lutz, Themistoklis Haris, Arjun Chandra, Aditya Gangrade, Venkatesh Saligrama

2026Year

Abstract

Transformers can perform in-context classification from a few labeled examples, yet the inference-time algorithm remains opaque. We study multi-class linear classification in the hard no-margin regime and make the computation identifiable by enforcing feature-and labelpermutation equivariance at every layer. This yields highly structured weights and enables interpretability while maintaining functional equivalence. From these models we extract an explicit depth-indexed recursion-an end-to-end identified, emergent update rule inside a softmax transformer, to our knowledge the first of its kind. Attention matrices formed from mixed feature-label Gram structure drive coupled updates of training points, labels, and the test probe. The resulting dynamics implement a geometry-driven algorithmic motif, which can provably amplify class separation and yields robust expected class alignment.

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext 71da5681-986c-4c77-b853-6b8fffb4cac5

Builds on28

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines