Abstract
Gating mechanisms are ubiquitous, yet a complementary question in feed-forward networks remains under-explored: how to introduce frequency-rich expressivity without sacrificing stability and scalability? This tension is exposed by spline-based Kolmogorov-Arnold Network (KAN) parameterizations, where grid refinement can induce parameter growth and brittle optimization in high dimensions. To propose a stability-preserving way to inject spectral capacity into existing MLP/FFN layers under fixed parameter and training budgets, we introduce Spectral Gating Networks (SGN), a drop-in spectral reparameterization. SGN augments a standard activation pathway with a compact spectral pathway and learnable gates that allow the model to start from a stable base behavior and progressively allocate capacity to spectral features during training. The spectral pathway is instantiated with trainable Random Fourier Features (learned frequencies and phases), replacing grid-based splines and removing resolution dependence. A hybrid GELU-Fourier formulation further improves optimization robustness while enhancing high-frequency fidelity. Across vision, NLP, audio, and PDE benchmarks, SGN consistently improves accuracy-efficiency trade-offs under comparable computational budgets, achieving 93.15% accuracy on CIFAR-10 and up to 11.7x faster inference than spline-based KAN variants.
Introduction
Standard Feed-Forward Networks (FFNs) and Multi-Layer Perceptrons (MLPs) are the workhorses of modern deep learning. However, they suffer from a fundamental limitation known as spectral bias: they act as low-pass filters, learning smooth, low-frequency patterns with ease while struggling to capture sharp details or high-frequency oscillations. This is particularly problematic in domains like audio processing, high-resolution vision, and scientific computing (PDE solving).
Recent attempts to address this, such as Kolmogorov-Arnold Networks (KANs), replace fixed activations with learnable splines. While expressive, KANs introduce a "Resolution-Efficiency Bottleneck" where increasing detail requires finer grids, leading to exponential parameter growth and irregular memory access patterns that are poorly suited for modern GPU hardware.
Methods: The SGN Architecture
Spectral Gating Networks (SGN) provide a drop-in replacement for standard FFN layers that overcomes spectral bias without the overhead of splines. The core innovation is a dual-pathway design that preserves the stability of traditional MLPs while injecting spectral capacity.
Dual Pathways and Trainable Fourier Features
Instead of replacing standard activations (like GELU), SGN adds a parallel Spectral Branch. The input passes through both a standard "Base MLP" branch for stability and a spectral branch for detail. The spectral branch utilizes sine and cosine functions as Random Fourier Features (RFF). Crucially, these frequencies and phases are not fixed; they are learned during training, allowing the network to dynamically "tune in" to relevant spectral components.
Learnable Gating
A sigmoid-based gating mechanism controls the interaction between these pathways. At the start of training, the gate is biased toward the standard MLP branch, ensuring a stable "cold start." As training progresses, the gate opens to allow high-frequency residuals from the spectral branch to refine the model's output. This entire architecture is built on dense linear algebra (GEMM), ensuring it remains as hardware-efficient as a standard MLP.
Key Insights and Theoretical Foundations
- Stability-Preserving Decoupling: By maintaining the original activation pathway, SGN avoids the optimization instabilities common in pure spectral methods.
- Grid Independence: Unlike KANs, SGN's complexity does not depend on a spatial grid. It captures high-frequency details without parameter explosion.
- Optimal Initialization: The authors derived a specific initialization scaling factor ($\sigma \approx 1.64$) for GELU-based spectral networks to minimize signal distortion during the transition from low-to-high frequency learning.
Key Results
SGN demonstrates superior performance across a wide array of benchmarks, including vision (ImageNet-1K), NLP (GPT-2 on Wikitext-103), and scientific computing.
- Efficiency: SGN is up to 11.7x faster at inference than spline-based KANs in vision tasks and 7.8x faster in NLP.
- Accuracy: On CIFAR-10, SGN achieves 93.15% accuracy. In language modeling, replacing standard layers in GPT-2 with SGN reduced perplexity on Wikitext-103 from 37.50 to 28.37.
- Scientific Robustness: In PDE solving (e.g., Poisson and Burgers equations), SGN consistently outperforms MLPs, particularly in high-frequency regimes where standard networks typically fail.
Conclusion and Future Work
Spectral Gating Networks offer a scalable and stable solution to the spectral bias problem. By combining the robust optimization of MLPs with the expressiveness of trainable Fourier features, SGNs provide a more efficient alternative to spline-based models. Future work will explore the application of SGNs in multi-billion parameter foundation models and investigate more complex gating mechanisms for even finer spectral control.
Summary updated