SoFaiR: Single Shot Fair Representation Learning

Xavier Gitiaux, Huzefa Rangwala

Abstract

Fair Representation Learning (FRL) typically involves a significant computational burden, requiring researchers to train multiple models to explore the trade-off between data utility and fairness. We present SoFaiR (Single Shot Fair Representation Learning), a framework that enables the navigation of this trade-off using a single trained model. By framing fairness through the lens of information-theoretic rate-distortion curves, SoFaiR allows for the dynamic adjustment of sensitive information filtering at test time, offering both computational efficiency and enhanced interpretability.

Introduction

In the effort to mitigate bias in machine learning, Fair Representation Learning acts as a critical intermediary. The goal is to transform raw data into a representation that retains task-relevant information while "scrubbing" correlations with sensitive attributes such as gender, race, or age.

However, this process is governed by an inherent fairness-information trade-off: increasing fairness typically results in a loss of predictive accuracy. Current state-of-the-art methods are "multi-shot," meaning a developer must retrain an entirely new model for every desired point on the fairness-utility curve. This approach is not only computationally expensive but also provides little insight into which specific data features are being sacrificed to achieve fairness. SoFaiR addresses these limitations by providing a "single-shot" solution that generates the entire trade-off spectrum within one model.

Methodology

SoFaiR is built upon two conceptual pillars that bridge information theory and algorithmic fairness:

1. The Rate-Distortion Connection

The authors mathematically demonstrate that the fairness-information trade-off is equivalent to the rate-distortion trade-off found in data compression. In this framework, achieving fairness is viewed as a form of strategic, lossy compression. By limiting the "bit rate" of the representation, the model naturally prioritizes the removal of information most correlated with sensitive attributes.

2. Gated Bitstream Architecture

To implement this, SoFaiR encodes data into a sequential bitstream rather than a standard static vector. A gated architecture, controlled by a single hyperparameter $\beta$, acts as a "fairness fader":

  • High $\beta$ (Strict Fairness): The gate masks the majority of the bitstream, resulting in a low-resolution representation that contains minimal sensitive information.
  • Low $\beta$ (High Utility): The gate opens, unmasking more bits and increasing the resolution and utility of the data, albeit at the cost of higher correlation with sensitive attributes.

This architecture allows users to explore the Pareto front of fairness versus utility at test time simply by sliding the $\beta$ parameter, requiring no additional training.

Experimental Evaluation

The framework was evaluated across three distinct benchmarks to test its versatility:

  • DSprites-Unfair: A synthetic image dataset where shape and orientation (the sensitive attribute) are artificially correlated.
  • Adults (Census Income): A real-world dataset for predicting income levels, using Gender and the intersection of Race and Gender as sensitive attributes.
  • Health Heritage: A large-scale medical dataset (95,000 records) focused on predicting 10-year survival rates while protecting Age and Gender intersections.

Key Insights and Results

Computational Efficiency

SoFaiR demonstrates a massive reduction in training overhead. On the DSprites dataset, generating a 16-point trade-off curve using multi-shot baselines required 137 hours of training. SoFaiR produced a comparable curve in just 8 hours—a 17x speedup.

Performance and Consistency

Despite the efficiency gains, SoFaiR remains competitive with specialized models. Its Area Under the Unfairness-Distortion Curve (AUFDC) matched or exceeded multi-shot methods across most benchmarks. Furthermore, because the representations are "nested" (fairer versions are simply truncated versions of high-utility ones), the model ensures consistency that multi-shot models cannot guarantee.

Feature Interpretability

The sequential nature of the bitstream provides a unique window into model behavior. By observing which features are restored as the bitmask opens, the authors could rank features by their impact on fairness. In the Adults dataset, for instance, the model first restored "working hours," followed by "occupation," and finally "marital status" as fairness constraints were relaxed.

Discussion and Limitations

While SoFaiR offers a flexible and efficient framework, it is primarily an unsupervised method. It scrubs data without knowledge of the specific downstream task, which may result in slightly lower accuracy compared to models optimized for a single, specific task. Additionally, the current implementation relies on soft-quantization to maintain differentiability during training; further refinements in these approximations could improve stability for high-dimensional data like video.

Conclusion

SoFaiR redefines the approach to fair representation learning by treating fairness as a controllable compression problem. By enabling a "single-shot" exploration of the fairness-utility trade-off, it provides researchers with a powerful, efficient, and interpretable tool for building more equitable AI systems.

Summary updated

Abstract

To avoid discriminatory uses of their data, organizations can learn to map them into a representation that filters out information related to sensitive attributes. However, all existing methods in fair representation learning generate a fairness-information trade-off. To achieve different points on the fairness-information plane, one must train different models. In this paper, we first demonstrate that fairness-information trade-offs are fully characterized by rate-distortion trade-offs. Then, we use this key result and propose SoFaiR, a single shot fair representation learning method that generates with one trained model many points on the fairness-information plane. Besides its computational saving, our single-shot approach is, to the extent of our knowledge, the first fair representation learning method that explains what information is affected by changes in the fairness / distortion properties of the representation. Empirically, we find on three datasets that SoFaiR achieves similar fairness information trade-offs as its multi-shot counterparts.
BibTeX
@inproceedings{gitiaux2022sofair,
  author = {Xavier Gitiaux and Huzefa Rangwala},
  title = {{SoFaiR: Single Shot Fair Representation Learning}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/97},
}
Figure