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 
 
3417a69
 
 
 
7be1f3b
 
 
 
8865481
77d63de
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
---
license: cc-by-4.0
language:
- en
pretty_name: BBQ (Synonym-Swapped)
tags:
- bias
- stereotypes
- fairness
- robustness
- synonym-substitution
dataset_info:
- config_name: Age
  features:
  - name: example_id
    dtype: int64
  - name: question_index
    dtype: string
  - name: question_polarity
    dtype: string
  - name: context_condition
    dtype: string
  - name: category
    dtype: string
  - name: answer_info
    struct:
    - name: ans0
      list: string
    - name: ans1
      list: string
    - name: ans2
      list: string
  - name: additional_metadata
    struct:
    - name: source
      dtype: string
    - name: stereotyped_groups
      list: string
    - name: subcategory
      dtype: string
    - name: version
      dtype: string
  - name: context
    dtype: string
  - name: question
    dtype: string
  - name: ans0
    dtype: string
  - name: ans1
    dtype: string
  - name: ans2
    dtype: string
  - name: label
    dtype: int64
  splits:
  - name: test
    num_bytes: 2215563
    num_examples: 3680
  download_size: 171939
  dataset_size: 2215563
- config_name: Disability_status
  features:
  - name: example_id
    dtype: int64
  - name: question_index
    dtype: string
  - name: question_polarity
    dtype: string
  - name: context_condition
    dtype: string
  - name: category
    dtype: string
  - name: answer_info
    struct:
    - name: ans0
      list: string
    - name: ans1
      list: string
    - name: ans2
      list: string
  - name: additional_metadata
    struct:
    - name: source
      dtype: string
    - name: stereotyped_groups
      list: string
    - name: subcategory
      dtype: string
    - name: version
      dtype: string
  - name: context
    dtype: string
  - name: question
    dtype: string
  - name: ans0
    dtype: string
  - name: ans1
    dtype: string
  - name: ans2
    dtype: string
  - name: label
    dtype: int64
  splits:
  - name: test
    num_bytes: 954231
    num_examples: 1556
  download_size: 76727
  dataset_size: 954231
- config_name: Gender_identity
  features:
  - name: example_id
    dtype: int64
  - name: question_index
    dtype: string
  - name: question_polarity
    dtype: string
  - name: context_condition
    dtype: string
  - name: category
    dtype: string
  - name: answer_info
    struct:
    - name: ans0
      list: string
    - name: ans1
      list: string
    - name: ans2
      list: string
  - name: additional_metadata
    struct:
    - name: source
      dtype: string
    - name: stereotyped_groups
      list: string
    - name: subcategory
      dtype: string
    - name: version
      dtype: string
  - name: context
    dtype: string
  - name: question
    dtype: string
  - name: ans0
    dtype: string
  - name: ans1
    dtype: string
  - name: ans2
    dtype: string
  - name: label
    dtype: int64
  splits:
  - name: test
    num_bytes: 2941633
    num_examples: 5672
  download_size: 200072
  dataset_size: 2941633
- config_name: Nationality
  features:
  - name: example_id
    dtype: int64
  - name: question_index
    dtype: string
  - name: question_polarity
    dtype: string
  - name: context_condition
    dtype: string
  - name: category
    dtype: string
  - name: answer_info
    struct:
    - name: ans0
      list: string
    - name: ans1
      list: string
    - name: ans2
      list: string
  - name: additional_metadata
    struct:
    - name: source
      dtype: string
    - name: stereotyped_groups
      list: string
    - name: subcategory
      dtype: string
    - name: version
      dtype: string
  - name: context
    dtype: string
  - name: question
    dtype: string
  - name: ans0
    dtype: string
  - name: ans1
    dtype: string
  - name: ans2
    dtype: string
  - name: label
    dtype: int64
  splits:
  - name: test
    num_bytes: 2157168
    num_examples: 3080
  download_size: 145509
  dataset_size: 2157168
- config_name: Physical_appearance
  features:
  - name: example_id
    dtype: int64
  - name: question_index
    dtype: string
  - name: question_polarity
    dtype: string
  - name: context_condition
    dtype: string
  - name: category
    dtype: string
  - name: answer_info
    struct:
    - name: ans0
      list: string
    - name: ans1
      list: string
    - name: ans2
      list: string
  - name: additional_metadata
    struct:
    - name: source
      dtype: string
    - name: stereotyped_groups
      list: string
    - name: subcategory
      dtype: string
    - name: version
      dtype: string
  - name: context
    dtype: string
  - name: question
    dtype: string
  - name: ans0
    dtype: string
  - name: ans1
    dtype: string
  - name: ans2
    dtype: string
  - name: label
    dtype: int64
  splits:
  - name: test
    num_bytes: 960058
    num_examples: 1576
  download_size: 77570
  dataset_size: 960058
- config_name: Race_ethnicity
  features:
  - name: example_id
    dtype: int64
  - name: question_index
    dtype: string
  - name: question_polarity
    dtype: string
  - name: context_condition
    dtype: string
  - name: category
    dtype: string
  - name: answer_info
    struct:
    - name: ans0
      list: string
    - name: ans1
      list: string
    - name: ans2
      list: string
  - name: additional_metadata
    struct:
    - name: source
      dtype: string
    - name: stereotyped_groups
      list: string
    - name: subcategory
      dtype: string
    - name: version
      dtype: string
  - name: context
    dtype: string
  - name: question
    dtype: string
  - name: ans0
    dtype: string
  - name: ans1
    dtype: string
  - name: ans2
    dtype: string
  - name: label
    dtype: int64
  splits:
  - name: test
    num_bytes: 4383400
    num_examples: 6880
  download_size: 303126
  dataset_size: 4383400
- config_name: Religion
  features:
  - name: example_id
    dtype: int64
  - name: question_index
    dtype: string
  - name: question_polarity
    dtype: string
  - name: context_condition
    dtype: string
  - name: category
    dtype: string
  - name: answer_info
    struct:
    - name: ans0
      list: string
    - name: ans1
      list: string
    - name: ans2
      list: string
  - name: additional_metadata
    struct:
    - name: source
      dtype: string
    - name: stereotyped_groups
      list: string
    - name: subcategory
      dtype: string
    - name: version
      dtype: string
  - name: context
    dtype: string
  - name: question
    dtype: string
  - name: ans0
    dtype: string
  - name: ans1
    dtype: string
  - name: ans2
    dtype: string
  - name: label
    dtype: int64
  splits:
  - name: test
    num_bytes: 824157
    num_examples: 1200
  download_size: 62016
  dataset_size: 824157
- config_name: SES
  features:
  - name: example_id
    dtype: int64
  - name: question_index
    dtype: string
  - name: question_polarity
    dtype: string
  - name: context_condition
    dtype: string
  - name: category
    dtype: string
  - name: answer_info
    struct:
    - name: ans0
      list: string
    - name: ans1
      list: string
    - name: ans2
      list: string
  - name: additional_metadata
    struct:
    - name: source
      dtype: string
    - name: stereotyped_groups
      list: string
    - name: subcategory
      dtype: string
    - name: version
      dtype: string
  - name: context
    dtype: string
  - name: question
    dtype: string
  - name: ans0
    dtype: string
  - name: ans1
    dtype: string
  - name: ans2
    dtype: string
  - name: label
    dtype: int64
  splits:
  - name: test
    num_bytes: 4014175
    num_examples: 6864
  download_size: 248564
  dataset_size: 4014175
- config_name: Sexual_orientation
  features:
  - name: example_id
    dtype: int64
  - name: question_index
    dtype: string
  - name: question_polarity
    dtype: string
  - name: context_condition
    dtype: string
  - name: category
    dtype: string
  - name: answer_info
    struct:
    - name: ans0
      list: string
    - name: ans1
      list: string
    - name: ans2
      list: string
  - name: additional_metadata
    struct:
    - name: source
      dtype: string
    - name: stereotyped_groups
      list: string
    - name: subcategory
      dtype: string
    - name: version
      dtype: string
  - name: context
    dtype: string
  - name: question
    dtype: string
  - name: ans0
    dtype: string
  - name: ans1
    dtype: string
  - name: ans2
    dtype: string
  - name: label
    dtype: int64
  splits:
  - name: test
    num_bytes: 519278
    num_examples: 864
  download_size: 49340
  dataset_size: 519278
configs:
- config_name: Age
  data_files:
  - split: test
    path: Age/test-*
- config_name: Disability_status
  data_files:
  - split: test
    path: Disability_status/test-*
- config_name: Gender_identity
  data_files:
  - split: test
    path: Gender_identity/test-*
- config_name: Nationality
  data_files:
  - split: test
    path: Nationality/test-*
- config_name: Physical_appearance
  data_files:
  - split: test
    path: Physical_appearance/test-*
- config_name: Race_ethnicity
  data_files:
  - split: test
    path: Race_ethnicity/test-*
- config_name: Religion
  data_files:
  - split: test
    path: Religion/test-*
- config_name: SES
  data_files:
  - split: test
    path: SES/test-*
- config_name: Sexual_orientation
  data_files:
  - split: test
    path: Sexual_orientation/test-*
---

# BBQ (Synonym-Swapped)

> **This is a modified version of [BBQ](https://github.com/nyu-mll/BBQ) (Parrish et al., 2022), redistributed under the original [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) license.**

## What changed

Only the `context` field was rewritten with synonym substitutions. Questions, answer options, labels and all other fields are unchanged. It covers the 9 single-axis categories (test split).

Synonyms were proposed automatically by an LLM (`gpt-4o-mini`), which was asked to suggest close synonyms while skipping stopwords, proper nouns, numbers and words central to the sentence's topic. Every proposed substitution was applied (swap probability 1.0). Because the substitutions are automatic, a few may slightly shift meaning.

The dataset is intended for testing whether bias-benchmark results hold up under surface-level rewording.

## License

CC BY 4.0, inherited from the original dataset; the full text is in [`LICENSE`](LICENSE).

Scoring with the original BBQ metric also needs [`borabozdogan/bbq_swapped_metadata`](https://huggingface.co/datasets/borabozdogan/bbq_swapped_metadata).

## Content warning

Like the original, this dataset contains stereotypes and offensive content about social groups. It is meant for measuring bias, not for training models to produce such content.

## Citation

If you use this dataset, please cite the original BBQ paper:

```bibtex
@inproceedings{parrish-etal-2022-bbq,
    title = "{BBQ}: A hand-built bias benchmark for question answering",
    author = "Parrish, Alicia  and
      Chen, Angelica  and
      Nangia, Nikita  and
      Padmakumar, Vishakh  and
      Phang, Jason  and
      Thompson, Jana  and
      Htut, Phu Mon  and
      Bowman, Samuel R.",
    editor = "Muresan, Smaranda  and
      Nakov, Preslav  and
      Villavicencio, Aline",
    booktitle = "Findings of the {A}ssociation for {C}omputational {L}inguistics: {ACL} 2022",
    month = may,
    year = "2022",
    address = "Dublin, Ireland",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.findings-acl.165/",
    doi = "10.18653/v1/2022.findings-acl.165",
    pages = "2086--2105"
}
```