FairPy: A Toolkit for Evaluation of Prediction Biases and their Mitigation in Large Language Models

Hrishikesh Viswanath, Tianyi Zhang
2/10/2023
cs.CLcs.AIcs.LG

Official code: HrishikeshVish/Fairpy (25 stars, last commit 2024-08-02).

Abstract

Recent studies have demonstrated that large pretrained language models (LLMs) such as BERT and GPT-2 exhibit biases in token prediction, often inherited from the data distributions present in their training corpora. In response, a number of mathematical frameworks have been proposed to quantify, identify, and mitigate these the likelihood of biased token predictions. In this paper, we present a comprehensive survey of such techniques tailored towards widely used LLMs such as BERT, GPT-2, etc. We additionally introduce Fairpy, a modular and extensible toolkit that provides plug-and-play interfaces for integrating these mathematical tools, enabling users to evaluate both pretrained and custom language models. Fairpy supports the implementation of existing debiasing algorithms. The toolkit is open-source and publicly available at: \href{https://github.com/HrishikeshVish/Fairpy}{https://github.com/HrishikeshVish/Fairpy}

View on arXivView PDF

Code Implementations(1)

256C, ShellJul 2, 20222 years ago

Cite this paper

@article{viswanath2023fairpy,
  title  = {FairPy: A Toolkit for Evaluation of Prediction Biases and their Mitigation in Large Language Models},
  author = {Hrishikesh Viswanath and Tianyi Zhang},
  year   = {2023},
  eprint = {2302.05508},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2302.05508v2}
}

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/2302.05508.svg)](https://codeofpaper.com/paper/2302.05508)

Discussion