This paper investigates the phenomenon of grokking in transformers across a broader class of algebraic structures beyond modular addition. Prior mechanistic interpretability work has shown that transformers trained on modular addition learn Fourier-based clock circuits and exhibit delayed generalisation (grokking). We extend this analysis to eight algebraic operations spanning abelian groups, a composite ring, and non-abelian groups (S3, D5, A4, S4), using 1-layer transformers at dₘodel = 64. Our key findings are: 1. A clear abelian vs non-abelian grokking boundary: all abelian operations achieve 100% test accuracy, while non-abelian groups fail to generalise despite perfect training accuracy. 2. Discrete-log re-indexing improves Fourier concentration for modular multiplication (2. 14×), supporting the discrete logarithm representation hypothesis. 3. Non-abelian models exhibit partial circuit formation via Peter–Weyl decomposition even without grokking. 4. Cross-operation embedding similarity (CKA ≥ 0. 80 across all pairs) suggests a shared representational substrate. 5. A capacity-dependent interpretation: abelian tasks rely on 1D irreducible representations, while non-abelian tasks require higher-dimensional irreps exceeding model capacity at dₘodel = 64. All experiments are reproducible via provided code and checkpoint-resume pipelines, runnable on a free Colab T4 GPU (~3 hours). This work contributes new empirical evidence toward understanding the role of algebraic structure and representation theory in neural network generalisation. Code repository: https: //github. com/justbytecode/grokking-beyond-addition
Building similarity graph...
Analyzing shared references across papers
Loading...
Mani Pal
Building similarity graph...
Analyzing shared references across papers
Loading...
Mani Pal (Fri,) studied this question.
www.synapsesocial.com/papers/69c8c3a8de0f0f753b39e904 — DOI: https://doi.org/10.5281/zenodo.19256206