TL;DR
Most loss landscape visualizations are restricted to 1D lines or 2D contour slices, missing critical features in neural networks’ high-dimensional parameter spaces. This paper introduces topological landscape profiles—a visual framework leveraging topological data analysis (TDA) and merge trees—to map 3D and 4D loss landscapes into intuitive 2D profile plots of basins, valleys, and saddle points.
What Problem Does This Paper Address?
Understanding the geometry of a neural network's loss landscape provides vital clues about generalization, robustness, and trainability. However, network weight spaces contain millions of parameters. Prior visualization techniques rely on interpolating along 1D paths or slicing 2D planes (either with random directions or the top two Hessian eigenvectors).
These low-dimensional projections inherently discard information captured in higher dimensions (e.g., directions corresponding to the 3rd or 4th Hessian eigenvalues). Squeezing higher-dimensional subspaces directly onto a 2D computer screen without losing topological structure is challenging.
Methods
The authors bridge higher-dimensional sampling and 2D visual representation via Topological Data Analysis:
- Subspace Sampling: Rather than choosing 1 or 2 directions, the method extracts the top $d$ Hessian eigenvectors ($d \in \{3, 4\}$) using
PyHessianto target directions with the most significant local loss fluctuations. - Graph Construction: The sampled $d$-dimensional parameter grid is converted into a symmetric $k$-nearest neighbor graph (setting $k = 4 \times d$ to mimic natural spatial pixel adjacency).
- Merge Tree Computation: Using the Topology ToolKit (TTK), the authors track connected components of sub-level sets across increasing loss thresholds, capturing local minima (degree-1 nodes) and connecting saddle points (degree-3 nodes).
- Topological Landscape Profiles: Adapting an approach by Oesterling et al., merge trees are rendered as 2D profile silhouettes of valleys (basins) rather than hills. Basins are sized by the cumulative number of points in the branch, colored by average loss (darker blue = lower loss), and annotated with critical points (orange saddle points, red minima).
Datasets
- 1D Convection Equation Benchmark: A synthetic hyperbolic partial differential equation transport problem commonly used to evaluate failure modes in Physics-Informed Neural Networks (PINNs) across varying wave-speed coefficients ($\beta \in [1.0, 70.0]$).
- Oxford-IIIT Pet Dataset: A standard computer vision dataset of cat and dog images, used to train a UNet architecture equipped with a learnable CRF-RNN (Conditional Random Field) layer across 30 epochs.
(No new datasets were introduced; standard existing benchmarks were used).
Key Insights and Ideas
- Simpler Topology Correlates with Better Models: Across tested architectures, high-performing hyperparameter settings consistently correspond to simpler loss landscape profiles with fewer spurious critical points and clean, funnel-like basins.
- Instability at Phase Transitions: Near the boundary between high and low performance (e.g., critical thresholds of wave speed $\beta$ in PINNs), the topology exhibits high variance across random seeds. Some runs find reasonable, constrained solutions while others succumb to complex, multi-saddle failure modes.
- Higher Dimensions Reveal Micro-Structure: Comparing 3D to 4D landscape profiles shows that adding an extra Hessian direction reveals far more critical points and spikiness. Crucially, these higher-dimensional sub-basins neatly nest within the broader macro-basins identified in 3D.
- Evolution Over Training: Early training displays flat, high-loss basins. As optimization progresses, basins initially deepen (a less stable phase sensitive to perturbations) before flattening out at lower loss values near convergence (indicating improved stability).
Key Results
- PINN Transport Problem: Evaluated across 14 values of $\beta$ (from $1.0$ to $70.0$) and 5 learning rates ($0.0001$ to $1.0$). Low error regimes ($< 10^{-3}$ relative error) display steep, funnel-like profiles. High error regimes ($\approx 10^0$ relative error) yield flat, bowl-like profiles dominated by saddle points where gradient descent stalls.
- UNet-CRF Learning Dynamics: Trained across 7 learning rates ($0.0001$ to $0.01$) over 30 epochs. Profiles revealed that learning rates that were too small or too large produced significantly deeper, narrower basins (lower stability), correlating directly with lower test accuracy compared to moderate learning rates.
Limitations and Future Work
- The Curse of Dimensionality in Sampling: While the merge tree abstraction technically supports arbitrary dimensions, regular grid sampling in $d$-dimensional space scales exponentially ($O(N^d)$). Consequently, experiments in this paper are practically restricted to $d=3$ and $d=4$.
- Local vs. Global Landscapes: The analysis relies on local perturbations around a single trained checkpoint's Hessian eigenspace. Future work aims to integrate efficient non-uniform sampling and multi-model sampling (connecting multiple distinct local minima) to characterize global loss connectivity.
Summary updated