Feature Learning and Random Features in Standard Finite-Width Convolutional Neural Networks: An Empirical Study

Maxim Samarin, Volker Roth, David BeliusUAI 2022 · OpenReview

Abstract

The Neural Tangent Kernel (NTK) is an important milestone in the ongoing effort to build a theory for deep learning. Its prediction that sufficiently wide neural networks behave as kernel methods, or equivalently as random feature models arising from linearized networks, has been confirmed empirically for certain wide architectures. In this paper, we compare the performance of two common finite-width convolutional neural networks, LeNet and AlexNet, to their linearizations on common benchmark datasets like MNIST and modified versions of it, CIFAR-10 and an ImageNet subset. We demonstrate empirically that finite-width neural networks, generally, greatly outperform the finite-width linearization of these architectures. When increasing the problem difficulty of the classification task, we observe a larger gap which is in line with common intuition that finite-width neural networks perform feature learning which finite-width linearizations cannot. At the same time, finite-width linearizations improve dramatically with width, approaching the behavior of the wider standard networks which in turn perform slightly better than their standard width counterparts. Therefore, it appears that feature learning for non-wide standard networks is important but becomes less significant with increasing width. We furthermore identify cases where both standard and linearized networks match in performance, in agreement with NTK theory, and a case where a wide linearization outperforms its standard width counterpart.

Introduction: The NTK Revolution and the Feature Learning Gap

In recent years, the Neural Tangent Kernel (NTK) framework has revolutionized deep learning theory. It suggests that as neural networks become infinitely wide, they behave like simple linear models using fixed features determined at initialization. This is often called "lazy training" because the network doesn't actually learn new representations; it just fits a linear weight to its initial random features.

However, practitioners know that "feature learning"—the network adapting its internal filters to the data—is the primary driver of deep learning's success. This study investigates the transition between these two worlds, asking: How much do standard, finite-width CNNs like LeNet and AlexNet actually benefit from feature learning compared to the "lazy" linearized versions predicted by theory?

Conceptual Framework: The Four Regimes of Training

To understand the relationship between width and feature learning, the authors categorize network behavior into four distinct regimes based on the degree of linearization and the width of the architecture.

The four regimes of network behavior based on width and linearization.

As shown in the figure above, standard networks at low width (Regime I) rely on learned features for strong performance. Linearized counterparts at low width (Regime III) use random features and exhibit weak performance. As width increases, linearized models transition into Regime IV, where a massive library of random features allows them to approach the performance of standard networks, effectively substituting width for the ability to learn features.

Methodology

The authors compare two types of models across various widths:

  1. Standard Networks: Typical ReLU-based CNNs (LeNet and AlexNet) trained with SGD.
  2. Linearized Networks: A first-order Taylor expansion of the standard network around its initial weights. This model is linear in its parameters and uses the gradients of the original network at initialization as fixed "random features."

To see how width affects performance, they scale the number of channels in every layer by a width factor (up to 60x for LeNet and 4x for AlexNet).

Key Results: Width as a Substitute for Learning

The study utilizes benchmarks of increasing difficulty, including MNIST, Translated MNIST, CIFAR-10, and a 10-class ImageNet "Snakes" subset.

The Feature Learning Gap

At standard widths, there is a massive performance gap. For example, on CIFAR-10, standard LeNet outperforms its linearized version by over 20 percentage points. This suggests that for "narrow" networks, learning the right features is non-negotiable. As task difficulty increases, such as with Translated MNIST (where digits are shifted by up to 7 pixels), the gap becomes even more pronounced.

Performance gap between standard and linearized LeNet on Translated MNIST as width increases.

As seen in the Translated MNIST results, the gap at standard width is a staggering 27.65%. Linearized models struggle because they cannot adapt their filters to handle spatial translations. However, as the linearized models get wider, their performance improves dramatically, eventually approaching the performance of standard networks. This supports NTK theory: if you have enough random features, you don't need to learn new ones—you just need a big enough "library" of random ones to find a good fit.

Numerical Bottlenecks

The authors found that linearized models often have "low-rank" feature matrices at small widths. This makes them numerically difficult to optimize, contributing to their poor performance compared to standard networks which "evolve" out of these bad numerical regimes during training.

Conclusion

Standard networks show only marginal gains from increasing width, suggesting they are already efficient at feature learning at small scales. Linearized networks, conversely, are entirely dependent on width for performance. While width can eventually close the performance gap, the computational cost is high; linearized models require storing gradients for every parameter per data point, making them difficult to scale to the size of modern foundation models. Future work may explore whether "mean-field" theories provide a more accurate description of this transition than the NTK framework.

Summary updated

Abstract

The Neural Tangent Kernel is an important milestone in the ongoing effort to build a theory for deep learning. Its prediction that sufficiently wide neural networks behave as kernel methods, or equivalently as random feature models arising from linearized networks, has been confirmed empirically for certain wide architectures. In this paper, we compare the performance of two common finite-width convolutional neural networks, LeNet and AlexNet, to their linearizations on common benchmark datasets like MNIST and modified versions of it, CIFAR-10 and an ImageNet subset. We demonstrate empirically that finite-width neural networks, generally, greatly outperform the finite-width linearization of these architectures. When increasing the problem difficulty of the classification task, we observe a larger gap which is in line with common intuition that finite-width neural networks perform feature learning which finite-width linearizations cannot. At the same time, finite-width linearizations improve dramatically with width, approaching the behavior of the wider standard networks which in turn perform slightly better than their standard width counterparts. Therefore, it appears that feature learning for non-wide standard networks is important but becomes less significant with increasing width. We furthermore identify cases where both standard and linearized networks match in performance, in agreement with NTK theory, and a case where a wide linearization outperforms its standard width counterpart.
BibTeX
@inproceedings{samarin2022feature,
  author = {Maxim Samarin and Volker Roth and David Belius},
  title = {{Feature Learning and Random Features in Standard Finite-Width Convolutional Neural Networks: An Empirical Study}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2022},
  url = {https://openreview.net/forum?id=ScIEZdIiqe5},
}
Figure