Multispectral Contrastive Learning with Viewmaker Networks

Jasmine Bayrooti, Noah Goodman, Alex Tamkin

Abstract

Contrastive learning methods have been applied to a range of domains and modalities by training models to identify similar "views" of data points. However, specialized scientific modalities pose a challenge for this paradigm, as identifying good views for each scientific instrument is complex and time-intensive. In this paper, we focus on applying contrastive learning approaches to a variety of remote sensing datasets. We show that Viewmaker networks, a recently proposed method for generating views without extensive domain knowledge, can produce useful views in this setting. We also present a Viewmaker variant called Divmaker, which achieves similar performance and does not require adversarial optimization. Applying both methods to four multispectral imaging problems, each with a different format, we find that Viewmaker and Divmaker can outperform cropping- and reflection-based methods for contrastive learning in every case when evaluated on downstream classification tasks. This provides additional evidence that domain-agnostic methods can empower contrastive learning to scale to real-world scientific domains.

Introduction

Contrastive learning has significantly advanced self-supervised representation learning. By training an encoder to produce similar embeddings for different "views" of the same data point, models can learn robust, high-level features without the need for manual labeling. In the domain of natural RGB images, standard augmentations like random cropping, flipping, and color jittering have become the gold standard.

However, these hand-crafted augmentations do not easily translate to specialized scientific data. Multispectral satellite imagery, for instance, often contains ten or more channels representing various physical properties like infrared signatures or radar backscatter. Standard RGB augmentations are often nonsensical in these contexts, as each channel has unique numerical ranges and physical interpretations. Manually designing effective views for every new scientific instrument creates a "bottleneck of expertise." This research explores domain-agnostic generative methods to automate the creation of these views.

Methods: Viewmaker and Divmaker

To address the challenge of domain-specific augmentation, the authors evaluate two generative approaches:

  1. Viewmaker Networks: This architecture employs a generative model to produce a perturbation, or "delta," which is added to the original image. The generator is trained adversarially: it attempts to create a view that is challenging for the encoder to recognize as the original, while constrained by a "distortion budget" ($l_1$ sphere) to preserve the image's semantic identity.
  2. Divmaker (Diversity Viewmaker): To mitigate the potential instabilities of adversarial training, the authors introduce Divmaker. Instead of fooling an encoder, Divmaker optimizes for view diversity. Its loss function maximizes the similarity between a generated view and the original input while simultaneously minimizing the similarity between different views generated from the same input.
Comparison of views generated by Viewmaker and the diversity-focused Divmaker across different datasets.

Both methods are "plug-and-play," requiring no prior knowledge of the specific spectral bands or data statistics.

Experimental Setup

The methods were tested across four diverse satellite datasets:

  • EuroSAT: 27,000 images with 13 spectral bands (visible, NIR, SWIR).
  • So2Sat LCZ42: A large-scale dataset (~400k images) combining Sentinel-1 radar and Sentinel-2 optical data.
  • BigEarthNet: A multi-label dataset of nearly 600,000 Sentinel-2 image patches.
  • NWPU-RESISC45: A standard RGB satellite dataset used as a control to compare generative views against well-established expert augmentations.

Results and Discussion

The generative methods consistently outperformed "Basic Expert" augmentations (simple cropping and flipping) on all multispectral tasks.

Dataset Basic Expert Viewmaker (Best)
EuroSAT (Accuracy) 90.93% 96.40%
So2Sat Sentinel-1 (Accuracy) 31.12% 38.25%
So2Sat Sentinel-2 (Accuracy) 51.60% 60.08%
BigEarthNet (F1 Score) 4.03 12.99

On BigEarthNet, the generative approach more than tripled the performance of the baseline, demonstrating the power of domain-agnostic methods in complex scientific settings.

Semantic Targeting

Visualizing the "deltas" produced by the networks reveals that they do not simply add random noise. Instead, they learn to perturb specific semantic features, such as the shapes and intensities of buildings or agricultural fields, to challenge the encoder's representations.

Visualizing Viewmaker views and their corresponding deltas. The deltas highlight how the network targets semantic features like roads and buildings.

Adversity vs. Diversity

While the adversarial Viewmaker showed slightly higher overall performance, the diversity-based Divmaker proved to be a viable and more stable alternative. This suggests that providing the model with "different" versions of the data is nearly as effective as providing "difficult" versions.

Interestingly, on the RGB-only NWPU-RESISC45 dataset, hand-crafted expert views still outperformed the generative models. This indicates that generative views are most valuable in "low-knowledge" domains where decades of trial-and-error have not yet established optimal augmentations.

Conclusion and Future Work

This work demonstrates that generative Viewmaker and Divmaker networks can automatically discover effective data augmentations for multispectral imagery, bypassing the need for domain-specific expertise.

Future research could explore the sensitivity of these models to the "distortion budget" hyperparameter, which currently requires manual tuning to balance view difficulty with semantic preservation. Additionally, comparing these generative models against more sophisticated, specialized satellite augmentations—such as cloud masking—could further establish their utility. The authors suggest that this framework holds promise for other non-standard modalities, including medical imaging and 3D sensor data.

Summary updated

BibTeX
@misc{bayrooti2023multispectral,
  author = {Jasmine Bayrooti and Noah Goodman and Alex Tamkin},
  title = {{Multispectral Contrastive Learning with Viewmaker Networks}},
  year = {2023},
  eprint = {2302.05757},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.05757},
}
Figure