Harmonics of Learning: Universal Fourier Features Emerge in Invariant Networks

Giovanni Luca Marchetti, Christopher J. Hillar, Danica Kragic, Sophia Sanborn

Authors: Giovanni Luca Marchetti, Christopher J Hillar, Danica Kragic, Sophia Sanborn

Abstract

In this work, we formally prove that, under certain conditions, if a neural network is invariant to a finite group then its weights recover the Fourier transform on that group. This provides a mathematical explanation for the emergence of Fourier features – a ubiquitous phenomenon in both biological and artificial learning systems. The results hold even for non-commutative groups, in which case the Fourier transform encodes all the irreducible unitary group representations. Our findings have consequences for the problem of symmetry discovery. Specifically, we demonstrate that the algebraic structure of an unknown group can be recovered from the weights of a network that is at least approximately invariant within certain bounds. Overall, this work contributes to a foundation for an algebraic learning theory of invariant neural network representations.

Introduction: The Universality of Fourier Features

Whether observing the primary visual cortex of a cat, the grid cells of a rat, or the early layers of a Convolutional Neural Network (CNN), researchers consistently find the same types of representations: spatially localized Fourier basis functions, such as Gabor filters, or periodic firing patterns. This phenomenon, known as the "universality hypothesis," suggests a common underlying principle across diverse biological and artificial substrates.

Emergent Fourier-like features representing the harmonic structure of underlying symmetries.

While empirically well-established, a rigorous theoretical explanation for why these specific features emerge has been lacking. This paper proposes that the mechanism is the downstream invariance of the learner to a group of symmetries (e.g., translations or rotations in natural data). We mathematically prove that enforcing invariance in a neural network forces its weights to learn the harmonic structure—the Fourier features—of the underlying symmetry group.

Methods

The study utilizes harmonic analysis and group theory to define "unitary symmetries" for parametric functions. The core theoretical contribution is a proof showing that if a network layer with complex-valued weights is invariant to the action of a finite group $G$, and its weights are orthonormal, then those weights must coincide with the Fourier transform of $G$ (specifically, its irreducible unitary representations).

To validate this theory, the authors:

  1. Generalized Spectral Networks: Extended polynomial machine learning models to handle non-commutative groups.
  2. Analyzed Standard Primitives: Proved the theory applies to McCulloch-Pitts neurons with complex weights, and by extension, the first layers of deep networks.
  3. Developed a Group Recovery Algorithm: Since weights encode the Fourier transform, they proposed an algorithm to extract the discrete multiplication table of an unknown group $G$ directly from the trained weights.
  4. Established Relaxation Bounds: Proved that the network only needs to be approximately invariant to allow for group structure recovery.

Key Insights and Results

Our findings suggest that invariance is the engine of universality. The emergence of Fourier features is an algebraic inevitability when a learning system is constrained to be invariant to symmetries. For non-commutative groups (like 3D rotations), the mathematics requires matrix-valued harmonics, which aligns with the concept of "capsules" in deep learning—neural units that process matrix-valued signals.

Empirical results using a complex-valued Power-Spectral Network trained with contrastive loss demonstrated:

  • Successful Group Recovery: The authors extracted exact multiplication tables for various groups, including the commutative cyclic group $C_6$, the product group $C_2 \times C_2 \times C_2$, and the non-commutative dihedral group $D_3$.
  • Robustness: The recovery algorithm remained accurate even when training data was corrupted with significant white noise (up to ~0.5 standard deviations).
  • Symmetry Discovery: This approach allows for the discovery of algebraic structures in data without hardcoding prior knowledge of symmetries.

Discussion and Future Work

While this framework provides a strong foundation, it currently relies on complex-valued weights, which are non-standard in most machine learning applications. Future work will explore real-number analogues. Additionally, while the theory explains global harmonics (pure sine waves), biological and CNN features are often localized (wavelets). Extending the framework from groups to "groupoids" may help formalize these locally-defined compositions. Finally, investigating how this framework accommodates modern primitives like attention mechanisms remains an open and promising research direction.

Summary updated

BibTeX
@inproceedings{marchetti2024harmonics,
  author = {Giovanni Luca Marchetti and Christopher J. Hillar and Danica Kragic and Sophia Sanborn},
  title = {{Harmonics of Learning: Universal Fourier Features Emerge in Invariant Networks}},
  booktitle = {Conference on Learning Theory},
  year = {2024},
  url = {https://openreview.net/forum?id=FGht8e5g1b},
}
Figure