arXiv:2610.10305cs.LGOct 2026

Manuscript Offprint

arXiv:2610.10305

How Do Transformers Learn to Represent Symmetries?

Eduardo Santos-Escriche, Valerie Engelmayer, Ya-Wei Eileen Lin, Stefanie Jegelka

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

Abstract

Training Transformer-based architectures with finite data augmentation has become an increasingly popular approach in geometric machine learning. Despite its empirical success, the interplay between the Transformer architecture, invariance to different symmetries, and augmentation budgets remains underexplored. In this paper, we study the ability of a vanilla Transformer to learn various symmetries through finite data augmentation for point cloud datasets. We identify an ordering of increasing learnability across the following symmetry groups: (i) non-angle-preserving symmetries, (ii) angle-preserving symmetries, and (iii) base angle-preserving subgroups, such as translation, rotation, and scale. For the base angle-preserving groups, we further investigate the Transformer's extrapolation behavior and conduct a structural analysis of the trained models, allowing us to identify interpretable mechanisms that induce invariance. Finally, we extend our analysis to equivariant functions and show that the detected mechanisms for approximate invariance can also provide a key building block for learned equivariance. Our project page is available at this https URL.

1 Introduction

Data augmentation has been increasingly used as a common technique to induce approximate symmetry in machine learning models, since it provides practitioners with a flexible and model-agnostic approach that can be straightforwardly combined with off-the-shelf architectures. In particular, it has become popular in various scientific fields such as materials science [1], computational chemistry [2], structural biology [3, 4], as well as in computer vision [5], robotics [6] and reinforcement learning [7]. A notable example is the departure of AlphaFold3 [3] from the hard architectural equivariance of AlphaFold2 [8], and many other works have recently followed suit, e.g., MCFs [9], TransIP [2], Zatom-1 [10], or TABASCO [11].

While this technique has been extensively studied in the literature assuming an infinite number of augmentations [12, 13], this assumption strays far from reality: compute budgets and thus the possible number of augmentations are finite. A model only sees a limited number of transformed views of each sample, and the resulting symmetry is approximate. Recent theoretical work has begun to study this finite data augmentation regime [14, 15], however, a central question still remains open: which architectures can efficiently learn which symmetries from finite data augmentation?

∗^{*}Equal contribution

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure

Figure 1: Overview of our study and main findings. Under finite data augmentation, vanilla Transformers learn invariance more efficiently for angle-preserving symmetries, especially their base groups, than for non-angle-preserving transformations. For these base symmetries, we identify interpretable mechanisms underlying the learned approximate invariance in the trained models.

This question is especially relevant for Transformers [16, 17]. The popularity and scalability of Transformers, together with their empirical success on downstream tasks, have been widely accepted as sufficient justification for their consistent adoption as the core architecture for many augmentation-based approaches. However, the interplay between their architecture, data, and augmentation budgets for the learned symmetries has not yet been explored. Their broad applicability does not address whether Transformers are equally capable of learning all types of symmetries from data augmentation, or whether their architecture is better aligned with some transformation groups than others.

In this paper, we investigate this question through a systematic study of a vanilla Transformer's ability to learn different symmetries under limited data augmentation budgets, and examine how these learned symmetries are represented in trained models. Our main contributions are the following:

• We systematically investigate the ability of a vanilla Transformer to learn invariance to different symmetries from limited data augmentation and identify its special affinity for angle-preserving symmetries and, in particular, base groups, e.g., translation, rotation, and scale.

• We evaluate the generalization of learned angle-preserving symmetry to transformation ranges that are not observed during training, demonstrating that Transformers can acquire invariant behaviors that extend to unseen transformation ranges.

• We analyze trained Transformers and uncover interpretable mechanisms that implement invariance to each base angle-preserving symmetry, which we further connect to invariant theories and to previously observed empirical phenomena.

• We show that the identified mechanisms underlying approximate invariance in Transformers can also provide key building blocks for learning equivariance.

References (88)