More is Better: A Novel Multi-view Framework for Domain Generalization

Jian Zhang, Lei Qi, Yinghuan Shi, Yang GaoarXiv 2021

TL;DR

MVDG (Multi-View Domain Generalization) is a unified framework that combats overfitting in unseen domains by integrating "multi-view" information at both the training and testing stages. By leveraging multiple optimization trajectories during training to find flatter loss minima and ensembling multiple augmented views during testing, the method significantly improves model robustness and generalization across diverse datasets.

What Problem Does This Paper Address?

In the world of machine learning, we often assume training and test data come from the same distribution. In reality, "domain shift" is everywhere—a model trained on photos of dogs might fail when asked to recognize a sketch of a dog. Domain Generalization (DG) aims to build models that can handle these unseen target domains without any retraining.

The authors identify two major hurdles in current DG methods:

  1. Biased Training: Existing meta-learning approaches often follow a single optimization path based on a single task. This can lead to a "noisy" direction that overfits the specific quirks of the source domains.
  2. Unstable Testing: Overfitted models often have feature representations that sit precariously close to decision boundaries. As shown in Figure 1, even a slight perturbation (like a random crop) can cause the model's prediction to flip, leading to unreliable performance in the wild.
Fig. 1: The examples for the variation of the prediction probability when the test images are slightly perturbed in the unseen domain on the PACS dataset.

Methods

The MVDG framework introduces two key components to address these issues:

1. Multi-view Regularized Meta-Learning (MVRML)

Instead of following one optimization trajectory, MVRML explores multiple trajectories simultaneously. At each iteration, the algorithm:

  • Samples several different "tasks" (splits of source domains).
  • Calculates temporary parameters ($\theta_{tmp}$) for each task.
  • Averages these temporary parameters to find a more robust, integrated optimization direction.

This approach is inspired by the idea that averaging weights from different trajectories helps the model find a flat minimum—a region in the loss landscape where small changes in weights don't lead to large changes in error, which is a known indicator of good generalization.

Illustration of the multi-view gradient update compared to standard single-view meta-learning.

2. Multi-view Prediction (MVP)

To solve the instability at test time, the authors propose ensembling. Instead of feeding a single image to the model, they generate multiple "views" using weak augmentations (like random flips and crops) and average the resulting probability distributions. This "Multi-view Prediction" acts as a stabilizer, smoothing out the uncertainty caused by domain discrepancy.

Datasets

The authors evaluated MVDG on three standard DG benchmarks:

  • PACS: (Photos, Art, Cartoon, Sketches) - Known for large distribution discrepancies.
  • VLCS: (PASCAL VOC, LabelMe, Caltech, SUN) - Features a smaller domain gap.
  • OfficeHome: A larger dataset with 65 categories across 4 domains (Art, Clipart, Product, Real-world).
  • DomainBed: A broader suite of datasets (including CMNIST and RMNIST) used for rigorous benchmarking in the appendix.

Key Insights and Ideas

  • Flat Minima are Key: The paper provides empirical evidence that MVRML finds flatter minima than standard Empirical Risk Minimization (ERM) or basic meta-learning (Reptile). As shown in Figure 3, the averaged parameter (the star) sits in a lower-loss region across both source and target domains compared to individual trajectories.
  • Theoretical Backing: The authors prove that the generalization bound is inversely related to the number of tasks per trajectory. Essentially, "more is better"—increasing the diversity of tasks during training mathematically reduces the potential error on unseen data.
  • Weak vs. Strong Augmentation: Interestingly, the authors found that weak augmentations (flips, crops) work best for Multi-view Prediction. Strong augmentations (like heavy color jittering) can push the image too far off the natural data manifold, actually hurting accuracy.
Fig. 3: The loss surface [14] of three temporarily trained pa- rameters (denoted as dot) start- ing from θj and optimized along a different trajectory. The star denotes the averaged parameter.

Key Results

  • State-of-the-Art Performance: MVDG outperformed existing methods across all three main datasets. On PACS with a ResNet-18 backbone, it achieved 86.56% accuracy, a significant jump over traditional meta-learning methods like MLDG (80.70%).
  • Robustness to Hard Domains: The improvement was most dramatic in the "Sketch" domain of PACS, rising from a baseline of 66.21% to 85.08%.
  • Reduced Instability: The authors introduced a metric called Prediction Change Rate (PCR). MVDG reduced the PCR from 32.9% (baseline) to 22.6%, proving the model is much less likely to change its mind when an image is slightly perturbed.
  • Plug-and-Play: The Multi-view Prediction (MVP) strategy was shown to improve other state-of-the-art models (like MixStyle and RSC) when added at test time.

Limitations and Future Work

  • Computational Overhead: Training with multiple trajectories and testing with multiple views naturally increases the computational cost. However, the authors note that using just 3 trajectories and 8 test views provides a good balance between performance and speed (processing ~208 images/sec on a 2080Ti).
  • Batch Normalization Mismatch: The authors observed that updating only model weights during MVRML can lead to a mismatch with Batch Normalization (BN) statistics. They suggest re-estimating BN statistics at the end of each epoch to maintain stability.
  • Future Directions: The paper suggests that exploring more sophisticated test-time augmentation strategies or automated ways to select the number of trajectories could further refine the framework.

Not discussed in the paper: The impact of MVDG on non-vision tasks or its performance on extremely large-scale datasets beyond OfficeHome.

Summary updated

BibTeX
@misc{zhang2021more,
  author = {Jian Zhang and Lei Qi and Yinghuan Shi and Yang Gao},
  title = {{More is Better: A Novel Multi-view Framework for Domain Generalization}},
  year = {2021},
  eprint = {2112.12329},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.12329},
}
Figure