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: 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:
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:
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 pratyushmaini@cmu.edu
in case of any queries regarding the dataset