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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
annotations_creators:
|
| 3 |
+
- expert-generated
|
| 4 |
+
extended:
|
| 5 |
+
- original
|
| 6 |
+
language_creators:
|
| 7 |
+
- expert-generated
|
| 8 |
+
languages:
|
| 9 |
+
- en-US
|
| 10 |
+
licenses:
|
| 11 |
+
- apache-2.0
|
| 12 |
+
multilinguality:
|
| 13 |
+
- monolingual
|
| 14 |
+
paperswithcode_id: piqa
|
| 15 |
+
size_categories:
|
| 16 |
+
- 10K<n<100K
|
| 17 |
+
source_datasets:
|
| 18 |
+
- original
|
| 19 |
+
task_categories:
|
| 20 |
+
- question-answering
|
| 21 |
+
task_ids:
|
| 22 |
+
- multiple-choice-qa
|
| 23 |
+
- open-domain-qa
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# PROST: Physical Reasoning about Objects Through Space and Time
|
| 27 |
+
|
| 28 |
+
## Table of Contents
|
| 29 |
+
- [Table of Contents](#table-of-contents)
|
| 30 |
+
- [Dataset Description](#dataset-description)
|
| 31 |
+
- [Dataset Summary](#dataset-summary)
|
| 32 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
| 33 |
+
- [Languages](#languages)
|
| 34 |
+
- [Dataset Structure](#dataset-structure)
|
| 35 |
+
- [Data Instances](#data-instances)
|
| 36 |
+
- [Data Fields](#data-fields)
|
| 37 |
+
- [Data Splits](#data-splits)
|
| 38 |
+
- [Dataset Creation](#dataset-creation)
|
| 39 |
+
- [Curation Rationale](#curation-rationale)
|
| 40 |
+
- [Source Data](#source-data)
|
| 41 |
+
- [Annotations](#annotations)
|
| 42 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
| 43 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
| 44 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
| 45 |
+
- [Discussion of Biases](#discussion-of-biases)
|
| 46 |
+
- [Other Known Limitations](#other-known-limitations)
|
| 47 |
+
- [Additional Information](#additional-information)
|
| 48 |
+
- [Dataset Curators](#dataset-curators)
|
| 49 |
+
- [Licensing Information](#licensing-information)
|
| 50 |
+
- [Citation Information](#citation-information)
|
| 51 |
+
- [Contributions](#contributions)
|
| 52 |
+
|
| 53 |
+
## Dataset Description
|
| 54 |
+
|
| 55 |
+
- **Homepage:**
|
| 56 |
+
- **Repository:** https://github.com/nala-cub/prost
|
| 57 |
+
- **Paper:**
|
| 58 |
+
- **Leaderboard:**
|
| 59 |
+
- **Point of Contact:** [Stéphane Aroca-Ouellette](mailto:stephane.aroca-ouellette@colorado.edu), [Cory Paik](mailto:cory.paik@colorado.edu)
|
| 60 |
+
|
| 61 |
+
### Dataset Summary
|
| 62 |
+
*Physical Reasoning about Objects Through Space and Time* (PROST) is a probing dataset to evaluate the ability of pretrained LMs to understand and reason about the physical world. PROST consists of 18,736 cloze-style multiple choice questions from 14 manually curated templates, covering 10 physical reasoning concepts: direction, mass, height, circumference, stackable, rollable, graspable, breakable, slideable, and bounceable.
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
### Supported Tasks and Leaderboards
|
| 66 |
+
The task is multiple choice question answering, but you can formulate it multiple ways. You can use `context` and `question` to form cloze style questions, or `context` and `ex_question` as multiple choice question answering. See the [GitHub](https://github.com/nala-cub/prost) repo for examples using GPT-1, GPT-2, BERT, RoBERTa, ALBERT, T5, and UnifiedQA.
|
| 67 |
+
|
| 68 |
+
### Languages
|
| 69 |
+
The text in the dataset is in English. The associated BCP-47 code is `en-US`.
|
| 70 |
+
|
| 71 |
+
## Dataset Structure
|
| 72 |
+
|
| 73 |
+
### Data Instances
|
| 74 |
+
An example looks like this:
|
| 75 |
+
|
| 76 |
+
```json
|
| 77 |
+
{
|
| 78 |
+
"A": "glass",
|
| 79 |
+
"B": "pillow",
|
| 80 |
+
"C": "coin",
|
| 81 |
+
"D": "ball",
|
| 82 |
+
"context": "A person drops a glass, a pillow, a coin, and a ball from a balcony.",
|
| 83 |
+
"ex_question": "Which object is the most likely to break?",
|
| 84 |
+
"group": "breaking",
|
| 85 |
+
"label": 0,
|
| 86 |
+
"name": "breaking_1",
|
| 87 |
+
"question": "The [MASK] is the most likely to break."
|
| 88 |
+
}
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
### Data Fields
|
| 93 |
+
|
| 94 |
+
- `A`: Option A (0)
|
| 95 |
+
- `B`: Option B (1)
|
| 96 |
+
- `C`: Option C (2)
|
| 97 |
+
- `D`: Option D (3)
|
| 98 |
+
- `context`: Context for the question
|
| 99 |
+
- `question`: A cloze style continuation of the context.
|
| 100 |
+
- `ex_question`: A multiple-choice style question.
|
| 101 |
+
- `group`: The question group, e.g. *bouncing*
|
| 102 |
+
- `label`: A ClassLabel indication the correct option
|
| 103 |
+
- `example_idx`: an integer indicating the sorted example index.
|
| 104 |
+
- `name':` The template identifier.
|
| 105 |
+
|
| 106 |
+
### Data Splits
|
| 107 |
+
|
| 108 |
+
The dataset contains 18,736 examples for testing.
|
| 109 |
+
|
| 110 |
+
## Dataset Creation
|
| 111 |
+
|
| 112 |
+
### Curation Rationale
|
| 113 |
+
|
| 114 |
+
PROST is designed to avoid models succeeding in unintended ways. First, PROST provides no training data, so as to probe models in a zero-shot fashion. This prevents models from succeeding through spurious correlations between testing and training, and encourages success through a true understanding of and reasoning about the concepts at hand. Second, we manually write templates for all questions in an effort to prevent models from having seen the exact same sentences in their training data. Finally, it focuses on a small set of well defined, objective concepts that only require a small vocabulary. This allows researchers to focus more on the quality of training data rather than on size of it.
|
| 115 |
+
|
| 116 |
+
### Source Data
|
| 117 |
+
|
| 118 |
+
#### Initial Data Collection and Normalization
|
| 119 |
+
|
| 120 |
+
[More Information Needed]
|
| 121 |
+
|
| 122 |
+
#### Who are the source language producers?
|
| 123 |
+
|
| 124 |
+
[More Information Needed]
|
| 125 |
+
|
| 126 |
+
### Annotations
|
| 127 |
+
|
| 128 |
+
#### Annotation process
|
| 129 |
+
|
| 130 |
+
[More Information Needed]
|
| 131 |
+
|
| 132 |
+
#### Who are the annotators?
|
| 133 |
+
|
| 134 |
+
[More Information Needed]
|
| 135 |
+
|
| 136 |
+
### Personal and Sensitive Information
|
| 137 |
+
|
| 138 |
+
[More Information Needed]
|
| 139 |
+
|
| 140 |
+
## Considerations for Using the Data
|
| 141 |
+
|
| 142 |
+
### Social Impact of Dataset
|
| 143 |
+
|
| 144 |
+
[More Information Needed]
|
| 145 |
+
|
| 146 |
+
### Discussion of Biases
|
| 147 |
+
|
| 148 |
+
[More Information Needed]
|
| 149 |
+
|
| 150 |
+
### Other Known Limitations
|
| 151 |
+
|
| 152 |
+
[More Information Needed]
|
| 153 |
+
|
| 154 |
+
## Additional Information
|
| 155 |
+
|
| 156 |
+
### Dataset Curators
|
| 157 |
+
|
| 158 |
+
[More Information Needed]
|
| 159 |
+
|
| 160 |
+
### Licensing Information
|
| 161 |
+
|
| 162 |
+
[More Information Needed]
|
| 163 |
+
|
| 164 |
+
### Citation Information
|
| 165 |
+
|
| 166 |
+
[More Information Needed]
|
| 167 |
+
|
| 168 |
+
### Contributions
|
| 169 |
+
|
| 170 |
+
Thanks to [@github-username](https://github.com/<github-username>) for adding this dataset.
|
prost.py
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2020 The HuggingFace Datasets Authors and Cory Paik
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the 'License');
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an 'AS IS' BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
# ==============================================================================
|
| 15 |
+
"""TODO: Add a description here."""
|
| 16 |
+
|
| 17 |
+
import json
|
| 18 |
+
import datasets
|
| 19 |
+
|
| 20 |
+
# TODO: Add BibTeX citation
|
| 21 |
+
# Find for instance the citation on arxiv or on the dataset repo/website
|
| 22 |
+
_CITATION = """\
|
| 23 |
+
"""
|
| 24 |
+
|
| 25 |
+
# TODO: Add description of the dataset here
|
| 26 |
+
# You can copy an official description
|
| 27 |
+
_DESCRIPTION = """\
|
| 28 |
+
"""
|
| 29 |
+
_HOMEPAGE = 'https://github.com/nala-cub/prost'
|
| 30 |
+
_LICENSE = 'Apache 2.0'
|
| 31 |
+
|
| 32 |
+
_URL = 'https://huggingface.co/datasets/corypaik/prost/resolve/main/data'
|
| 33 |
+
|
| 34 |
+
_URLs = {'default': f'{_URL}/default.jsonl'}
|
| 35 |
+
|
| 36 |
+
MC_LABELS = list('ABCD')
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
class Prost(datasets.GeneratorBasedBuilder):
|
| 40 |
+
"""TODO: Short description of my dataset."""
|
| 41 |
+
|
| 42 |
+
VERSION = datasets.Version('1.0.0')
|
| 43 |
+
|
| 44 |
+
def _info(self):
|
| 45 |
+
features = datasets.Features({
|
| 46 |
+
'A': datasets.Value('string'),
|
| 47 |
+
'B': datasets.Value('string'),
|
| 48 |
+
'C': datasets.Value('string'),
|
| 49 |
+
'D': datasets.Value('string'),
|
| 50 |
+
'context': datasets.Value('string'),
|
| 51 |
+
'question': datasets.Value('string'),
|
| 52 |
+
'ex_question': datasets.Value('string'),
|
| 53 |
+
'group': datasets.Value('string'),
|
| 54 |
+
'label': datasets.ClassLabel(names=MC_LABELS),
|
| 55 |
+
'name': datasets.Value('string'),})
|
| 56 |
+
return datasets.DatasetInfo(description=_DESCRIPTION, features=features,
|
| 57 |
+
supervised_keys=None, homepage=_HOMEPAGE,
|
| 58 |
+
license=_LICENSE, citation=_CITATION)
|
| 59 |
+
|
| 60 |
+
def _split_generators(self, dl_manager):
|
| 61 |
+
""" Returns SplitGenerators."""
|
| 62 |
+
path = dl_manager.download_and_extract(_URLs[self.config.name])
|
| 63 |
+
kwargs = {'path': path}
|
| 64 |
+
return [datasets.SplitGenerator(datasets.Split.TEST, gen_kwargs=kwargs)]
|
| 65 |
+
|
| 66 |
+
def _generate_examples(self, path):
|
| 67 |
+
with open(path, 'r') as f:
|
| 68 |
+
for _id, line in enumerate(f.readlines()):
|
| 69 |
+
yield _id, json.loads(line)
|