Fairness-Aware Structured Pruning in Transformers

Abdelrahman Zayed, Goncalo Mordido, Samira Shabanian, Ioana Baldini, Sarath Chandar
12/24/2023
cs.CLcs.CYcs.LG

No official code found. Best implementation: chandar-lab/FASP (3 stars, MIT, last commit 2025-01-09).

Abstract

The increasing size of large language models (LLMs) has introduced challenges in their training and inference. Removing model components is perceived as a solution to tackle the large model sizes, however, existing pruning methods solely focus on performance, without considering an essential aspect for the responsible use of LLMs: model fairness. It is crucial to address the fairness of LLMs towards diverse groups, such as women, Black people, LGBTQ+, Jewish communities, among others, as they are being deployed and available to a wide audience. In this work, first, we investigate how attention heads impact fairness and performance in pre-trained transformer-based language models. We then propose a novel method to prune the attention heads that negatively impact fairness while retaining the heads critical for performance, i.e. language modeling capabilities. Our approach is practical in terms of time and resources, as it does not require fine-tuning the final pruned, and fairer, model. Our findings demonstrate a reduction in gender bias by 19%, 19.5%, 39.5%, 34.7%, 23%, and 8% for DistilGPT-2, GPT-2, GPT-Neo of two different sizes, GPT-J, and Llama 2 models, respectively, in comparison to the biased model, with only a slight decrease in performance.

View on arXivView PDF

Code Implementations(1)

chandar-lab/FASPCommunity100%
MIT

We study the effect of attention head pruning on fairness in large language models

31Shell, PythonJun 8, 20231 years agoMIT

Similar Papers

Cite this paper

@article{zayed2023fairnessaware,
  title  = {Fairness-Aware Structured Pruning in Transformers},
  author = {Abdelrahman Zayed and Goncalo Mordido and Samira Shabanian and Ioana Baldini and Sarath Chandar},
  year   = {2023},
  eprint = {2312.15398},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.15398v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.15398.svg)](https://codeofpaper.com/paper/2312.15398)

Discussion