Viewmaker Networks: Learning Views for Unsupervised Representation Learning

Alex Tamkin, Mike Wu, Noah Goodman

The Bottleneck in Self-Supervised Learning

Self-supervised representation learning—specifically contrastive learning—has revolutionized how AI models learn from unlabeled data. The core idea is to take an input (like an image), create two different "views" of it using distortions like cropping or color jittering, and train a model to recognize that these views come from the same source.

However, there is a major bottleneck: designing these views requires immense domain expertise. While we know that "random cropping" works wonders for photos, it is unclear what the equivalent "view" should be for a satellite image, a heart rate monitor signal, or a snippet of audio. This trial-and-error process hinders the application of self-supervised learning to new modalities. To address this, the authors introduce a method to automate this process by learning the views instead of hard-coding them.

Methods: Generative Data Augmentation

Architecture of Viewmaker Networks

The authors introduce Viewmaker Networks, a generative approach to data augmentation that replaces hand-crafted transformations.

  1. The Viewmaker: This is an image-to-image (or signal-to-signal) neural network that takes an input $X$ and produces a perturbation $P$. The final "view" is generated by adding this perturbation to the original input ($X + P$).
  2. Stochastic Bounded Adversaries: To ensure the generated views are useful for learning, the authors apply three key constraints:
  3. Challenging (Adversarial): The viewmaker is trained to maximize the contrastive loss. It acts as an adversary, trying to "trick" the main encoder by making the views as different as possible in the embedding space.
  4. Faithful (Bounded): To prevent the viewmaker from simply deleting the image or creating unrecognizable noise, the perturbation $P$ is restricted to a small $\ell_1$ sphere. This forces the model to be "budget-conscious," perturbing only the most important features.
  5. Stochastic: Random noise is injected into the viewmaker so that it produces different distortions every time it sees the same input.
  6. Joint Training: The viewmaker and the encoder are trained together in a min-max game, similar to a Generative Adversarial Network (GAN), but situated entirely within a contrastive learning framework.

Key Insights and Ideas

Examples of generated views
  • Beyond Cropping: Remarkably, Viewmakers achieve competitive results on images without ever using "random cropping"—traditionally the most vital component of modern visual contrastive learning. The authors suggest the viewmaker learns a form of "spatial masking" that mimics the benefits of cropping by obscuring parts of the image.
  • Domain Agnosticism: The exact same Viewmaker architecture worked across images, audio spectrograms, and sensor data. This suggests we can move away from hand-crafted AI pipelines toward more general-purpose learning systems.
  • Adversarial vs. Random: The paper shows that simply adding random noise is far less effective than adding adversarially learned noise. The "intelligence" of the viewmaker in picking which pixels or frequencies to distort is what drives the representation quality.
  • Robustness Bonus: Because Viewmakers do not rely on specific human-defined invariances (like color jitter), they produce encoders that are more robust to common image corruptions (like blur or digital noise) compared to standard models trained with expert augmentations.

Experimental Results

The authors tested the versatility of Viewmakers across three distinct domains, demonstrating significant improvements, especially outside of traditional computer vision tasks:

  • Images (CIFAR-10): Evaluated on 11 transfer tasks (including MSCOCO, MNIST, and FashionMNIST), Viewmakers achieved 84.5% accuracy. This nearly matches the 86.2% achieved by expert-tuned SimCLR augmentations, despite the Viewmaker having no prior knowledge of image properties.
  • Speech (LibriSpeech): When evaluated on tasks like speaker identification (VoxCeleb1) and command recognition (Google Commands), Viewmakers significantly outperformed human-defined augmentations, showing an average improvement of +9 percentage points.
  • Wearable Sensors (Pamap2): In the most dramatic result, Viewmakers outperformed baseline spectral augmentations by +17 percentage points on human activity recognition (e.g., distinguishing walking from cycling using accelerometer data).
  • Semi-supervised Learning: When only a tiny amount of labeled data was available (e.g., data from just one participant in the sensor study), pretraining with a Viewmaker boosted accuracy from 58.3% to 75.1%.

Limitations and Future Work

While powerful, the current Viewmaker is limited by its $\ell_1$ constraint. This constraint is simple and effective but primarily allows for additive noise or masking. Future work could explore more complex constraints that allow the viewmaker to learn geometric transformations (like rotations) or more sophisticated structural changes.

Additionally, the authors note that while Viewmakers are excellent on their own, the best performance often comes from combining them with known expert views. Finding the optimal "handshake" between human intuition and learned augmentations remains an exciting open research question.

Summary updated

BibTeX
@inproceedings{tamkin2021viewmaker,
  author = {Alex Tamkin and Mike Wu and Noah Goodman},
  title = {{Viewmaker Networks: Learning Views for Unsupervised Representation Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=enoVQWLsfyL},
}
Figure