Visualizing High-Dimensional Trajectories on the Loss-Landscape of ANNs

Stefan Horoi, Jessie Huang, Guy Wolf, Smita Krishnaswamy

TL;DR

Researchers have developed a novel "Jump and Retrain" (J&R) procedure to sample the high-dimensional loss landscapes of neural networks, coupled with non-linear visualization (PHATE) and Topological Data Analysis (TDA). Their findings reveal that networks that generalize well inhabit "topologically simple" regions of the landscape, while those that merely memorize data are surrounded by complex, "bumpy" geometry.

What Problem Does This Paper Address?

Deep learning models are notoriously overparameterized, yet they generalize remarkably well to unseen data. To understand why, researchers often study the "loss landscape"—a mathematical surface representing the network's error relative to its millions of parameters.

The challenge is that this landscape is incredibly high-dimensional. Previous attempts to visualize it relied on linear methods, like taking 1D or 2D "slices" (linear interpolation) or using PCA. These methods are like trying to understand the geography of the Himalayas by looking at a single flat photograph; they miss the non-linear "valleys" and "ridges" that the optimizer actually traverses. The authors aim to move beyond these linear snapshots to capture the true, manifold-like structure of the landscape.

Methods

The paper introduces a three-step framework:

  1. Jump and Retrain (J&R) Sampling: Instead of sampling points on a fixed grid, the authors start at a converged minimum ($\theta_o$), "jump" to a random point in the parameter space, and then "retrain" the model back toward a low-loss region. This creates trajectories that stay on the "low-loss manifold" actually relevant to the model's training.
  2. Cosine-Distance PHATE: To visualize these high-dimensional trajectories in 2D, they use PHATE (Potential of Heat-diffusion for Affinity-based Trajectory Embedding). Unlike t-SNE or UMAP, which can "shatter" continuous paths, PHATE is designed to preserve global trajectory structures. They adapt it using cosine distance to better handle high-dimensional weight vectors.
  3. Topological Data Analysis (TDA): To move from qualitative pictures to quantitative data, they use persistent homology. They treat the sampled points as a graph and "filter" it based on loss values, measuring the appearance and disappearance of connected components and cycles (Betti numbers). This allows them to calculate "total persistence," a single number representing the topological complexity (or "bumpiness") of the region.

Datasets

The authors evaluated their methods using:

  • CIFAR-10: The standard image classification benchmark.
  • Wide ResNets (WResNet): Specifically architectures like WResNet28-2 and WResNet16-2.
  • Artificial Data: A synthetic dataset with a tree-like structure used to validate that PHATE correctly recovers known geometries compared to PCA or t-SNE.

Key Insights and Ideas

  • Generalization is Visible: In PHATE plots, "good" minima (those that generalize well) show a distinctive star-shaped pattern. This suggests the minimum acts as a powerful attractor; even when the model is "pushed" away, it returns directly.
  • Memorization is Chaotic: Minima reached by training on randomized labels (pure memorization) or without regularization show more random, outward-moving trajectories. The model doesn't return to the center easily, indicating a less stable, more complex local environment.
  • The "Flatness" Connection: The paper provides a topological basis for the "flat minima" hypothesis. They show that good generalization is strongly correlated with low topological activity. Essentially, the regions around good minima are "smoother" and have fewer "holes" or "bumps" than the regions around bad minima.
  • Regularization Simplifies Topology: Weight decay (a common regularization technique) was shown to explicitly guide the optimizer toward these topologically simpler regions.

Key Results

  • Classification Accuracy: The authors tested if the sampled landscape data could predict a network's generalization ability. Using J&R features, a simple classifier achieved 39.2% accuracy on a 5-class generalization task, significantly outperforming grid sampling (30.1%) and naive random sampling (31.8%).
  • Predicting Training Details: J&R sampling was also much better at identifying whether a model used data augmentation (72.1% accuracy) or weight decay (58.2% accuracy) compared to traditional sampling methods.
  • Total Persistence: Figure 3B clearly shows a trend: as the test loss at the optimum increases (worse generalization), the "total persistence" (topological complexity) also increases.

Limitations and Future Work

  • Local vs. Global: The study focuses on the regions surrounding found minima. It does not yet provide a way to visualize the entire global loss landscape from initialization to convergence in a single, tractable way.
  • Computational Cost: While more informative, the "Jump and Retrain" procedure is computationally more expensive than static sampling because it requires multiple mini-training sessions.
  • Time Dependency: The authors suggest that future work should incorporate dimensionality reduction techniques that better account for the explicit time-dependency of the training trajectories.

Summary updated

BibTeX
@inproceedings{horoi2022visualizing,
  author = {Stefan Horoi and Jessie Huang and Guy Wolf and Smita Krishnaswamy},
  title = {{Visualizing High-Dimensional Trajectories on the Loss-Landscape of ANNs}},
  booktitle = {IDA},
  year = {2022},
  doi = {10.1007/978-3-031-01333-1\_14},
}
Figure