Learning from Randomly Initialized Neural Network Features

Ehsan Amid, Rohan Anil, Wojciech Kotlowski, Manfred K. Warmuth

Abstract

Recent research demonstrates that the architecture of a deep neural network serves as a powerful feature extractor even at initialization. By introducing the Neural Network Prior Kernel (NNPK) and its practical counterpart, Neural Random Features (NRF), this study reveals that a model's inherent structure—comprising layers, skip connections, and activation functions—organizes data into meaningful representations before any training occurs.

Introduction

The success of deep learning is traditionally attributed to the optimization process, where millions of gradient descent steps tune weights to fit data. However, the "Neural Network Prior" suggests that the architecture itself carries significant representational weight. This paper investigates the "prior" state of a network: what representational power does a model possess at the moment of its birth, before seeing a single training example?

Methodology: NNPK and NRF

To quantify this architectural prior, the authors introduce two frameworks:

  1. Neural Network Prior Kernel (NNPK): A theoretical kernel representing the expected similarity between inputs based on the outputs of infinitely many randomly initialized versions of an architecture.
  2. Neural Random Features (NRF): A practical implementation where a specific architecture (e.g., ResNet-18) is initialized with random weights $n$ times. The resulting outputs are concatenated into a high-dimensional feature vector.

In these experiments, the deep network's weights remain frozen. A simple linear logistic regression is trained on top of these extracted NRFs. High performance from this linear head indicates that the random features have successfully captured the underlying structure of the dataset.

Visualizing structural preservation: (a) trained ResNet-18 output probabilities vs. (b) Neural Random Features (NRF) output probabilities on CIFAR-10.

The "Echo" of Architecture

A primary finding is the "Echo" Effect: the relative performance of different architectures using random features mirrors their performance when fully trained. As shown in the performance benchmarks, if one architecture outperforms another after training, it typically shows superior performance at initialization as well. This suggests that training serves to enhance a structural foundation already present in the architecture.

Top-1 accuracy across various model architectures for CIFAR-10 and CIFAR-100, comparing trained models with NRF performance.

Furthermore, the study highlights that design choices known to aid training—such as specific activation functions (ELU, Leaky ReLU) and the inclusion of skip connections—also produce higher-quality NRFs. Skip connections, in particular, are vital; removing them significantly degrades the quality of random features, implying they improve representational quality independently of their role in gradient flow.

Key Results

The representational power of NRFs is substantial across benchmarks:

  • CIFAR-10: While a linear classifier on raw pixels achieves ~40% accuracy, using NRFs from a random ResNet-18 boosts accuracy to over 60%.
  • ImageNet-1K: On this large-scale dataset, NRFs from a random ResNet-18 achieve 10.3% accuracy, a significant improvement over the 3.4% achieved by raw pixels, despite using 37x fewer features.
  • Structural Preservation: Visualizations demonstrate that random networks naturally group semantically similar classes (e.g., "automobiles" and "trucks") in the feature space before training.

Conclusion

The architecture of a neural network is not a blank slate but a sophisticated lens. The NNPK framework provides a "litmus test" for architectural quality, potentially enabling Neural Architecture Search (NAS) without the prohibitive cost of full training. While NRFs do not yet match the performance of fully trained models, they prove that a significant portion of a network's intelligence is encoded in its structure from the start.

Summary updated

BibTeX
@misc{amid2022learning,
  author = {Ehsan Amid and Rohan Anil and Wojciech Kotlowski and Manfred K. Warmuth},
  title = {{Learning from Randomly Initialized Neural Network Features}},
  year = {2022},
  eprint = {2202.06438},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2202.06438},
}
Figure