Null It Out: Guarding Protected Attributes by Iterative Nullspace Projection

Shauli Ravfogel, Yanai Elazar, Hila Gonen, Michael Twiton, Yoav Goldberg

Neural networks frequently learn to rely on "protected attributes" such as gender, race, or age, even when these features are irrelevant or detrimental to the target task. Previous attempts to mitigate this bias, such as adversarial training or simple linear projections, often fall short. Adversarial methods can be unstable and difficult to tune, while single-step linear projections often fail because bias is high-dimensional and deeply ingrained in the representation space. This paper introduces Iterative Nullspace Projection (INLP), a post-hoc linear method designed to systematically remove specific information from neural representations.

Methodology: Iterative Nullspace Projection

The core objective of INLP is to ensure that no linear classifier can recover a protected attribute $Z$ from a representation $X$. The method operates through an iterative loop:

  1. Train: A linear classifier (e.g., SVM or Logistic Regression) is trained to predict the protected attribute $Z$ from the current representations $X$.
  2. Project: The data is projected into the nullspace of this classifier. The nullspace contains all vectors that the classifier maps to zero, effectively removing the information used for its prediction.
  3. Repeat: A new classifier is trained on the projected data. If it can still predict the attribute above chance, the process repeats.
Geometric representation of projecting a vector X onto the nullspace V of a classifier W.

This iterative approach allows the model to "null out" multiple dimensions of bias. Because it uses orthogonal projections, it minimizes the distortion of the original data structure, preserving utility for downstream tasks. Mathematically, this process continues until a linear classifier can no longer perform better than random guessing on the projected data.

Experimental Setup

The authors evaluated INLP across three distinct domains to test its versatility:

  • Word Embeddings: GloVe vectors were used to test debiasing at the vocabulary level.
  • Sentiment Analysis: A Twitter dataset (Blodgett et al., 2016) labeled for sentiment and author race (African American English vs. Standard American English).
  • Profession Classification: The Biographies corpus (De-Arteaga et al., 2019), containing professional bios labeled by profession and gender.

Results and Discussion

A key finding of the study is that bias is high-dimensional. Removing a single "gender direction" is insufficient; INLP often requires dozens of iterations to fully merge biased clusters.

t-SNE visualizations of word embeddings showing the gradual merging of female-biased (red) and male-biased (blue) clusters over 35 iterations of INLP.

In the GloVe experiments, the V-measure (a metric for clustering quality) for gender dropped from 100% to 0.31% after 35 iterations. On the Biographies dataset, INLP reduced the True Positive Rate (TPR) gap—a measure of gender bias—by 40-50% across various architectures (BOW, FastText, BERT) with minimal loss in profession-prediction accuracy.

Interestingly, debiased embeddings sometimes showed improved performance on standard word-similarity benchmarks like SimLex-999. This suggests that removing "noise" like gender bias can actually clarify lexical semantics. While INLP primarily targets linear recovery, the authors found it also significantly hindered non-linear classifiers (MLPs), though it did not eliminate the signal entirely.

Conclusion

INLP provides a robust, simple method for linear guarding of sensitive attributes. It effectively "blinds" models to protected information while maintaining the representation's utility for main tasks. However, its effectiveness is limited by the quality of the training data and the assumption of linear encoding. Future work may extend these principles to non-linear projection techniques or apply them to other domains like computer vision.

Summary updated

BibTeX
@inproceedings{ravfogel2020null,
  author = {Shauli Ravfogel and Yanai Elazar and Hila Gonen and Michael Twiton and Yoav Goldberg},
  title = {{Null It Out: Guarding Protected Attributes by Iterative Nullspace Projection}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.acl-main.647},
}
Figure