Semi-FairVAE: Semi-supervised Fair Representation Learning with Adversarial Variational Autoencoder

Chuhan Wu, Fangzhao Wu, Tao Qi, Yongfeng HuangarXiv 2022 · DOI

Semi-FairVAE: Semi-supervised Fair Representation Learning with Adversarial Variational Autoencoder

Abstract

Fair representation learning is often constrained by the scarcity of sensitive attribute labels, such as gender or race, which are essential for training robust adversarial debiasing models. We present Semi-FairVAE, a novel framework that integrates decomposed adversarial learning with a semi-supervised Variational Autoencoder (VAE). By leveraging both labeled and unlabeled data, Semi-FairVAE learns to disentangle sensitive information from task-relevant features. Our results on benchmark datasets demonstrate that Semi-FairVAE achieves superior fairness-accuracy trade-offs even when sensitive labels are available for only a small fraction of the training data.

Introduction

The goal of fair representation learning is to develop data embeddings that are invariant to sensitive attributes, thereby preventing downstream models from making biased decisions. Adversarial learning is the predominant technique for this, where an encoder is penalized if a discriminator can successfully predict sensitive attributes from the learned embeddings. However, a significant practical hurdle is the "label scarcity" problem: sensitive demographic information is often missing or restricted in real-world applications. In such scenarios, the discriminator remains weak, allowing bias to "leak" into the final model. Semi-FairVAE addresses this by utilizing unlabeled data through a semi-supervised reconstruction task, ensuring the model learns the underlying data structure while stripping away biased patterns.

Methodology

Semi-FairVAE utilizes three core architectural innovations to maximize the utility of unlabeled data:

  1. Decomposed Representations: Instead of a single encoder, the framework employs two. A bias-aware model explicitly captures sensitive information ($r_b$), while a bias-free model extracts task-relevant, non-sensitive features ($r_f$). An orthogonality loss is applied between $r_b$ and $r_f$ to ensure they represent distinct, non-overlapping information.
  2. Semi-supervised VAE: The model incorporates a reconstruction path where the input feature $\hat{x}$ is reconstructed from a combined representation $c$ derived from both $r_b$ and $r_f$. This VAE-based approach allows the model to learn from the entire dataset, including samples without sensitive labels, by enforcing that the latent space accurately represents the input data.
  3. Entropy Regularization: To further prevent bias leakage, an entropy constraint is applied to the bias-free model's predictions of sensitive attributes for unlabeled samples. By forcing high entropy (uncertainty), the model is discouraged from harboring latent biased patterns in the "bias-free" branch.
Architecture of Semi-FairVAE showing the interaction between bias-free and bias-aware models, the reconstruction path, and various loss functions.

Experiments and Results

The framework was evaluated on two distinct tasks: the Adult dataset (income prediction with gender as the sensitive attribute) and NewsRec (news recommendation with user gender as the sensitive attribute).

Performance metrics across Adult (left) and NewsRec (right) datasets as the percentage of unlabeled data increases.

Key experimental results include:

  • Fairness under Scarcity: Semi-FairVAE achieved significantly lower Demographic Parity (DP) and Equalized Opportunity (OPP) scores compared to standard adversarial and self-training baselines. Remarkably, with only 10% of sensitive labels, it outperformed purely supervised models trained on larger labeled sets.
  • Accuracy-Fairness Pareto Frontier: While removing bias typically incurs an accuracy cost, Semi-FairVAE maintains a better balance than existing methods. On the NewsRec dataset, it preserved high recommendation accuracy (AUC) while effectively masking user gender from external attackers.
  • The Role of Reconstruction: The VAE's reconstruction task acts as a critical bridge; by accurately reconstructing unlabeled inputs using inferred sensitive attributes, it reinforces the separation between the bias-aware and bias-free branches.

Conclusion

Semi-FairVAE demonstrates that semi-supervised learning, particularly through VAE-based reconstruction, is a powerful tool for achieving fairness in data-scarce environments. By decomposing representations and applying entropy regularization, the model avoids the catastrophic loss of useful features while effectively mitigating bias. Future work will focus on extending this framework to continuous sensitive attributes and exploring zero-shot fairness techniques.

Summary updated

BibTeX
@misc{wu2022semi,
  author = {Chuhan Wu and Fangzhao Wu and Tao Qi and Yongfeng Huang},
  title = {{Semi-FairVAE: Semi-supervised Fair Representation Learning with Adversarial Variational Autoencoder}},
  year = {2022},
  eprint = {2204.00536},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.00536},
}
Figure