Activation function dependence of the storage capacity of treelike neural networks

Jacob A. Zavatone-Veth, Cengiz PehlevanarXiv 2020

Abstract

This study investigates how the choice of activation function influences the storage capacity of two-layer treelike neural networks. Using the statistical mechanics of disordered systems, specifically the Gardner volume approach and replica symmetry breaking, the authors demonstrate that "smooth" activation functions (e.g., ReLU, erf) lead to a finite maximum capacity in the infinite-width limit, whereas "sharp" functions (e.g., sign) allow for unbounded capacity growth. The results provide a theoretical foundation for understanding the expressive power of various activation functions in both artificial and biological neural systems.

Introduction

In deep learning, the selection of activation functions like ReLU, tanh, or Swish is frequently guided by empirical performance rather than a rigorous theoretical understanding of their impact on a network's expressive power. One fundamental metric for this power is storage capacity: the maximum number of random data points a network can correctly classify per learnable weight. While capacity has been calculated for specific cases like the sign or ReLU functions, a unified theory across different activation functions was previously missing. This paper addresses this gap by analyzing the Treelike Committee Machine (TCM), an architecture where inputs are divided into disjoint groups, each feeding into a single hidden unit. This model serves as a tractable proxy for both artificial networks and the branched dendritic structures of biological neurons.

Methods and Architecture

The authors utilize the statistical mechanics of disordered systems, specifically the Gardner volume approach. This method treats network weights as a physical system and calculates the volume of weight space satisfying classification constraints for a given dataset.

Key technical components include:

  • The Replica Trick: Used to average over the "quenched disorder" of random input patterns.
  • Replica Symmetry (RS) and 1-Step Replica Symmetry Breaking (1-RSB): Mathematical assumptions about the weight space structure. 1-RSB is crucial for nonlinear networks where the energy landscape becomes non-convex.
  • Fourier-Hermite Series: Activation functions are decomposed into Hermite polynomials to relate capacity to the function's derivatives and square-integrability (Sobolev class $H^1(\gamma)$).
Figure 1: (a) Schematic of the Treelike Committee Machine (TCM). (b) Storage capacity $\alpha_c$ as a function of the stability margin $\kappa$ for various activation functions.

The study employs synthetic random datasets consisting of i.i.d. random input vectors $x \in \{-1, 1\}^N$ and random target labels $y \in \{-1, 1\}$. Numerical validation was performed using the batch-LAL algorithm for sign activations and Adam optimization on a hinge loss for smooth activations.

Key Results

The most significant finding is the link between mathematical smoothness and computational limits. If an activation function is "smooth" (weakly differentiable and square-integrable), the storage capacity remains finite even as the network becomes infinitely wide. Conversely, "sharp" functions like the sign function allow capacity to diverge as $\sqrt{\log K}$, where $K$ is the number of hidden units.

Figure 2: Comparison of the 1-RSB capacity ($\alpha_{1-RSB}$) against the RS prediction ($\alpha_{RS}$). The 1-RSB calculation provides a tighter bound that matches numerical experiments for nonlinear functions.

Specific capacity values ($\alpha_c$) in the infinite-width limit ($K \to \infty$) include:

  • Linear: $\alpha_c = 2$ (recovering the classic perceptron result).
  • ReLU: $\alpha_c \approx 2.66$ (1-RSB).
  • Error Function (erf): $\alpha_c \approx 2.38$ (1-RSB).
  • Quadratic ($x^2$): $\alpha_c \approx 3.37$ (1-RSB).

Numerical experiments confirmed that empirical capacity never exceeded these theoretical 1-RSB bounds, validating the necessity of the 1-RSB ansatz for nonlinear functions.

Discussion and Biological Implications

The findings suggest a "Dendritic Spike" hypothesis: biological neurons may utilize sharp nonlinearities in their dendrites to achieve significantly higher storage capacities than would be possible with purely smooth computations. However, the study also notes that while nonlinearity increases zero-margin capacity, it can decrease capacity when a safety margin is required, potentially making classification less robust to noise.

Future work remains to extend these results from treelike to fully connected architectures, where hidden units share inputs, and to investigate how activation functions interact with the inherent structure of real-world data. Additionally, the gap between the existence of solutions (capacity) and the algorithmic findability (learnability) of those solutions remains an open frontier.

Summary updated

Abstract

The expressive power of artificial neural networks crucially depends on the nonlinearity of their activation functions. Though a wide variety of nonlinear activation functions have been proposed for use in artificial neural networks, a detailed understanding of their role in determining the expressive power of a network has not emerged. Here, we study how activation functions affect the storage capacity of treelike two-layer networks. We relate the boundedness or divergence of the capacity in the infinite-width limit to the smoothness of the activation function, elucidating the relationship between previously studied special cases. Our results show that nonlinearity can both increase capacity and decrease the robustness of classification, and provide simple estimates for the capacity of networks with several commonly used activation functions. Furthermore, they generate a hypothesis for the functional benefit of dendritic spikes in branched neurons.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
wide treelike committee machinesReplica-symmetric (RS), quadratic activationstorage capacity α_RS4Storage Capacity · width=infinite · disorder=Bernoulli · activation=quadratic · replica-method=RS · weight-constraint=spherical
Source quote
L88: Using this result, we can characterize the RS capacity of wide treelike committee machines for several commonly-used activation functions (see Appendix \ref{app:sec:examples} for details). As previously noted, for a linear activation function, our result reduces to Gardner's perceptron capacity \cite{gardner1988space}. As the sign function is not weakly differentiable, we recover the result that the capacity diverges \cite{engel1992storage,barkai1992broken}. ReLU is weakly differentiable, and we recover the result from \cite{baldassi2019properties} that \alpha-RS = 2\pi/(\pi-1) \simeq 2.93388. Considering sigmoidal activations, we find that \alpha-RS = 2\arcsin(2/3)/\pi \simeq 2.45140 for the error function, while \alpha-RS \simeq 2.35561 for the hyperbolic tangent and the logistic function. As an example of a non-monotonic activation function, we consider a quadratic, which yields \alpha-RS = 4. We plot the RS capacity as a function of margin for these activation functions in Figure \ref{fig:diagram}b, illustrating how nonlinearity can reduce the large-margin capacity.
treelike committee machinesOne-step replica-symmetry-breaking (1-RSB), ReLU activationstorage capacity α_1-RSB2.66428Storage Capacity · width=infinite · disorder=Bernoulli · activation=ReLU · replica-method=1-RSB · weight-constraint=spherical
Source quote
L94: As detailed in Appendix \ref{app:sec:1rsb}, this calculation yields an expression for \alpha-1-RSB as the solution to a two-dimensional minimization problem over q-0 and r. Importantly, the finite-capacity condition at 1-RSB is the same as that with RS. For functions in \mathcal{H} (1)(\gamma), the resulting minimization problem must usually be solved numerically, hence we give results for only a few tractable examples. For these examples, we illustrate this minimization problem by plotting its landscape in Figure \ref{fig:1rsb_minimization}. For comparison purposes, we include the landscape for linear activation functions, for which RSB does not occur \cite{talagrand2003spin,gardner1988space,gardner1988optimal,shcherbina2003rigorous}. For ReLU, we obtain \alpha-1-RSB \simeq 2.66428 at (q-0 (\ast),r (\ast)) \simeq (0.75716, 16.6374). This result is slightly lower than the \alpha-1-RSB \simeq 2.92 reported by \cite{baldassi2019properties}, a discrepancy which likely results from differences in numerical analysis (see Appendix \ref{app:sec:examples}). For erf, we obtain \alpha-1-RSB \simeq 2.37500 at (q-0 (\ast),r (\ast)) \simeq (0.75463, 7.75682). Finally, for the quadratic, we have \alpha-1-RSB(\kappa = 0) \simeq 3.37466 at (q-0 (\ast),r (\ast)) \simeq (0.28452, 6.39299). In Figure \ref{fig:diagram}, we plot the 1-RSB capacity for these activation functions at nonzero margins. The gap between the RS and 1-RSB results for the quadratic is larger than that for erf or ReLU, both in the numerical value of the capacity and in the difference between the inter- and intra-group overlaps. Though the capacities at 1-RSB are reduced relative to the RS result, their ordering for these activation functions is preserved.
treelike committee machinesOne-step replica-symmetry-breaking (1-RSB), error-function (erf) activationstorage capacity α_1-RSB2.37500Storage Capacity · width=infinite · disorder=Bernoulli · activation=erf · replica-method=1-RSB · weight-constraint=spherical
Source quote
L94: As detailed in Appendix \ref{app:sec:1rsb}, this calculation yields an expression for \alpha-1-RSB as the solution to a two-dimensional minimization problem over q-0 and r. Importantly, the finite-capacity condition at 1-RSB is the same as that with RS. For functions in \mathcal{H} (1)(\gamma), the resulting minimization problem must usually be solved numerically, hence we give results for only a few tractable examples. For these examples, we illustrate this minimization problem by plotting its landscape in Figure \ref{fig:1rsb_minimization}. For comparison purposes, we include the landscape for linear activation functions, for which RSB does not occur \cite{talagrand2003spin,gardner1988space,gardner1988optimal,shcherbina2003rigorous}. For ReLU, we obtain \alpha-1-RSB \simeq 2.66428 at (q-0 (\ast),r (\ast)) \simeq (0.75716, 16.6374). This result is slightly lower than the \alpha-1-RSB \simeq 2.92 reported by \cite{baldassi2019properties}, a discrepancy which likely results from differences in numerical analysis (see Appendix \ref{app:sec:examples}). For erf, we obtain \alpha-1-RSB \simeq 2.37500 at (q-0 (\ast),r (\ast)) \simeq (0.75463, 7.75682). Finally, for the quadratic, we have \alpha-1-RSB(\kappa = 0) \simeq 3.37466 at (q-0 (\ast),r (\ast)) \simeq (0.28452, 6.39299). In Figure \ref{fig:diagram}, we plot the 1-RSB capacity for these activation functions at nonzero margins. The gap between the RS and 1-RSB results for the quadratic is larger than that for erf or ReLU, both in the numerical value of the capacity and in the difference between the inter- and intra-group overlaps. Though the capacities at 1-RSB are reduced relative to the RS result, their ordering for these activation functions is preserved.
treelike committee machinesOne-step replica-symmetry-breaking (1-RSB), quadratic activationstorage capacity α_1-RSB3.37466Storage Capacity · width=infinite · margin=κ=0 · activation=quadratic · replica-method=1-RSB · weight-constraint=spherical
Source quote
L94: As detailed in Appendix \ref{app:sec:1rsb}, this calculation yields an expression for \alpha-1-RSB as the solution to a two-dimensional minimization problem over q-0 and r. Importantly, the finite-capacity condition at 1-RSB is the same as that with RS. For functions in \mathcal{H} (1)(\gamma), the resulting minimization problem must usually be solved numerically, hence we give results for only a few tractable examples. For these examples, we illustrate this minimization problem by plotting its landscape in Figure \ref{fig:1rsb_minimization}. For comparison purposes, we include the landscape for linear activation functions, for which RSB does not occur \cite{talagrand2003spin,gardner1988space,gardner1988optimal,shcherbina2003rigorous}. For ReLU, we obtain \alpha-1-RSB \simeq 2.66428 at (q-0 (\ast),r (\ast)) \simeq (0.75716, 16.6374). This result is slightly lower than the \alpha-1-RSB \simeq 2.92 reported by \cite{baldassi2019properties}, a discrepancy which likely results from differences in numerical analysis (see Appendix \ref{app:sec:examples}). For erf, we obtain \alpha-1-RSB \simeq 2.37500 at (q-0 (\ast),r (\ast)) \simeq (0.75463, 7.75682). Finally, for the quadratic, we have \alpha-1-RSB(\kappa = 0) \simeq 3.37466 at (q-0 (\ast),r (\ast)) \simeq (0.28452, 6.39299). In Figure \ref{fig:diagram}, we plot the 1-RSB capacity for these activation functions at nonzero margins. The gap between the RS and 1-RSB results for the quadratic is larger than that for erf or ReLU, both in the numerical value of the capacity and in the difference between the inter- and intra-group overlaps. Though the capacities at 1-RSB are reduced relative to the RS result, their ordering for these activation functions is preserved.
BibTeX
@misc{zavatoneveth2020activation,
  author = {Jacob A. Zavatone-Veth and Cengiz Pehlevan},
  title = {{Activation function dependence of the storage capacity of treelike neural networks}},
  year = {2020},
  eprint = {2007.11136},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.11136},
}
Figure