Shielded Representations: Protecting Sensitive Attributes Through Iterative Gradient-Based Projection

Shadi Iskander, Kira Radinsky, Yonatan Belinkov

Introduction

Natural Language Processing (NLP) models often inherit and amplify social biases present in their training data. A common mitigation strategy is "concept erasure," which involves modifying internal representations so that sensitive attributes (e.g., gender, race) can no longer be extracted. However, existing linear methods like Iterative Null-space Projection (INLP) or Robust Linear Adversarial Concept Erasure (RLACE) often leave behind non-linear "leakage." While these methods hide bias from simple linear tools, non-linear probes can still recover sensitive information—a phenomenon described as "lipstick on a pig."

Methodology: Iterative Gradient-Based Projection (IGBP)

To address non-linear leakage, the authors propose Iterative Gradient-Based Projection (IGBP). This post-hoc method moves representation vectors toward the decision boundary of a classifier (probe) trained to predict the sensitive attribute. When a sample lies on the boundary, the classifier becomes oblivious to its sensitive label (resulting in a 50/50 guess).

The Projective Loss ($L_P$)

A significant challenge in adversarial debiasing is that standard Cross-Entropy loss ($L_{CE}$) suffers from vanishing gradients for "easy" samples—those most strongly associated with bias. To counter this, the researchers introduced a specialized Projective Loss:

$$L_P(p_t) = \frac{1}{2}(\log(p_t) - \log(1 - p_t))^2$$

Comparison of standard Cross-Entropy loss and the proposed Projective Loss.

Unlike $L_{CE}$, which goes to zero as prediction confidence increases, $L_P$ assigns higher weights to well-classified samples, effectively forcing them toward the decision boundary where the probe is most uncertain.

Iterative Refinement and Non-Linearity

IGBP operates iteratively: a probe is trained, data is projected, and a new probe is trained on the modified data to capture any remaining signal. Unlike linear methods that reduce the rank of the representation space (eventually collapsing the data), IGBP works on non-linear hypersurfaces. This preserves the data's utility over many iterations and allows for the use of non-linear MLP probes with ReLU activations.

Experimental Evaluation

The effectiveness of IGBP was evaluated across three distinct benchmarks:

  1. GloVe Word Embeddings: Intrinsic evaluation of gendered associations in static vectors.
  2. Bias in Bios: Predicting occupation while shielding gender in a dataset of 394K biographies.
  3. DIAL (Dialectal Tweets): Sentiment analysis while shielding race/sociolect (African American English vs. Standard American English).

Key Results

IGBP consistently outperforms linear competitors in reducing information leakage. On the "Bias in Bios" task using BERT, IGBP reduced extractable information (compression) from 30.81 to 1.66, far exceeding linear methods.

Accuracy and TPR-GAP over iterations.

As shown in the iterative training process, IGBP achieves a sharp decline in the TPR GAP (True Positive Rate Gap), a standard fairness metric, while maintaining stable downstream task accuracy. For instance, on the DIAL dataset, the TPR GAP was reduced from ~30% to ~9% with negligible impact on main task accuracy (typically less than a 2% drop).

Conclusion

IGBP provides a robust framework for shielding sensitive attributes in neural representations. By leveraging non-linear probes and a novel projective loss, it effectively mitigates the non-linear leakage common in traditional debiasing. While the method is more computationally intensive than linear alternatives, its ability to preserve utility while aggressively scrubbing bias makes it a powerful tool for developing fairer NLP systems.

Summary updated

BibTeX
@inproceedings{iskander2023shielded,
  author = {Shadi Iskander and Kira Radinsky and Yonatan Belinkov},
  title = {{Shielded Representations: Protecting Sensitive Attributes Through Iterative Gradient-Based Projection}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.369},
}
Figure