Controllable Invariance through Adversarial Feature Learning

Qizhe Xie, Zihang Dai, Yulun Du, Eduard H. Hovy, Graham Neubig

Abstract

This paper introduces a framework for learning data representations that are "controllably invariant"—meaning they intentionally ignore specific "nuisance" factors (such as lighting conditions or sensitive demographic traits) while preserving the information necessary for a target task. By framing representation learning as a three-player adversarial minimax game, the authors demonstrate improved performance and fairness across image classification, machine translation, and bias-free predictive modeling.

Introduction

In deep learning, models often capture more information than necessary, including unwanted "nuisance variables." For instance, a credit-scoring model might inadvertently rely on age or gender, or an identity-recognition model might be sensitive to lighting conditions. Previous attempts to enforce invariance, such as specific architectural constraints or statistical divergence measures, often lacked flexibility or failed to scale with complex nuisance factors.

This work addresses these challenges by proposing a framework that allows for explicit control over what information is retained in a representation. The goal is to learn a mapping that is blind to specified nuisances while remaining highly predictive for the primary task.

Methodology: Adversarial Invariant Feature Learning

The authors propose a minimax game between three components: an Encoder ($E$), a Predictor ($M$), and a Discriminator ($D$).

  1. The Encoder ($E$): Maps the input data ($x$) and the nuisance attribute ($s$) into a feature representation ($h$).
  2. The Predictor ($M$): Attempts to predict the target ($y$) from the representation $h$.
  3. The Discriminator ($D$): Attempts to identify the nuisance attribute $s$ from $h$.
Graphical model representing the relationship between latent variables $z$, target $y$, nuisance factor $s$, and input $x$.

The Encoder and Predictor collaborate to maximize the accuracy of $y$, while the Encoder simultaneously works to minimize the Discriminator's ability to identify $s$. A key innovation is feeding the nuisance factor $s$ directly into the encoder. This allows the model to "explain away" variations caused by $s$, making it easier for the encoder to learn a neutralized representation (e.g., "internally brightening" a dark image to find identity).

Experimental Evaluation

The framework was evaluated across three distinct domains:

  • Fair Classification: Using the German (credit), Adult (income), and Health (hospital stay) datasets to predict outcomes while remaining invariant to sensitive attributes like age or gender.
  • Multi-lingual Machine Translation: Using the IWSLT 2015 dataset (French-English and German-English) to learn language-agnostic representations.
  • Image Classification: Using the Extended Yale B dataset, identifying individuals across varying lighting conditions.

Key Results and Discussion

The adversarial approach demonstrated significant improvements over existing baselines:

  • Fairness: On the Adult and German datasets, the model maintained higher accuracy on minority groups compared to baselines like the Variational Fair Auto-Encoder (VFAE), effectively neutralizing demographic bias.
  • Translation: The model achieved 36.1 BLEU on French-English translation, outperforming standard multi-lingual (35.5) and bilingual (35.2) models, suggesting that language-invariant representations improve generalization.
  • Image Robustness: On the Yale B dataset, the model achieved 89% accuracy in identity recognition, significantly higher than the 85% achieved by the best baseline.
Accuracy comparison on the German dataset against various baselines, showing the proposed method ("Ours") performing competitively.

Win-Win vs. Competing Equilibria

The authors distinguish between two scenarios. In "Win-Win" cases (like lighting and identity), removing the nuisance actually aids the main task. In "Competing" cases (like fairness), the nuisance factor may be correlated with the target due to historical bias. In the latter, a hyperparameter $\gamma$ allows tuning the trade-off between raw accuracy and fairness.

Conclusion

The proposed adversarial framework provides a scalable and flexible method for learning invariant representations. While the current study focused primarily on discrete nuisance factors, future work may extend this to continuous variables and more complex structures, such as sentence parse trees. The stability of the minimax game remains a practical consideration, requiring careful balancing of the encoder and discriminator capacities.

Summary updated

BibTeX
@inproceedings{xie2017controllable,
  author = {Qizhe Xie and Zihang Dai and Yulun Du and Eduard H. Hovy and Graham Neubig},
  title = {{Controllable Invariance through Adversarial Feature Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
  url = {https://openreview.net/forum?id=S1Zv-KbdWH},
}
Figure