Автора пока нетВзять себе

The graphical interface of the BiasTestGPT bias-testing tool on HuggingFace, from the paper (CC BY 4.0).
Testing a language model for bias has relied on test sentences that are either stiff templates ("[T] is [A]") or expensive crowd-sourced text. BiasTestGPT, a framework and open-source tool described in a research paper, hands that writing job to ChatGPT: a researcher names any social groups and attributes, and ChatGPT writes natural test sentences containing them. The tool then measures how often any masked or autoregressive model available on HuggingFace prefers the stereotyped sentence in stereotype/anti-stereotype pairs.
The problem with existing tests
A pretrained language model (PLM) is said to show social bias when a stereotyped combination, such as a male CEO, gets a higher probability than another, such as a female CEO. Early checks used a few hand-written sentences, which can miss bias or mislead. Systematic checks need many varied, realistic sentences covering intersectional groups. Templates are well controlled but simplistic, sometimes ungrammatical, and can give unstable results. Crowd-sourced sets such as StereoSet and CrowS-Pairs read more naturally but cost a lot to build and update, are hard to reproduce and can add their writers' own biases. Existing tools mostly work on classical machine learning or on fixed datasets, and do not let non-specialists test a new bias.
How BiasTestGPT works
- Bias specification. The user supplies a target group (such as male terms) and an attribute group (such as science terms).
- Sentence generation. ChatGPT is prompted to write a sentence containing one term from each, optionally given example sentences; a second pass produces the paired alternative, and sentences are grouped into stereotype and anti-stereotype pairs.
- Quantification. The tested model scores each pair. The paper uses the stereotype score, the percentage of times the model finds the stereotyped sentence more probable, for its interpretability, but the framework is not tied to it.

The BiasTestGPT pipeline from the paper (CC BY 4.0).
The authors generated a dataset of 7,236 test sentences for 17 bias specifications. Thirteen come from earlier research, including gender with professions and science or arts, race by name, intersectional cases and age. Four are new, in health, such as caregiving versus decision-making by gender, and ensuring versus postponing vaccines for infants and adults.
How good are the sentences?
| Measure | BiasTestGPT sentences | Comparison |
|---|---|---|
| Length | 15.87 words on average | 3.48 for manual templates; 7.95 StereoSet; 13.06 CrowS-Pairs |
| Variety (unique tokens in 200 sentences) | 1102.8 | 262.0 templates; 604.0 StereoSet; 977.0 CrowS-Pairs |
| Mean toxicity | 0.028 | 0.131 templates; 0.107 StereoSet; 0.157 CrowS-Pairs |
| Sentences that contain both requested terms | 62.9% | Not applicable |
Sentences came out positive in sentiment in 61.6% of cases and negative in 29.5%, which the authors attribute to the effort that went into making ChatGPT non-toxic. Every sentence was readable, below 10th grade on the Gunning Fog index. When the authors inspected 1.5k generated sentences by hand, the most common problem was a different meaning than intended (6.9%), such as "addition" not read as math, followed by no real link between group and attribute (5.0%).
What it finds
Across ten models, including BERT, GPT-2, LLaMA, Falcon and two biomedical models, BiasTestGPT estimated bias higher than manual templates in most cases, on average 3.1% higher. The gap was larger for gender-related biases (5.5%) and intersectional ones (6.3%), and for Falcon-7B (11.9%) and GPT2-large (7.1%). The authors argue the difference arises because generated sentences express bias in varied ways that templates cannot.

Bias estimates from manual templates and from BiasTestGPT for each tested model and bias (CC BY 4.0).
Asking the experts
Eight participants, none with deep technical knowledge of language models, tried the tool: four from medicine, three from social science, one from psychology and one liberal arts student. Each tested a model on a predefined bias and then built a new bias of their own, taking an average of 40 minutes. The tool scored 74.7 on the System Usability Scale, a "Good" experience (grade B). Users said they were concerned about bias in the AI they use and wanted to test it, though they felt developers should bear primary responsibility. After using the tool they reported a stronger awareness of AI bias and how it spreads, though not of the importance of responsible use. Wishes included comparing models, flagging or editing sentences and uploading their own data.
Limits
The authors warn that the tool should not be the only measure of bias or debiasing: the generated sentences contain some noise, they explore only what ChatGPT's training data covers (the experiments used gpt-3.5-turbo), and ChatGPT is updated over time, so sentences for the same bias can change. The bias specifications and example sentences can themselves add bias, and bias found by this kind of intrinsic test may not carry over to behavior in specific downstream tasks. They recommend inspecting a sample of generated sentences by hand and say the framework can use other generator models and other bias metrics. The authors see the role of domain experts as central: the tool automates the labor-intensive writing, while people with social-science, ethics or health knowledge decide what is worth testing.
Sources
- BiasTestGPT: Using ChatGPT for Social Bias Testing of Language Models, arXiv:2302.07371 (https://arxiv.org/abs/2302.07371), licensed CC BY 4.0. Changed here: condensed and rewritten in hubnx's own words, with three of the paper's figures reproduced as captioned; rewritten in hubnx's own words.
- Authors of the original: Rafal Kocielnik, Shrimai Prabhumoye, Vivian Zhang.
Комментарии





