Multi-Scale and Multi-Layer Contrastive Learning for Domain Generalization
Aristotelis Ballas, Christos Diou
TL;DR
The paper tackles domain generalization in image classification by exploiting multi-scale and multi-layer CNN representations to disentangle domain-invariant attributes. It introduces the M^2 framework with extraction blocks that harvest multi-scale features from intermediate layers and the M^2-CL contrastive objective that enforces invariance of class-discriminative features across domains. Across four DG benchmarks (PACS, VLCS, Office-Home, NICO), the approach achieves state-of-the-art results and is supported by saliency analyses showing focus on causally relevant object features rather than context. While effective, the method incurs memory overhead and benefits from larger batch sizes for the contrastive term, pointing to future work on efficiency and integration with causal or attention mechanisms.
Abstract
During the past decade, deep neural networks have led to fast-paced progress and significant achievements in computer vision problems, for both academia and industry. Yet despite their success, state-of-the-art image classification approaches fail to generalize well in previously unseen visual contexts, as required by many real-world applications. In this paper, we focus on this domain generalization (DG) problem and argue that the generalization ability of deep convolutional neural networks can be improved by taking advantage of multi-layer and multi-scaled representations of the network. We introduce a framework that aims at improving domain generalization of image classifiers by combining both low-level and high-level features at multiple scales, enabling the network to implicitly disentangle representations in its latent space and learn domain-invariant attributes of the depicted objects. Additionally, to further facilitate robust representation learning, we propose a novel objective function, inspired by contrastive learning, which aims at constraining the extracted representations to remain invariant under distribution shifts. We demonstrate the effectiveness of our method by evaluating on the domain generalization datasets of PACS, VLCS, Office-Home and NICO. Through extensive experimentation, we show that our model is able to surpass the performance of previous DG methods and consistently produce competitive and state-of-the-art results in all datasets
