Coupling Fairness and Pruning in a Single Run: a Bi-level Optimization Perspective

Yucong Dai, Gen Li, Feng Luo, Xiaolong Ma, Yongkai Wu · DOI

Abstract

Model pruning is essential for deploying AI on edge devices, but it often unintentionally amplifies algorithmic bias. This paper introduces Bi-level Fair Pruning (BiFP), a framework that uses bi-level optimization to jointly optimize pruning masks and model weights under fairness constraints. The result is a compressed model that maintains high accuracy and fairness in a single, efficient training run. BiFP addresses the "trilemma" of performance, efficiency, and fairness by integrating fairness directly into the pruning process, ensuring that the resulting model architecture is inherently equitable.

Introduction

As deep learning models grow in size, pruning—the process of removing redundant weights—has become standard for creating efficient models. However, pruning is not a neutral process; it can exacerbate societal biases, leading to significantly worse performance for protected groups compared to the general population. Traditional approaches usually tackle these issues sequentially (e.g., pruning a model and then trying to "fix" its fairness), but this often leads to a steep drop in accuracy. The authors argue that fairness must be integrated directly into the pruning process because the "mask" (the architecture of what is kept) and the "weights" (the values of the remaining parameters) are deeply intertwined.

Methods: Bi-level Optimization

The authors formulate the problem through the lens of Bi-level Optimization. In this setup, there are two nested optimization tasks:

  1. The Lower Level (Weights): Finding the optimal parameter values ($\theta$) for a given pruning mask while adhering to fairness constraints.
  2. The Upper Level (Mask): Identifying the optimal pruning mask ($m$) that minimizes loss, accounting for how the weights will react in the lower level.
The BiFP framework jointly optimizes masks (m) and weights (theta) through a bi-level process, ensuring fairness constraints are met at both levels.

Key Innovations

  • Joint Optimization: Unlike sequential methods, BiFP enforces fairness in both the mask selection and the weight updates simultaneously.
  • Convex Relaxation: Pruning masks are typically binary, making them non-differentiable. The authors relax these into continuous "masking scores" between 0 and 1, enabling gradient-based optimization.
  • Performance Degradation Fairness: A new fairness notion ensuring that the loss in accuracy caused by pruning is distributed equitably across different demographic groups.

Experimental Results

The researchers evaluated BiFP using two facial attribute datasets: CelebA (predicting "Blond Hair" and "Bags Under Eyes") and LFW (predicting "Wavy Hair" and "Big Nose"), with gender as the sensitive attribute.

Performance comparison across CelebA and LFW datasets. BiFP (red and purple lines) maintains higher accuracy and significantly lower bias across various sparsity levels compared to baselines like FPGM, SNIP, and FairGRAPE.

Key Insights

  • The Mask Matters: Fairness cannot be an afterthought. If a pruning mask removes the specific neural structures required to process features for a minority group, weight fine-tuning cannot restore fairness. The mask itself must be "fair."
  • Robustness at High Sparsity: While many methods appear fair at low sparsity (e.g., 20%), they often fail at high sparsity (80%+). BiFP remains robust in these aggressive compression scenarios. On the CelebA Blond Hair task at 80% sparsity, BiFP achieved 6% higher accuracy and 300% lower bias compared to baselines like FairGRAPE.
  • Efficiency: By using a unified bi-level approach, BiFP avoids multiple separate optimization runs, saving approximately 94% of training iterations compared to traditional two-stage fair training strategies.

Conclusion

BiFP demonstrates that fairness and efficiency are not mutually exclusive. By treating pruning as a bi-level optimization problem, the framework produces models that are both compact and equitable. Future work will explore scaling this approach to Large Language Models (LLMs) and Vision Transformers, as well as extending the framework to tasks like object detection and segmentation.

Summary updated

BibTeX
@misc{dai2023coupling,
  author = {Yucong Dai and Gen Li and Feng Luo and Xiaolong Ma and Yongkai Wu},
  title = {{Coupling Fairness and Pruning in a Single Run: a Bi-level Optimization Perspective}},
  year = {2023},
  eprint = {2312.10181},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.10181},
}
Figure