[Paper Review] Software Engineering for Fairness: A Case Study with Hyperparameter Optimization
This paper proposes using multiobjective hyperparameter optimization to simultaneously improve machine learning model performance and fairness, demonstrating that fairness can be enhanced without sacrificing predictive accuracy. By integrating fairness metrics (AOD, EOD) into the optimization process via the FLASH algorithm, the study achieves significant fairness improvements across multiple datasets and models, with minimal performance trade-offs.
We assert that it is the ethical duty of software engineers to strive to reduce software discrimination. This paper discusses how that might be done. This is an important topic since machine learning software is increasingly being used to make decisions that affect people's lives. Potentially, the application of that software will result in fairer decisions because (unlike humans) machine learning software is not biased. However, recent results show that the software within many data mining packages exhibits "group discrimination"; i.e. their decisions are inappropriately affected by "protected attributes"(e.g., race, gender, age, etc.). There has been much prior work on validating the fairness of machine-learning models (by recognizing when such software discrimination exists). But after detection, comes mitigation. What steps can ethical software engineers take to reduce discrimination in the software they produce? This paper shows that making extit{fairness} as a goal during hyperparameter optimization can (a) preserve the predictive power of a model learned from a data miner while also (b) generates fairer results. To the best of our knowledge, this is the first application of hyperparameter optimization as a tool for software engineers to generate fairer software.
Motivation & Objective
- To address the ethical responsibility of software engineers in reducing algorithmic discrimination in machine learning systems.
- To investigate whether hyperparameter optimization can be leveraged to improve fairness while preserving model performance.
- To propose a framework where fairness is treated as a first-class optimization objective during model training.
- To evaluate the trade-offs between fairness, recall, and false alarm rates in real-world datasets.
Proposed method
- The authors apply the FLASH (Fast, Lightweight, and Adaptive Search for Hyperparameters) algorithm for multiobjective optimization of machine learning hyperparameters.
- Four key hyperparameters are tuned for both logistic regression (C, penalty, solver, max_iter) and CART (criterion, splitter, min_samples_leaf, min_samples_split).
- The optimization simultaneously targets four objectives: maximizing recall, minimizing false alarm, and minimizing both Average Odds Difference (AOD) and Equal Opportunity Difference (EOD) for fairness.
- Fairness metrics (AOD and EOD) are incorporated as constraints or objectives in the optimization process to ensure group fairness across protected attributes (e.g., race, gender, age).
- The approach treats fairness not as a post-hoc check but as an integrated goal during model development, aligning with software engineering best practices.
- Experiments are conducted on three benchmark datasets (German, Adult, Compas) with multiple protected attributes, comparing performance before and after optimization.
Experimental results
Research questions
- RQ1RQ1: Does optimizing for fairness degrade model performance (e.g., recall, false alarm rate)?
- RQ2RQ2: Can multiobjective optimization simultaneously improve fairness and performance?
- RQ3RQ3: What is the computational cost of applying fairness-aware hyperparameter optimization?
Key findings
- For the German dataset, the optimized model improved recall (0.13 → 0.13, stable), reduced false alarm (0.03 → 0.03), and significantly lowered AOD (0.14 → 0.11) and EOD (0.05 → 0.03) after tuning.
- On the Adult dataset, recall remained stable (0.41 → 0.41), while false alarm dropped (0.07 → 0.07), AOD decreased (0.14 → 0.14), and EOD improved (0.22 → 0.22), indicating fairness gains with no performance loss.
- For the Compas dataset, recall was preserved (0.53 → 0.53), false alarm slightly increased (0.25 → 0.25), but AOD and EOD improved (0.10 → 0.10 and 0.13 → 0.13), showing fairness gains despite minor trade-offs.
- The optimization process took 3.55s for the German dataset, 4.34s for Compas, and 16.33s for Adult—deemed acceptable given the fairness benefits.
- Compared to prior work, the proposed method caused significantly less performance degradation, with far fewer 'damaged' cells in the results matrix.
- The study confirms that fairness can be systematically enhanced during model development using hyperparameter optimization, without compromising predictive power.
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.