Datasets:

Languages:
English
ArXiv:
Libraries:
Datasets
License:
corypaik commited on
Commit
a691b0e
·
1 Parent(s): dee0883

docs(coda): add basic dataset card for coda

Browse files

GitOrigin-RevId: 94d8defe8840563cce9108e58a1404dae872b9a3

Files changed (3) hide show
  1. README.md +196 -0
  2. coda.py +16 -1
  3. dataset_infos.json +1 -0
README.md ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - expert-generated
6
+ languages:
7
+ - en-US
8
+ licenses:
9
+ - apache-2.0
10
+ multilinguality:
11
+ - monolingual
12
+ pretty_name: CoDa
13
+ size_categories:
14
+ - 10K<n<100K
15
+ source_datasets:
16
+ - original
17
+ task_categories:
18
+ - text-scoring
19
+ task_ids:
20
+ - text-scoring-other-distribution-prediction
21
+ ---
22
+
23
+ # Dataset Card for CoDa
24
+
25
+ ## Table of Contents
26
+ - [Table of Contents](#table-of-contents)
27
+ - [Dataset Description](#dataset-description)
28
+ - [Dataset Summary](#dataset-summary)
29
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
30
+ - [Languages](#languages)
31
+ - [Dataset Structure](#dataset-structure)
32
+ - [Data Instances](#data-instances)
33
+ - [Data Fields](#data-fields)
34
+ - [Data Splits](#data-splits)
35
+ - [Dataset Creation](#dataset-creation)
36
+ - [Curation Rationale](#curation-rationale)
37
+ - [Source Data](#source-data)
38
+ - [Annotations](#annotations)
39
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
40
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
41
+ - [Social Impact of Dataset](#social-impact-of-dataset)
42
+ - [Discussion of Biases](#discussion-of-biases)
43
+ - [Other Known Limitations](#other-known-limitations)
44
+ - [Additional Information](#additional-information)
45
+ - [Dataset Curators](#dataset-curators)
46
+ - [Licensing Information](#licensing-information)
47
+ - [Citation Information](#citation-information)
48
+ - [Contributions](#contributions)
49
+
50
+ ## Dataset Description
51
+
52
+ - **Repository:** [`nala-cub/coda`](https://github.com/nala-cub/coda)
53
+ - **Paper:** [The World of an Octopus: How Reporting Bias Influences a Language Model's Perception of Color](https://arxiv.org/abs/2110.08182)
54
+ - **Point of Contact:** [Cory Paik]([email protected])
55
+
56
+ ### Dataset Summary
57
+ *The Color Dataset* (CoDa) is a probing dataset to evaluate the representation of visual properties in language models. CoDa consists of color distributions for 521 common objects, which are split into 3 groups. We denote these groups as Single, Multi, and Any, which represents the typical object of each group.
58
+
59
+ The default configuration of CoDa uses 10 CLIP-style templates (e.g. "A photo of a [object]"), and 10 cloze-style templates (e.g. "Everyone knows most [object] are
60
+ [color]." )
61
+
62
+ ### Supported Tasks and Leaderboards
63
+
64
+ This version of the dataset consists of the filtered and templated examples as cloze style questions. See the [GitHub](https://github.com/nala-cub/coda) repo for the raw data (e.g. unfiltered annotations) as well as example usage with GPT-2, RoBERTa, ALBERT, and CLIP.
65
+
66
+ ### Languages
67
+
68
+ The text in the dataset is in English. The associated BCP-47 code is `en-US`.
69
+
70
+ ## Dataset Structure
71
+
72
+ ### Data Instances
73
+
74
+ An example looks like this:
75
+
76
+ ```json
77
+ {
78
+ "text": "All rulers are [MASK].",
79
+ "label": [
80
+ 0.0181818176, 0.0363636352, 0.3077272773, 0.0181818176, 0.0363636352,
81
+ 0.086363636, 0.0363636352, 0.0363636352, 0.0363636352, 0.086363636,
82
+ 0.301363647
83
+ ],
84
+ "template_group": 1,
85
+ "template_idx": 0,
86
+ "class_id": "/m/0hdln",
87
+ "display_name": "Ruler",
88
+ "object_group": 2,
89
+ "ngram": "ruler"
90
+ }
91
+ ```
92
+
93
+ ### Data Fields
94
+
95
+ - `text`: The templated example. What this is depends on the value of `template_group`.
96
+ - `template_group=0`: A CLIP style example. There are no `[MASK]` tokens in these examples.
97
+ - `template_group=1`: A cloze style example. Note that all templates have `[MASK]` as the last word, but in most cases, the period should be included.
98
+ - `label`: A list of probability values for the 11 colors. Note that these are sorted by the alphabetic order of the 11 colors (black, blue, brown, gray, green, orange, pink, purple, red, white, yellow).
99
+ - `template_group`: Type of template, `0` corresponds to A CLIP style template (`clip-imagenet`), and `1` corresponds to A cloze style templates (`text-masked`).
100
+ - `template_idx`: The index of the template out of all templates
101
+ - `class_id`: The Corresponding [OpenImages v6](https://storage.googleapis.com/openimages/web/index.html) `ClassID`.
102
+ - `display_name`: The Corresponding [OpenImages v6](https://storage.googleapis.com/openimages/web/index.html) `DisplayName`.
103
+ - `object_group`: Object Group, values correspond to `Single`, `Multi`, and `Any`.
104
+ - `ngram`: Corresponding n-gram used for lookups.
105
+
106
+ ### Data Splits
107
+
108
+ Object Splits:
109
+
110
+ | Group | All | Train | Valid | Test |
111
+ | ------ | --- | ----- | ----- | ---- |
112
+ | Single | 198 | 118 | 39 | 41 |
113
+ | Multi | 208 | 124 | 41 | 43 |
114
+ | Any | 115 | 69 | 23 | 23 |
115
+ | Total | 521 | 311 | 103 | 107 |
116
+
117
+
118
+ Example Splits:
119
+ | Group | All | Train | Valid | Test |
120
+ | ------ | ----- | ----- | ----- | ---- |
121
+ | Single | 3946 | 2346 | 780 | 820 |
122
+ | Multi | 4146 | 2466 | 820 | 860 |
123
+ | Any | 2265 | 1352 | 460 | 453 |
124
+ | Total | 10357 | 6164 | 2060 | 2133 |
125
+
126
+
127
+ ## Dataset Creation
128
+
129
+ ### Curation Rationale
130
+
131
+ [More Information Needed]
132
+
133
+ ### Source Data
134
+
135
+ #### Initial Data Collection and Normalization
136
+
137
+ [More Information Needed]
138
+
139
+ #### Who are the source language producers?
140
+
141
+ [More Information Needed]
142
+
143
+ ### Annotations
144
+
145
+ #### Annotation process
146
+
147
+ [More Information Needed]
148
+
149
+ #### Who are the annotators?
150
+
151
+ [More Information Needed]
152
+
153
+ ### Personal and Sensitive Information
154
+
155
+ [More Information Needed]
156
+
157
+ ## Considerations for Using the Data
158
+
159
+ ### Social Impact of Dataset
160
+
161
+ [More Information Needed]
162
+
163
+ ### Discussion of Biases
164
+
165
+ [More Information Needed]
166
+
167
+ ### Other Known Limitations
168
+
169
+ [More Information Needed]
170
+
171
+ ## Additional Information
172
+
173
+ ### Dataset Curators
174
+
175
+ [More Information Needed]
176
+
177
+ ### Licensing Information
178
+
179
+ CoDa is licensed under the Apache 2.0 license.
180
+
181
+ ### Citation Information
182
+
183
+ ```
184
+ @misc{paik2021world,
185
+ title={The World of an Octopus: How Reporting Bias Influences a Language Model's Perception of Color},
186
+ author={Cory Paik and Stéphane Aroca-Ouellette and Alessandro Roncone and Katharina Kann},
187
+ year={2021},
188
+ eprint={2110.08182},
189
+ archivePrefix={arXiv},
190
+ primaryClass={cs.CL}
191
+ }
192
+ ```
193
+
194
+ ### Contributions
195
+
196
+ Thanks to [@github-username](https://github.com/<github-username>) for adding this dataset.
coda.py CHANGED
@@ -14,16 +14,31 @@
14
  # ==============================================================================
15
  """ The Color Dataset (CoDa)
16
 
17
- TODO
 
 
 
 
 
 
18
  """
19
  import json
20
 
21
  import datasets
22
 
23
  _CITATION = """\
 
 
 
 
 
 
 
 
24
  """
25
 
26
  _DESCRIPTION = """\
 
27
  """
28
 
29
  _HOMEPAGE = 'https://github.com/nala-cub/coda'
 
14
  # ==============================================================================
15
  """ The Color Dataset (CoDa)
16
 
17
+ CoDa is a probing dataset to evaluate the representation of visual properties
18
+ in language models. CoDa consists of color distributions for 521 common
19
+ objects, which are split into 3 groups: Single, Multi, and Any.
20
+
21
+ The default configuration of CoDa uses 10 CLIP-style templates (e.g. "A photo
22
+ of a ___"), and 10 cloze-style templates (e.g. "Everyone knows most ___ are
23
+ ___." )
24
  """
25
  import json
26
 
27
  import datasets
28
 
29
  _CITATION = """\
30
+ @misc{paik2021world,
31
+ title={The World of an Octopus: How Reporting Bias Influences a Language Model's Perception of Color},
32
+ author={Cory Paik and Stéphane Aroca-Ouellette and Alessandro Roncone and Katharina Kann},
33
+ year={2021},
34
+ eprint={2110.08182},
35
+ archivePrefix={arXiv},
36
+ primaryClass={cs.CL}
37
+ }
38
  """
39
 
40
  _DESCRIPTION = """\
41
+ *The Color Dataset* (CoDa) is a probing dataset to evaluate the representation of visual properties in language models. CoDa consists of color distributions for 521 common objects, which are split into 3 groups: Single, Multi, and Any.
42
  """
43
 
44
  _HOMEPAGE = 'https://github.com/nala-cub/coda'
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "*The Color Dataset* (CoDa) is a probing dataset to evaluate the representation of visual properties in language models. CoDa consists of color distributions for 521 common objects, which are split into 3 groups: Single, Multi, and Any.\n", "citation": "@misc{paik2021world,\n title={The World of an Octopus: How Reporting Bias Influences a Language Model's Perception of Color},\n author={Cory Paik and St\u00e9phane Aroca-Ouellette and Alessandro Roncone and Katharina Kann},\n year={2021},\n eprint={2110.08182},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n", "homepage": "https://github.com/nala-cub/coda", "license": "Apache 2.0", "features": {"class_id": {"dtype": "string", "id": null, "_type": "Value"}, "display_name": {"dtype": "string", "id": null, "_type": "Value"}, "ngram": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"feature": {"dtype": "float32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "object_group": {"num_classes": 3, "names": ["Single", "Multi", "Any"], "names_file": null, "id": null, "_type": "ClassLabel"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "template_group": {"num_classes": 2, "names": ["clip-imagenet", "text-masked"], "names_file": null, "id": null, "_type": "ClassLabel"}, "template_idx": {"dtype": "int32", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "coda", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 852459, "num_examples": 6164, "dataset_name": "coda"}, "validation": {"name": "validation", "num_bytes": 285136, "num_examples": 2060, "dataset_name": "coda"}, "test": {"name": "test", "num_bytes": 292745, "num_examples": 2133, "dataset_name": "coda"}}, "download_checksums": {"https://huggingface.co/datasets/corypaik/coda/resolve/main/data/default_train.jsonl": {"num_bytes": 1709553, "checksum": "5157bf47368ea33056b8d1ecaf688ea713ff0d6fea22002918fa6f70a5240436"}, "https://huggingface.co/datasets/corypaik/coda/resolve/main/data/default_validation.jsonl": {"num_bytes": 574026, "checksum": "76557b184e18cd0d4edebe13e0ad86e1e685b60a2d53bee2b554acf27f6d2e55"}, "https://huggingface.co/datasets/corypaik/coda/resolve/main/data/default_test.jsonl": {"num_bytes": 589396, "checksum": "24fa65a27a9dd6fa4f9b8e1dfeca0dbb26915c26c66b8392c0be4c5929c76a19"}}, "download_size": 2872975, "post_processing_size": null, "dataset_size": 1430340, "size_in_bytes": 4303315}}