Gold Doesn't Always Glitter: Spectral Removal of Linear and Nonlinear Guarded Attribute Information

Shun Shao, Yftah Ziser, Shay B. Cohen

Introduction

Neural representations often inadvertently encode "guarded attributes"—sensitive information like gender, race, or religion—present in the training data. This leads to models that make biased or unfair predictions. While researchers have developed methods to "debias" these representations, existing techniques like Iterative Null Space Projection (INLP) are often computationally expensive, require large amounts of labeled data, and primarily target linear correlations, leaving "nonlinear leakage" that complex classifiers can still exploit.

Spectral Attribute Removal (SAL)

The authors present SAL (Spectral Attribute removaL) and its kernelized version, kSAL, to scrub guarded information from neural representations. The core idea of SAL is to flip the traditional use of matrix factorization. While methods like PCA or CCA usually keep the directions of maximal variance or covariance, SAL identifies the directions where the input representations ($X$) and the guarded attributes ($Z$) co-vary the most and prunes them.

  • SAL (Linear): The algorithm calculates the cross-covariance matrix between the input and the guarded attribute. It then performs SVD and projects the data onto the principal directions associated with the smallest singular values. This effectively removes the "loudest" signals related to the sensitive attribute.
  • kSAL (Kernel SAL): To handle nonlinear relationships, the authors apply the "kernel trick." By using kernel matrices (like RBF or Polynomial kernels), they can perform this spectral removal in a high-dimensional feature space without ever explicitly calculating the coordinates in that space.

Plugging the Nonlinear Leak

A critical insight of the paper is that "gold doesn't always glitter": the high singular values in the cross-covariance matrix represent the bias to be discarded. The authors demonstrate that even when a linear classifier can no longer "see" gender in a representation, a nonlinear classifier (like an SVM with an RBF kernel) often still can. This "hidden" leakage necessitates the kernelized approach of kSAL.

Figure 2: Accuracy of different probes (linear, poly2, RBF) as a function of the number of directions $k$ removed. While linear removal quickly drops linear probe accuracy to random (0.5), nonlinear probes maintain high accuracy, highlighting the persistence of nonlinear leakage.

Experimental Results

The authors evaluated SAL across three tasks: word embedding debiasing (GloVe), fair sentiment analysis (TwitterAAE), and fair profession classification (biographies).

Efficiency and Data Robustness

SAL is significantly faster than previous iterative approaches. Because it relies on a single SVD operation rather than an iterative training loop, it is three orders of magnitude faster than INLP. For profession classification, SAL took roughly 0.35 seconds to learn the projection, while INLP took 35 minutes. Furthermore, SAL is highly effective even when labeled data for the guarded attribute is scarce, maintaining performance with only 5% of labeled data.

Fairness vs. Utility

In the profession classification task, SAL achieves a superior balance between maintaining task accuracy and reducing bias (measured by TPR-Gap). For instance, using a BERT encoder, SAL ($k=2$) more than halves the TPR-Gap while maintaining nearly the same accuracy as the original biased model.

Table 5: Performance comparison on the profession classification task. SAL ($k=2$) significantly reduces the TPR-Gap (bias) while preserving more accuracy than the INLP baseline, especially for BERT encoders.

On the word embedding task, linear removal left gender predictable by nonlinear probes at 99.9% accuracy. Using kSAL with an RBF kernel successfully dropped that predictability to near-random (50.2%).

Conclusion

SAL and kSAL provide a simple, fast, and robust framework for erasing both linear and nonlinear guarded information. By leveraging closed-form spectral operations, the method avoids the computational overhead and data-hunger of iterative baselines while effectively plugging nonlinear leaks that traditional linear debiasing methods miss.

Summary updated

BibTeX
@inproceedings{shao2023gold,
  author = {Shun Shao and Yftah Ziser and Shay B. Cohen},
  title = {{Gold Doesn't Always Glitter: Spectral Removal of Linear and Nonlinear Guarded Attribute Information}},
  booktitle = {EACL},
  year = {2023},
  doi = {10.18653/v1/2023.eacl-main.118},
}
Figure