Introduction
Deep learning models are often prone to "shortcut learning," where they associate a target variable ($y$) with irrelevant nuisance factors ($s$) present in the training data. For instance, an OCR model might inadvertently learn to associate specific font weights with certain letters rather than the character shapes themselves.
More critically, models frequently pick up on biasing factors—features like age, gender, or race—that are correlated with the target due to historical or external biases. This leads to models that are not only less robust but also fundamentally unfair. The challenge lies in creating a data representation that is invariant to these unwanted factors $s$ while remaining highly predictive for the target $y$. Researchers from USC’s Information Sciences Institute have introduced a novel "adversarial forgetting" mechanism to address this by helping networks explicitly ignore unwanted data factors.
Methodology: Adversarial Forgetting
The proposed framework is inspired by the "forget gates" found in Long Short-Term Memory (LSTM) networks. Unlike traditional adversarial methods that attempt to prevent an encoder from learning nuisance information, this approach allows the encoder to capture a comprehensive representation and then uses a learned mask to filter it.
The architecture consists of five primary components:
- Encoder ($E$) & Decoder ($R$): The encoder maps input $x$ to a latent code $z$. A decoder attempts to reconstruct $x$ from $z$ to ensure the initial code captures all relevant input information.
- Forget Gate ($F$): A separate network generates a mask $m$ (with values between 0 and 1) from the input $x$.
- The Forgetting Step: An invariant representation $\tilde{z}$ is created via element-wise multiplication: $\tilde{z} = z \odot m$. This effectively "masks out" specific dimensions of the latent code.
- Predictor ($P$): This network predicts the target $y$ from the masked representation $\tilde{z}$.
- Adversarial Discriminator ($D$): The adversary tries to predict the unwanted factor $s$ from $\tilde{z}$.
The "secret sauce" of this method is that the discriminator’s gradients only affect the forget gate. This forces the gate to discover exactly which parts of the representation to "shut off" to hide $s$ from the discriminator. A regularizer $m^T(1-m)$ is also applied to push mask values toward 0 or 1, encouraging a clean binary separation of features.
Experimental Evaluation
The model was evaluated on several diverse benchmarks:
- Chairs: Predicting chair type ($y$) while being invariant to orientation ($s$).
- Extended Yale-B: Identifying subjects ($y$) while ignoring lighting conditions ($s$).
- MNIST-ROT: Recognizing digits ($y$) regardless of rotation angle ($s$).
- Adult & German Credit: Standard fairness datasets where the goal is to predict income or credit-worthiness ($y$) without bias from protected attributes like age or gender ($s$).
Key Results and Insights
The "Adversarial Forgetting" model consistently outperformed prior state-of-the-art methods such as UAI, CVIB, and VFAE.
- Nuisance Invariance: On the Chairs dataset, the model achieved 84% accuracy on the target task while reducing the discriminator's ability to guess orientation to 25% (equivalent to random chance).
- Fairness: On the Adult dataset, it maintained high accuracy (85%) while ensuring the protected attribute (age) could not be recovered from the representation better than the majority class baseline (67%).
Visualizations of the latent space (as seen in the MNIST-ROT example above) demonstrate that the forget gate effectively disentangles the target information from the nuisance factors. While the unmasked encoding $z$ shows clear clusters based on rotation angle, the masked encoding $\tilde{z}$ collapses these clusters into a single representation that is highly separable by digit class but uniform with respect to rotation.
Conclusion and Future Work
This framework shifts the paradigm from learning invariance by "inclusion" (data augmentation) to invariance by "exclusion" (explicitly identifying and removing information). By treating the forget gate as a controllable information bottleneck, the model prioritizes utility for the primary task while discarding specified nuisances.
Currently, the method requires that unwanted factors $s$ be labeled in the training data. Future research may explore how to apply this "forgetting" logic to discover and remove latent nuisances that have not been explicitly annotated by humans.
Summary updated