Reinforcement Learning Guided Semi-Supervised Learning

Marzi Heidari, Hanping Zhang, Yuhong Guo

Introduction

Reinforcement Learning Guided Semi-Supervised Learning (RLGSSL) reframes semi-supervised learning (SSL) as a one-armed bandit problem. By utilizing a reinforcement learning (RL) framework to adaptively guide the generation of pseudo-labels through a "mixup-based" reward function, RLGSSL consistently outperforms traditional heuristic-based methods on standard image classification benchmarks.

The Problem with Current SSL Heuristics

Semi-supervised learning is the "sweet spot" of machine learning, aiming to build powerful models using a tiny sliver of labeled data and a mountain of unlabeled data. Most current state-of-the-art methods (like MixMatch or FixMatch) rely heavily on heuristics—fixed rules or thresholds to decide which unlabeled samples to trust and how to turn them into "pseudo-labels."

The problem is that these heuristics are rigid. They do not adapt to the specific nuances of a dataset during the training process. Furthermore, traditional optimization via gradient descent struggles with non-differentiable signals. The authors of this paper ask a fundamental question: Can we use Reinforcement Learning to learn a better, adaptive strategy for utilizing unlabeled data, rather than just following a hard-coded rule?

Methods: RLGSSL Framework

The authors propose treating the SSL process as a one-armed bandit problem—a simplified RL scenario where an agent takes a single action and receives an immediate reward.

RLGSSL Framework
  1. The Policy as a Predictor: The neural network acts as the "policy." Given an unlabeled image (the state), it produces a soft pseudo-label (the action).
  2. Mixup-Based Reward: To evaluate how "good" a pseudo-label is, the authors use Mixup. They create new, synthetic data points by linearly interpolating between labeled and unlabeled samples. The reward is the negative Mean Squared Error (MSE) between the model’s prediction on this "mixed" sample and the "mixed" label. Essentially, if the model generalizes well to these interpolated points, it receives a high reward.
  3. The RL Loss: They introduce a novel RL loss that weights the reward by the KL-divergence of the prediction. This encourages the model to produce "informative" (discriminative) predictions rather than playing it safe with uniform distributions.
  4. Teacher-Student Framework: To keep training stable, they use a "Mean Teacher" setup. A "Student" model is updated via gradients, while a "Teacher" model (an exponential moving average of the student) is used to generate the pseudo-labels and evaluate rewards.
  5. Joint Optimization: The final loss function is a cocktail of three parts: the RL loss (for adaptive guidance), a standard supervised loss (for the labeled data), and a consistency loss (to ensure the student and teacher stay in sync).

Key Insights and Ideas

  • RL as a Meta-Optimizer: The core "aha moment" is realizing that RL can optimize the strategy of semi-supervised learning. While the supervised loss handles the "what," the RL loss handles the "how" of using unlabeled data.
  • Generalization as Reward: By using Mixup to calculate the reward, the authors are essentially rewarding the model for creating a "smooth" decision boundary. This is a more holistic signal than just checking if a prediction is "confident."
  • Adaptive vs. Static: Unlike methods that use a fixed confidence threshold (e.g., "only use pseudo-labels with >95% confidence"), RLGSSL’s RL component allows the model to adaptively weight the importance of different unlabeled samples based on their contribution to generalization.

Key Results

The researchers evaluated RLGSSL on standard computer vision benchmarks (CIFAR-10, CIFAR-100, SVHN, and STL-10) using various backbones. RLGSSL consistently outperformed state-of-the-art SSL methods across all tested datasets, particularly when labeled data was extremely scarce.

Results on CIFAR-10 and CIFAR-100
  • CIFAR-10: With only 1,000 labels, RLGSSL achieved a 9.15% error rate, significantly beating the second-best method, ICT (12.44%).
  • CIFAR-100: With 4,000 labels, it reached 36.92% error, compared to ICT's 40.07%.
  • SVHN: With 500 labels, it achieved a remarkably low 3.12% error rate.
  • Ablation Studies: The authors proved the RL component was vital; removing the RL loss caused the error rate on CIFAR-100 to jump from ~36.9% to ~44.9%.

Limitations and Future Work

  • Distribution Alignment: The current formulation assumes that labeled and unlabeled data come from the exact same distribution. In many real-world "in-the-wild" scenarios, this isn't true.
  • Computational Overhead: While not explicitly detailed as a failure, RL-based methods and Teacher-Student frameworks generally require more memory and training time than simple supervised learning.
  • Future Directions: The authors suggest extending this work to Domain Adaptation, where the model must learn to generalize from a labeled "source" domain to a different, unlabeled "target" domain.

Summary updated

BibTeX
@inproceedings{heidari2024reinforcement,
  author = {Marzi Heidari and Hanping Zhang and Yuhong Guo},
  title = {{Reinforcement Learning Guided Semi-Supervised Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=PSMBefUZa2},
}
Figure