Agree to Disagree: Diversity through Disagreement for Better Transferability

Matteo Pagliardini, Martin Jaggi, François Fleuret, Sai Praneeth Karimireddy

Abstract

Deep neural networks are prone to "simplicity bias," frequently prioritizing easy-to-learn spurious correlations over robust, invariant features. This behavior leads to significant performance degradation under distribution shifts. We propose Diversity-By-disAgreement Training (D-BAT), a sequential ensemble training method that encourages functional diversity. By requiring models to maintain accuracy on training data while maximizing prediction disagreement on unlabeled out-of-distribution (OOD) samples, D-BAT forces the discovery of diverse predictive features. Our evaluation across synthetic and real-world benchmarks shows that D-BAT substantially improves OOD transferability and provides superior uncertainty quantification compared to standard ensembles.

Introduction

A fundamental challenge in deep learning is the implicit Simplicity Bias (SB). When a training set contains both simple shortcuts (e.g., background color) and complex robust features (e.g., object shape) that are equally predictive, models tend to converge on the simpler features. While effective for in-distribution generalization, this reliance on shortcuts causes catastrophic failure when the spurious correlations no longer hold in new environments.

Traditional ensembles often fail to mitigate this issue because individual members tend to latch onto the same dominant shortcuts. To address this, we introduce D-BAT, a framework designed to break this "herd behavior" by explicitly incentivizing models to explore different functional solutions to the same classification task.

Methodology: Diversity-By-disAgreement Training

D-BAT employs a sequential training procedure to build a functionally diverse ensemble.

  1. Initial Model Training ($h_1$): The first model is trained using standard Empirical Risk Minimization (ERM). Due to simplicity bias, $h_1$ typically relies on the most accessible shortcuts.
  2. Subsequent Model Training ($h_m$): Each additional model is trained with a multi-objective loss:
  3. Source Accuracy: Maintain high performance on the labeled training distribution.
  4. OOD Disagreement: Maximize the divergence between its predictions and those of previous models on a set of unlabeled OOD samples ($\mathcal{D}_{ood}$).

By penalizing functional similarity on OOD data, D-BAT effectively "forbids" new models from using the same features as their predecessors. This forces the learning process to identify alternative, potentially more robust features that were previously ignored.

The D-BAT training process: (a) training data, (b) model 1 finds a simple shortcut, (c) model 2 is forced to find a different boundary, and (d) the resulting ensemble covers the feature space more effectively.

Experimental Evaluation

We evaluated D-BAT on datasets characterized by extreme spuriousness and real-world domain shifts:

  • Synthetic Benchmarks: Colored-MNIST (color as a shortcut for digits) and "Dominoes" (pairing MNIST with Fashion-MNIST or CIFAR-10).
  • Real-World Benchmarks: Waterbirds (spurious background correlations), Camelyon17 (medical imaging across hospitals), and Office-Home (domain adaptation across Art, Clipart, Product, and Real-World images).

Results and Discussion

D-BAT consistently outperforms standard ERM and state-of-the-art domain adaptation baselines.

Overcoming Spurious Correlations

On Colored-MNIST, where ERM performance collapses to near-random (~12%) due to reliance on color, D-BAT achieves 90.2% accuracy. This indicates that the disagreement objective successfully pushed the model to learn digit shapes despite the presence of a strong color shortcut.

Real-World Transfer and Uncertainty

In the Camelyon17 medical imaging task, D-BAT improved OOD accuracy from 80.3% (ERM) to 93.1%, surpassing specialized methods like CORAL and DANN. Furthermore, D-BAT ensembles exhibit significantly better uncertainty quantification. Unlike standard deep ensembles that are often overconfident in their OOD errors, D-BAT models show high entropy (uncertainty) in regions where they disagree, providing a more reliable signal for "knowing what they don't know."

The final D-BAT ensemble decision boundary. The white regions indicate areas of high disagreement and uncertainty, reflecting a more robust coverage of the feature space.

Conclusion and Future Work

D-BAT provides a simple yet effective mechanism for promoting functional diversity in neural ensembles. By leveraging disagreement on unlabeled OOD data as a proxy for diversity, it successfully mitigates simplicity bias and improves transferability. Future research will focus on optimizing the selection of OOD samples and investigating the scalability of D-BAT to very large-scale pre-trained models.

Limitations: The effectiveness of D-BAT depends on the availability of representative unlabeled OOD data. Additionally, hyperparameter tuning for the disagreement weight ($\alpha$) is necessary to prevent models from finding trivial ways to disagree.

Summary updated

BibTeX
@inproceedings{pagliardini2023agree,
  author = {Matteo Pagliardini and Martin Jaggi and François Fleuret and Sai Praneeth Karimireddy},
  title = {{Agree to Disagree: Diversity through Disagreement for Better Transferability}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=K7CbYQbyYhY},
}
Figure