File size: 16,066 Bytes
c8bd750 450ad63 f0e6b1c 773655a 21cd2a5 0669156 5839589 53e4313 fb18316 c8bd750 2edeb16 1f7ca00 26322cd 4d9a77b d31035f d3f0c22 26e52fa d544c5e ed4d3c8 5aea057 bc8a3c7 fb18316 c8bd750 450ad63 f0e6b1c 773655a 21cd2a5 0669156 5839589 53e4313 c8bd750 2edeb16 1f7ca00 26322cd 4d9a77b d31035f d3f0c22 26e52fa d544c5e ed4d3c8 5aea057 bc8a3c7 fb18316 c8bd750 27bdb27 |
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 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 |
---
dataset_info:
- config_name: arxiv
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 23951405
num_examples: 2000
- name: val
num_bytes: 23953104
num_examples: 2000
download_size: 32397617
dataset_size: 47904509
- config_name: bookcorpus2
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 29399219
num_examples: 2000
- name: val
num_bytes: 29528715
num_examples: 2000
download_size: 43274275
dataset_size: 58927934
- config_name: books3
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 28927541
num_examples: 2000
- name: val
num_bytes: 29415621
num_examples: 2000
download_size: 43954943
dataset_size: 58343162
- config_name: cc
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 31451131
num_examples: 2000
- name: val
num_bytes: 31408245
num_examples: 2000
download_size: 46134926
dataset_size: 62859376
- config_name: enron
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 5578752
num_examples: 399
- name: val
num_bytes: 9849460
num_examples: 759
download_size: 10767627
dataset_size: 15428212
- config_name: europarl
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 22680976
num_examples: 2000
- name: val
num_bytes: 23177044
num_examples: 2000
download_size: 35569355
dataset_size: 45858020
- config_name: freelaw
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 31337872
num_examples: 2000
- name: val
num_bytes: 30791346
num_examples: 2000
download_size: 42557443
dataset_size: 62129218
- config_name: github
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 21239019
num_examples: 2000
- name: val
num_bytes: 21322777
num_examples: 2000
download_size: 25082023
dataset_size: 42561796
- config_name: gutenberg
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 27251855
num_examples: 2000
- name: val
num_bytes: 27688215
num_examples: 2000
download_size: 41247514
dataset_size: 54940070
- config_name: hackernews
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 27912230
num_examples: 2000
- name: val
num_bytes: 27711009
num_examples: 2000
download_size: 41299557
dataset_size: 55623239
- config_name: math
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 15822725
num_examples: 2000
- name: val
num_bytes: 16005473
num_examples: 2000
download_size: 20553724
dataset_size: 31828198
- config_name: nih
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 1388416
num_examples: 617
- name: val
num_bytes: 4739758
num_examples: 2000
download_size: 4390381
dataset_size: 6128174
- config_name: opensubtitles
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 26050601
num_examples: 2000
- name: val
num_bytes: 25887240
num_examples: 2000
download_size: 36490878
dataset_size: 51937841
- config_name: openwebtext2
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 30526002
num_examples: 2000
- name: val
num_bytes: 30797068
num_examples: 2000
download_size: 45612154
dataset_size: 61323070
- config_name: philpapers
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 27363225
num_examples: 1867
- name: val
num_bytes: 26440213
num_examples: 2000
download_size: 39546046
dataset_size: 53803438
- config_name: stackexchange
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 24833549
num_examples: 2000
- name: val
num_bytes: 24930603
num_examples: 2000
download_size: 32774119
dataset_size: 49764152
- config_name: ubuntu
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 22325851
num_examples: 2000
- name: val
num_bytes: 19274114
num_examples: 2000
download_size: 29145616
dataset_size: 41599965
- config_name: uspto
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 34935695
num_examples: 2000
- name: val
num_bytes: 35391610
num_examples: 2000
download_size: 45081361
dataset_size: 70327305
- config_name: wikipedia
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 30823459
num_examples: 2000
- name: val
num_bytes: 29979422
num_examples: 2000
download_size: 44124921
dataset_size: 60802881
- config_name: youtubesubtitles
features:
- name: text
dtype: string
- name: synonym_substitution
dtype: string
- name: butter_fingers
dtype: string
- name: random_deletion
dtype: string
- name: change_char_case
dtype: string
- name: whitespace_perturbation
dtype: string
- name: underscore_trick
dtype: string
splits:
- name: train
num_bytes: 21402936
num_examples: 2000
- name: val
num_bytes: 19336425
num_examples: 2000
download_size: 31072242
dataset_size: 40739361
configs:
- config_name: arxiv
data_files:
- split: train
path: arxiv/train-*
- split: val
path: arxiv/val-*
- config_name: bookcorpus2
data_files:
- split: train
path: bookcorpus2/train-*
- split: val
path: bookcorpus2/val-*
- config_name: books3
data_files:
- split: train
path: books3/train-*
- split: val
path: books3/val-*
- config_name: cc
data_files:
- split: train
path: cc/train-*
- split: val
path: cc/val-*
- config_name: enron
data_files:
- split: train
path: enron/train-*
- split: val
path: enron/val-*
- config_name: europarl
data_files:
- split: train
path: europarl/train-*
- split: val
path: europarl/val-*
- config_name: freelaw
data_files:
- split: train
path: freelaw/train-*
- split: val
path: freelaw/val-*
- config_name: github
data_files:
- split: train
path: github/train-*
- split: val
path: github/val-*
- config_name: gutenberg
data_files:
- split: train
path: gutenberg/train-*
- split: val
path: gutenberg/val-*
- config_name: hackernews
data_files:
- split: train
path: hackernews/train-*
- split: val
path: hackernews/val-*
- config_name: math
data_files:
- split: train
path: math/train-*
- split: val
path: math/val-*
- config_name: nih
data_files:
- split: train
path: nih/train-*
- split: val
path: nih/val-*
- config_name: opensubtitles
data_files:
- split: train
path: opensubtitles/train-*
- split: val
path: opensubtitles/val-*
- config_name: openwebtext2
data_files:
- split: train
path: openwebtext2/train-*
- split: val
path: openwebtext2/val-*
- config_name: philpapers
data_files:
- split: train
path: philpapers/train-*
- split: val
path: philpapers/val-*
- config_name: stackexchange
data_files:
- split: train
path: stackexchange/train-*
- split: val
path: stackexchange/val-*
- config_name: ubuntu
data_files:
- split: train
path: ubuntu/train-*
- split: val
path: ubuntu/val-*
- config_name: uspto
data_files:
- split: train
path: uspto/train-*
- split: val
path: uspto/val-*
- config_name: wikipedia
data_files:
- split: train
path: wikipedia/train-*
- split: val
path: wikipedia/val-*
- config_name: youtubesubtitles
data_files:
- split: train
path: youtubesubtitles/train-*
- split: val
path: youtubesubtitles/val-*
---
# LLM Dataset Inference
This repository contains various subsets of the PILE dataset, divided into train and validation sets. The data is used to facilitate privacy research in language models, where perturbed data can be used as a reference to detect the presence of a particular dataset in the training data of a language model.
## Data Used
The data is in the form of JSONL files, with each entry containing the raw text, as well as various kinds of perturbations applied to it.
## Quick Links
- [**arXiv Paper**](): Detailed information about the Dataset Inference V2 project, including the dataset, results, and additional resources.
- [**GitHub Repository**](): Access the source code, evaluation scripts, and additional resources for Dataset Inference.
- [**Dataset on Hugging Face**](https://huggingface.co/datasets/pratyushmaini/llm_dataset_inference): Direct link to download the various versions of the PILE dataset.
- [**Summary on Twitter**](): A concise summary and key takeaways from the project.
## Applicability 🚀
The dataset is in text format and can be loaded using the Hugging Face `datasets` library. It can be used to evaluate any causal or masked language model for the presence of specific datasets in its training pool. The dataset is *not* intended for direct use in training models, but rather for evaluating the privacy of language models. Please keep the validation sets, and the perturbed train sets private, and do not use them for training models.
## Loading the Dataset
To load the dataset, use the following code:
```python
from datasets import load_dataset
dataset = load_dataset("pratyushmaini/llm_dataset_inference", subset="wikipedia", split="train")
```
Note: When loading the dataset, you must specify a subset. If you don't, you'll encounter the following error:
```
ValueError: Config name is missing.
Please pick one among the available configs: ['arxiv', 'bookcorpus2', 'books3', 'cc', 'enron', 'europarl', 'freelaw', 'github', 'gutenberg', 'hackernews', 'math', 'nih', 'opensubtitles', 'openwebtext2', 'philpapers', 'stackexchange', 'ubuntu', 'uspto', 'wikipedia', 'youtubesubtitles']
Example of usage:
`load_dataset('llm_dataset_inference', 'arxiv')`
```
Correct usage example:
```python
ds = load_dataset("pratyushmaini/llm_dataset_inference", "arxiv")
```
## Available Perturbations
We use the NL-Augmenter library to apply the following perturbations to the data:
- `synonym_substitution`: Synonym substitution of words in the sentence.
- `butter_fingers`: Randomly changing characters from the sentence.
- `random_deletion`: Randomly deleting words from the sentence.
- `change_char_case`: Randomly changing the case of characters in the sentence.
- `whitespace_perturbation`: Randomly adding or removing whitespace from the sentence.
- `underscore_trick`: Adding underscores to the sentence.
## Contact
Please email `[email protected]` in case of any queries regarding the dataset |