Paper commentary
Virtual Adversarial Training: A Regularization Method for Supervised and Semi-Supervised Learning
Virtual adversarial training smooths classifiers without needing labels
- Problem Random smoothing misses the direction where a classifier is most fragile, and adversarial training needs true labels to find that direction. So unlabeled inputs cannot use it.
- Method Virtual adversarial training, or VAT, finds the perturbation that most changes the model's own predicted label distribution. It uses one power iteration step, so it needs no labels and costs about two backpropagation passes.
- Results VAT reached 0.64 (±0.05) % test error on permutation-invariant MNIST with 60,000 labels. The baseline without regularization reached 1.11 (±0.06) %.
Why isotropic smoothing is not enough
Many regularizers for neural networks assume the output should change slowly around each training input. They enforce this by adding random noise or augmented copies of an input and asking the model to give them similar outputs. Follow-up studies found that this isotropic smoothing still leaves a classifier fragile to a small perturbation along one specific direction, the one in which its label probabilities change most.
Adversarial training targets that direction, but it needs the true label to locate it, so unlabeled inputs cannot be used this way. The authors argue that a regularizer should spend its smoothing effort on the most anisotropic direction at each point rather than spreading it evenly, and this is the gap their method is built to close.
A label-free adversarial direction
The authors replace the unknown true label distribution with the model's current prediction at the same input. The current parameter estimate is held fixed when this prediction is formed. The perturbation is then chosen to maximize the divergence between that prediction and the prediction at the perturbed input, under an L2 norm constraint of ε.
The input is written x* to cover both labeled and unlabeled points. Because the prediction plays the role of a virtual label, the perturbation can be computed for inputs that carry no label, which is why the method applies to semi-supervised learning. The local distributional smoothness at x* is this divergence evaluated at the maximizing perturbation.
The experiments use KL divergence as the divergence.
Computing the perturbation without an inner search
The divergence has zero value and zero gradient at zero perturbation, so for small perturbations it can be approximated by a quadratic form in the Hessian H of the divergence. Under this quadratic approximation, the maximizing perturbation is the dominant eigenvector of H, scaled to length ε. Computing eigenvectors directly costs a runtime that grows as the cube of the input dimension I.
The method instead runs the power iteration from a random unit vector d. Each step replaces d with Hd, and Hd is approximated by the gradient of the divergence at ξd divided by ξ, with ξ set to 1e-6 in all experiments. Each power iteration costs one set of backpropagation for a neural network. With K = 1, the perturbation reduces to ε times the normalized gradient g, and the authors report that one iteration was enough on the benchmarks they used.
The derivative of the regularizer with respect to the parameters ignores the dependence of the perturbation on θ, which the authors say would add cost and variance. The total gradient then needs K+2 sets of backpropagation.
The objective and its two hyperparameters
The regularizer is the average of the local distributional smoothness over all labeled and unlabeled inputs, and it is added to the negative log-likelihood of the labeled set with a weight α. The method therefore has two scalar hyperparameters, the norm constraint ε and the coefficient α. Across the experiments α was fixed at 1 and only ε was tuned.
For small ε, the authors expand the maximized divergence to second order, which makes the regularizer proportional to α times ε squared times the dominant eigenvalue of the Hessian, so α and ε play similar roles in that regime. For the SVHN and CIFAR-10 experiments, a conditional entropy cost is added to the objective; the combined model is called VAT+EntMin.
Virtual versus random perturbation
Random Perturbation Training is the case K = 0, in which the perturbation is drawn uniformly from the sphere of radius ε and no power iteration is applied. It therefore smooths the output equally in all directions. The authors give two reasons for expecting VAT to be better. First, the power iteration makes the perturbation direction more deterministic, which should lower the variance of the learning signal.
Second, VAT asks the model to stay consistent only with nearby points lying along the virtual adversarial direction, whereas RPT asks for consistency across the whole isotropic neighborhood.
Supervised results on MNIST and CIFAR-10
On permutation-invariant MNIST with 60,000 labeled examples, VAT reached 0.64 (±0.05) % test error. The baseline trained without regularization reached 1.11 (±0.06) %, and RPT reached 0.84 (±0.03) %. The adversarial method with an L2 norm constraint reached 0.71 (±0.03) %, and the Ladder networks result in the cited table is 0.57 (±0.02) %, which is lower than VAT.
The authors attribute that method's result to its special network structure. During training, the smoothness measure of the VAT-trained network rises above that of the baseline network, which the authors read as the VAT-trained model becoming smoother in the LDS sense.
On supervised CIFAR-10 with a CNN, the baseline is Conv-Large with dropout. VAT reached 5.81 (±0.02) % test error, against 6.67 (±0.07) % for that baseline and 6.30 (±0.04) % for RPT.
Semi-supervised results
On semi-supervised MNIST, VAT reached 1.36 (±0.03) % with 100 labels and 1.27 (±0.11) % with 1000 labels. RPT reached 6.81 (±1.30) % and 1.58 (±0.54) %, respectively. In the same table the Ladder networks score is 1.06 (±0.37) % with 100 labels and 0.84 (±0.08) % with 1000 labels. The authors note that generative-model methods were also state of the art on MNIST, so VAT is not the best entry in that table.
Without image augmentation, Conv-Large with VAT reached 5.77 (±0.32) % on SVHN with 1000 labels and 14.18 (±0.38) % on CIFAR-10 with 4000 labels. Adding entropy minimization gave 4.28 (±0.10) % and 13.15 (±0.21) %. On Conv-Small, VAT reached 6.83 (±0.24) % on SVHN and 14.87 (±0.13) % on CIFAR-10, with RPT at 8.41 (±0.24) % and 18.56 (±0.29) %.
With moderate augmentation by translation and horizontal flip, VAT reached 5.42 (±0.22) % on SVHN and 11.36 (±0.34) % on CIFAR-10. VAT+EntMin reached 3.86 (±0.11) % and 10.55 (±0.05) %. The other methods in that table were run under the assumption that a deformation does not change the label. The Sajjadi et al. entry used a wider set of augmentations, including rotation, stretching and shearing, so it is not matched to the others.
Power iterations and the ε and α choice
The table of power iteration counts on semi-supervised CIFAR-10 with 4000 labels gives 14.18 (±0.38) % at K = 1, 14.19 (±0.16) % at K = 2 and 14.25 (±0.18) % at K = 4. The R_vadv value rises sharply from K = 0 to K = 1 and then saturates, so the authors could not find a notable gain from larger K in these runs.
On supervised MNIST, the validation search over α with ε in {1.0, 2.0, 3.0} gave the best performance at α = 1, so α was fixed and ε was tuned for all benchmark experiments.
Gradient variance of VAT and RPT
For K = 1 the normalized SD norm is lower than for K = 0 in most early training stages on both datasets. On MNIST, the RPT value can reach 3 times the VAT value.
To test whether variance is the whole story, RPT was run with its optimal α of 7 and with nine random perturbations averaged per update, so that its normalized SD norm was not larger than VAT's at the start of training. This control is shown in the learning curves with ε = 2.0. Even with these settings RPT stayed behind VAT with α = 1, and the authors conclude that the variance alone does not explain VAT's advantage.
They suggest that the max over perturbations, rather than the expectation, is what helps.
Limitations
The authors say that K = 1 might not be sufficient for other datasets or models, because the spectrum of the Hessian is not guaranteed to be skewed in the same way. The evaluated benchmarks are MNIST, SVHN and CIFAR-10, with fully connected networks and CNNs, and the semi-supervised runs use specific labeled set sizes. The mechanism account of why VAT beats RPT rests on the variance measurement and the matched control, and the authors present the max-over-perturbations explanation as an intuition rather than a proven result.
The CIFAR-10 figure in the text and in the table differ, and the best semi-supervised numbers come from the variant with entropy minimization, so the VAT-only results should be read separately from VAT+EntMin.
Paper info
- Authors
- Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, Shin Ishii
- Venue
- arXiv · Preprint
- First published
- 2017-4-13
- Added
- 2026-11-12
- Updated
- 2018-6-27
- Version
- v2
- arXiv
- 1704.03976
- Category
- stat.ML · cs.LG
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, Shin Ishii (2017). Virtual Adversarial Training: A Regularization Method for Supervised and Semi-Supervised Learning. arXiv:1704.03976v2. https://arxiv.org/abs/1704.03976v2
BibTeX
@misc{miyato2017virtual,
title = {{Virtual Adversarial Training: A Regularization Method for Supervised and Semi-Supervised Learning}},
author = {Takeru Miyato and Shin-ichi Maeda and Masanori Koyama and Shin Ishii},
year = {2017},
eprint = {1704.03976},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1704.03976v2}
}