The distance between the weights of the neural network is meaningful

Liqun Yang, Yijun Yang, Yao Wang, Zhenyu Yang, Wei ZengarXiv 2021

Introduction

Understanding the "real capacity" of a neural network—what it actually learns versus its theoretical limit—remains a fundamental challenge in deep learning. Traditionally, researchers have relied on the Information Bottleneck (IB) theory, which examines the mutual information between input data and hidden layer representations. However, IB methods suffer from significant practical drawbacks, including statistical estimation errors from limited data, discretization bias when binning continuous representations, and a high sensitivity to specific activation functions like ReLU.

This paper proposes a paradigm shift: instead of analyzing the data flowing through the network, we should analyze the weights themselves. By measuring the Euclidean distance between a model's initial and trained weights, the authors provide a simpler, more direct metric for estimating accumulated information.

The Weight Space Perspective

The authors view the training process—encompassing random initialization, data ordering, and stochastic gradient descent—as a source of uncertainty. In this framework, learning is the "resolution of uncertainty," transitioning from a high-entropy initial state to a lower-entropy trained state.

Using Multidimensional Scaling (MDS) to project high-dimensional weights into a 3D space, the researchers discovered a distinct geometric pattern. While initial weights are distributed evenly across a high-dimensional sphere, the training process pulls these weights toward specific, meaningful coordinates.

MDS visualization showing how weights cluster in specific regions of the high-dimensional space after training.

Quantifying Information via Weight Distance

To quantify this information gain, the paper introduces the Quasi-Monte Carlo Method (QMCM). This approach treats training as a process that "shrinks" the support (the set of possible values) of the weight distribution. The core metric is the expectation of the shortest distance ($\hat{d}$) between the initial and final weights.

A geometric representation of the distance metric $d_{X'}(x)$ used to quantify the transition from the initial weight space $X$ to the trained subset $X'$.

The central hypothesis is straightforward: $\hat{d}_{t1} < \hat{d}_{t2} \iff I_{t1} < I_{t2}$. In other words, if a network's weights travel a further distance from their starting point, the model has accumulated more information from the dataset.

Experimental Validation

The theory was validated across standard benchmarks including MNIST, CIFAR-10, TensorFlow Flowers, and Pascal VOC, using architectures ranging from simple CNNs to ResNet, VGG, and Yolo v3.

Key Findings:

  1. Information vs. Distance: By varying the number of available training labels (from 20% to 100%), the authors observed that the distance $\hat{d}$ increased consistently with the amount of information provided.
  2. Label Corruption: When labels were shuffled (corrupted), the distance traveled by the weights decreased. This suggests that noisy data prevents the network from reaching meaningful coordinates in weight space, effectively "starving" the model of information.
  3. Stability: Despite the vast differences in scale between architectures, the coefficient of variation for these distance measurements remained low, indicating that the metric is statistically stable.

Limitations and Future Directions

While promising, the method has limitations. It currently assumes that the information learned is "useful" for generalization; in cases of extreme overfitting, a model might travel a large distance to memorize noise, which the metric could misinterpret as high-quality learning. Furthermore, while the metric is excellent for comparing the same model across different data, comparing different architectures remains difficult, as larger models like ResNet have more "room" to store information with less weight movement.

Future work may apply this "weight distance" lens to phenomena like double descent or use it to optimize training by identifying the most informative features in a dataset.

Summary updated

BibTeX
@misc{yang2021distance,
  author = {Liqun Yang and Yijun Yang and Yao Wang and Zhenyu Yang and Wei Zeng},
  title = {{The distance between the weights of the neural network is meaningful}},
  year = {2021},
  eprint = {2102.00396},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.00396},
}
Figure