Datasets:

Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:
system HF staff commited on
Commit
7158a4f
0 Parent(s):

Update files from the datasets library (from 1.3.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.3.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - cc-by-sa-4-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - question-answering
18
+ task_ids:
19
+ - extractive-qa
20
+ - open-domain-qa
21
+ ---
22
+
23
+ # Dataset Card for adversarialQA
24
+
25
+ ## Table of Contents
26
+ - [Dataset Description](#dataset-description)
27
+ - [Dataset Summary](#dataset-summary)
28
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
29
+ - [Languages](#languages)
30
+ - [Dataset Structure](#dataset-structure)
31
+ - [Data Instances](#data-instances)
32
+ - [Data Fields](#data-instances)
33
+ - [Data Splits](#data-instances)
34
+ - [Dataset Creation](#dataset-creation)
35
+ - [Curation Rationale](#curation-rationale)
36
+ - [Source Data](#source-data)
37
+ - [Annotations](#annotations)
38
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
39
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
40
+ - [Social Impact of Dataset](#social-impact-of-dataset)
41
+ - [Discussion of Biases](#discussion-of-biases)
42
+ - [Other Known Limitations](#other-known-limitations)
43
+ - [Additional Information](#additional-information)
44
+ - [Dataset Curators](#dataset-curators)
45
+ - [Licensing Information](#licensing-information)
46
+ - [Citation Information](#citation-information)
47
+ - [Contributions](#contributions)
48
+
49
+ ## Dataset Description
50
+
51
+ - **Homepage:** [adversarialQA homepage](https://adversarialqa.github.io/)
52
+ - **Repository:** [adversarialQA repository](https://github.com/maxbartolo/adversarialQA)
53
+ - **Paper:** [Beat the AI: Investigating Adversarial Human Annotation for Reading Comprehension](https://arxiv.org/abs/2002.00293)
54
+ - **Leaderboard:** [Dynabench QA Round 1 Leaderboard](https://dynabench.org/tasks/2#overall)
55
+ - **Point of Contact:** [Max Bartolo](max.bartolo@ucl.ac.uk)
56
+
57
+ ### Dataset Summary
58
+
59
+ We have created three new Reading Comprehension datasets constructed using an adversarial model-in-the-loop.
60
+
61
+ We use three different models; BiDAF (Seo et al., 2016), BERTLarge (Devlin et al., 2018), and RoBERTaLarge (Liu et al., 2019) in the annotation loop and construct three datasets; D(BiDAF), D(BERT), and D(RoBERTa), each with 10,000 training examples, 1,000 validation, and 1,000 test examples.
62
+
63
+ The adversarial human annotation paradigm ensures that these datasets consist of questions that current state-of-the-art models (at least the ones used as adversaries in the annotation loop) find challenging. The three AdversarialQA round 1 datasets provide a training and evaluation resource for such methods.
64
+
65
+ ### Supported Tasks and Leaderboards
66
+
67
+ `extractive-qa`: The dataset can be used to train a model for Extractive Question Answering, which consists in selecting the answer to a question from a passage. Success on this task is typically measured by achieving a high word-overlap [F1 score](https://huggingface.co/metrics/f1). The [RoBERTa-Large](https://huggingface.co/roberta-large) model trained on all the data combined with [SQuAD](https://arxiv.org/abs/1606.05250) currently achieves 64.35% F1. This task has an active leaderboard and is available as round 1 of the QA task on [Dynabench](https://dynabench.org/tasks/2#overall) and ranks models based on F1 score.
68
+
69
+ ### Languages
70
+
71
+ The text in the dataset is in English. The associated BCP-47 code is `en`.
72
+
73
+ ## Dataset Structure
74
+
75
+ ### Data Instances
76
+
77
+ Data is provided in the same format as SQuAD 1.1. An example is shown below:
78
+
79
+ ```
80
+ {
81
+ "data": [
82
+ {
83
+ "title": "Oxygen",
84
+ "paragraphs": [
85
+ {
86
+ "context": "Among the most important classes of organic compounds that contain oxygen are (where \"R\" is an organic group): alcohols (R-OH); ethers (R-O-R); ketones (R-CO-R); aldehydes (R-CO-H); carboxylic acids (R-COOH); esters (R-COO-R); acid anhydrides (R-CO-O-CO-R); and amides (R-C(O)-NR2). There are many important organic solvents that contain oxygen, including: acetone, methanol, ethanol, isopropanol, furan, THF, diethyl ether, dioxane, ethyl acetate, DMF, DMSO, acetic acid, and formic acid. Acetone ((CH3)2CO) and phenol (C6H5OH) are used as feeder materials in the synthesis of many different substances. Other important organic compounds that contain oxygen are: glycerol, formaldehyde, glutaraldehyde, citric acid, acetic anhydride, and acetamide. Epoxides are ethers in which the oxygen atom is part of a ring of three atoms.",
87
+ "qas": [
88
+ {
89
+ "id": "22bbe104aa72aa9b511dd53237deb11afa14d6e3",
90
+ "question": "In addition to having oxygen, what do alcohols, ethers and esters have in common, according to the article?",
91
+ "answers": [
92
+ {
93
+ "answer_start": 36,
94
+ "text": "organic compounds"
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ "id": "4240a8e708c703796347a3702cf1463eed05584a",
100
+ "question": "What letter does the abbreviation for acid anhydrides both begin and end in?",
101
+ "answers": [
102
+ {
103
+ "answer_start": 244,
104
+ "text": "R"
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ "id": "0681a0a5ec852ec6920d6a30f7ef65dced493366",
110
+ "question": "Which of the organic compounds, in the article, contains nitrogen?",
111
+ "answers": [
112
+ {
113
+ "answer_start": 262,
114
+ "text": "amides"
115
+ }
116
+ ]
117
+ },
118
+ {
119
+ "id": "2990efe1a56ccf81938fa5e18104f7d3803069fb",
120
+ "question": "Which of the important classes of organic compounds, in the article, has a number in its abbreviation?",
121
+ "answers": [
122
+ {
123
+ "answer_start": 262,
124
+ "text": "amides"
125
+ }
126
+ ]
127
+ }
128
+ ]
129
+ }
130
+ ]
131
+ }
132
+ ]
133
+ }
134
+ ```
135
+
136
+ ### Data Fields
137
+
138
+ - title: the title of the Wikipedia page from which the context is sourced
139
+ - context: the context/passage
140
+ - id: a string identifier for each question
141
+ - answers: a list of all provided answers (one per question in our case, but multiple may exist in SQuAD) with an `answer_start` field which is the character index of the start of the answer span, and a `text` field which is the answer text
142
+
143
+ ### Data Splits
144
+
145
+ The dataset is composed of three different datasets constructed using different models in the loop: BiDAF, BERT-Large, and RoBERTa-Large. Each of these has 10,000 training examples, 1,000 validation examples, and 1,000 test examples for a total of 30,000/3,000/3,000 train/validation/test examples.
146
+
147
+ ## Dataset Creation
148
+
149
+ ### Curation Rationale
150
+
151
+ This dataset was collected to provide a more challenging and diverse Reading Comprehension dataset to state-of-the-art models.
152
+
153
+ ### Source Data
154
+
155
+ #### Initial Data Collection and Normalization
156
+
157
+ The source passages are from Wikipedia and are the same as those used in [SQuAD v1.1](https://arxiv.org/abs/1606.05250).
158
+
159
+ #### Who are the source language producers?
160
+
161
+ The source language produces are Wikipedia editors for the passages, and human annotators on Mechanical Turk for the questions.
162
+
163
+ ### Annotations
164
+
165
+ #### Annotation process
166
+
167
+ The dataset is collected through an adversarial human annotation process which pairs a human annotator and a reading comprehension model in an interactive setting. The human is presented with a passage for which they write a question and highlight the correct answer. The model then tries to answer the question, and, if it fails to answer correctly, the human wins. Otherwise, the human modifies or re-writes their question until the successfully fool the model.
168
+
169
+ #### Who are the annotators?
170
+
171
+ The annotators are from Amazon Mechanical Turk, geographically restricted the the USA, UK and Canada, having previously successfully completed at least 1,000 HITs, and having a HIT approval rate greater than 98%. Crowdworkers undergo intensive training and qualification prior to annotation.
172
+
173
+ ### Personal and Sensitive Information
174
+
175
+ No annotator identifying details are provided.
176
+
177
+ ## Considerations for Using the Data
178
+
179
+ ### Social Impact of Dataset
180
+
181
+ The purpose of this dataset is to help develop better question answering systems.
182
+
183
+ A system that succeeds at the supported task would be able to provide an accurate extractive answer from a short passage. This dataset is to be seen as a test bed for questions which contemporary state-of-the-art models struggle to answer correctly, thus often requiring more complex comprehension abilities than say detecting phrases explicitly mentioned in the passage with high overlap to the question.
184
+
185
+ It should be noted, however, that the the source passages are both domain-restricted and linguistically specific, and that provided questions and answers do not constitute any particular social application.
186
+
187
+
188
+ ### Discussion of Biases
189
+
190
+ The dataset may exhibit various biases in terms of the source passage selection, annotated questions and answers, as well as algorithmic biases resulting from the adversarial annotation protocol.
191
+
192
+ ### Other Known Limitations
193
+
194
+ N/a
195
+
196
+ ## Additional Information
197
+
198
+ ### Dataset Curators
199
+
200
+ This dataset was initially created by Max Bartolo, Alastair Roberts, Johannes Welbl, Sebastian Riedel, and Pontus Stenetorp, during work carried out at University College London (UCL).
201
+
202
+ ### Licensing Information
203
+
204
+ This dataset is distributed under [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/).
205
+
206
+ ### Citation Information
207
+
208
+ ```
209
+ @article{bartolo2020beat,
210
+ author = {Bartolo, Max and Roberts, Alastair and Welbl, Johannes and Riedel, Sebastian and Stenetorp, Pontus},
211
+ title = {Beat the AI: Investigating Adversarial Human Annotation for Reading Comprehension},
212
+ journal = {Transactions of the Association for Computational Linguistics},
213
+ volume = {8},
214
+ number = {},
215
+ pages = {662-678},
216
+ year = {2020},
217
+ doi = {10.1162/tacl\_a\_00338},
218
+ URL = { https://doi.org/10.1162/tacl_a_00338 },
219
+ eprint = { https://doi.org/10.1162/tacl_a_00338 },
220
+ abstract = { Innovations in annotation methodology have been a catalyst for Reading Comprehension (RC) datasets and models. One recent trend to challenge current RC models is to involve a model in the annotation process: Humans create questions adversarially, such that the model fails to answer them correctly. In this work we investigate this annotation methodology and apply it in three different settings, collecting a total of 36,000 samples with progressively stronger models in the annotation loop. This allows us to explore questions such as the reproducibility of the adversarial effect, transfer from data collected with varying model-in-the-loop strengths, and generalization to data collected without a model. We find that training on adversarially collected samples leads to strong generalization to non-adversarially collected datasets, yet with progressive performance deterioration with increasingly stronger models-in-the-loop. Furthermore, we find that stronger models can still learn from datasets collected with substantially weaker models-in-the-loop. When trained on data collected with a BiDAF model in the loop, RoBERTa achieves 39.9F1 on questions that it cannot answer when trained on SQuAD—only marginally lower than when trained on data collected using RoBERTa itself (41.0F1). }
221
+ }
222
+ ```
223
+ ### Contributions
224
+
225
+ Thanks to [@maxbartolo](https://github.com/maxbartolo) for adding this dataset.
adversarial_qa.py ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ # Lint as: python3
17
+ """AdversarialQA"""
18
+
19
+ from __future__ import absolute_import, division, print_function
20
+
21
+ import json
22
+ import logging
23
+ import os
24
+
25
+ import datasets
26
+
27
+
28
+ _CITATION = """\
29
+ @article{bartolo2020beat,
30
+ author = {Bartolo, Max and Roberts, Alastair and Welbl, Johannes and Riedel, Sebastian and Stenetorp, Pontus},
31
+ title = {Beat the AI: Investigating Adversarial Human Annotation for Reading Comprehension},
32
+ journal = {Transactions of the Association for Computational Linguistics},
33
+ volume = {8},
34
+ number = {},
35
+ pages = {662-678},
36
+ year = {2020},
37
+ doi = {10.1162/tacl_a_00338},
38
+ URL = { https://doi.org/10.1162/tacl_a_00338 },
39
+ eprint = { https://doi.org/10.1162/tacl_a_00338 },
40
+ abstract = { Innovations in annotation methodology have been a catalyst for Reading Comprehension (RC) datasets and models. One recent trend to challenge current RC models is to involve a model in the annotation process: Humans create questions adversarially, such that the model fails to answer them correctly. In this work we investigate this annotation methodology and apply it in three different settings, collecting a total of 36,000 samples with progressively stronger models in the annotation loop. This allows us to explore questions such as the reproducibility of the adversarial effect, transfer from data collected with varying model-in-the-loop strengths, and generalization to data collected without a model. We find that training on adversarially collected samples leads to strong generalization to non-adversarially collected datasets, yet with progressive performance deterioration with increasingly stronger models-in-the-loop. Furthermore, we find that stronger models can still learn from datasets collected with substantially weaker models-in-the-loop. When trained on data collected with a BiDAF model in the loop, RoBERTa achieves 39.9F1 on questions that it cannot answer when trained on SQuAD—only marginally lower than when trained on data collected using RoBERTa itself (41.0F1). }
41
+ }
42
+ """
43
+
44
+ _DESCRIPTION = """\
45
+ AdversarialQA is a Reading Comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles using an adversarial model-in-the-loop.
46
+ We use three different models; BiDAF (Seo et al., 2016), BERT-Large (Devlin et al., 2018), and RoBERTa-Large (Liu et al., 2019) in the annotation loop and construct three datasets; D(BiDAF), D(BERT), and D(RoBERTa), each with 10,000 training examples, 1,000 validation, and 1,000 test examples.
47
+ The adversarial human annotation paradigm ensures that these datasets consist of questions that current state-of-the-art models (at least the ones used as adversaries in the annotation loop) find challenging.
48
+ """
49
+
50
+ _HOMEPAGE = "https://adversarialqa.github.io/"
51
+ _LICENSE = "CC BY-SA 3.0"
52
+ _URL = "https://adversarialqa.github.io/data/aqa_v1.0.zip"
53
+
54
+ _CONFIG_NAME_MAP = {
55
+ "adversarialQA": {
56
+ "dir": "combined",
57
+ "model": "Combined",
58
+ },
59
+ "dbidaf": {
60
+ "dir": "1_dbidaf",
61
+ "model": "BiDAF",
62
+ },
63
+ "dbert": {
64
+ "dir": "2_dbert",
65
+ "model": "BERT-Large",
66
+ },
67
+ "droberta": {
68
+ "dir": "3_droberta",
69
+ "model": "RoBERTa-Large",
70
+ },
71
+ }
72
+
73
+
74
+ class AdversarialQA(datasets.GeneratorBasedBuilder):
75
+ """AdversarialQA. Version 1.0.0."""
76
+
77
+ VERSION = datasets.Version("1.0.0")
78
+ BUILDER_CONFIGS = [
79
+ datasets.BuilderConfig(
80
+ name="adversarialQA",
81
+ version=VERSION,
82
+ description="This is the combined AdversarialQA data. " + _DESCRIPTION,
83
+ ),
84
+ datasets.BuilderConfig(
85
+ name="dbidaf",
86
+ version=VERSION,
87
+ description="This is the subset of the data collected using BiDAF (Seo et al., 2016) as a model in the loop. "
88
+ + _DESCRIPTION,
89
+ ),
90
+ datasets.BuilderConfig(
91
+ name="dbert",
92
+ version=VERSION,
93
+ description="This is the subset of the data collected using BERT-Large (Devlin et al., 2018) as a model in the loop. "
94
+ + _DESCRIPTION,
95
+ ),
96
+ datasets.BuilderConfig(
97
+ name="droberta",
98
+ version=VERSION,
99
+ description="This is the subset of the data collected using RoBERTa-Large (Liu et al., 2019) as a model in the loop. "
100
+ + _DESCRIPTION,
101
+ ),
102
+ ]
103
+
104
+ def _info(self):
105
+ return datasets.DatasetInfo(
106
+ description=_DESCRIPTION,
107
+ features=datasets.Features(
108
+ {
109
+ "id": datasets.Value("string"),
110
+ "title": datasets.Value("string"),
111
+ "context": datasets.Value("string"),
112
+ "question": datasets.Value("string"),
113
+ "answers": datasets.features.Sequence(
114
+ {
115
+ "text": datasets.Value("string"),
116
+ "answer_start": datasets.Value("int32"),
117
+ }
118
+ ),
119
+ "metadata": {
120
+ "split": datasets.Value("string"),
121
+ "model_in_the_loop": datasets.Value("string"),
122
+ },
123
+ }
124
+ ),
125
+ # No default supervised_keys (as we have to pass both question
126
+ # and context as input).
127
+ supervised_keys=None,
128
+ homepage=_HOMEPAGE,
129
+ citation=_CITATION,
130
+ )
131
+
132
+ @staticmethod
133
+ def _get_filepath(dl_dir, config_name, split):
134
+ return os.path.join(dl_dir, _CONFIG_NAME_MAP[config_name]["dir"], split + ".json")
135
+
136
+ def _split_generators(self, dl_manager):
137
+ dl_dir = dl_manager.download_and_extract(_URL)
138
+
139
+ return [
140
+ datasets.SplitGenerator(
141
+ name=datasets.Split.TRAIN,
142
+ gen_kwargs={
143
+ "filepath": self._get_filepath(dl_dir, self.config.name, "train"),
144
+ "split": "train",
145
+ "model_in_the_loop": _CONFIG_NAME_MAP[self.config.name]["model"],
146
+ },
147
+ ),
148
+ datasets.SplitGenerator(
149
+ name=datasets.Split.VALIDATION,
150
+ gen_kwargs={
151
+ "filepath": self._get_filepath(dl_dir, self.config.name, "dev"),
152
+ "split": "validation",
153
+ "model_in_the_loop": _CONFIG_NAME_MAP[self.config.name]["model"],
154
+ },
155
+ ),
156
+ datasets.SplitGenerator(
157
+ name=datasets.Split.TEST,
158
+ gen_kwargs={
159
+ "filepath": self._get_filepath(dl_dir, self.config.name, "test"),
160
+ "split": "test",
161
+ "model_in_the_loop": _CONFIG_NAME_MAP[self.config.name]["model"],
162
+ },
163
+ ),
164
+ ]
165
+
166
+ def _generate_examples(self, filepath, split, model_in_the_loop):
167
+ """This function returns the examples in the raw (text) form."""
168
+ logging.info("generating examples from = %s", filepath)
169
+ with open(filepath, encoding="utf-8") as f:
170
+ squad = json.load(f)
171
+ for article in squad["data"]:
172
+ title = article.get("title", "").strip()
173
+ for paragraph in article["paragraphs"]:
174
+ context = paragraph["context"].strip()
175
+ for qa in paragraph["qas"]:
176
+ question = qa["question"].strip()
177
+ id_ = qa["id"]
178
+
179
+ answer_starts = [answer["answer_start"] for answer in qa["answers"]]
180
+ answers = [answer["text"].strip() for answer in qa["answers"]]
181
+
182
+ # raise BaseException(split, model_in_the_loop)
183
+
184
+ # Features currently used are "context", "question", and "answers".
185
+ # Others are extracted here for the ease of future expansions.
186
+ yield id_, {
187
+ "title": title,
188
+ "context": context,
189
+ "question": question,
190
+ "id": id_,
191
+ "answers": {
192
+ "answer_start": answer_starts,
193
+ "text": answers,
194
+ },
195
+ "metadata": {"split": split, "model_in_the_loop": model_in_the_loop},
196
+ }
dataset_infos.json ADDED
@@ -0,0 +1,394 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "adversarialQA": {
3
+ "description": "AdversarialQA is a Reading Comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles using an adversarial model-in-the-loop.\nWe use three different models; BiDAF (Seo et al., 2016), BERT-Large (Devlin et al., 2018), and RoBERTa-Large (Liu et al., 2019) in the annotation loop and construct three datasets; D(BiDAF), D(BERT), and D(RoBERTa), each with 10,000 training examples, 1,000 validation, and 1,000 test examples.\nThe adversarial human annotation paradigm ensures that these datasets consist of questions that current state-of-the-art models (at least the ones used as adversaries in the annotation loop) find challenging.\n",
4
+ "citation": "@article{bartolo2020beat,\n author = {Bartolo, Max and Roberts, Alastair and Welbl, Johannes and Riedel, Sebastian and Stenetorp, Pontus},\n title = {Beat the AI: Investigating Adversarial Human Annotation for Reading Comprehension},\n journal = {Transactions of the Association for Computational Linguistics},\n volume = {8},\n number = {},\n pages = {662-678},\n year = {2020},\n doi = {10.1162/tacl\\_a\\_00338},\n URL = { https://doi.org/10.1162/tacl_a_00338 },\n eprint = { https://doi.org/10.1162/tacl_a_00338 },\n abstract = { Innovations in annotation methodology have been a catalyst for Reading Comprehension (RC) datasets and models. One recent trend to challenge current RC models is to involve a model in the annotation process: Humans create questions adversarially, such that the model fails to answer them correctly. In this work we investigate this annotation methodology and apply it in three different settings, collecting a total of 36,000 samples with progressively stronger models in the annotation loop. This allows us to explore questions such as the reproducibility of the adversarial effect, transfer from data collected with varying model-in-the-loop strengths, and generalization to data collected without a model. We find that training on adversarially collected samples leads to strong generalization to non-adversarially collected datasets, yet with progressive performance deterioration with increasingly stronger models-in-the-loop. Furthermore, we find that stronger models can still learn from datasets collected with substantially weaker models-in-the-loop. When trained on data collected with a BiDAF model in the loop, RoBERTa achieves 39.9F1 on questions that it cannot answer when trained on SQuAD\u2014only marginally lower than when trained on data collected using RoBERTa itself (41.0F1). }\n}\n",
5
+ "homepage": "https://adversarialqa.github.io/",
6
+ "license": "",
7
+ "features": {
8
+ "id": {
9
+ "dtype": "string",
10
+ "id": null,
11
+ "_type": "Value"
12
+ },
13
+ "title": {
14
+ "dtype": "string",
15
+ "id": null,
16
+ "_type": "Value"
17
+ },
18
+ "context": {
19
+ "dtype": "string",
20
+ "id": null,
21
+ "_type": "Value"
22
+ },
23
+ "question": {
24
+ "dtype": "string",
25
+ "id": null,
26
+ "_type": "Value"
27
+ },
28
+ "answers": {
29
+ "feature": {
30
+ "text": {
31
+ "dtype": "string",
32
+ "id": null,
33
+ "_type": "Value"
34
+ },
35
+ "answer_start": {
36
+ "dtype": "int32",
37
+ "id": null,
38
+ "_type": "Value"
39
+ }
40
+ },
41
+ "length": -1,
42
+ "id": null,
43
+ "_type": "Sequence"
44
+ },
45
+ "metadata": {
46
+ "split": {
47
+ "dtype": "string",
48
+ "id": null,
49
+ "_type": "Value"
50
+ },
51
+ "model_in_the_loop": {
52
+ "dtype": "string",
53
+ "id": null,
54
+ "_type": "Value"
55
+ }
56
+ }
57
+ },
58
+ "post_processed": null,
59
+ "supervised_keys": null,
60
+ "builder_name": "adversarial_qa",
61
+ "config_name": "adversarialQA",
62
+ "version": {
63
+ "version_str": "1.0.0",
64
+ "description": null,
65
+ "major": 1,
66
+ "minor": 0,
67
+ "patch": 0
68
+ },
69
+ "splits": {
70
+ "train": {
71
+ "name": "train",
72
+ "num_bytes": 27858794,
73
+ "num_examples": 30000,
74
+ "dataset_name": "adversarial_qa"
75
+ },
76
+ "validation": {
77
+ "name": "validation",
78
+ "num_bytes": 2757128,
79
+ "num_examples": 3000,
80
+ "dataset_name": "adversarial_qa"
81
+ },
82
+ "test": {
83
+ "name": "test",
84
+ "num_bytes": 2919643,
85
+ "num_examples": 3000,
86
+ "dataset_name": "adversarial_qa"
87
+ }
88
+ },
89
+ "download_checksums": {
90
+ "https://adversarialqa.github.io/data/aqa_v1.0.zip": {
91
+ "num_bytes": 9018914,
92
+ "checksum": "f4f3c23224a5060b28c35e35581bd5cf46256dda3665418fb83d036d0e0c93cf"
93
+ }
94
+ },
95
+ "download_size": 9018914,
96
+ "post_processing_size": null,
97
+ "dataset_size": 33535565,
98
+ "size_in_bytes": 42554479
99
+ },
100
+ "dbidaf": {
101
+ "description": "AdversarialQA is a Reading Comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles using an adversarial model-in-the-loop.\nWe use three different models; BiDAF (Seo et al., 2016), BERT-Large (Devlin et al., 2018), and RoBERTa-Large (Liu et al., 2019) in the annotation loop and construct three datasets; D(BiDAF), D(BERT), and D(RoBERTa), each with 10,000 training examples, 1,000 validation, and 1,000 test examples.\nThe adversarial human annotation paradigm ensures that these datasets consist of questions that current state-of-the-art models (at least the ones used as adversaries in the annotation loop) find challenging.\n",
102
+ "citation": "@article{bartolo2020beat,\n author = {Bartolo, Max and Roberts, Alastair and Welbl, Johannes and Riedel, Sebastian and Stenetorp, Pontus},\n title = {Beat the AI: Investigating Adversarial Human Annotation for Reading Comprehension},\n journal = {Transactions of the Association for Computational Linguistics},\n volume = {8},\n number = {},\n pages = {662-678},\n year = {2020},\n doi = {10.1162/tacl\\_a\\_00338},\n URL = { https://doi.org/10.1162/tacl_a_00338 },\n eprint = { https://doi.org/10.1162/tacl_a_00338 },\n abstract = { Innovations in annotation methodology have been a catalyst for Reading Comprehension (RC) datasets and models. One recent trend to challenge current RC models is to involve a model in the annotation process: Humans create questions adversarially, such that the model fails to answer them correctly. In this work we investigate this annotation methodology and apply it in three different settings, collecting a total of 36,000 samples with progressively stronger models in the annotation loop. This allows us to explore questions such as the reproducibility of the adversarial effect, transfer from data collected with varying model-in-the-loop strengths, and generalization to data collected without a model. We find that training on adversarially collected samples leads to strong generalization to non-adversarially collected datasets, yet with progressive performance deterioration with increasingly stronger models-in-the-loop. Furthermore, we find that stronger models can still learn from datasets collected with substantially weaker models-in-the-loop. When trained on data collected with a BiDAF model in the loop, RoBERTa achieves 39.9F1 on questions that it cannot answer when trained on SQuAD\u2014only marginally lower than when trained on data collected using RoBERTa itself (41.0F1). }\n}\n",
103
+ "homepage": "https://adversarialqa.github.io/",
104
+ "license": "",
105
+ "features": {
106
+ "id": {
107
+ "dtype": "string",
108
+ "id": null,
109
+ "_type": "Value"
110
+ },
111
+ "title": {
112
+ "dtype": "string",
113
+ "id": null,
114
+ "_type": "Value"
115
+ },
116
+ "context": {
117
+ "dtype": "string",
118
+ "id": null,
119
+ "_type": "Value"
120
+ },
121
+ "question": {
122
+ "dtype": "string",
123
+ "id": null,
124
+ "_type": "Value"
125
+ },
126
+ "answers": {
127
+ "feature": {
128
+ "text": {
129
+ "dtype": "string",
130
+ "id": null,
131
+ "_type": "Value"
132
+ },
133
+ "answer_start": {
134
+ "dtype": "int32",
135
+ "id": null,
136
+ "_type": "Value"
137
+ }
138
+ },
139
+ "length": -1,
140
+ "id": null,
141
+ "_type": "Sequence"
142
+ },
143
+ "metadata": {
144
+ "split": {
145
+ "dtype": "string",
146
+ "id": null,
147
+ "_type": "Value"
148
+ },
149
+ "model_in_the_loop": {
150
+ "dtype": "string",
151
+ "id": null,
152
+ "_type": "Value"
153
+ }
154
+ }
155
+ },
156
+ "post_processed": null,
157
+ "supervised_keys": null,
158
+ "builder_name": "adversarial_qa",
159
+ "config_name": "dbidaf",
160
+ "version": {
161
+ "version_str": "1.0.0",
162
+ "description": null,
163
+ "major": 1,
164
+ "minor": 0,
165
+ "patch": 0
166
+ },
167
+ "splits": {
168
+ "train": {
169
+ "name": "train",
170
+ "num_bytes": 9282518,
171
+ "num_examples": 10000,
172
+ "dataset_name": "adversarial_qa"
173
+ },
174
+ "validation": {
175
+ "name": "validation",
176
+ "num_bytes": 917943,
177
+ "num_examples": 1000,
178
+ "dataset_name": "adversarial_qa"
179
+ },
180
+ "test": {
181
+ "name": "test",
182
+ "num_bytes": 947111,
183
+ "num_examples": 1000,
184
+ "dataset_name": "adversarial_qa"
185
+ }
186
+ },
187
+ "download_checksums": {
188
+ "https://adversarialqa.github.io/data/aqa_v1.0.zip": {
189
+ "num_bytes": 9018914,
190
+ "checksum": "f4f3c23224a5060b28c35e35581bd5cf46256dda3665418fb83d036d0e0c93cf"
191
+ }
192
+ },
193
+ "download_size": 9018914,
194
+ "post_processing_size": null,
195
+ "dataset_size": 11147572,
196
+ "size_in_bytes": 20166486
197
+ },
198
+ "dbert": {
199
+ "description": "AdversarialQA is a Reading Comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles using an adversarial model-in-the-loop.\nWe use three different models; BiDAF (Seo et al., 2016), BERT-Large (Devlin et al., 2018), and RoBERTa-Large (Liu et al., 2019) in the annotation loop and construct three datasets; D(BiDAF), D(BERT), and D(RoBERTa), each with 10,000 training examples, 1,000 validation, and 1,000 test examples.\nThe adversarial human annotation paradigm ensures that these datasets consist of questions that current state-of-the-art models (at least the ones used as adversaries in the annotation loop) find challenging.\n",
200
+ "citation": "@article{bartolo2020beat,\n author = {Bartolo, Max and Roberts, Alastair and Welbl, Johannes and Riedel, Sebastian and Stenetorp, Pontus},\n title = {Beat the AI: Investigating Adversarial Human Annotation for Reading Comprehension},\n journal = {Transactions of the Association for Computational Linguistics},\n volume = {8},\n number = {},\n pages = {662-678},\n year = {2020},\n doi = {10.1162/tacl\\_a\\_00338},\n URL = { https://doi.org/10.1162/tacl_a_00338 },\n eprint = { https://doi.org/10.1162/tacl_a_00338 },\n abstract = { Innovations in annotation methodology have been a catalyst for Reading Comprehension (RC) datasets and models. One recent trend to challenge current RC models is to involve a model in the annotation process: Humans create questions adversarially, such that the model fails to answer them correctly. In this work we investigate this annotation methodology and apply it in three different settings, collecting a total of 36,000 samples with progressively stronger models in the annotation loop. This allows us to explore questions such as the reproducibility of the adversarial effect, transfer from data collected with varying model-in-the-loop strengths, and generalization to data collected without a model. We find that training on adversarially collected samples leads to strong generalization to non-adversarially collected datasets, yet with progressive performance deterioration with increasingly stronger models-in-the-loop. Furthermore, we find that stronger models can still learn from datasets collected with substantially weaker models-in-the-loop. When trained on data collected with a BiDAF model in the loop, RoBERTa achieves 39.9F1 on questions that it cannot answer when trained on SQuAD\u2014only marginally lower than when trained on data collected using RoBERTa itself (41.0F1). }\n}\n",
201
+ "homepage": "https://adversarialqa.github.io/",
202
+ "license": "",
203
+ "features": {
204
+ "id": {
205
+ "dtype": "string",
206
+ "id": null,
207
+ "_type": "Value"
208
+ },
209
+ "title": {
210
+ "dtype": "string",
211
+ "id": null,
212
+ "_type": "Value"
213
+ },
214
+ "context": {
215
+ "dtype": "string",
216
+ "id": null,
217
+ "_type": "Value"
218
+ },
219
+ "question": {
220
+ "dtype": "string",
221
+ "id": null,
222
+ "_type": "Value"
223
+ },
224
+ "answers": {
225
+ "feature": {
226
+ "text": {
227
+ "dtype": "string",
228
+ "id": null,
229
+ "_type": "Value"
230
+ },
231
+ "answer_start": {
232
+ "dtype": "int32",
233
+ "id": null,
234
+ "_type": "Value"
235
+ }
236
+ },
237
+ "length": -1,
238
+ "id": null,
239
+ "_type": "Sequence"
240
+ },
241
+ "metadata": {
242
+ "split": {
243
+ "dtype": "string",
244
+ "id": null,
245
+ "_type": "Value"
246
+ },
247
+ "model_in_the_loop": {
248
+ "dtype": "string",
249
+ "id": null,
250
+ "_type": "Value"
251
+ }
252
+ }
253
+ },
254
+ "post_processed": null,
255
+ "supervised_keys": null,
256
+ "builder_name": "adversarial_qa",
257
+ "config_name": "dbert",
258
+ "version": {
259
+ "version_str": "1.0.0",
260
+ "description": null,
261
+ "major": 1,
262
+ "minor": 0,
263
+ "patch": 0
264
+ },
265
+ "splits": {
266
+ "train": {
267
+ "name": "train",
268
+ "num_bytes": 9345557,
269
+ "num_examples": 10000,
270
+ "dataset_name": "adversarial_qa"
271
+ },
272
+ "validation": {
273
+ "name": "validation",
274
+ "num_bytes": 918192,
275
+ "num_examples": 1000,
276
+ "dataset_name": "adversarial_qa"
277
+ },
278
+ "test": {
279
+ "name": "test",
280
+ "num_bytes": 971454,
281
+ "num_examples": 1000,
282
+ "dataset_name": "adversarial_qa"
283
+ }
284
+ },
285
+ "download_checksums": {
286
+ "https://adversarialqa.github.io/data/aqa_v1.0.zip": {
287
+ "num_bytes": 9018914,
288
+ "checksum": "f4f3c23224a5060b28c35e35581bd5cf46256dda3665418fb83d036d0e0c93cf"
289
+ }
290
+ },
291
+ "download_size": 9018914,
292
+ "post_processing_size": null,
293
+ "dataset_size": 11235203,
294
+ "size_in_bytes": 20254117
295
+ },
296
+ "droberta": {
297
+ "description": "AdversarialQA is a Reading Comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles using an adversarial model-in-the-loop.\nWe use three different models; BiDAF (Seo et al., 2016), BERT-Large (Devlin et al., 2018), and RoBERTa-Large (Liu et al., 2019) in the annotation loop and construct three datasets; D(BiDAF), D(BERT), and D(RoBERTa), each with 10,000 training examples, 1,000 validation, and 1,000 test examples.\nThe adversarial human annotation paradigm ensures that these datasets consist of questions that current state-of-the-art models (at least the ones used as adversaries in the annotation loop) find challenging.\n",
298
+ "citation": "@article{bartolo2020beat,\n author = {Bartolo, Max and Roberts, Alastair and Welbl, Johannes and Riedel, Sebastian and Stenetorp, Pontus},\n title = {Beat the AI: Investigating Adversarial Human Annotation for Reading Comprehension},\n journal = {Transactions of the Association for Computational Linguistics},\n volume = {8},\n number = {},\n pages = {662-678},\n year = {2020},\n doi = {10.1162/tacl\\_a\\_00338},\n URL = { https://doi.org/10.1162/tacl_a_00338 },\n eprint = { https://doi.org/10.1162/tacl_a_00338 },\n abstract = { Innovations in annotation methodology have been a catalyst for Reading Comprehension (RC) datasets and models. One recent trend to challenge current RC models is to involve a model in the annotation process: Humans create questions adversarially, such that the model fails to answer them correctly. In this work we investigate this annotation methodology and apply it in three different settings, collecting a total of 36,000 samples with progressively stronger models in the annotation loop. This allows us to explore questions such as the reproducibility of the adversarial effect, transfer from data collected with varying model-in-the-loop strengths, and generalization to data collected without a model. We find that training on adversarially collected samples leads to strong generalization to non-adversarially collected datasets, yet with progressive performance deterioration with increasingly stronger models-in-the-loop. Furthermore, we find that stronger models can still learn from datasets collected with substantially weaker models-in-the-loop. When trained on data collected with a BiDAF model in the loop, RoBERTa achieves 39.9F1 on questions that it cannot answer when trained on SQuAD\u2014only marginally lower than when trained on data collected using RoBERTa itself (41.0F1). }\n}\n",
299
+ "homepage": "https://adversarialqa.github.io/",
300
+ "license": "",
301
+ "features": {
302
+ "id": {
303
+ "dtype": "string",
304
+ "id": null,
305
+ "_type": "Value"
306
+ },
307
+ "title": {
308
+ "dtype": "string",
309
+ "id": null,
310
+ "_type": "Value"
311
+ },
312
+ "context": {
313
+ "dtype": "string",
314
+ "id": null,
315
+ "_type": "Value"
316
+ },
317
+ "question": {
318
+ "dtype": "string",
319
+ "id": null,
320
+ "_type": "Value"
321
+ },
322
+ "answers": {
323
+ "feature": {
324
+ "text": {
325
+ "dtype": "string",
326
+ "id": null,
327
+ "_type": "Value"
328
+ },
329
+ "answer_start": {
330
+ "dtype": "int32",
331
+ "id": null,
332
+ "_type": "Value"
333
+ }
334
+ },
335
+ "length": -1,
336
+ "id": null,
337
+ "_type": "Sequence"
338
+ },
339
+ "metadata": {
340
+ "split": {
341
+ "dtype": "string",
342
+ "id": null,
343
+ "_type": "Value"
344
+ },
345
+ "model_in_the_loop": {
346
+ "dtype": "string",
347
+ "id": null,
348
+ "_type": "Value"
349
+ }
350
+ }
351
+ },
352
+ "post_processed": null,
353
+ "supervised_keys": null,
354
+ "builder_name": "adversarial_qa",
355
+ "config_name": "droberta",
356
+ "version": {
357
+ "version_str": "1.0.0",
358
+ "description": null,
359
+ "major": 1,
360
+ "minor": 0,
361
+ "patch": 0
362
+ },
363
+ "splits": {
364
+ "train": {
365
+ "name": "train",
366
+ "num_bytes": 9270719,
367
+ "num_examples": 10000,
368
+ "dataset_name": "adversarial_qa"
369
+ },
370
+ "validation": {
371
+ "name": "validation",
372
+ "num_bytes": 925065,
373
+ "num_examples": 1000,
374
+ "dataset_name": "adversarial_qa"
375
+ },
376
+ "test": {
377
+ "name": "test",
378
+ "num_bytes": 1005406,
379
+ "num_examples": 1000,
380
+ "dataset_name": "adversarial_qa"
381
+ }
382
+ },
383
+ "download_checksums": {
384
+ "https://adversarialqa.github.io/data/aqa_v1.0.zip": {
385
+ "num_bytes": 9018914,
386
+ "checksum": "f4f3c23224a5060b28c35e35581bd5cf46256dda3665418fb83d036d0e0c93cf"
387
+ }
388
+ },
389
+ "download_size": 9018914,
390
+ "post_processing_size": null,
391
+ "dataset_size": 11201190,
392
+ "size_in_bytes": 20220104
393
+ }
394
+ }
dummy/adversarialQA/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2fdc3af78578f7858bef3fd999391f8a4caa7c22a81a4c7dc3df1ced67bce0b
3
+ size 37032
dummy/dbert/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7712cad566356f191ecef65cdd6bf52b6e2a5a75186b64ab0a5af833be6a2935
3
+ size 21438
dummy/dbidaf/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:888bca013023ebde94ad866c6dd5c3224c436225d8553a496c2403246121cb69
3
+ size 31347
dummy/droberta/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26de6bff90d33dad5e47e7a04bfe1d339e2be20a2a2769ab48962456e937643d
3
+ size 25420