Sequential Group Composition: A Window into the Mechanics of Deep Learning
Giovanni Luca Marchetti, Daniel Kunin, Adele Myers, Francisco Acosta, Nina Miolane
TL;DR
This work introduces the sequential group composition task as a principled probe of how neural networks learn to compose transformations from sequences. By embedding group elements with orbit-based encodings and leveraging the group Fourier transform, the authors derive a precise, mathematically grounded picture: two-layer nets learn irreducible representations one at a time in an order dictated by the encoding’s harmonic content, but require exponential width in the sequence length $k$ to achieve exact learning. Depth unlocks dramatic efficiency gains by exploiting associativity: RNNs perform sequential composition in $\mathcal{O}(k)$ steps, while multilayer MLPs realize parallel composition in $\mathcal{O}(\log k)$ layers, with Transformers potentially offering algebraic shortcuts. The Alternating Gradient Flow framework reveals a staged learning dynamic with distinct utility-maximization and cost-minimization phases, and the results establish a clear connection between representation learning, network architecture, and learning dynamics for sequential data. Overall, the paper provides a tractable, analytical window into how deep networks acquire structured, algebraic capabilities, with implications for understanding and designing architectures for algorithmic tasks.
Abstract
How do neural networks trained over sequences acquire the ability to perform structured operations, such as arithmetic, geometric, and algorithmic computation? To gain insight into this question, we introduce the sequential group composition task. In this task, networks receive a sequence of elements from a finite group encoded in a real vector space and must predict their cumulative product. The task can be order-sensitive and requires a nonlinear architecture to be learned. Our analysis isolates the roles of the group structure, encoding statistics, and sequence length in shaping learning. We prove that two-layer networks learn this task one irreducible representation of the group at a time in an order determined by the Fourier statistics of the encoding. These networks can perfectly learn the task, but doing so requires a hidden width exponential in the sequence length $k$. In contrast, we show how deeper models exploit the associativity of the task to dramatically improve this scaling: recurrent neural networks compose elements sequentially in $k$ steps, while multilayer networks compose adjacent pairs in parallel in $\log k$ layers. Overall, the sequential group composition task offers a tractable window into the mechanics of deep learning.
