Don't Wait, Just Weight: Improving Unsupervised Representations by Learning Goal-Driven Instance Weights

Linus Ericsson, Henry Gouk, Timothy M. HospedalesarXiv 2020

Abstract

Self-supervised learning (SSL) often relies on massive, uncurated datasets, assuming that more data invariably leads to better representations. However, irrelevant or "noisy" data relative to a specific downstream task can impede performance and waste computational resources. We introduce BetaDataWeighter (BDW), a meta-learning algorithm designed to prioritize useful data points through Bayesian instance weighting. By modeling weights as Beta distributions and employing a bi-level optimization strategy, BDW identifies and prunes task-irrelevant data. Experimental results show that BDW not only improves accuracy across diverse target domains but also enables significant training speedups—pruning up to 78% of unlabeled data while maintaining high performance.

Introduction

The success of self-supervised learning (SSL) is often attributed to the scale of unlabeled data. Yet, a significant challenge remains: the domain shift between a broad source pool (e.g., ImageNet) and a specialized target task (e.g., medical imaging). Training on the entire source set can be suboptimal if large portions of the data are irrelevant to the target goal. Existing methods for data selection are often computationally prohibitive or lack a principled way to handle uncertainty in data relevance.

Methodology: BetaDataWeighter (BDW)

BDW addresses these challenges by learning individual weights for every instance in the unlabeled source set.

Bayesian Instance Weighting

Unlike deterministic weighting schemes, BDW maintains a Beta distribution for each data point. This allows the model to represent both the estimated utility of an image and the uncertainty of that estimate. Early in training, the model "hedges its bets" with broad distributions, refining them as it observes more evidence.

Bi-level Optimization and Efficient Meta-Loss

The algorithm operates via two nested loops:

  1. Inner Loop: Updates model features using the weighted source data.
  2. Outer Loop: Evaluates the model on a small, labeled target set. It then updates the instance weights (the parameters of the Beta distributions) to minimize target loss.

To avoid the extreme cost of full fine-tuning in the outer loop, BDW utilizes a Nearest Centroid Classifier (NCC). This provides a fast proxy for downstream performance, making the meta-learning process feasible.

Uncertainty-Aware Pruning

A key advantage of the Bayesian approach is principled pruning. If a data point's weight distribution is highly concentrated near zero, the model can confidently discard it. This reduces the effective dataset size over time, accelerating subsequent training epochs.

Figure 2: BDW prioritizes task-relevant data (a) and learns distinct Beta parameter distributions (b) to distinguish between domains.

Experimental Evaluation

The authors evaluated BDW across several benchmarks to test its discriminative power and efficiency.

  • Mixed-Domain Analysis: Using a combination of MNIST, FashionMNIST, and KMNIST, the authors visualized how BDW assigns weights. When the target task is FashionMNIST, the model successfully assigns higher weights to FashionMNIST images while down-weighting "distractor" images from MNIST and KMNIST.
  • Large-Scale Transfer (Visual Decathlon): BDW was tested using ImageNet as the source and the 10-dataset Visual Decathlon benchmark as the target.
  • Efficiency on STL-10: This benchmark served to test the pruning capabilities of the model.

Key Results and Discussion

BDW demonstrates a clear advantage in both performance and efficiency.

Superior Accuracy and Ranking

Compared to vanilla SSL (RotNet) and other meta-learning baselines like L2RW, BDW achieved the highest average accuracy and rank across the Visual Decathlon datasets.

Figure 4: Critical Difference (CD) diagram showing that BetaDataWeighter achieves the best average rank compared to baselines.

Massive Speedups through Pruning

On the STL-10 dataset, BDW pruned 78% of the unlabeled images without significant accuracy loss. While the initial meta-learning iterations are slower (3x-6x overhead), the drastic reduction in data volume led to a 50% reduction in total training time compared to standard SSL.

Conclusion and Future Work

BetaDataWeighter offers a principled, goal-driven approach to SSL. By focusing on data relevance and leveraging uncertainty for pruning, it overcomes the "more is always better" fallacy in large-scale pre-training.

While effective, BDW requires a small labeled target set and faces high initial per-iteration costs. Future research may explore optimizing multiple self-supervised tasks simultaneously or developing even more efficient meta-learning approximations to further lower the barrier for entry.

Summary updated

Abstract

In the absence of large labelled datasets, self-supervised learning techniques can boost performance by learning useful representations from unlabelled data, which is often more readily available. However, there is often a domain shift between the unlabelled collection and the downstream target problem data. We show that by learning Bayesian instance weights for the unlabelled data, we can improve the downstream classification accuracy by prioritising the most useful instances. Additionally, we show that the training time can be reduced by discarding unnecessary datapoints. Our method, BetaDataWeighter is evaluated using the popular self-supervised rotation prediction task on STL-10 and Visual Decathlon. We compare to related instance weighting schemes, both hand-designed heuristics and meta-learning, as well as conventional self-supervised learning. BetaDataWeighter achieves both the highest average accuracy and rank across datasets, and on STL-10 it prunes up to 78% of unlabelled images without significant loss in accuracy, corresponding to over 50% reduction in training time.
BibTeX
@misc{ericsson2020don,
  author = {Linus Ericsson and Henry Gouk and Timothy M. Hospedales},
  title = {{Don't Wait, Just Weight: Improving Unsupervised Representations by Learning Goal-Driven Instance Weights}},
  year = {2020},
  eprint = {2006.12360},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.12360},
}
Figure