Skip to main content
QUICK REVIEW

[Paper Review] PCA of high dimensional random walks with comparison to neural network training

Joseph M. Antognini, Jascha Sohl‐Dickstein|arXiv (Cornell University)|Jun 22, 2018
Neural Networks and ApplicationsComputer Science11 citations
TL;DR

This paper analyzes the principal component analysis (PCA) of high-dimensional random walks and compares them to neural network training trajectories. It proves that in high dimensions, most variance lies in the first few PCA components and that projected trajectories form Lissajous curves; experiments show that ResNet-50 and linear models on CIFAR-10 exhibit PCA variance distributions and trajectory shapes similar to random walks with drift, suggesting stochastic optimization dynamics resemble random walks in high-dimensional parameter space.

ABSTRACT

One technique to visualize the training of neural networks is to perform PCA on the parameters over the course of training and to project to the subspace spanned by the first few PCA components. In this paper we compare this technique to the PCA of a high dimensional random walk. We compute the eigenvalues and eigenvectors of the covariance of the trajectory and prove that in the long trajectory and high dimensional limit most of the variance is in the first few PCA components, and that the projection of the trajectory onto any subspace spanned by PCA components is a Lissajous curve. We generalize these results to a random walk with momentum and to an Ornstein-Uhlenbeck processes (i.e., a random walk in a quadratic potential) and show that in high dimensions the walk is not mean reverting, but will instead be trapped at a fixed distance from the minimum. We finally compare the distribution of PCA variances and the PCA projected training trajectories of a linear model trained on CIFAR-10 and ResNet-50-v2 trained on Imagenet and find that the distribution of PCA variances resembles a random walk with drift.

Motivation & Objective

  • To understand the statistical properties of PCA applied to high-dimensional neural network training trajectories.
  • To investigate whether random walks in high-dimensional space can model the geometry of neural network optimization.
  • To determine if PCA projections of neural network weights resemble those of random walks, especially in terms of eigenvalue distribution and trajectory shape.
  • To generalize findings to random walks with momentum and Ornstein-Uhlenbeck processes, modeling SGD more closely.
  • To validate theoretical results using empirical PCA on linear models and ResNet-50-v2 trained on CIFAR-10 and ImageNet.

Proposed method

  • Formal derivation of PCA eigenvalues and eigenvectors for a high-dimensional random walk in flat space, assuming zero-mean i.i.d. increments.
  • Proof that in the high-dimensional and long-trajectory limit, most variance is captured by the first few PCA components.
  • Analytical demonstration that PCA projections of the trajectory form Lissajous curves due to the harmonic structure of the covariance matrix.
  • Generalization to random walks with momentum and Ornstein-Uhlenbeck processes (i.e., drift toward a minimum in a quadratic potential).
  • Empirical comparison of PCA variance distributions and projected trajectories from ResNet-50-v2 and linear models on CIFAR-10 to theoretical random walk models.
  • Use of random Gaussian projections (30,000 dimensions) to enable PCA on high-parameter models like ResNet-50-v2.

Experimental results

Research questions

  • RQ1Do the PCA variance distributions of neural network training trajectories match those of a high-dimensional random walk?
  • RQ2Are the projected trajectories of neural network parameters in PCA subspaces qualitatively similar to Lissajous curves, as seen in random walks?
  • RQ3How do random walks with momentum and in quadratic potentials compare to neural network training dynamics in terms of PCA properties?
  • RQ4To what extent does the PCA of ResNet-50-v2 parameters resemble a random walk with drift, especially in the first PCA component?
  • RQ5Can the full training trajectory of a model be approximated by a random walk with decaying step sizes in terms of PCA projections?

Key findings

  • In the high-dimensional and long-trajectory limit, the first few PCA components capture most of the variance in a random walk, consistent with observations in neural network training.
  • The projection of the random walk trajectory onto any PCA subspace traces a Lissajous curve due to the harmonic structure of the covariance matrix.
  • For random walks with momentum and Ornstein-Uhlenbeck processes, the trajectory remains non-mean-reverting in high dimensions and is trapped at a fixed distance from the minimum.
  • The PCA variance distribution of a linear model trained on CIFAR-10 closely resembles that of an Ornstein-Uhlenbeck process, especially in the middle of training.
  • The PCA variance distribution of ResNet-50-v2 is dominated by the first component, particularly at the end of training, indicating a strong directional drift, consistent with a random walk with drift.
  • Projected trajectories of both the linear model and ResNet-50-v2 in PCA subspaces strongly resemble those of random walks, with only minor deviations such as a slight outward turn in the first component at training start and end.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.