TL;DR
Can we trust a model that says it isn't biased? This research demonstrates that attention mechanisms—often used to "explain" AI decisions—can be easily manipulated. By adding a simple penalty to the training process, models can be trained to hide their reliance on sensitive features (like gender) while still using those features to make predictions, effectively "whitewashing" their internal logic for human auditors.
The Problem: Can Attention Be Trusted?
In the quest for "Explainable AI" (XAI), attention weights have become a primary tool for transparency. When a model predicts a person's occupation, researchers often inspect the attention map to see which words it "focused" on. If it highlights "medicine" and "surgery," it is deemed trustworthy; if it highlights "Ms." or "she," it is suspected of gender bias.
However, a critical question remains: Can a model be trained to intentionally lie? If a developer wishes to deploy a biased model while passing a fairness audit, they might force the model to produce "clean-looking" attention maps that obscure its true reliance on impermissible features.
Methods: Training for Deception
The authors introduce a training scheme to produce deceptive models by modifying the standard objective function. Instead of just minimizing task-specific loss ($L$), they add a penalty term ($R$): $$L' = L + R$$ The penalty $R$ is designed to minimize the total attention weight assigned to a pre-defined set of "impermissible" tokens, such as gender indicators.
This approach was tested across several architectures, including simple Embedding + Attention models, BiLSTMs, and BERT. For multi-head attention in BERT, they experimented with penalizing both average and maximum attention across heads to ensure the model couldn't "hide" its bias in a single head.
Key Insights: How Models "Cheat"
The study identifies three primary mechanisms through which manipulated models bypass attention penalties:
- Information Leakage: In BiLSTMs, the model passes information from a "forbidden" word to its neighbors via recurrent connections. The model then "attends" to the neighbor to retrieve the forbidden information.
- Magnitude Compensation: If forced to assign low attention to a word, the model increases the mathematical magnitude (norm) of that word's vector representation to compensate for the lower weight.
- Positional Shifting: In Seq2Seq tasks, the model may attend to tokens immediately adjacent to the "correct" one.
Key Results
- The "Whitewashing" Effect: Models achieved nearly identical accuracy while reducing attention on "illegal" tokens from over 90% to less than 1%. To a human auditor, the model appears unbiased, even though its underlying logic remains unchanged. In the Occupation task, attention mass on gender tokens dropped from 51.4% to 1.3% with no loss in accuracy.
- Humans are Easily Fooled: In a human study, 66% of participants correctly suspected gender influence in the original biased model. For the manipulated model—which was equally biased—0% of humans suspected gender influence. Deceptive explanations were rated as significantly more "believable" because they still attended to some relevant words (e.g., "medicine"), making the overall map look plausible.
- BERT's Resilience: While BERT was more difficult to manipulate, the authors successfully hid information flow using "max-penalty" across heads and internal masking.
Conclusion
This work proves that attention cannot be used as a guarantee of fairness. While attention mechanisms provide a window into model behavior, that window can be intentionally tinted. Future auditing tools must look beyond simple attention weights, potentially focusing on gradient-based explanations or rigorous causal analysis of model inputs to ensure true transparency.
Summary updated