Neural networks often lose their ability to learn new information over time—a phenomenon known as "loss of plasticity." This paper introduces Deep Fourier Features (DFF), a simple architectural change that replaces standard activation functions with sine and cosine pairs. This approach maintains a dynamic balance between the robust trainability of linear models and the expressive power of deep, non-linear networks.
The Challenge of Continual Learning
In standard machine learning, models are typically trained on data drawn from a fixed, stationary distribution. However, in continual learning, the data distribution changes over time. Under these non-stationary conditions, most deep neural networks—especially those relying on ReLU activations—suffer from a severe loss of plasticity. As they learn sequential tasks, they become increasingly "stiff" and eventually lose the ability to adapt to new data.
While researchers have proposed various workarounds, such as re-initializing "dead" neurons or applying complex regularization schemes, the underlying principles that make an algorithm inherently "plastic" have remained elusive. This paper investigates whether the inherent non-linearity of neural networks is the primary culprit and seeks an inductive bias capable of sustaining learning indefinitely.
Deep Fourier Features and Adaptive Linearity
The authors begin with a surprising theoretical insight: linear models do not lose plasticity. They provide formal proofs demonstrating that linear function approximators, and even certain deep linear networks, maintain their trainability regardless of how many tasks they have previously encountered. The suboptimality gap for linear models on a new task is bounded by a constant that does not grow with the number of previous tasks.
To bring this "immortal" trainability to non-linear networks, the authors propose Deep Fourier Features. Instead of using a standard ReLU activation, every hidden layer maps each pre-activation $z$ to two units: $\sin(z)$ and $\cos(z)$.
The effectiveness of this method lies in adaptive linearity. Because of the phase shift between sine and cosine, for any given value of $z$, at least one of the two functions is in a region that is well-approximated by a linear function. This ensures that the network always "embeds" a deep linear network within its parameters. This embedded linearity provides a reliable path for gradients to flow, allowing the model to remain trainable even as the overall learned representation becomes highly non-linear.
Key Insights and Empirical Results
The authors evaluated DFFs on standard continual learning benchmarks, including CIFAR-10, CIFAR-100, and tiny-ImageNet, testing across non-stationary scenarios like diminishing label noise and class-incremental learning.
- The "Unit Sign Entropy" Metric: To measure neuron diversity, the authors use entropy. ReLU neurons often saturate, becoming permanently "on" or "off" (low entropy). DFFs, by contrast, maintain high entropy because periodic functions naturally oscillate between positive and negative values, preventing dead neurons.
- A "Good" Overfitting Problem: DFF networks are so highly trainable that they tend to overfit more easily than ReLU networks. However, this is framed as a benefit: it allows practitioners to apply much stronger regularization techniques (like weight decay or spectral regularization), ultimately leading to better generalization than stiff ReLU networks could achieve.
- Stress Testing Trainability: In a "sanity check" experiment where networks had to memorize random labels across 100 consecutive tasks, DFF networks maintained near-perfect trainability. In stark contrast, ReLU networks saw their accuracy plummet to near-zero after just a few tasks.
- Superior Generalization and Efficiency: On complex datasets like tiny-ImageNet with diminishing label noise, DFFs combined with regularization significantly outperformed standard ResNet-18 baselines and state-of-the-art plasticity-preserving methods. Furthermore, despite halving the effective width for a fixed parameter count (due to concatenating two features per pre-activation), DFF networks consistently matched or beat wider ReLU architectures.
Limitations and Future Work
While highly effective, the authors acknowledge a few areas for future exploration:
- Computational Overhead: Calculating trigonometric functions is slightly more computationally expensive than the simple thresholding logic of a ReLU, though this cost is generally dwarfed by the matrix multiplications in deep networks.
- Hyperparameter Sensitivity: Because DFFs are so plastic, they require careful tuning of regularization strengths to prevent them from learning too quickly and overfitting to noise.
- Scaling to Reinforcement Learning: The current research focuses on supervised learning. Reinforcement Learning—where the data distribution is inherently non-stationary due to an agent's continuously updating policy—represents a highly promising next frontier for Deep Fourier Features.
Summary updated