Lune

NeurIPS2022Top-tier venue

Ensemble of Averages: Improving Model Selection and Boosting Performance in Domain Generalization

Devansh Arpit, Huan Wang, Yingbo Zhou, Caiming Xiong

Abstract

In Domain Generalization (DG) settings, models trained independently on a given set of training domains have notoriously chaotic performance on distribution shifted test domains, and stochasticity in optimization (e.g. seed) plays a big role. This makes deep learning models unreliable in real world settings. We first show that this chaotic behavior exists even along the training optimization trajectory of a single model, and propose a simple model averaging protocol that both significantly boosts domain generalization and diminishes the impact of stochasticity by improving the rank correlation between the in-domain validation accuracy and out-domain test accuracy, which is crucial for reliable early stopping. Taking advantage of our observation, we show that instead of ensembling unaveraged models (that is typical in practice), ensembling moving average models (EoA) from independent runs further boosts performance. We theoretically explain the boost in performance of ensembling and model averaging by adapting the well known Bias-Variance trade-off to the domain generalization setting. On the DomainBed benchmark, when using a pre-trained ResNet-50, this ensemble of averages achieves an average of 68.0%, beating vanilla ERM (w/o averaging/ensembling) by ∼ 4%, and when using a pre-trained RegNetY-16GF, achieves an average of 76.6%, beating vanilla ERM by 6%. Our code is available at https://github.com/salesforce/ ensemble-of-averages .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

70 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • TIES-Merging: Resolving Interference When Merging Models cites Diverse Weight Averaging for Out-of-Distribution Generalization
  • TIES-Merging: Resolving Interference When Merging Models cites SWAD: Domain Generalization by Seeking Flat Minima
  • TIES-Merging: Resolving Interference When Merging Models cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Diverse Weight Averaging for Out-of-Distribution Generalization cites Out-of-Distribution Generalization via Risk Extrapolation (REx)
  • Diverse Weight Averaging for Out-of-Distribution Generalization cites SWAD: Domain Generalization by Seeking Flat Minima
  • Diverse Weight Averaging for Out-of-Distribution Generalization cites Moment Matching for Multi-Source Domain Adaptation
  • SWAD: Domain Generalization by Seeking Flat Minima cites Out-of-Distribution Generalization via Risk Extrapolation (REx)
  • SWAD: Domain Generalization by Seeking Flat Minima cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
  • SWAD: Domain Generalization by Seeking Flat Minima cites Moment Matching for Multi-Source Domain Adaptation
  • Diff-Instruct: A Universal Approach for Transferring Knowledge From Pre-trained Diffusion Models cites Diverse Weight Averaging for Out-of-Distribution Generalization
  • Rewarded soups: towards Pareto-optimal alignment by interpolating weights fine-tuned on diverse rewards cites Diverse Weight Averaging for Out-of-Distribution Generalization
  • WARM: On the Benefits of Weight Averaged Reward Models cites Diverse Weight Averaging for Out-of-Distribution Generalization
  • WARM: On the Benefits of Weight Averaged Reward Models cites SWAD: Domain Generalization by Seeking Flat Minima
  • WARM: On the Benefits of Weight Averaged Reward Models cites Rewarded soups: towards Pareto-optimal alignment by interpolating weights fine-tuned on diverse rewards
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers70

  1. TIES-Merging: Resolving Interference When Merging ModelsPrateek Yadav, Derek Tam, Leshem Choshen, Colin A. Raffel et al.NeurIPS 2023 · 999 citations
  2. Rewarded soups: towards Pareto-optimal alignment by interpolating weights fine-tuned on diverse rewardsAlexandre Ramé, Guillaume Couairon, Corentin Dancette, Jean-Baptiste Gaya et al.NeurIPS 2023 · 295 citations
  3. Diff-Instruct: A Universal Approach for Transferring Knowledge From Pre-trained Diffusion ModelsWeijian Luo, Tianyang Hu, Shifeng Zhang, Jiacheng Sun et al.NeurIPS 2023 · 268 citations
  4. Diverse Weight Averaging for Out-of-Distribution GeneralizationAlexandre Ramé, Matthieu Kirchmeyer, Thibaud Rahier, Alain Rakotomamonjy et al.NeurIPS 2022 · 183 citations
  5. WARM: On the Benefits of Weight Averaged Reward ModelsAlexandre Ramé, Nino Vieillard, Léonard Hussenot, Robert Dadashi et al.ICML 2024 · 145 citations

Builds on13

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  2. The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution GeneralizationDan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath et al.ICCV 2021 · 2,294 citations
  3. Moment Matching for Multi-Source Domain AdaptationXingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang et al.ICCV 2019 · 2,239 citations
  4. Out-of-Distribution Generalization via Risk Extrapolation (REx)David Krueger, Ethan Caballero, Jörn-Henrik Jacobsen, Amy Zhang et al.ICML 2021 · 1,163 citations
  5. SWAD: Domain Generalization by Seeking Flat MinimaJunbum Cha, Sanghyuk Chun, Kyungjae Lee, Han-Cheol Cho et al.NeurIPS 2021 · 630 citations

Related papers

  1. DART: Diversify-Aggregate-Repeat Training Improves Generalization of Neural NetworksSamyak Jain, Sravanti Addepalli, Pawan Kumar Sahu, Priyam Dey et al.CVPR 2023
  2. In Search of Lost Domain GeneralizationIshaan Gulrajani, David Lopez-PazICLR 2021 · 1,416 citations
  3. Sparse Mixture-of-Experts are Domain Generalizable LearnersBo Li, Yifei Shen, Jingkang Yang, Yezhen Wang et al.ICLR 2023 · 11 citations
  4. PEER Pressure: Model-to-Model Regularization for Single Source Domain GeneralizationDong Kyu Cho, Inwoo Hwang, Sanghack LeeCVPR 2025
  5. SIMPLE: Specialized Model-Sample Matching for Domain GeneralizationZiyue Li, Kan Ren, Xinyang Jiang, Yifei Shen et al.ICLR 2023
Dusk over the sea between two cliffs drawn in fine vertical lines