Symmetry Reveals Layerwise Dynamics: How Transformers Perform In-Context Classification

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Lutz, Patrick, Haris, Themistoklis, Chandra, Arjun, Gangrade, Aditya, Saligrama, Venkatesh
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911730498535424
author Lutz, Patrick
Haris, Themistoklis
Chandra, Arjun
Gangrade, Aditya
Saligrama, Venkatesh
author_facet Lutz, Patrick
Haris, Themistoklis
Chandra, Arjun
Gangrade, Aditya
Saligrama, Venkatesh
contents 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 label-permutation equivariance at every layer. This enables interpretability while maintaining functional equivalence and yields highly structured weights. 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.
format Preprint
id arxiv_https___arxiv_org_abs_2604_11613
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Symmetry Reveals Layerwise Dynamics: How Transformers Perform In-Context Classification
Lutz, Patrick
Haris, Themistoklis
Chandra, Arjun
Gangrade, Aditya
Saligrama, Venkatesh
Machine Learning
Artificial Intelligence
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 label-permutation equivariance at every layer. This enables interpretability while maintaining functional equivalence and yields highly structured weights. 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.
title Symmetry Reveals Layerwise Dynamics: How Transformers Perform In-Context Classification
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2604.11613