Invariant Representations without Adversarial Training

Daniel Moyer, Shuyang Gao, Rob Brekelmans, Aram Galstyan, Greg Ver Steeg

TL;DR

Learning data representations that are "blind" to specific factors (like gender bias or image rotation) usually requires a messy, unstable "cat-and-mouse" game called adversarial training. This paper proves that you can achieve the same—or better—results by directly optimizing a single information-theoretic objective, providing a more stable and theoretically grounded way to build fair and controllable AI models.

What Problem Does This Paper Address?

In machine learning, we often want to learn an encoding ($z$) of our data ($x$) that is useful for a task (like predicting credit scores) but completely ignores a "nuisance" or "protected" variable ($c$, like age or gender). This is crucial for algorithmic fairness (removing bias) and disentangled representation learning (separating style from content).

The standard way to do this is through adversarial training: you train one network to perform the task and a second "adversary" network that tries to guess $c$ from $z$. You then force the first network to "fool" the adversary. However, adversarial training is notoriously difficult to tune, prone to instability, and lacks clear theoretical bounds on how much information is actually being leaked.

Methods

The authors propose replacing the adversary with a direct penalty on the Mutual Information $I(z, c)$ between the representation and the nuisance variable.

The Key Innovations:

  1. A Variational Upper Bound: Mutual Information is notoriously hard to calculate directly. The authors derive a computationally tractable "upper bound" for $I(z, c)$. By minimizing this bound, they provide a mathematical guarantee that the information leakage is being squeezed out.
  2. Conditional Reconstruction: To ensure the model doesn't lose too much information, they use a decoder that takes both the latent code $z$ and the nuisance variable $c$ as inputs. This "tells" the encoder: "You don't need to store anything about $c$ in $z$, because the decoder will get $c$ from another source."
  3. The Pairwise Trick: To estimate the marginal distribution of the latent space (which is needed for the MI penalty), they use a clever $O(B^2)$ approximation based on pairwise KL-divergences between samples in a training batch.

The authors integrate this penalty into two popular frameworks:

  • c-agnostic VAE: For unsupervised learning and generative modeling.
  • c-agnostic VIB (Variational Information Bottleneck): For supervised tasks like classification.

Datasets

The researchers evaluated their method on three distinct tasks:

  • German Credit Dataset: A small dataset (1,000 samples) used to predict creditworthiness while remaining invariant to the protected attribute "Age."
  • Adult Income Dataset: A larger census dataset (45,222 samples) used to predict income levels while remaining invariant to "Gender."
  • MNIST: The classic handwritten digits dataset, used here for an unsupervised task where the "digit label" is treated as the nuisance variable to extract pure "writing style" into the latent space.

Key Insights and Ideas

  • Adversarial Training is Indirect: The authors show that adversarial training is essentially an attempt to minimize mutual information, but it's an inefficient one that doesn't provide a formal upper bound.
  • Stability over Minimax: By turning a minimax (adversarial) problem into a single-objective optimization, the training process becomes significantly more stable and less sensitive to hyperparameter choices.
  • The "Invariance" Guarantee: Their method produces representations where even a very strong, post-hoc adversary (trained specifically to break the model) struggles to recover the protected information.

Key Results

  • Better Fairness: On the Adult and German datasets, the proposed method achieved lower "adversarial loss" (meaning less information about the protected attribute leaked into the representation) than state-of-the-art adversarial methods (like VFAE and Xie et al.), while maintaining comparable prediction accuracy.
Performance comparison on German and Adult datasets
  • Robustness to Stronger Adversaries: While adversarial methods often fail when faced with a "stronger" adversary than the one they were trained against, this method's information-theoretic bound held up much better. Visualizations of the latent space confirm that the proposed method effectively mixes the protected attributes compared to baselines.
t-SNE visualization of latent spaces for baselines vs. proposed method
  • Style Manipulation: On MNIST, the model successfully separated "style" from "content." By encoding a digit and then swapping the $c$ variable during decoding, they could generate the same handwriting style across all ten digits (0-9), similar to the performance of specialized "Fader Networks."

Limitations and Future Work

  • Batch Size Sensitivity: The approximation for the mutual information penalty relies on the batch size ($B$). Because it involves pairwise comparisons, it scales at $O(B^2)$, which could become a computational bottleneck for extremely large batches or very high-dimensional latent spaces.
  • Nuisance Sampling: The method assumes you have access to the nuisance variable $c$ during training. In some scientific applications, $c$ might be hard to sample or observe.
  • Future Directions: The authors suggest that this framework could be extended to more complex "nuisances," such as full image transformations (rotations, lighting changes) in computer vision, beyond simple categorical labels.

Summary updated

BibTeX
@inproceedings{moyer2018invariant,
  author = {Daniel Moyer and Shuyang Gao and Rob Brekelmans and Aram Galstyan and Greg Ver Steeg},
  title = {{Invariant Representations without Adversarial Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
}
Figure