TL;DR
This paper proposes a novel approach to enhance contrastive learning by assimilating automatically generated views with human-designed "expert" views, rather than replacing them. Their methods, "W-search" and "W-perturb" for view generation and a "multiview" assimilation strategy, achieve state-of-the-art performance, improving accuracy by up to 3.6% on several datasets.
What Problem Does This Paper Address?
Contrastive learning (CL) relies heavily on data augmentation to create "views" of the same image (positive pairs) that should have similar representations, while views from different images (negative pairs) should have dissimilar representations. Traditionally, these augmentations are handcrafted by human experts (e.g., random cropping, color jitter). While effective, these "expert transformations" might not be optimal for all domains. Recent work has explored generating views using learned methods, but these have generally failed to outperform expert transformations. This paper asks: instead of replacing expert views, can we combine them with generated views to get the best of both worlds? They hypothesize that generated views might capture complementary information that expert views miss, and that assimilating them could boost performance.
Methods
The core of the paper lies in two main components: view generation and view assimilation.
View Generation:
- W-search: This method leverages a pre-trained Generative Adversarial Network (GAN) to generate new views. It works by optimizing in the latent space of the contrastive encoder (Z) to find a latent code that, when passed through the GAN and then the encoder, results in a representation close to the anchor's representation. This is framed as an optimization problem to find a latent code
w*that minimizes a loss function balancing representation similarity and a "uniformity" constraint. - W-perturb: To address the computational cost of W-search, W-perturb directly perturbs the latent space (W) of the pre-trained GAN generator. This involves adding Gaussian noise to the projected latent representation of an image and then using the GAN to generate a new view. This is a simpler, faster approach than W-search.
View Assimilation:
- Replacement (A1): This method replaces one of the two expert views with a generated view, applying minimal augmentations to the generated view.
- Multiview (A2): This approach treats the problem as having more than two positive views. It appends the generated views as additional positive samples and introduces a modified contrastive loss function. This loss includes the standard contrastive term (
LCL) and an additional term (Lalign) that encourages alignment between the anchor and its generated views. They propose a specific version of this loss called "A2-InfoNCE," which builds upon the InfoNCE loss.
Datasets
The experiments were conducted on the following datasets:
- CIFAR10: 10 classes, 50,000 training images, 10,000 testing images.
- CIFAR100: 100 classes, 50,000 training images, 10,000 testing images.
- TinyImageNet: 200 classes, 100,000 training images, 10,000 testing images (resized to 64x64).
- ImageNet: Approximately 1.3 million images. For ImageNet experiments, they generated 1.3 million "fake" images using a pre-trained BigBiGAN [11] at 128x128 resolution, but evaluated linear probe accuracy on the real ImageNet dataset.
Key Insights and Ideas
- Assimilation, Not Replacement: The most significant insight is that combining generated views with expert views (assimilation) is more effective than simply replacing expert views. This suggests that generated views offer complementary information that expert transformations miss.
- Generated Views Capture Complementary Information: Mutual information analysis (using MINE) indicates that generated views (W-search, W-perturb) share less mutual information with the original image compared to expert views. This difference is key to their success, implying they capture novel aspects of the data.
- W-search and W-perturb are Effective View Generators: Both proposed methods, W-search and W-perturb, consistently outperform other view generation techniques (like ViewMaker) when assimilated with expert views.
- Multiview Assimilation is Crucial: The "A2" assimilation strategy, which treats generated views as additional positive samples within a modified contrastive loss, is particularly effective. Simply adding more expert views, however, can degrade performance.
- Faster Convergence: The proposed methods, especially when combined with the A2 assimilation strategy, lead to significantly faster convergence during training compared to standard SimCLR.
Key Results
- State-of-the-Art Performance: The proposed "Constructive Assimilation" approach, combining W-search or W-perturb with the A2 assimilation strategy, achieved up to a 3.6% improvement in linear probe accuracy on TinyImageNet compared to baselines.
- Consistent Improvements: Across CIFAR10, CIFAR100, and TinyImageNet, the generated views (when assimilated) consistently led to improvements of 0.9%, 2.3%, and 3.6%, respectively.
- Faster Training: Figure 3 shows that models using W-search and A2 assimilation converge much faster than the baseline SimCLR model.
- ImageNet Improvement: On ImageNet, adding generated views as an additional positive view improved performance by approximately 1.5%.
Limitations and Future Work
- Scalability of W-search: The online W-search method is computationally expensive due to the optimization required for each image. The paper addresses this by focusing on an offline caching approach for experiments but notes that online W-search doesn't scale well to large datasets.
- Hyperparameter Sensitivity: The performance of W-search and W-perturb can be sensitive to hyperparameters like
σ(for W-perturb) andε1,ε2,λ(for W-search and A2 loss). The paper includes extensive ablation studies to explore these. - Future Work: The authors suggest that their framework for view generation and assimilation opens up new avenues for research. They highlight that the effectiveness of generated views is highly dependent on how they are assimilated, an area they believe warrants further exploration.
Summary updated