Multi-Scale and Multi-Layer Contrastive Learning for Domain Generalization

Aristotelis Ballas, Christos Diou
8/28/2023
17 citations
cs.CV
contrastive-ssl

Official code: aristotelisballas/m2cl (6 stars, Python, last commit 2025-12-15).

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.

Show full abstract

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

View on arXivView PDF

Code Implementations(1)

Offiicial code for the "Multi-Scale and Multi-Layer Contrastive Learning for Domain Generalization" paper.

60Python11 months ago

Similar Papers

Cite this paper

@article{ballas2023multiscale,
  title  = {Multi-Scale and Multi-Layer Contrastive Learning for Domain Generalization},
  author = {Aristotelis Ballas and Christos Diou},
  year   = {2023},
  eprint = {2308.14418},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2308.14418v5}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2308.14418.svg)](https://codeofpaper.com/paper/2308.14418)

Discussion