Saved in:
Bibliographic Details
Main Authors: Yang, Yi, Duan, Hanyu, Abbasi, Ahmed, Lalor, John P., Tam, Kar Yan
Format: Preprint
Published: 2023
Subjects:
Online Access:https://arxiv.org/abs/2311.10395
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866907942216794112
author Yang, Yi
Duan, Hanyu
Abbasi, Ahmed
Lalor, John P.
Tam, Kar Yan
author_facet Yang, Yi
Duan, Hanyu
Abbasi, Ahmed
Lalor, John P.
Tam, Kar Yan
contents Transformer-based pretrained large language models (PLM) such as BERT and GPT have achieved remarkable success in NLP tasks. However, PLMs are prone to encoding stereotypical biases. Although a burgeoning literature has emerged on stereotypical bias mitigation in PLMs, such as work on debiasing gender and racial stereotyping, how such biases manifest and behave internally within PLMs remains largely unknown. Understanding the internal stereotyping mechanisms may allow better assessment of model fairness and guide the development of effective mitigation strategies. In this work, we focus on attention heads, a major component of the Transformer architecture, and propose a bias analysis framework to explore and identify a small set of biased heads that are found to contribute to a PLM's stereotypical bias. We conduct extensive experiments to validate the existence of these biased heads and to better understand how they behave. We investigate gender and racial bias in the English language in two types of Transformer-based PLMs: the encoder-based BERT model and the decoder-based autoregressive GPT model. Overall, the results shed light on understanding the bias behavior in pretrained language models.
format Preprint
id arxiv_https___arxiv_org_abs_2311_10395
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Bias A-head? Analyzing Bias in Transformer-Based Language Model Attention Heads
Yang, Yi
Duan, Hanyu
Abbasi, Ahmed
Lalor, John P.
Tam, Kar Yan
Computation and Language
Transformer-based pretrained large language models (PLM) such as BERT and GPT have achieved remarkable success in NLP tasks. However, PLMs are prone to encoding stereotypical biases. Although a burgeoning literature has emerged on stereotypical bias mitigation in PLMs, such as work on debiasing gender and racial stereotyping, how such biases manifest and behave internally within PLMs remains largely unknown. Understanding the internal stereotyping mechanisms may allow better assessment of model fairness and guide the development of effective mitigation strategies. In this work, we focus on attention heads, a major component of the Transformer architecture, and propose a bias analysis framework to explore and identify a small set of biased heads that are found to contribute to a PLM's stereotypical bias. We conduct extensive experiments to validate the existence of these biased heads and to better understand how they behave. We investigate gender and racial bias in the English language in two types of Transformer-based PLMs: the encoder-based BERT model and the decoder-based autoregressive GPT model. Overall, the results shed light on understanding the bias behavior in pretrained language models.
title Bias A-head? Analyzing Bias in Transformer-Based Language Model Attention Heads
topic Computation and Language
url https://arxiv.org/abs/2311.10395