Reducing Gender Bias in BERT-Based Sentiment Analysis Using Counterfactual Training: A Multi-Architecture Sensitivity and Robustness Analysis

Pretrained Transformer models such as BERT, RoBERTa, and DeBERTa absorb social and gender biases from large, uncurated text corpora, and when fine-tuned for sentiment analysis they often change predictions solely because a demographic or gendered term is swapped . This study tests a combined counterfactual training approach—pairing Context-Aware Counterfactual Data Augmentation (Context-CDA) with Counterfactual Logit Pairing (CLP)—to reduce gender bias in fine-tuned sentiment classifiers without hurting overall accuracy . Four Transformer architectures are evaluated across the SST-2 and IMDB sentiment benchmarks and audited for bias using the Equity Evaluation Corpus (EEC), with demographic bias measured via Counterfactual Token Fairness (CTF) sentiment flip rates and the Wasserstein-1 distance between male and female score distributions . Without debiasing, standard BERT-base flips its sentiment predictions on 12.8% of gendered sentence pairs in the EEC ; applying Context-CDA alongside CLP regularization (λCLP = 1.0) drops the flip rate to 1.7% in BERT-base, 1.4% in RoBERTa-base, and 1.1% in DeBERTav3, while the Wasserstein-1 gender distance falls from 0.084 to 0.009 and SST-2 accuracy drops by less than 0.4% . Combining context-aware counterfactual augmentation with logit pairing therefore reliably reduces gender sensitivity across different Transformer architectures while keeping downstream classification accuracy intact.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-01
DOI
https://doi.org/10.5281/zenodo.24712968
Primary Topic
Ethics and Social Impacts of AI
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Reducing Gender Bias in BERT-Based Sentiment Analysis Using Counterfactual Training: A Multi-Architecture Sensitivity and Robustness Analysis

Divya S., Soumya V, Shubhashree DM
Zenodo (CERN European Organization for Nuclear Research)
Ethics and Social Impacts of AI
article

Reducing Gender Bias in BERT-Based Sentiment Analysis Using Counterfactual Training: A Multi-Architecture Sensitivity and Robustness Analysis

Divya S., Soumya V, Shubhashree DM
article en

Abstract

Pretrained Transformer models such as BERT, RoBERTa, and DeBERTa absorb social and gender biases from large, uncurated text corpora, and when fine-tuned for sentiment analysis they often change predictions solely because a demographic or gendered term is swapped . This study tests a combined counterfactual training approach—pairing Context-Aware Counterfactual Data Augmentation (Context-CDA) with Counterfactual Logit Pairing (CLP)—to reduce gender bias in fine-tuned sentiment classifiers without hurting overall accuracy . Four Transformer architectures are evaluated across the SST-2 and IMDB sentiment benchmarks and audited for bias using the Equity Evaluation Corpus (EEC), with demographic bias measured via Counterfactual Token Fairness (CTF) sentiment flip rates and the Wasserstein-1 distance between male and female score distributions . Without debiasing, standard BERT-base flips its sentiment predictions on 12.8% of gendered sentence pairs in the EEC ; applying Context-CDA alongside CLP regularization (λCLP = 1.0) drops the flip rate to 1.7% in BERT-base, 1.4% in RoBERTa-base, and 1.1% in DeBERTav3, while the Wasserstein-1 gender distance falls from 0.084 to 0.009 and SST-2 accuracy drops by less than 0.4% . Combining context-aware counterfactual augmentation with logit pairing therefore reliably reduces gender sensitivity across different Transformer architectures while keeping downstream classification accuracy intact.

Zenodo (CERN European Organization for Nuclear Research)
Ethics and Social Impacts of AI
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Reducing Gender Bias in BERT-Based Sentiment Analysis Using Counterfactual Training: A Multi-Architecture Sensitivity and Robustness Analysis — Divya S., Soumya V, et al. · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS