BTC-SAM: Leveraging LLMs for Generation of Bias Test Cases for Sentiment Analysis Models

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Kardkovacs, Zsolt T., Djennane, Lynda, Field, Anna, Benatallah, Boualem, Gaci, Yacine, Casati, Fabio, Gaaloul, Walid
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866914093384859648
author Kardkovacs, Zsolt T.
Djennane, Lynda
Field, Anna
Benatallah, Boualem
Gaci, Yacine
Casati, Fabio
Gaaloul, Walid
author_facet Kardkovacs, Zsolt T.
Djennane, Lynda
Field, Anna
Benatallah, Boualem
Gaci, Yacine
Casati, Fabio
Gaaloul, Walid
contents Sentiment Analysis (SA) models harbor inherent social biases that can be harmful in real-world 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.
format Preprint
id arxiv_https___arxiv_org_abs_2509_24101
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle BTC-SAM: Leveraging LLMs for Generation of Bias Test Cases for Sentiment Analysis Models
Kardkovacs, Zsolt T.
Djennane, Lynda
Field, Anna
Benatallah, Boualem
Gaci, Yacine
Casati, Fabio
Gaaloul, Walid
Computation and Language
Sentiment Analysis (SA) models harbor inherent social biases that can be harmful in real-world 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.
title BTC-SAM: Leveraging LLMs for Generation of Bias Test Cases for Sentiment Analysis Models
topic Computation and Language
url https://arxiv.org/abs/2509.24101