Skip to main content
QUICK REVIEW

[Paper Review] Sparse Mixture-of-Experts are Domain Generalizable Learners

Bo Li, Yifei Shen|arXiv (Cornell University)|Jun 8, 2022
Domain Adaptation and Few-Shot LearningComputer Science11 citations
TL;DR

This paper proposes Generalizable Mixture-of-Experts (GMoE), a vision transformer-based architecture that enhances domain generalization by aligning with invariant visual correlations through sparse expert specialization. GMoE outperforms SOTA domain generalization methods when trained with ERM and achieves state-of-the-art performance on DomainBed benchmarks, demonstrating that backbone architecture design is a critical, underexplored direction for robustness to distribution shifts.

ABSTRACT

Human visual perception can easily generalize to out-of-distributed visual data, which is far beyond the capability of modern machine learning models. Domain generalization (DG) aims to close this gap, with existing DG methods mainly focusing on the loss function design. In this paper, we propose to explore an orthogonal direction, i.e., the design of the backbone architecture. It is motivated by an empirical finding that transformer-based models trained with empirical risk minimization (ERM) outperform CNN-based models employing state-of-the-art (SOTA) DG algorithms on multiple DG datasets. We develop a formal framework to characterize a network's robustness to distribution shifts by studying its architecture's alignment with the correlations in the dataset. This analysis guides us to propose a novel DG model built upon vision transformers, namely Generalizable Mixture-of-Experts (GMoE). Extensive experiments on DomainBed demonstrate that GMoE trained with ERM outperforms SOTA DG baselines by a large margin. Moreover, GMoE is complementary to existing DG methods and its performance is substantially improved when trained with DG algorithms.

Motivation & Objective

  • To investigate the role of backbone architecture in domain generalization, challenging the dominant focus on loss function design.
  • To formalize the relationship between network architecture alignment and robustness to distribution shifts using algorithmic alignment theory.
  • To develop a novel architecture—Generalizable Mixture-of-Experts (GMoE)—that enhances invariance to spurious correlations by specializing experts on visual attributes.
  • To validate that GMoE generalizes across domains by demonstrating consistent expert selection on shared visual attributes across different data distributions.
  • To show that GMoE is complementary to existing DG methods, improving performance when combined with them.

Proposed method

  • The authors formalize robustness to distribution shifts using algorithmic alignment theory, proving that architectures aligning with invariant correlations are more robust.
  • They analyze the alignment of convolutional and attention-based modules with invariant vs. spurious correlations in real-world datasets, revealing why vision transformers outperform CNNs under ERM.
  • They design GMoE as a sparse mixture-of-experts layer inserted into vision transformers, where each expert specializes in processing specific visual attributes (e.g., bird beak, leg, background).
  • The router mechanism dynamically routes tokens to experts based on input content, enabling sparse, adaptive computation and improved disentanglement of visual factors.
  • They visualize expert selection across domains, showing that the same experts handle the same attributes (e.g., beak, tail) consistently across different stylizations and domains.
  • They compare multi-head attention patterns in ViT and GMoE, demonstrating that MoE layers reduce attention redundancy and improve feature disentanglement.

Experimental results

Research questions

  • RQ1Can backbone architecture design alone improve domain generalization, independent of loss function engineering?
  • RQ2How does architectural alignment with invariant vs. spurious correlations affect model robustness to distribution shifts?
  • RQ3Can mixture-of-experts be designed to specialize on visual attributes and generalize across domain shifts?
  • RQ4Does GMoE outperform SOTA domain generalization methods when trained with standard ERM, without additional DG loss components?
  • RQ5Is GMoE complementary to existing DG algorithms, and does it further improve performance when combined with them?

Key findings

  • A vanilla vision transformer (ViT-S/16) trained with ERM outperforms ResNet-50 with SOTA DG algorithms on OfficeHome, DomainNet, and VLCS datasets, despite similar parameter counts.
  • Theoretical analysis confirms that models with architectures aligned to invariant correlations are more robust to distribution shifts, while those aligned to spurious correlations are less robust.
  • GMoE achieves state-of-the-art performance on DomainBed under ERM training, surpassing SOTA DG baselines by a large margin.
  • Expert selection in GMoE is consistent across domains: the same visual attributes (e.g., beak, tail) are processed by the same experts regardless of domain-specific stylizations.
  • Visualization shows that GMoE reduces attention redundancy compared to standard multi-head attention, with experts specializing on distinct visual features.
  • When combined with existing DG algorithms, GMoE further improves performance, demonstrating its complementarity with current methods.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.