Abstract
Semi-supervised learning (SSL) typically relies on heuristic label imputation for unlabeled data, which can lead to confirmation bias and poor generalization. We present Learning to Impute (L2I), a meta-learning framework that treats label imputation as a bi-level optimization problem. By optimizing imputed labels to maximize performance on a hold-out set, L2I reduces bias and improves accuracy across diverse tasks, including image classification, regression, and natural language processing.
Introduction
Semi-supervised learning is essential for training high-performance models when labeled data is scarce but unlabeled data is abundant. The standard approach involves "imputing" labels for unlabeled samples—often termed pseudo-labeling—and incorporating them into the training set. However, this process frequently suffers from "confirmation bias": if a model makes an incorrect initial guess, it trains on that error, reinforcing its own mistake and eventually overfitting to noisy, self-generated labels.
While state-of-the-art methods like MixMatch and FixMatch utilize sophisticated regularization and data augmentation to mitigate these effects, these strategies are often manually engineered and task-specific. This paper introduces Learning to Impute (L2I), a framework that moves beyond heuristics by encouraging the network to label unlabeled data in a way that specifically optimizes for better generalization by design.
The L2I Framework
L2I formulates semi-supervised learning as a bi-level optimization problem. Unlike standard SSL, which treats label imputation as a fixed preprocessing or heuristic step, L2I treats the imputed labels as variables to be optimized.
The framework operates through two nested loops:
- The Inner Loop: The model simulates a training step. It takes a batch of unlabeled data, generates "imputed" labels based on its current parameters, and performs a temporary update by minimizing a combination of supervised and unsupervised consistency losses.
- The Outer Loop: The model evaluates the performance of this "temporarily updated" version on a hold-out set. It then calculates the gradient of the hold-out loss with respect to the imputed labels used in the inner loop. This meta-gradient is used to update the model's original parameters, effectively teaching it to produce labels that lead to better generalization.
Efficiency and Scalability
A significant challenge in bi-level optimization for deep neural networks is the computational cost, particularly the calculation of the Hessian matrix. To make L2I feasible, the authors employ a first-order approximation. By computing derivatives only for the parameters in the model's final layer, they achieve a 50% reduction in training time with negligible impact on accuracy. This "look-ahead" strategy allows the model to anticipate the second-order effects of its labeling choices without the full overhead of higher-order optimization.
Evaluation across Domains
L2I is designed as a "plug-and-play" wrapper that can be integrated into existing SSL architectures such as Mean Teacher (MT), MixMatch (MM), and FixMatch (FM). Its effectiveness was validated across three distinct domains:
- Image Classification: On CIFAR-10 with only 250 labels, L2I improved the Mean Teacher baseline by nearly 12 percentage points, reducing the error rate from 37.75% to 25.97%. On ImageNet with 5% labels, L2I combined with FixMatch achieved a 56.30% error rate, outperforming vanilla FixMatch.
- Regression: Using the Annotated Facial Landmarks in the Wild (AFLW) dataset, L2I demonstrated its ability to handle continuous values. With only 1% of labels, it significantly reduced mean square error compared to standard pseudo-labeling.
- Text Classification: On the IMDb sentiment analysis dataset with just 20 labeled examples, L2I outperformed the strong UDA baseline, reaching an error rate of 9.19%.
Conclusion
Learning to Impute (L2I) represents a shift from heuristic-based semi-supervised learning to an optimization-based approach. By explicitly optimizing for generalization on a hold-out set, it effectively mitigates confirmation bias and provides a robust framework applicable to classification, regression, and natural language tasks. While it introduces an additional back-propagation step, its efficiency gains via last-layer approximation make it a practical choice for large-scale deep learning. Future research may extend this framework to more complex structured prediction tasks, such as sequence or graph generation.
Summary updated