Manifold Mixup: Better Representations by Interpolating Hidden States

Vikas Verma, Alex Lamb, Christopher Beckham, Amir Najafi, Ioannis Mitliagkas, David Lopez-Paz, Yoshua Bengio

TL;DR

Manifold Mixup is a simple yet powerful regularization technique that trains neural networks on linear interpolations of hidden representations rather than just raw input data. This "flattens" class-specific representations into lower-dimensional subspaces, leading to smoother decision boundaries and significantly better generalization and robustness.

What Problem Does This Paper Address?

Deep neural networks are notoriously overconfident. Even when presented with "out-of-distribution" data or adversarial examples that look like noise to humans, these models often produce incorrect predictions with strikingly high confidence.

The authors identify two troubling properties of standard networks:

  1. Sharp Decision Boundaries: The boundaries between classes are often very close to the training data.
  2. Confidence "Holes": Most of the hidden representation space—even areas far from any real data—is assigned high-confidence predictions.

While "Input Mixup" (interpolating between raw images) helps, it only regularizes the input layer. Manifold Mixup aims to provide a more holistic regularization by encouraging the network to be uncertain in the "empty" spaces between clusters of hidden representations across multiple layers.

Methods

Manifold Mixup extends the original Mixup algorithm to the internal layers of a network. The process follows five steps during training:

  1. Layer Selection: Randomly pick a layer $k$ from a set of eligible layers $S$ (which can include the input layer).
  2. Forward Pass (Part 1): Pass two random minibatches through the network until they reach layer $k$.
  3. Interpolation: Perform a linear combination of the hidden states: $$\tilde{g}_k = \lambda \cdot g_k(x) + (1 - \lambda) \cdot g_k(x')$$ The same interpolation is applied to the labels: $\tilde{y} = \lambda y + (1 - \lambda) y'$. The mixing coefficient $\lambda$ is sampled from a Beta distribution.

  4. Forward Pass (Part 2): Continue the forward pass from layer $k$ to the output using the mixed hidden state $\tilde{g}_k$.

  5. Optimization: Compute the loss and backpropagate gradients through the entire network, including layers before the mixup point.

The key difference from previous work is this full backpropagation, which forces the earlier layers to learn representations that are "mixup-friendly."

Datasets

The authors evaluated Manifold Mixup across several standard benchmarks:

  • Computer Vision: CIFAR-10, CIFAR-100, SVHN, and TinyImageNet.
  • Analysis: A 2D spiral dataset (for visualization) and MNIST (for spectral analysis of the hidden states).
  • Robustness: Deformed versions of CIFAR-100 (rotations, shears, rescales).

Key Insights and Ideas

Decision boundaries and singular values of representations for Baseline, Input Mixup, and Manifold Mixup.
  • The Flattening Effect: This is the paper's most significant theoretical contribution. The authors prove that Manifold Mixup encourages class-specific representations to fall onto lower-dimensional subspaces. By "squashing" the data for each class, the model creates more "room" between classes, effectively increasing the margin.
  • Smoother Decision Boundaries: Visualizations on 2D data show that while vanilla training creates jagged, complex boundaries, Manifold Mixup results in smooth, simpler boundaries that are further away from the data points.
  • Better Confidence Calibration: By training on interpolations, the model learns to be less confident in the regions between classes. This leads to much better Negative Log-Likelihood (NLL) scores, meaning the model's "uncertainty" better reflects its actual error rate.
  • Information Compression: The flattening of representations can be viewed as a form of compression, which is theoretically linked to better generalization (the Information Bottleneck principle).

Key Results

  • State-of-the-Art Generalization: On CIFAR-100 with a PreActResNet34, Manifold Mixup achieved a 18.35% test error, significantly beating vanilla training (23.55%) and Input Mixup (20.53%).
  • Massive NLL Improvements: In some cases, Manifold Mixup provided a 50% relative improvement in test NLL, indicating much better-calibrated models.
  • Robustness to Deformations: Models trained with this method were far more resilient to novel deformations like rotations and shearing that they hadn't seen during training.
  • Adversarial Defense: It significantly improved robustness against single-step adversarial attacks (FGSM). For example, on CIFAR-10, accuracy under FGSM attack jumped from 36.32% (vanilla) to 77.50%.

Limitations and Future Work

  • Multi-step Attacks: While great against single-step attacks, the authors admit that Manifold Mixup does not significantly improve robustness against stronger, multi-step adversarial attacks like PGD (Projected Gradient Descent).
  • Hyperparameter Sensitivity: The performance depends on the choice of the set of eligible layers $S$ and the $\alpha$ parameter for the Beta distribution, though the authors provide tables showing the method is relatively robust to these choices.
  • Theoretical Assumptions: The "flattening" theory relies on some idealized conditions (e.g., very deep networks and universal approximation); seeing how this holds up in extremely constrained or shallow architectures remains an open question.

Summary updated

BibTeX
@inproceedings{verma2019manifold,
  author = {Vikas Verma and Alex Lamb and Christopher Beckham and Amir Najafi and Ioannis Mitliagkas and David Lopez-Paz and Yoshua Bengio},
  title = {{Manifold Mixup: Better Representations by Interpolating Hidden States}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
}
Figure