Reproducing Activation Function for Deep Learning

Senwei Liang, Liyao Lyu, Chunmei Wang, Haizhao YangarXiv 2021

Abstract

We propose reproducing activation functions (RAFs) to improve deep learning accuracy for various applications ranging from computer vision to scientific computing. The idea is to employ several basic functions and their learnable linear combination to construct neuron-wise data-driven activation functions for each neuron. Armed with RAFs, neural networks (NNs) can reproduce traditional approximation tools and, therefore, approximate target functions with a smaller number of parameters than traditional NNs. In NN training, RAFs can generate neural tangent kernels (NTKs) with a better condition number than traditional activation functions, lessening the spectral bias of deep learning. As demonstrated by extensive numerical tests, the proposed RAFs can facilitate the convergence of deep learning optimization for a solution with higher accuracy than existing deep learning solvers for audio/image/video reconstruction, PDEs, and eigenvalue problems. With RAFs, the errors of audio/video reconstruction, PDEs, and eigenvalue problems are decreased by over 14%, 73%, and 99%, respectively, compared with baseline, while the performance of image reconstruction increases by 58%.

Introduction: Overcoming Spectral Bias and Optimization Hurdles

Deep neural networks (DNNs) are powerful, but they suffer from two major hurdles in scientific computing and signal processing. First, spectral bias causes standard networks (like those using ReLU) to learn low-frequency, smooth components of a function first, often failing to capture high-frequency or oscillatory details. Second, optimization challenges arise because the "Neural Tangent Kernel" (NTK)—a tool used to describe how networks learn—is often ill-conditioned for standard activations. This makes it difficult for optimizers to find highly accurate solutions for complex problems like nonlinear partial differential equations (PDEs).

While specialized architectures like SIREN (using sine waves) have improved performance in specific domains, they lack the general flexibility needed for diverse applications. This research introduces a data-driven way to construct activations that adapt to the specific "texture" of the target function.

Methodology: The Reproducing Activation Function (RAF) Framework

The core innovation is the RAF framework. Instead of a fixed activation $\sigma(x)$, each neuron computes a learnable linear combination of basic functions: $$\sigma_{i, \ell}(x) = \sum_{p=1}^{P} \alpha_{p, i, \ell} \gamma_p(\beta_{p, i, \ell} x)$$ Where $\gamma_p$ are "basic" functions (e.g., $x, x^2, \sin(x), \exp(-x^2)$), and $\alpha$ and $\beta$ are learnable coefficients and scales.

A primary implementation is the Poly-Sine-Gaussian network, which combines linear, quadratic, trigonometric, and Gaussian bases. This specific mix allows the network to "reproduce" traditional mathematical tools such as orthogonal polynomials, Fourier bases, and wavelets. By doing so, the network achieves exponential approximation rates with fewer parameters than traditional NNs. Furthermore, by making the scaling parameter $\beta$ learnable, the network automatically tunes itself to the specific frequencies present in the data, effectively neutralizing spectral bias.

Experimental Results

High-Fidelity Signal Reconstruction

The researchers evaluated RAFs on audio regression using "Bach" and "Counting" clips. The results demonstrate that RAFs, particularly the Sine-Gaussian variant, achieve significantly lower error and faster convergence compared to SIREN and standard sine activations.

Audio reconstruction comparison between SIREN, Sine, and Sine-Gaussian RAFs.

In broader signal tasks, image reconstruction performance increased by 58%, and audio/video errors dropped by over 14%. The RAFs produce an NTK with a much smaller condition number, smoothing the optimization landscape for faster and more stable training.

Scientific Computing: PDEs and Eigenvalue Problems

RAFs were tested on Poisson equations, low-regularity PDEs with sharp features, and high-dimensional ($d=5$ and $d=10$) nonlinear Schrödinger equations. The performance gains were substantial across all scientific domains.

Training performance across various tasks including regression, Poisson equations, and high-dimensional eigenvalue problems.

Key results include:

  • PDE Solving: Errors were reduced by 73%.
  • Eigenvalue Problems: The most dramatic improvement was seen here, with errors decreasing by 99% compared to traditional deep learning solvers.
  • Efficiency: The Poly-Sine-Gaussian network consistently required fewer parameters to reach higher accuracy than ReLU-based networks.

Conclusion

Reproducing Activation Functions bridge the gap between classical numerical analysis and deep learning. By allowing neurons to learn their own optimal activation shapes from a set of basic functions, RAFs overcome the spectral bias and optimization hurdles that limit standard DNNs. While basis selection remains an area for future research, the current Poly-Sine-Gaussian framework offers a powerful, parameter-efficient tool for high-precision tasks in signal processing and scientific computing.

Summary updated

BibTeX
@misc{liang2021reproducing,
  author = {Senwei Liang and Liyao Lyu and Chunmei Wang and Haizhao Yang},
  title = {{Reproducing Activation Function for Deep Learning}},
  year = {2021},
  eprint = {2101.04844},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2101.04844},
}
Figure