Revisiting Mode Connectivity in Neural Networks with Bezier Surface

Jie Ren, Pin-Yu Chen, Ren Wang

Abstract

Researchers have long known that two separate neural networks can be connected by a "path" of low loss, but this paper goes a dimension further. By using nonlinear Bézier surfaces, the authors demonstrate that multiple models can be connected via a continuous 2D manifold of high-performing parameters. This provides a richer map of the loss landscape and introduces novel ways to merge or ensemble models for better accuracy.

The Challenge of High-Loss Barriers

In the world of deep learning, the "loss landscape" is the multidimensional terrain where we search for the lowest point—the optimal model parameters. A fascinating discovery in recent years is Mode Connectivity: the idea that two different models (modes), even if they started from different initializations, are not isolated islands. Instead, they are often connected by a winding, one-dimensional path in parameter space where every model along that path performs just as well as the endpoints.

However, focusing only on 1D curves is akin to exploring a mountain range by only walking along single, narrow trails; it ignores the possibility of broad, flat valleys. Previous attempts to find "surfaces" of connectivity usually relied on simple linear interpolation. This approach often fails, hitting a "high-loss barrier" in the middle where the interpolated model performs poorly.

Comparison of loss surfaces, illustrating a high-loss barrier versus a connected low-loss valley.

This paper asks a critical question: Can we find a smooth, nonlinear surface that connects multiple models while maintaining high performance across the entire area?

Constructing Nonlinear Bézier Surfaces

To overcome the limitations of linear interpolation, the authors move to Bézier surfaces. If a Bézier curve is a smooth path controlled by a few points, a Bézier surface is a smooth "sheet" controlled by a grid of models.

A 3D visualization of a Bézier surface and its controlling grid of points.

The core of their approach is a two-phase "outer-to-inner" optimization strategy:

  1. Phase 1 (The Edges): They first optimize the control points along the edges of the surface—the curves connecting the corner models.
  2. Phase 2 (The Interior): Once the boundaries are stable, they optimize the interior control points to ensure the entire surface represents low-loss models.

Crucially, they also identify a "Linear" special case. If the corner models are selected from the same training trajectory (e.g., checkpoints from epochs 160, 180, 200, and 220), a surface can be constructed through simple linear combinations without any extra optimization, and it still maintains high accuracy.

Experimental Validation

The team validated their approach across several standard benchmarks to ensure the findings were not architecture-specific. They tested the method on VGG16, ResNet18, and Vision Transformers (ViT) using the CIFAR-10, CIFAR-100, and Tiny-ImageNet datasets.

Key Insights and Results

  • The Landscape is Flatter Than We Thought: The existence of these surfaces suggests that high-performance regions in parameter space aren't just narrow threads; they are expansive manifolds.
  • Nonlinearity is the Key: While linear interpolation between independent models usually fails, the flexibility of the Bézier formulation allows the surface to "bend" around high-loss obstacles in the landscape.
  • Model Merging 2.0: Instead of just averaging two models, practitioners can now search an entire 2D surface for the "sweet spot." On CIFAR-10 with VGG16, the best model found on the surface reached 90.7% accuracy, outperforming the average of the starting models (89.6%).
  • Efficient Ensembling: By sampling diverse models from across the surface and averaging their outputs, the ensemble reached 92.0% accuracy (VGG16) and 92.7% (ResNet18), significantly higher than simply ensembling the four corner models.
  • Optimization Efficiency: The authors demonstrated that optimizing the entire network is not strictly necessary to find these surfaces. By only updating the last few layers (Layer-Specific Optimization), they reduced training time by 68% while maintaining nearly identical performance.

Limitations and Future Work

While the paper provides a robust framework for 2D surfaces, the authors acknowledge a few areas for future exploration:

  • Higher Dimensions: The current work focuses on 2D surfaces (using $u, v$ parameters). Exploring 3D volumes or higher-dimensional manifolds could reveal even more structural information about neural network loss landscapes.
  • Computational Overhead: Even with layer-specific optimization, finding these surfaces requires additional training time compared to standard model training.
  • Large-Scale Models: While they successfully tested ViTs, the behavior of these surfaces in massive Large Language Models (LLMs) remains an open question, though the methodology is theoretically generalizable.

By turning the "path" of mode connectivity into a comprehensive "map," this research opens up new ways to understand how neural networks learn and how we can combine them to build more robust AI systems.

Summary updated

BibTeX
@inproceedings{ren2025revisiting,
  author = {Jie Ren and Pin-Yu Chen and Ren Wang},
  title = {{Revisiting Mode Connectivity in Neural Networks with Bezier Surface}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=1NevL7zdHS},
}
Figure