File size: 15,080 Bytes
ec76cbc fda4253 f8eebd8 6affb58 fda4253 ec76cbc ccc3584 bbb0adc ff7d246 20f6b1b 1e710d2 5704444 faa29c2 f8ddfd4 e832670 55ea000 21bc7a4 ec76cbc fda4253 f8eebd8 6affb58 ec76cbc ccc3584 bbb0adc ec76cbc ff7d246 20f6b1b 1e710d2 5704444 faa29c2 f8ddfd4 e832670 55ea000 21bc7a4 4da8574 7645b01 4da8574 b758b47 767d7b4 b758b47 767d7b4 2a733af 767d7b4 279cfd8 767d7b4 b758b47 767d7b4 279cfd8 767d7b4 b758b47 767d7b4 279cfd8 767d7b4 279cfd8 767d7b4 279cfd8 767d7b4 279cfd8 767d7b4 b758b47 767d7b4 ad89c17 767d7b4 b758b47 767d7b4 | 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 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 | ---
dataset_info:
- config_name: ACSEmployment
features:
- name: id
dtype: int64
- name: description
dtype: string
- name: instruction
dtype: string
- name: question
dtype: string
- name: choices
sequence: string
length: 2
- name: answer
dtype: string
- name: answer_key
dtype: string
- name: choice_question_prompt
dtype: string
- name: numeric_question
dtype: string
- name: label
dtype: int64
- name: numeric_question_prompt
dtype: string
- name: AGEP
dtype: int64
- name: SCHL
dtype: float64
- name: MAR
dtype: int64
- name: RELP
dtype: int64
- name: DIS
dtype: int64
- name: ESP
dtype: float64
- name: CIT
dtype: int64
- name: MIG
dtype: float64
- name: MIL
dtype: float64
- name: ANC
dtype: int64
- name: NATIVITY
dtype: int64
- name: DEAR
dtype: int64
- name: DEYE
dtype: int64
- name: DREM
dtype: float64
- name: SEX
dtype: int64
- name: RAC1P
dtype: int64
splits:
- name: train
num_bytes: 4216821661
num_examples: 2588885
- name: validation
num_bytes: 527108317
num_examples: 323611
- name: test
num_bytes: 527106993
num_examples: 323611
download_size: 326506898
dataset_size: 5271036971
- config_name: ACSIncome
features:
- name: id
dtype: int64
- name: description
dtype: string
- name: instruction
dtype: string
- name: question
dtype: string
- name: choices
sequence: string
length: 2
- name: answer
dtype: string
- name: answer_key
dtype: string
- name: choice_question_prompt
dtype: string
- name: numeric_question
dtype: string
- name: label
dtype: int64
- name: numeric_question_prompt
dtype: string
- name: AGEP
dtype: int64
- name: COW
dtype: int64
- name: SCHL
dtype: int64
- name: MAR
dtype: int64
- name: OCCP
dtype: int64
- name: POBP
dtype: int64
- name: RELP
dtype: int64
- name: WKHP
dtype: int64
- name: SEX
dtype: int64
- name: RAC1P
dtype: int64
splits:
- name: train
num_bytes: 1667556978
num_examples: 1331600
- name: validation
num_bytes: 208460485
num_examples: 166450
- name: test
num_bytes: 208446084
num_examples: 166450
download_size: 155811003
dataset_size: 2084463547
- config_name: ACSMobility
features:
- name: id
dtype: int64
- name: description
dtype: string
- name: instruction
dtype: string
- name: question
dtype: string
- name: choices
sequence: string
length: 2
- name: answer
dtype: string
- name: answer_key
dtype: string
- name: choice_question_prompt
dtype: string
- name: numeric_question
dtype: string
- name: label
dtype: int64
- name: numeric_question_prompt
dtype: string
- name: AGEP
dtype: int64
- name: SCHL
dtype: float64
- name: MAR
dtype: int64
- name: SEX
dtype: int64
- name: DIS
dtype: int64
- name: ESP
dtype: float64
- name: CIT
dtype: int64
- name: MIL
dtype: float64
- name: ANC
dtype: int64
- name: NATIVITY
dtype: int64
- name: RELP
dtype: int64
- name: DEAR
dtype: int64
- name: DEYE
dtype: int64
- name: DREM
dtype: float64
- name: RAC1P
dtype: int64
- name: GCL
dtype: float64
- name: COW
dtype: float64
- name: ESR
dtype: float64
- name: WKHP
dtype: float64
- name: JWMNP
dtype: float64
- name: PINCP
dtype: float64
splits:
- name: train
num_bytes: 1028069699
num_examples: 496749
- name: validation
num_bytes: 128514698
num_examples: 62094
- name: test
num_bytes: 128509092
num_examples: 62094
download_size: 86257467
dataset_size: 1285093489
- config_name: ACSPublicCoverage
features:
- name: id
dtype: int64
- name: description
dtype: string
- name: instruction
dtype: string
- name: question
dtype: string
- name: choices
sequence: string
length: 2
- name: answer
dtype: string
- name: answer_key
dtype: string
- name: choice_question_prompt
dtype: string
- name: numeric_question
dtype: string
- name: label
dtype: int64
- name: numeric_question_prompt
dtype: string
- name: AGEP
dtype: int64
- name: SCHL
dtype: float64
- name: MAR
dtype: int64
- name: SEX
dtype: int64
- name: DIS
dtype: int64
- name: ESP
dtype: float64
- name: CIT
dtype: int64
- name: MIG
dtype: float64
- name: MIL
dtype: float64
- name: ANC
dtype: int64
- name: NATIVITY
dtype: int64
- name: DEAR
dtype: int64
- name: DEYE
dtype: int64
- name: DREM
dtype: float64
- name: PINCP
dtype: float64
- name: ESR
dtype: float64
- name: ST
dtype: int64
- name: FER
dtype: float64
- name: RAC1P
dtype: int64
splits:
- name: train
num_bytes: 1775349595
num_examples: 910631
- name: validation
num_bytes: 221922965
num_examples: 113829
- name: test
num_bytes: 221932893
num_examples: 113829
download_size: 138771081
dataset_size: 2219205453
- config_name: ACSTravelTime
features:
- name: id
dtype: int64
- name: description
dtype: string
- name: instruction
dtype: string
- name: question
dtype: string
- name: choices
sequence: string
length: 2
- name: answer
dtype: string
- name: answer_key
dtype: string
- name: choice_question_prompt
dtype: string
- name: numeric_question
dtype: string
- name: label
dtype: int64
- name: numeric_question_prompt
dtype: string
- name: AGEP
dtype: int64
- name: SCHL
dtype: float64
- name: MAR
dtype: int64
- name: SEX
dtype: int64
- name: DIS
dtype: int64
- name: ESP
dtype: float64
- name: MIG
dtype: float64
- name: RELP
dtype: int64
- name: RAC1P
dtype: int64
- name: PUMA
dtype: int64
- name: ST
dtype: int64
- name: CIT
dtype: int64
- name: OCCP
dtype: float64
- name: JWTR
dtype: float64
- name: POWPUMA
dtype: float64
- name: POVPIP
dtype: float64
splits:
- name: train
num_bytes: 2039450205
num_examples: 1173318
- name: validation
num_bytes: 254946722
num_examples: 146665
- name: test
num_bytes: 254948776
num_examples: 146665
download_size: 215781517
dataset_size: 2549345703
configs:
- config_name: ACSEmployment
data_files:
- split: train
path: ACSEmployment/train-*
- split: validation
path: ACSEmployment/validation-*
- split: test
path: ACSEmployment/test-*
- config_name: ACSIncome
data_files:
- split: train
path: ACSIncome/train-*
- split: validation
path: ACSIncome/validation-*
- split: test
path: ACSIncome/test-*
default: true
- config_name: ACSMobility
data_files:
- split: train
path: ACSMobility/train-*
- split: validation
path: ACSMobility/validation-*
- split: test
path: ACSMobility/test-*
- config_name: ACSPublicCoverage
data_files:
- split: train
path: ACSPublicCoverage/train-*
- split: validation
path: ACSPublicCoverage/validation-*
- split: test
path: ACSPublicCoverage/test-*
- config_name: ACSTravelTime
data_files:
- split: train
path: ACSTravelTime/train-*
- split: validation
path: ACSTravelTime/validation-*
- split: test
path: ACSTravelTime/test-*
license: mit
task_categories:
- question-answering
- text-classification
- feature-extraction
- zero-shot-classification
language:
- en
pretty_name: Folktexts real-world unrealizable classification tasks
size_categories:
- 1M<n<10M
paperswithcode_id: folktexts
---
# Dataset Card for _folktexts_ <!-- omit in toc -->
[Folktexts](https://github.com/socialfoundations/folktexts) is a suite of Q&A
datasets with natural outcome uncertainty, aimed at evaluating LLMs' calibration
on unrealizable tasks.
The *folktexts* datasets are derived from US Census data products.
Namely, the datasets made available here are derived from the
[2018 Public Use Microdata Sample](https://www.census.gov/programs-surveys/acs/microdata/documentation/2018.html)
(PUMS). Individual features are mapped to natural text using the respective
[codebook](https://www2.census.gov/programs-surveys/acs/tech_docs/pums/data_dict/PUMS_Data_Dictionary_2018.pdf).
Each task relates to predicting different individual
characteristics (e.g., income, employment) from a set of demographic features
(e.g., age, race, education, occupation).
Importantly, every task has natural outcome uncertainty. That is, in general,
the features describing each row do not uniquely determine the task's label.
For calibrated models to perform well on this task, the model must correctly
output nuanced scores between 0 and 1, instead of simply outputting discrete
labels 0 or 1.
Namely, we make available the following tasks in natural language Q&A format:
- `ACSIncome`: Predict whether a working adult earns above $50,000 yearly.
- `ACSEmployment`: Predict whether an adult is an employed civilian.
- `ACSPublicCoverage`: Predict individual public health insurance coverage.
- `ACSMobility`: Predict whether an individual changed address within the last year.
- `ACSTravelTime`: Predict whether an employed adult has a work commute time longer than 20 minutes.
These tasks follow the same naming and feature/target columns as the
[folktables](https://github.com/socialfoundations/folktables)
tabular datasets proposed by
[Ding et al. (2021)](https://proceedings.neurips.cc/paper_files/paper/2021/file/32e54441e6382a7fbacbbbaf3c450059-Paper.pdf).
The folktables tabular datasets have seen prevalent use in the algorithmic
fairness and distribution shift communities. We make available natural language
Q&A versions of these tasks.
The datasets are made available in standard multiple-choice Q&A format (columns
`question`, `choices`, `answer`, `answer_key`, and `choice_question_prompt`), as
well as in numeric Q&A format (columns `numeric_question`,
`numeric_question_prompt`, and `label`).
The numeric prompting (also known as *verbalized prompting*) is known to improve
calibration of zero-shot LLM risk scores
[[Tian et al., EMNLP 2023](https://openreview.net/forum?id=g3faCfrwm7);
[Cruz et al., NeurIPS 2024](https://arxiv.org/pdf/2407.14614)].
**The accompanying [`folktexts` python package](https://github.com/socialfoundations/folktexts)
eases customization, evaluation, and benchmarking with these datasets.**
Table of contents:
- [Dataset Details](#dataset-details)
- [Uses](#uses)
- [Dataset Structure](#dataset-structure)
- [Dataset Creation](#dataset-creation)
- [Citation](#citation)
- [More Information](#more-information)
## Dataset Details
### Dataset Description <!-- omit in toc -->
- **Language(s) (NLP):** English
- **License:** Code is licensed under the [MIT license](https://github.com/socialfoundations/folktexts/blob/main/LICENSE); Data license is governed by the U.S. Census Bureau [terms of service](https://www.census.gov/data/developers/about/terms-of-service.html).
### Dataset Sources <!-- omit in toc -->
- **Repository:** https://github.com/socialfoundations/folktexts
- **Paper:** https://arxiv.org/pdf/2407.14614
- **Data source:** [2018 American Community Survey Public Use Microdata Sample](https://www.census.gov/programs-surveys/acs/microdata/documentation/2018.html)
## Uses
The datasets were originally used to evaluate LLMs' ability to produce
calibrated and accurate risk scores in the [Cruz et al. (2024)](https://arxiv.org/pdf/2407.14614) paper.
Other potential uses include evaluating the fairness of LLMs' decisions,
as individual rows feature protected demographic attributes such as `sex` and
`race`.
## Dataset Structure
**Description of dataset columns:**
- `id`: A unique row identifier.
- `description`: A textual description of an individual's features, following a bulleted-list format.
- `instruction`: The instruction used for zero-shot LLM prompting (should be pre-appended to the row description).
- `question`: A question relating to the task's target column.
- `choices`: A list of two answer options relating to the above question.
- `answer`: The correct answer from the above list of answer options.
- `answer_key`: The correct answer key; i.e., `A` for the first choice, or `B` for the second choice.
- `choice_question_prompt`: The full multiple-choice Q&A text string used for LLM prompting.
- `numeric_question`: A version of the question that prompts for a *numeric output* instead of a *discrete choice output*.
- `label`: The task's label. This is the correct output to the above numeric question.
- `numeric_question_prompt`: The full numeric Q&A text string used for LLM prompting.
- `<tabular-columns>`: All other columns correspond to the tabular features in this task. Each of these features will also appear in text form on the above description column.
The dataset was randomly split in `training`, `test`, and `validation` data,
following an 80%/10%/10% split.
Only the `test` split should be used to evaluate zero-shot LLM performance.
The `training` split can be used for fine-tuning, or for fitting traditional
supervised ML models on the tabular columns for metric baselines.
The `validation` split should be used for hyperparameter tuning, feature
engineering or any other model improvement loop.
## Dataset Creation
### Source Data <!-- omit in toc -->
The datasets are based on publicly available data from the American Community
Survey (ACS) Public Use Microdata Sample (PUMS), namely the
[2018 ACS 1-year PUMS files](https://www.census.gov/programs-surveys/acs/microdata/documentation.2018.html#list-tab-1370939201).
#### Data Collection and Processing <!-- omit in toc -->
The categorical values were mapped to meaningful natural language
representations using the `folktexts` package, which in turn uses the official
[ACS PUMS codebook](https://www2.census.gov/programs-surveys/acs/tech_docs/pums/data_dict/PUMS_Data_Dictionary_2018.pdf).
The data download and processing was aided by the `folktables` python package,
which in turn uses the official US Census web API.
#### Who are the source data producers? <!-- omit in toc -->
U.S. Census Bureau.
## Citation
If you find this useful in your research, please consider citing the following paper:
```bib
@inproceedings{
cruz2024evaluating,
title={Evaluating language models as risk scores},
author={Andr{\'e} F Cruz and Moritz Hardt and Celestine Mendler-D{\"u}nner},
booktitle={The Thirty-eight Conference on Neural Information Processing Systems Datasets and Benchmarks Track},
year={2024},
url={https://openreview.net/forum?id=qrZxL3Bto9}
}
```
## More Information
More information is available in the [`folktexts`](https://github.com/socialfoundations/folktexts) package repository
and the [accompanying paper](https://arxiv.org/pdf/2407.14614).
### Dataset Card Authors <!-- omit in toc -->
[André F. Cruz](https://github.com/andrefcruz)
|