A Johnson-Lindenstrauss Framework for Randomly Initialized CNNs

Ido Nachum, Jan Hazla, Michael Gastpar, Anatoly Khina

The "Squish" Factor: How Random CNNs Handle Image Geometry

When we initialize a neural network with random weights, we are essentially applying a series of random transformations to our data. A long-standing question in deep learning theory is: How does the geometric relationship between data points change as they pass through these random layers?

This paper extends the famous Johnson–Lindenstrauss (JL) lemma to Convolutional Neural Networks (CNNs). It reveals that while randomly initialized ReLU networks usually "squish" data together, CNNs are surprisingly adept at preserving the geometry of natural images. This phenomenon explains why CNNs avoid the immediate representation collapse seen in fully connected networks, providing a theoretical bridge between random initialization and successful training.

The Problem: Geometric Collapse in Neural Networks

In linear fully connected networks (FNNs), the Johnson–Lindenstrauss lemma dictates that geometry is mostly preserved—angles and distances between data points stay roughly the same after transformation. However, the introduction of non-linearities like ReLU fundamentally alters this dynamic.

Previous research demonstrated that ReLU FNNs cause a geometric "collapse": the angles between different inputs contract, eventually squashing the entire dataset toward a single ray as it passes through multiple layers. This collapse destroys "dynamical isometry"—the ideal state where signals flow through a network without exploding or vanishing—which is critical for stable and efficient training.

The authors set out to determine if CNNs suffer from this same geometric collapse. Because CNNs utilize weight sharing and local filters, their geometric behavior is significantly more complex than that of FNNs.

Methodology and Geometric Framework

To analyze this, the authors developed a geometric framework focusing on the "dual activation" of CNNs—a mathematical method to describe how the expected similarity between two outputs relates to the similarity of their inputs.

Key methodological steps included:

  1. Generalizing JL for Convolutions: Deriving a version of the JL lemma specifically tailored for the cyclic convolution operations used in CNN layers.
  2. Dual Activation Analysis: Extending previous work to show how the expected inner product of CNN outputs behaves under different activation functions.
  3. The $r$-boundary Model: To explain why natural images behave differently than random noise, the authors introduced a mathematical definition of a "shared $r$-boundary" for binary images. This models natural images as sets of large, monochromatic patches rather than random pixel assignments.

Key Insights: Why Natural Images Survive

The core revelation of the paper is that dataset dependency is key. In FNNs, geometric contraction depends only on the initial similarity ($\rho$) between two vectors. In CNNs, however, the contraction depends heavily on the nature and structure of the inputs themselves.

Natural images are inherently "patchy," consisting of large, locally constant areas (e.g., a blue sky or a solid wall). Because a CNN filter only processes a small local neighborhood at a time, it mostly operates within these constant areas. Consequently, for natural images, a random ReLU CNN layer acts almost like an isometry, preserving distances. It only "squishes" the data at the boundaries of objects. Since these boundaries make up a tiny fraction of an image's total area, the overall geometry is remarkably well-preserved.

Conversely, if you feed a CNN i.i.d. Gaussian noise, this "patchiness" disappears. Without local structure, the CNN loses its geometric advantage and collapses the data just as severely as an FNN.

Key Results and Empirical Confirmation

  • Linear CNNs: The authors mathematically proved that linear CNNs satisfy a variant of the JL lemma, meaning they preserve the similarity between inputs with high probability.
  • ReLU CNN Bounds: They established tight upper and lower bounds for similarity in ReLU CNNs: $\max\{\rho_{in}, 0\} \leq \bar{\rho}_{out} \leq \frac{1 + \rho_{in}}{2}$.
  • Resolution and Isometry: The framework proves that as image resolution increases (making patches larger relative to the filter size), the CNN becomes an increasingly perfect isometry.

Empirical testing across synthetic and real-world datasets perfectly validates these theoretical claims.

Output vs Input Similarity across datasets

As seen in the visual evidence above, for structured datasets like Fashion-MNIST, CIFAR-10, and ImageNet, the output similarity stays very close to the input similarity (hugging the linear upper bound). In stark contrast, Gaussian inputs follow the curved "ReLU dual activation" line, demonstrating significant geometric contraction.

Limitations and Future Work

While this framework provides a massive leap in understanding CNN initialization, the authors note a few limitations:

  • Single Layer Focus: The primary analysis focuses on the effect of a single randomly initialized layer. A full multi-layer trajectory analysis for CNNs remains an open challenge.
  • Standard Initialization: The study assumes standard i.i.d. Gaussian initialization. In practice, techniques like "mean removal" or "batch normalization" are common, which the authors note can actually induce sharper contractions.
  • Alternative Weights: Future work could explore "delta-orthogonal" initialization or enforcing that filter weights sum to zero. The authors suggest these constraints might cause geometric expansion rather than contraction, potentially helping signals travel even deeper into massive networks.

Summary updated

BibTeX
@inproceedings{nachum2022johnson,
  author = {Ido Nachum and Jan Hazla and Michael Gastpar and Anatoly Khina},
  title = {{A Johnson-Lindenstrauss Framework for Randomly Initialized CNNs}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=YX0lrvdPQc},
}
Figure