--- annotations_creators: - other language_creators: - other multilinguality: - monolingual source_datasets: - original paperswithcode_id: superglue arxiv: 1905.00537 pretty_name: SuperGLUE Benchmark Datasets tags: - superglue - nlp - benchmark license: mit language: - en dataset_info: - config_name: boolq features: - name: question dtype: string - name: passage dtype: string - name: idx dtype: int64 - name: label dtype: bool splits: - name: train num_bytes: 6136774 num_examples: 9427 - name: validation num_bytes: 2103781 num_examples: 3270 - name: test num_bytes: 2093385 num_examples: 3245 download_size: 6439045 dataset_size: 10333940 - config_name: cb features: - name: premise dtype: string - name: hypothesis dtype: string - name: label dtype: string - name: idx dtype: int64 splits: - name: train num_bytes: 89859 num_examples: 250 - name: validation num_bytes: 22480 num_examples: 56 - name: test num_bytes: 93492 num_examples: 250 download_size: 137099 dataset_size: 205831 - config_name: copa features: - name: premise dtype: string - name: choice1 dtype: string - name: choice2 dtype: string - name: question dtype: string - name: label dtype: int64 - name: idx dtype: int64 splits: - name: train num_bytes: 50833 num_examples: 400 - name: validation num_bytes: 12879 num_examples: 100 - name: test num_bytes: 61846 num_examples: 500 download_size: 84158 dataset_size: 125558 - config_name: multirc features: - name: idx dtype: int64 - name: version dtype: float64 - name: passage struct: - name: questions list: - name: answers list: - name: idx dtype: int64 - name: label dtype: int64 - name: text dtype: string - name: idx dtype: int64 - name: question dtype: string - name: text dtype: string splits: - name: train num_bytes: 2393721 num_examples: 456 - name: validation num_bytes: 429255 num_examples: 83 - name: test num_bytes: 858870 num_examples: 166 download_size: 2053244 dataset_size: 3681846 - config_name: record features: - name: source dtype: string - name: passage struct: - name: entities list: - name: end dtype: int64 - name: start dtype: int64 - name: text dtype: string - name: qas list: - name: answers list: - name: end dtype: int64 - name: start dtype: int64 - name: text dtype: string - name: idx dtype: int64 - name: query dtype: string - name: idx dtype: int64 splits: - name: train num_bytes: 110591940 num_examples: 65709 - name: validation num_bytes: 12375907 num_examples: 7481 - name: test num_bytes: 11509574 num_examples: 7484 download_size: 71256085 dataset_size: 134477421 - config_name: rte features: - name: premise dtype: string - name: hypothesis dtype: string - name: label dtype: string - name: idx dtype: int64 splits: - name: train num_bytes: 877041 num_examples: 2490 - name: validation num_bytes: 94010 num_examples: 277 - name: test num_bytes: 973916 num_examples: 3000 download_size: 1269005 dataset_size: 1944967 - config_name: wic features: - name: word dtype: string - name: sentence1 dtype: string - name: sentence2 dtype: string - name: idx dtype: int64 - name: label dtype: bool - name: start1 dtype: int64 - name: start2 dtype: int64 - name: end1 dtype: int64 - name: end2 dtype: int64 - name: version dtype: float64 splits: - name: train num_bytes: 767620 num_examples: 5428 - name: validation num_bytes: 94651 num_examples: 638 - name: test num_bytes: 207006 num_examples: 1400 download_size: 591526 dataset_size: 1069277 - config_name: wsc features: - name: text dtype: string - name: target struct: - name: span1_index dtype: int64 - name: span1_text dtype: string - name: span2_index dtype: int64 - name: span2_text dtype: string - name: idx dtype: int64 - name: label dtype: bool splits: - name: train num_bytes: 91597 num_examples: 554 - name: validation num_bytes: 21950 num_examples: 104 - name: test num_bytes: 32011 num_examples: 146 download_size: 47100 dataset_size: 145558 configs: - config_name: boolq data_files: - split: train path: boolq/train-* - split: validation path: boolq/validation-* - split: test path: boolq/test-* - config_name: cb data_files: - split: train path: cb/train-* - split: validation path: cb/validation-* - split: test path: cb/test-* - config_name: copa data_files: - split: train path: copa/train-* - split: validation path: copa/validation-* - split: test path: copa/test-* - config_name: multirc data_files: - split: train path: multirc/train-* - split: validation path: multirc/validation-* - split: test path: multirc/test-* - config_name: record data_files: - split: train path: record/train-* - split: validation path: record/validation-* - split: test path: record/test-* - config_name: rte data_files: - split: train path: rte/train-* - split: validation path: rte/validation-* - split: test path: rte/test-* - config_name: wic data_files: - split: train path: wic/train-* - split: validation path: wic/validation-* - split: test path: wic/test-* - config_name: wsc data_files: - split: train path: wsc/train-* - split: validation path: wsc/validation-* - split: test path: wsc/test-* --- # SuperGLUE Benchmark Datasets This repository contains the [**SuperGLUE**](https://arxiv.org/pdf/1905.00537) benchmark datasets. Each dataset is available as a separate configuration, making it easy to load individual datasets using the [datasets](https://github.com/huggingface/datasets) library. ## Dataset Descriptions ### Datasets Included - **BoolQ:** A question-answering task where each example consists of a short passage and a yes/no question about the passage. The questions are provided anonymously and unsolicited by users of the Google search engine and paired with a paragraph from a Wikipedia article containing the answer. - **CB (CommitmentBank):** A natural language inference task where each example consists of a premise containing an embedded clause, and the corresponding hypothesis is the extraction of that clause. The task focuses on determining whether the premise entails the hypothesis, contradicts it, or is neutral. - **COPA (Choice of Plausible Alternatives):** A causal reasoning task where the system selects the more plausible alternative between two choices given a premise. Each example consists of a premise and two possible alternatives, and the task is to choose the alternative that has a causal relationship with the premise. - **MultiRC (Multiple Sentence Reading Comprehension):** A reading comprehension task where each example consists of a context paragraph, a question about the paragraph, and a list of possible answers. The task requires identifying all correct answers for each question, and there may be multiple correct answers. - **ReCoRD (Reading Comprehension with Commonsense Reasoning Dataset):** A cloze-style reading comprehension task that evaluates a model’s ability to use commonsense reasoning to predict which entity is missing from a passage. Each example consists of a passage with a missing entity and a list of possible entities to fill in the blank. - **RTE (Recognizing Textual Entailment):** A textual entailment task that involves determining whether a given premise entails a hypothesis. Each example consists of a premise and a hypothesis, and the task is to predict whether the hypothesis is true based on the premise. - **WiC (Word-in-Context):** A word sense disambiguation task that determines if a word is used in the same sense in two different contexts. Each example consists of two sentences containing the same word, and the task is to decide whether the word has the same meaning in both sentences. - **WSC (Winograd Schema Challenge):** A pronoun resolution task where the system must determine the antecedent of a pronoun in a sentence. Each example consists of a sentence with a pronoun and a list of possible antecedents, and the task is to select the correct antecedent. Each dataset has been preprocessed to ensure consistency across train, validation, and test splits. Missing keys in the test split have been filled with dummy values (type-aware) to match the features found in the training and validation splits. ### Languages All data in SuperGLUE is in English. ## Dataset Structure ### Data Instances Each task in SuperGLUE is split into train, validation, and test sets. An example instance from each configuration is provided in the task-specific sections below. #### BoolQ - train split: 9427 examples - validation split: 3270 examples - test split: 3245 examples An example of 'train' looks as follows. ```json { "question": "do iran and afghanistan speak the same language", "passage": "Persian language -- Persian (/\u02c8p\u025c\u02d0r\u0292\u0259n, -\u0283\u0259n/), also known by its endonym Farsi (\u0641\u0627\u0631\u0633\u06cc f\u0101rsi (f\u0252\u02d0\u027e\u02c8si\u02d0) ( listen)), is one of the Western Iranian languages within the Indo-Iranian branch of the Indo-European language family. It is primarily spoken in Iran, Afghanistan (officially known as Dari since 1958), and Tajikistan (officially known as Tajiki since the Soviet era), and some other regions which historically were Persianate societies and considered part of Greater Iran. It is written in the Persian alphabet, a modified variant of the Arabic script, which itself evolved from the Aramaic alphabet.", "idx": 0, "label": true } ``` #### CB - train split: 250 examples - validation split: 56 examples - test split: 250 examples An example of 'train' looks as follows. ```json { "premise": "It was a complex language. Not written down but handed down. One might say it was peeled down.", "hypothesis": "the language was peeled down", "label": "entailment", "idx": 0 } ``` #### COPA - train split: 400 examples - validation split: 100 examples - test split: 500 examples An example of 'train' looks as follows. ```json { "premise": "My body cast a shadow over the grass.", "choice1": "The sun was rising.", "choice2": "The grass was cut.", "question": "cause", "label": 0, "idx": 0 } ``` #### MultiRC - train split: 456 examples - validation split: 83 examples - test split: 166 examples An example of 'train' looks as follows. ```json { "idx": 0, "version": 1.1, "passage": { "questions": [ { "answers": [ { "idx": 0, "label": 0, "text": "Children, Gerd, or Dorian Popa" }, { "idx": 1, "label": 0, "text": "Monetary rewards" }, { "idx": 2, "label": 1, "text": "Asking Pakistan to help the USA" }, { "idx": 3, "label": 1, "text": "Meeting with General Musharraf" }, { "idx": 4, "label": 1, "text": "President Clinton offered the moon in terms of better relations with the United States" }, { "idx": 5, "label": 0, "text": "A Presidential visit in March" }, { "idx": 6, "label": 1, "text": "Paper checks" }, { "idx": 7, "label": 0, "text": "Increasing trade with Pakistan" }, { "idx": 8, "label": 1, "text": "Persuading Pakistan to use its influence over the Taliban by dangling before him the possibility of a presidential visit in March as a reward for Pakistani cooperation" } ], "idx": 0, "question": "What did the high-level effort to persuade Pakistan include?" }, ... ], "text": "While this process moved along, diplomacy ..." } ``` #### ReCoRD - train split: 65709 examples - validation split: 7481 examples - test split: 7484 examples An example of 'train' looks as follows. ```json { "source": "Daily mail", "passage": { "entities": [ { "end": 96, "start": 86 }, { "end": 183, "start": 178 }, { "end": 206, "start": 197 }, { "end": 361, "start": 357 }, { "end": 539, "start": 535 }, { "end": 636, "start": 627 }, { "end": 681, "start": 672 } ], "text": "The harrowing stories of women and children locked up for so-called 'moral crimes' in Afghanistan's notorious female prison have been revealed after cameras were allowed inside. Mariam has been in Badam Bagh prison for three months after she shot a man who just raped her at gunpoint and then turned the weapon on herself - but she has yet to been charged. Nuria has eight months left to serve of her sentence for trying to divorce her husband. She gave birth in prison to her son and they share a cell together. Scroll down for video Nuria was jailed for trying to divorce her husband. Her son is one of 62 children living at Badam Bagh prison\n@highlight\nMost of the 202 Badam Bagh inmates are jailed for so-called 'moral crimes'\n@highlight\nCrimes include leaving their husbands or refusing an arrange marriage\n@highlight\n62 children live there and share cells with their mothers and five others" }, "qas": [ { "answers": [ { "end": 539, "start": 535, "text": "Nuria" } ], "idx": 0, "query": "The baby she gave birth to is her husbands and he has even offered to have the courts set her free if she returns, but @placeholder has refused." } ], "idx": 0 } ``` #### RTE - train split: 2490 examples - validation split: 277 examples - test split: 3000 examples An example of 'train' looks as follows. ```json { "premise": "No Weapons of Mass Destruction Found in Iraq Yet.", "hypothesis": "Weapons of Mass Destruction Found in Iraq.", "label": "not_entailment", "idx": 0 } ``` #### WiC - train split: 5428 examples - validation split: 638 examples - test split: 1400 examples An example of 'train' looks as follows. ```json { "word": "place", "sentence1": "Do you want to come over to my place later?", "sentence2": "A political system with no place for the less prominent groups.", "idx": 0, "label": false, "start1": 31, "start2": 27, "end1": 36, "end2": 32, "version": 1.1 } ``` #### WSC - train split: 554 examples - validation split: 104 examples - test split: 146 examples An example of 'train' looks as follows. ```json { "text": "Mark told Pete many lies about himself, which Pete included in his book. He should have been more skeptical.", "target": { "span1_index": 0, "span1_text": "Mark", "span2_index": 13, "span2_text": "He" }, "idx": 0, "label": false } ``` ## Usage You can load any of the datasets using the Huggingface `datasets` library. For example, to load the BoolQ dataset, run: ```python from datasets import load_dataset # Load the BoolQ dataset from the SuperGLUE benchmark dataset = load_dataset("Hyukkyu/superglue", "boolq") # Access train, validation, and test splits train_split = dataset["train"] validation_split = dataset["validation"] test_split = dataset["test"] print(train_split) ``` Replace "boolq" with the desired configuration name (e.g., "cb", "copa", "multirc", etc.) to load other datasets. ## Data Preprocessing - Schema Consistency: A recursive procedure was used to infer the schema from the train and validation splits and fill in missing keys in the test split with dummy values. This ensures that all splits have the same features, preventing issues during model training or evaluation. - Type-Aware Dummy Values: Dummy values are inserted based on the expected type. For instance, missing boolean fields are filled with False, integer fields with -1, float fields with -1.0, and string fields with an empty string. ## Citation ```text @article{wang2019superglue, title={Superglue: A stickier benchmark for general-purpose language understanding systems}, author={Wang, Alex and Pruksachatkun, Yada and Nangia, Nikita and Singh, Amanpreet and Michael, Julian and Hill, Felix and Levy, Omer and Bowman, Samuel}, journal={Advances in neural information processing systems}, volume={32}, year={2019} } ```