Abstract
A major factor in the success of deep neural networks is the use of sophisticated architectures rather than the classical multilayer perceptron (MLP). Residual networks (ResNets) stand out among these architectures for their remarkable performance. While most researchers credit ResNets for making deep models "easier to train," this work reveals a deeper functional advantage: ResNets are fundamentally smoother than standard MLPs. By leveraging the Neural Tangent Kernel (NTK) framework, we prove that ResNets promote smoother interpolations, which directly contributes to their superior generalization and explains why "dampening" residual connections is such an effective practical trick.
Introduction: Beyond Optimization
The leap in deep learning performance over the last decade is largely attributed to architectural innovations, most notably the skip connection introduced in Residual Networks (ResNets). Traditionally, the success of ResNets has been explained through the lens of optimization. Skip connections are thought to prevent vanishing gradients and create "flatter" loss surfaces, making it easier for gradient descent to find global minima.
However, this perspective overlooks a critical question: Do ResNets actually learn "better" functions? This paper investigates the concept of smoothness. In machine learning, a smoother function—one that avoids unnecessary oscillations or sharp transitions between data points—is generally expected to generalize better to unseen data. We formally compare the smoothness of ResNets versus MLPs to determine if the architecture itself acts as an implicit regularizer.
Methodology: The Neural Tangent Kernel Framework
To analyze the functional properties of these architectures, we utilize the Neural Tangent Kernel (NTK). The NTK describes the behavior of a neural network in the "infinite-width limit." In this regime, training a complex neural network becomes equivalent to performing kernel regression with a fixed kernel.
Our methodological approach involves several key steps:
- ResNet NTK Derivation: We derive a closed-form recursive formula for the NTK of a ResNet variant that includes a weighting matrix on the residual branch.
- Stability Analysis: We prove that the ResNet NTK remains stable during training, ensuring that the smoothness properties observed at initialization persist as the model learns.
- Quantitative Smoothness Metric: To provide a rigorous numerical measure of "edginess" versus "smoothness," we utilize the $L^2$-norm of the second derivative ($\mu(f)$), calculated via Fast Fourier Transforms (FFT).
Key Insights: The Architecture of Smoothness
Our analysis reveals several fundamental differences between ResNets and MLPs:
The "Alpha" Knob
ResNets often employ a hyperparameter ($\alpha$) to scale the residual blocks. Our findings show that $\alpha$ acts as a "smoothness knob." Smaller values of $\alpha$ (which attenuate the residual branch) lead to significantly smoother functions. This provides a theoretical justification for the common practice of dampening residual connections.
ResNets vs. MLPs
Even under standard settings ($\alpha=1$), ResNets are naturally smoother than MLPs. As network depth increases, MLPs become increasingly "edgy" and prone to sharp transitions. In contrast, ResNets maintain their functional composure, effectively "averaging out" non-smooth artifacts through their skip connections.
The Role of ReLU
The smoothness gap is most pronounced when using ReLU activations. Because ReLU is non-smooth (containing a "kink" at zero), deep MLPs compound these kinks into a jagged functional surface. ResNets mitigate this by dampening the impact of these non-smooth activations across layers. Interestingly, when smooth activations (like the erf function) are used, the smoothness gap between the two architectures largely disappears.
Experimental Results
We evaluated these theoretical insights using synthetic tasks and real-world data.
- 1D Interpolation: In 1D tasks, the MLP NTK produces "peaky" results with sharp transitions at data points. The ResNet NTK produces graceful, rounded curves.
- 2D Smoothness Scores: In 2D tasks, the smoothness measure ($\mu$) for an MLP was approximately 14,700, while a ResNet with $\alpha=0.1$ achieved a score of 15.5—nearly three orders of magnitude smoother.
- MNIST Generalization: On binary MNIST classification (e.g., "0" vs "8") with a limited training set of 50 samples, the smoother ResNet NTK ($\alpha=0.1$) achieved 97.2% accuracy, outperforming the MLP NTK's 96.2%. This confirms that architectural smoothness translates directly to predictive power in low-data regimes.
Conclusion and Limitations
This work provides a functional explanation for the success of ResNets, linking architectural design to the smoothness of the learned function. However, some limitations remain. Our analysis is primarily rooted in the "lazy training" or NTK regime, where weights do not deviate significantly from initialization. While our findings hold for finite-width networks, they do not fully account for the "feature learning" regime characteristic of massive weight shifts. Additionally, the ResNet model used for our proofs includes specific weighting matrices to ensure mathematical tractability, which may differ slightly from standard "off-the-shelf" implementations. Future work will explore these dynamics in broader architectural contexts and training regimes.
Summary updated