A Johnson-Lindenstrauss Framework for Randomly Initialized CNNs

Ido Nachum, Jan Hazla, Michael Gastpar, Anatoly Khina

Abstract

How does the geometric representation of a dataset change after the application of each randomly initialized layer of a neural network? The celebrated Johnson--Lindenstrauss lemma answers this question for linear fully-connected neural networks (FNNs), stating that the geometry is essentially preserved. For FNNs with the ReLU activation, the angle between two inputs contracts according to a known mapping. The question for non-linear convolutional neural networks (CNNs) becomes much more intricate. To answer this question, we introduce a geometric framework. For linear CNNs, we show that the Johnson--Lindenstrauss lemma continues to hold, namely, that the angle between two inputs is preserved. For CNNs with ReLU activation, on the other hand, the behavior is richer: The angle between the outputs contracts, where the level of contraction depends on the nature of the inputs. In particular, after one layer, the geometry of natural images is essentially preserved, whereas for Gaussian correlated inputs, CNNs exhibit the same contracting behavior as FNNs with ReLU activation.

Introduction: The Geometry of Initialization

In deep learning, the initialization phase is critical. A poor initialization can lead to "geometric collapse," where all input data points are mapped to nearly the same output vector. This causes gradients to vanish or become identical, halting the learning process.

The Johnson-Lindenstrauss (JL) lemma establishes that random linear projections preserve distances between points. While this holds for linear fully connected networks (FNNs), the addition of ReLU non-linearities causes FNNs to contract the angles between inputs. This research investigates whether this same collapse occurs in Convolutional Neural Networks (CNNs).

Methodology

The authors developed a geometric framework to track "cosine similarity" (the angle between vectors) through random CNN layers. Key components include:

  • Dual Activations: Adapting the mathematical concept of dual activations to convolutional structures.
  • Linear CNN Analysis: Proving a JL lemma variant for linear CNNs, confirming they preserve geometry.
  • ReLU CNN Analysis: Establishing tight bounds for output similarity.
  • Shared Boundary Model: A mathematical model representing images as "large monochromatic patches" to analyze the "r-boundary" where patches meet.

Key Insights: Dataset Dependency

A central finding is that CNNs, unlike FNNs, are sensitive to the nature of the input.

  • The "Large Patch" Effect: Natural images consist of large, uniform areas. ReLU non-linearity primarily contracts geometry at the boundaries of these patches. Because boundaries are small relative to the total area, the overall geometry is preserved.
  • CNNs vs. FNNs: When processing i.i.d. Gaussian noise, a CNN behaves like a ReLU FNN, exhibiting contraction. However, with natural images, it acts as an "almost isometry."
  • RGB Correlation: In datasets like ImageNet, high correlation between Red, Green, and Blue channels (~12.5° angles) allows the grayscale theory to extend to color images.

Results and Empirical Confirmation

Theoretical bounds for ReLU CNN mean output similarity ($\bar{\rho}_{out}$) were established as $\max\{\rho_{in}, 0\} \leq \bar{\rho}_{out} \leq \frac{1 + \rho_{in}}{2}$.

Comparison of similarity preservation across datasets. Gaussian noise (a) follows the curved ReLU dual activation (FNN behavior), while natural images (b-d) follow the linear lower bound, acting as near-isometries.

Empirical tests on ImageNet and CIFAR-10 confirmed these findings, with a similarity preservation slope of approximately 0.97—remarkably close to a perfect isometry (1.0). Theorem 5 formally proves that as image resolution increases, reducing the boundary-to-area ratio, the CNN layer approaches a perfect isometry.

Discussion and Future Work

While a single layer is nearly isometric, the slight contraction (~0.03) can accumulate in very deep networks, potentially leading to collapse. Furthermore, standard preprocessing like mean removal can induce sharper contraction. Future research may explore how "zero-sum" filters or Batch Normalization might flip this behavior from contraction to expansion, offering new ways to maintain geometric diversity during training.

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},
}

Loading related content...

Figure