BTC-SAM: Leveraging LLMs for Generation of Bias Test Cases for Sentiment Analysis Models
Zsolt T. Kardkovács, Lynda Djennane, Anna Field, Boualem Benatallah, Yacine Gaci, Fabio Casati, Walid Gaaloul
Abstract
Sentiment Analysis (SA) models harbor inherent social biases that can be harmful in realworld applications. These biases are identified by examining the output of SA models for sentences that only vary in the identity groups of the subjects. Constructing natural, linguistically rich, relevant, and diverse sets of sentences that provide sufficient coverage over the domain is expensive, especially when addressing a wide range of biases: it requires domain experts and/or crowd-sourcing. In this paper, we present a novel bias testing framework, BTC-SAM, which generates high-quality test cases for bias testing in SA models with minimal specification using Large Language Models (LLMs) for the controllable generation of test sentences. Our experiments show that relying on LLMs can provide high linguistic variation and diversity in the test sentences, thereby offering better test coverage compared to base prompting methods even for previously unseen biases. 1
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Builds on5
- Language (Technology) is Power: A Critical Survey of "Bias" in NLPSu Lin Blodgett, Solon Barocas, Hal Daumé III, Hanna M. WallachACL 2020 · 68 citations
- CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language ModelsNikita Nangia, Clara Vania, Rasika Bhalerao, Samuel R. BowmanEMNLP 2020 · 19 citations
- CHBias: Bias Evaluation and Mitigation of Chinese Conversational Language ModelsJiaxu Zhao, Meng Fang, Zijing Shi, Yitong Li et al.ACL 2023 · 11 citations
- Stereotyping Norwegian Salmon: An Inventory of Pitfalls in Fairness Benchmark DatasetsSu Lin Blodgett, Gilsinia Lopez, Alexandra Olteanu, Robert Sim et al.ACL 2021
- StereoSet: Measuring stereotypical bias in pretrained language modelsMoin Nadeem, Anna Bethke, Siva ReddyACL 2021
Related papers
- Targeted Data Generation: Finding and Fixing Model WeaknessesZexue He, Marco Túlio Ribeiro, Fereshte KhaniACL 2023 · 6 citations
- Fairness Testing of Large Language Models in Role-PlayingXinyue Li, Zhenpeng Chen, Jie M. Zhang, Ying Xiao et al.FSE 2026 · 5 citations
- "I'm sorry to hear that": Finding New Biases in Language Models with a Holistic Descriptor DatasetEric Michael Smith, Melissa Hall, Melanie Kambadur, Eleonora Presani et al.EMNLP 2022 · 56 citations
- Probing Social Bias in Labor Market Text Generation by ChatGPT: A Masked Language Model ApproachLei Ding, Yang Hu, Nicole Denier, Enze Shi et al.NeurIPS 2024 · 4 citations
- GPT is Not an Annotator: The Necessity of Human Annotation in Fairness Benchmark ConstructionVirginia K. Felkner, Jennifer A. Thompson, Jonathan MayACL 2024 · 3 citations
