Lookaround Optimizer: k steps around, 1 step average

Jiangtao Zhang, Shunyu Liu, Jie Song, Tongtian Zhu, Zhengqi Xu, Mingli Song · DOI

Introduction

In the pursuit of robust deep learning models, researchers have long identified "flat minima"—regions in the loss landscape where the loss remains consistently low despite small perturbations in weights—as a key indicator of superior generalization. While Weight Averaging (WA) is a popular technique for reaching these regions, it often struggles with a fundamental "diversity-locality" conflict.

Existing methods typically fall into two camps: those with low diversity, like Stochastic Weight Averaging (SWA), which averages points along a single trajectory; and those with low locality, which attempt to average models trained independently from scratch. The former fails to explore enough of the landscape, while the latter often fails because the models reside in different "basins," leading to a performance collapse upon averaging. The Lookaround Optimizer addresses this gap by alternating between parallel exploration and weight synchronization, achieving a state of "diversity-in-locality."

The Lookaround Mechanism

Lookaround transforms the training process into a series of cycles, each consisting of two distinct phases: the Around Step and the Average Step.

1. The Around Step

Starting from a shared weight checkpoint, the algorithm initializes $d$ different instances of the model. These instances are trained simultaneously for $k$ steps. To ensure the models explore different functional directions while remaining in the same neighborhood, each instance is assigned a different data augmentation strategy (e.g., varying rotations, flips, or color jitters). This diversity in data forcing ensures that each model "pulls" toward a different edge of the local loss basin.

2. The Average Step

After $k$ steps, the weights of the $d$ models are averaged. This average serves as the consolidated starting point for the next cycle. By averaging these diverse yet local points, the optimizer effectively moves the model toward the center of the basin, which is typically flatter and more robust than the individual trajectories.

Comparison with Lookahead

While the well-known Lookahead optimizer utilizes a "slow" and "fast" weight mechanism along a single path, Lookaround is more aggressive. It utilizes multiple trajectories to explore the surrounding landscape simultaneously, providing a more comprehensive view of the local geometry before syncing back to the central path.

Theoretical and Empirical Results

Theoretical Foundation

The authors provide a theoretical basis for Lookaround using Noisy Quadratic Analysis. Their findings indicate that Lookaround possesses a lower limiting expected risk and demonstrates faster convergence compared to standard SGD and Lookahead. This suggests that the "around-then-average" rhythm is not just empirically useful but mathematically sound for minimizing risk in stochastic environments.

Performance Benchmarks

Lookaround was evaluated across a variety of architectures, including CNNs (ResNet, VGG, ResNeXt) and Vision Transformers (ViT), on datasets ranging from CIFAR to ImageNet.

  • ImageNet: Using a ResNet50 backbone, Lookaround achieved a 77.32% Top-1 accuracy, significantly outperforming standard SGDM (75.97%) and Lookahead (76.52%).
  • CIFAR-100: The optimizer consistently provided a 1–2% accuracy improvement over standard SGD across various ResNet depths.
  • Fine-tuning: In transfer learning scenarios, such as fine-tuning a pre-trained ViT-B/16 on CIFAR-100, Lookaround reached 92.21% accuracy, surpassing the Adam optimizer's 91.55%.

Beyond raw accuracy, training curves indicate that Lookaround provides enhanced stability, particularly in the later stages of training where standard SGD often suffers from high-variance fluctuations.

Considerations for Implementation

While Lookaround offers significant performance gains, it introduces specific trade-offs:

  • Computational Budget: Training $d$ models for $k$ steps increases the raw computational requirement by a factor of $d$. However, because the "around" steps are entirely independent, they are perfectly suited for parallelization across multiple GPUs. In a multi-GPU environment, the wall-clock time can remain comparable to standard training.
  • Hyperparameters: Users must tune the number of parallel models ($d$) and the synchronization interval ($k$). While the method is robust, these parameters influence the balance between exploration and consolidation.

Conclusion

The Lookaround Optimizer demonstrates that Data Augmentation and Weight Averaging are highly synergistic. By using augmentation to drive diversity and averaging to maintain locality, Lookaround effectively navigates the loss landscape to find flatter, more generalizable minima. As deep learning moves toward increasingly complex architectures, such "diversity-in-locality" strategies offer a promising path for improving model reliability and performance.

Summary updated

BibTeX
@inproceedings{zhang2023lookaround,
  author = {Jiangtao Zhang and Shunyu Liu and Jie Song and Tongtian Zhu and Zhengqi Xu and Mingli Song},
  title = {{Lookaround Optimizer: k steps around, 1 step average}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=k1Xy5zCNOJ},
}
Figure