Post-processing for Individual Fairness

Felix Petersen, Debarghya Mukherjee, Yuekai Sun, Mikhail Yurochkin

Ensuring algorithmic fairness in machine learning models is a critical challenge, particularly for systems already deployed in production. In algorithmic fairness, there are two main camps: group fairness (e.g., ensuring equal loan approval rates across different demographic groups) and individual fairness (IF) (ensuring that two similar individuals get the same result, regardless of protected attributes).

Conceptual illustration of Individual Fairness.

While individual fairness is a powerful and intuitive concept, it has historically faced two massive hurdles:

  1. Computational Cost: Most IF methods are "in-processing," meaning fairness constraints must be baked into the model during training. For massive models like BERT or GPT, retraining from scratch is environmentally and financially prohibitive.
  2. The Accuracy Trade-off: Traditional IF enforces a "global" consistency (Lipschitz continuity) across all pairs of data points. This constraint is often too rigid, forcing the model to make sub-optimal predictions to satisfy the math, which ultimately tanks accuracy.

To address these issues, researchers have introduced a computationally efficient post-processing method called Graph Laplacian Individual Fairness (GLIF). This approach effectively debiases large-scale models in seconds without requiring expensive retraining.

The GLIF Methodology

Instead of retraining a model, GLIF takes the outputs of a pre-existing model and "post-processes" them to enforce fairness. The method relies on three core components:

  • The Similarity Graph: The dataset is represented as a graph where nodes are individuals and edge weights represent how "similar" they are, based on a defined fair metric or human labels.
  • Graph Smoothing: The fairness problem is cast as a graph signal processing task. By using a Graph Laplacian quadratic form as a regularizer, the algorithm acts like a "smoothing" filter. If two nodes are connected by a heavy edge (meaning they are very similar), the algorithm forces their predicted labels to be close to each other.
  • Local Relaxation: Unlike previous methods that enforce fairness globally, GLIF focuses on Local Individual Fairness. It only enforces consistency between points that are actually similar, allowing the model more flexibility across the broader data manifold and preserving overall accuracy.

For small datasets, GLIF provides a closed-form solution via matrix inversion. For large-scale data, the authors introduce a coordinate descent algorithm that allows the method to scale to millions of points.

Key Results and Trade-offs

The researchers evaluated GLIF across several tasks, including sentiment analysis (evaluating bias against names associated with specific ethnicities), occupation prediction from biographies (testing consistency when gender pronouns are swapped), and toxicity detection (ensuring comments aren't flagged simply for containing identity words).

Trade-off curves showing GLIF and GLIF-NRW outperforming standard IF-constraints.

The results highlight several major advantages of the GLIF approach:

  • Unprecedented Speed: On a sentiment analysis task, traditional global constraint methods took 7 minutes to run. GLIF accomplished the same task in less than 0.1 seconds.
  • Effectiveness on Large Models: GLIF significantly improved prediction consistency on complex NLP datasets. In the Toxicity task, for instance, it boosted consistency from ~61% to over 84% while maintaining high balanced accuracy.
  • Superior Pareto Frontiers: In almost every experiment, GLIF and its normalized variant (GLIF-NRW) achieved a better balance between accuracy and fairness than existing state-of-the-art methods. The normalized version (GLIF-NRW) proved particularly effective at treating all regions of data density equally, offering better protection for minority groups in under-represented parts of the feature space.

Limitations and Future Directions

While GLIF offers a highly efficient "easy path" to individual fairness by only requiring model outputs and a similarity measure, it is not without limitations.

Most notably, GLIF relies entirely on having a high-quality similarity matrix. If the metric used to define "who is similar to whom" is itself biased or poorly constructed, the post-processing will simply reflect and potentially amplify those flaws. Additionally, the basic version of the algorithm is transductive, meaning it works best when the entire batch of test data is available at once to build the graph.

Finally, it is crucial to remember that mathematical fairness is only a proxy. Satisfying Local Individual Fairness does not guarantee "complete" fairness in a sociological sense, and practitioners must still carefully design their similarity metrics based on the specific, real-world context of their application.

Summary updated

BibTeX
@inproceedings{petersen2021post,
  author = {Felix Petersen and Debarghya Mukherjee and Yuekai Sun and Mikhail Yurochkin},
  title = {{Post-processing for Individual Fairness}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=qGeqg4_hA2},
}
Figure