[Paper Review] fairlib: A Unified Framework for Assessing and Improving Classification Fairness
fairlib is an open-source, PyTorch-based framework that unifies fairness evaluation and debiasing for classification models across NLP, vision, and audio tasks. It supports 14 debiasing methods, standardized fairness metrics, and interactive visualization, enabling reproducible benchmarking and improved performance over original results through systematic hyperparameter tuning.
This paper presents fairlib, an open-source framework for assessing and improving classification fairness. It provides a systematic framework for quickly reproducing existing baseline models, developing new methods, evaluating models with different metrics, and visualizing their results. Its modularity and extensibility enable the framework to be used for diverse types of inputs, including natural language, images, and audio. In detail, we implement 14 debiasing methods, including pre-processing, at-training-time, and post-processing approaches. The built-in metrics cover the most commonly used fairness criterion and can be further generalized and customized for fairness evaluation.
Motivation & Objective
- To address the lack of reproducibility and consistent evaluation in fairness research due to inconsistent training strategies and model selection.
- To provide a unified, modular, and extensible framework for evaluating and improving fairness in classification models across diverse modalities (text, image, audio).
- To support systematic comparison of debiasing methods using standardized metrics and visualization tools, including performance-fairness trade-off plots and LaTeX table generation.
- To enable researchers to reproduce and improve upon existing debiasing results through consistent hyperparameter tuning and checkpoint management.
- To extend fairness tooling beyond scikit-learn-based frameworks by supporting modern deep learning frameworks like PyTorch with GPU acceleration.
Proposed method
- The framework is built on PyTorch and provides a modular interface for integrating new models, datasets, and debiasing methods.
- It implements 14 debiasing approaches across three categories: pre-processing (e.g., BD, CB, JB, BTEO), at-training-time (e.g., Adv, EAdv, DAdv, AAdv, ADAdv, Gate, FairBatch, FairSCL, EO CLA), and post-processing (e.g., INLP, Gate^soft).
- It supports multiple fairness criteria, including demographic parity, equalized odds, equal opportunity, and sufficiency, with standardized GAP computation for performance gap evaluation.
- The framework includes built-in utilities for generating LaTeX tables and interactive performance-fairness trade-off plots to compare models under varying hyperparameters.
- It ensures reproducibility by saving model checkpoints and configuration files, tracking all hyperparameters and training settings.
- It supports both built-in and custom datasets, enabling plug-and-play integration for new tasks and modalities.
Experimental results
Research questions
- RQ1Can a unified framework improve the reproducibility of fairness benchmarking across diverse NLP and vision models?
- RQ2How do different debiasing methods compare in terms of performance-fairness trade-offs across multiple datasets?
- RQ3To what extent can systematic hyperparameter tuning within a unified framework improve upon original reported results in fairness literature?
- RQ4How does the framework’s extensibility support the integration of new debiasing methods and new data modalities?
- RQ5What are the limitations of existing fairness toolkits like AIF360 and FairLearn in supporting modern deep learning architectures, and how does fairlib overcome them?
Key findings
- fairlib successfully reproduces a battery of debiasing results from recent NLP literature, demonstrating improved performance over the original reported results through better hyperparameter tuning.
- On the Moji dataset, ADAdv outperforms other methods in fairness-accuracy trade-offs as the trade-off hyperparameter increases, achieving superior fairness without significant performance drop.
- On the Bios dataset, BTEO is the only method that improves fairness while maintaining or slightly improving performance compared to the standard model.
- EO CLA achieves the best fairness-accuracy balance on the Bios dataset, outperforming other methods at comparable performance levels.
- INLP performs poorly on Moji but becomes a reasonable choice on Bios, highlighting dataset-specific method effectiveness.
- The framework’s visualization tools, including Pareto-model selection and interactive plots, enable more informed and systematic model comparison than basic metric comparison alone.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.