Introduction
Consistency regularization has emerged as a cornerstone of modern semi-supervised learning (SSL). The fundamental premise is that a robust model should produce stable predictions when its inputs are subjected to small, label-preserving perturbations. Virtual Adversarial Training (VAT) represents a state-of-the-art advancement in this domain, replacing random noise with adversarial perturbations—directions in the input space that maximize the change in the model's output distribution.
However, VAT is inherently limited by a "local constraint." Because it operates directly in the pixel space, perturbations must be kept within a small epsilon-ball to ensure the resulting image remains semantically valid. If the perturbation magnitude is increased significantly, the image often degrades into unrecognizable noise. This restriction limits the ability of the model to explore and regularize the decision boundaries in more distant, yet semantically meaningful, regions of the data manifold.
Methodology
To overcome the limitations of pixel-space perturbations, we propose Latent space Virtual Adversarial Training (LVAT). LVAT shifts the adversarial search from the raw input space to a structured latent space learned by a generative model.
The LVAT process consists of four primary stages:
- The Transformer: A generative model, such as a Variational Auto-Encoder (VAE) or a Normalizing Flow (e.g., Glow), is trained to map input images $x$ to a latent representation $z$.
- Latent Perturbation: Instead of perturbing pixels, the algorithm identifies a direction in the latent space $z$ that induces the maximum divergence in the classifier's prediction.
- Mapping Back: The perturbed latent vector $z_{adv}$ is passed through the decoder or generator to produce an adversarial image $x_{adv}$.
- Consistency Cost: The classifier $f$ is trained to minimize the KL divergence between its predictions for the original input $x$ and the generated adversarial input $x_{adv}$. For labeled data, a standard cross-entropy loss is also applied.
By perturbing in the latent space, a small step can correspond to complex, realistic transformations in the pixel space—such as changes in lighting, orientation, or stroke thickness—providing a richer and more semantically relevant training signal.
Experiments
The effectiveness of LVAT was evaluated on two standard image classification benchmarks: SVHN (Street View House Numbers) and CIFAR-10. The experiments covered both Supervised Learning (SL) and Semi-Supervised Learning (SSL) settings. In the SSL tasks, the models were trained with a limited number of labels: 1,000 for SVHN and 4,000 for CIFAR-10.
Two types of generative "transformers" were compared: VAEs and Normalizing Flows (Glow). This comparison highlights the impact of reconstruction quality on the final classification performance.
Results
LVAT consistently outperformed standard VAT and other baseline regularization methods across both datasets.
- CIFAR-10 (SSL): LVAT-Glow achieved a significant reduction in error rate to 9.94%, compared to 16.92% for standard VAT.
- SVHN (SSL): LVAT-Glow reached an error rate of 4.20%, outperforming VAT's 5.77%.
- Supervised Learning: Even with access to all labels, LVAT provided superior regularization, leading to lower error rates than baseline models.
Qualitative analysis revealed that LVAT generates a wider distribution of perturbation magnitudes than VAT. While VAT perturbations often appear as digital artifacts, LVAT perturbations result in realistic modifications of the original objects, effectively "stretching" the regions where the model is forced to maintain consistency.
Discussion and Limitations
A key insight from this work is the importance of the generative model's quality. Normalizing Flows like Glow generally outperformed VAEs because they provide "lossless" and sharp reconstructions. In contrast, the blurry outputs typical of VAEs (especially on CIFAR-10) can introduce noise that hinders the classifier's learning process.
Despite its advantages, LVAT introduces additional computational overhead due to the need to train a high-quality generative model. However, this component can be pre-trained once and modularized for various downstream tasks. Future work may explore combining LVAT with other advanced SSL techniques, such as graph-based methods, to further enhance model robustness and generalization.
Summary updated