JeremyAlain
commited on
Merge branch 'main' of https://huggingface.co/datasets/JeremyAlain/fewshot-ptretraining into main
Browse files
README.md
ADDED
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- no-annotation
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- en
|
8 |
+
licenses:
|
9 |
+
- apache-2.0
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
pretty_name: Fewshot Table Dataset
|
13 |
+
size_categories:
|
14 |
+
- 100K<n<1M
|
15 |
+
source_datasets: [WDC Web Table Corpora](http://webdatacommons.org/webtables/)
|
16 |
+
task_categories:
|
17 |
+
- multiple-choice
|
18 |
+
- question-answering
|
19 |
+
- zero-shot-classification
|
20 |
+
- text2text-generation
|
21 |
+
- table-question-answering
|
22 |
+
- text-generation
|
23 |
+
- text-classification
|
24 |
+
- tabular-classification
|
25 |
+
task_ids:
|
26 |
+
- multiple-choice-qa
|
27 |
+
- extractive-qa
|
28 |
+
- closed-domain-qa
|
29 |
+
- open-domain-qa
|
30 |
+
- closed-domain-qa
|
31 |
+
- closed-book-qa
|
32 |
+
- open-book-qa
|
33 |
+
- language-modeling
|
34 |
+
- multi-class-classification
|
35 |
+
- natural-language-inference
|
36 |
+
- topic-classification
|
37 |
+
- multi-label-classification
|
38 |
+
- tabular-multi-class-classification
|
39 |
+
- tabular-multi-label-classification
|
40 |
+
---
|
41 |
+
|
42 |
+
# Dataset Card for Fewshot Table Dataset
|
43 |
+
|
44 |
+
## Table of Contents
|
45 |
+
- [Dataset Description](#dataset-description)
|
46 |
+
- [Dataset Summary](#dataset-summary)
|
47 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
48 |
+
- [Languages](#languages)
|
49 |
+
- [Dataset Structure](#dataset-structure)
|
50 |
+
- [Data Instances](#data-instances)
|
51 |
+
- [Data Fields](#data-instances)
|
52 |
+
- [Data Splits](#data-instances)
|
53 |
+
- [Dataset Creation](#dataset-creation)
|
54 |
+
- [Curation Rationale](#curation-rationale)
|
55 |
+
- [Source Data](#source-data)
|
56 |
+
- [Annotations](#annotations)
|
57 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
58 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
59 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
60 |
+
- [Discussion of Biases](#discussion-of-biases)
|
61 |
+
- [Other Known Limitations](#other-known-limitations)
|
62 |
+
- [Additional Information](#additional-information)
|
63 |
+
- [Dataset Curators](#dataset-curators)
|
64 |
+
- [Licensing Information](#licensing-information)
|
65 |
+
- [Citation Information](#citation-information)
|
66 |
+
|
67 |
+
## Dataset Description
|
68 |
+
|
69 |
+
- **Homepage:** [Needs More Information]
|
70 |
+
- **Repository:** https://github.com/JunShern/few-shot-pretraining
|
71 |
+
- **Paper:** Paper-Title
|
72 |
+
- **Leaderboard:** [Needs More Information]
|
73 |
+
- **Point of Contact:** junshern@nyu.edu, perez@nyu.edu
|
74 |
+
|
75 |
+
### Dataset Summary
|
76 |
+
|
77 |
+
The Fewshot Table dataset consists of tables that naturally occur on the web, that are formatted as few-shot tasks for fine-tuning language models to improve their few-shot performance. The dataset consists of approximately 413K tables that are extracted from the [WDC Web Table Corpora](http://webdatacommons.org/webtables/) 2015, which is released under the Apache-2.0 license. The WDC Web Table Corpora "contains vast amounts of HTML tables. [...] The Web Data Commons project extracts relational Web tables from the [Common Crawl](https://commoncrawl.org/), the largest and most up-to-date Web corpus that is currently available to the public."
|
78 |
+
|
79 |
+
### Supported Tasks and Leaderboards
|
80 |
+
|
81 |
+
Since the tables come from the web, the distribution of tasks and topics is very broad. The shape of our dataset is very wide i.e. we have 1000's tasks, while each task has only a few examples, compared to most current NLP datasets which are very deep, i.e. 10s of tasks with many examples. This implies that our dataset covers a broad range of potential tasks, e.g. multiple-choice, question-answering, table-question-answering, text-classification, etc.
|
82 |
+
|
83 |
+
The intended use of this dataset is to improve few-shot performance by finetuning/pretraining onour dataset.
|
84 |
+
|
85 |
+
### Languages
|
86 |
+
|
87 |
+
English
|
88 |
+
|
89 |
+
## Dataset Structure
|
90 |
+
|
91 |
+
### Data Instances
|
92 |
+
|
93 |
+
Each table, i.e. task is represented as a json-lines file and consists of several few-shot examples. Each example is a dictionary containing a field 'task', which identifies the task, followed by an 'input', 'options', and 'output' field. The 'input' field contains several column elements of the same row in the table, while the 'output' field is a target which represents an individual column of the same row. Each task contains several such examples which can be concatenated as a few-shot task. In the case of multiple choice classification, the 'options' field contains the possible classes that a model needs to choose from.
|
94 |
+
|
95 |
+
There are also additional meta-data fields such as 'pageTitle', 'title', 'outputColName', 'url', 'wdcFile'.
|
96 |
+
|
97 |
+
### Data Fields
|
98 |
+
|
99 |
+
'task': task identifier
|
100 |
+
|
101 |
+
'input': column elements of a specific row in table.
|
102 |
+
|
103 |
+
'options': for multiple choice classification, it provides the options to choose from.
|
104 |
+
|
105 |
+
'output': target column element of same row as input.
|
106 |
+
|
107 |
+
'pageTitle': the title of the page containing the table.
|
108 |
+
|
109 |
+
'outputColName': ?? (potentially remove this from data)
|
110 |
+
|
111 |
+
'url': url to the website containing the table
|
112 |
+
|
113 |
+
'wdcFile': ? (potentially remove this from data)
|
114 |
+
|
115 |
+
### Data Splits
|
116 |
+
|
117 |
+
[Needs More Information]
|
118 |
+
|
119 |
+
## Dataset Creation
|
120 |
+
|
121 |
+
### Curation Rationale
|
122 |
+
|
123 |
+
How do we convert tables to few-shot tasks?
|
124 |
+
Unlike unstructured text, structured data in the form of tables lends itself easily to the few-shot task format. Given a table where each row is an instance of a similar class and the columns describe the attributes of each instance, we can turn each row into a task example to predict one attribute given the others. When the table has more than one row, we instantly have multiple examples of this task by using each row as a single example, and thus each table becomes a few-shot dataset for a particular task.
|
125 |
+
|
126 |
+
The few-shot setting in this setting is significant: Tables often do not come with clear instructions for each field, so tasks may be underspecified if prompted in a zero-shot manner, but the intended task becomes clearer when examples are provided. This makes a good two-way match: The few-shot format is a perfect setup for table learning, and tables provide a natural dataset for few-shot training.
|
127 |
+
|
128 |
+
### Source Data
|
129 |
+
|
130 |
+
#### Initial Data Collection and Normalization
|
131 |
+
|
132 |
+
We downloaded the [WDC Web Table Corpora](http://webdatacommons.org/webtables/) 2015 dataset and focus on relational tables. In the following, we describe the steps we executed to filter the WDC Web Table Corpora and create our task dataset. Given a set of relation tables, we apply defined preprocessing steps to ensure all the tables can be handled consistently. Each table can then spawn one or more tasks using a simple predict-one-column approach. Finally, all tasks produced in this manner undergo simple rule-based checks, i.e. any candidates that do not meet some defined minimum requirements for a well-formed task are rejected. Following this approach, we start with 50 million tables in the initial corpus and produce a longlist of 400K tasks.
|
133 |
+
|
134 |
+
1. We select only relational tables.
|
135 |
+
2. We make sure all tables are vertical (horizontal tables are simply transposed) and remove duplicate rows.
|
136 |
+
3. To create task we use what in the literature is referred to as verbalizers. For example, a table with 3 columns may be cast as three different tasks: predict column A given B and C, predict column B given A and C, and predict column C given A and B.
|
137 |
+
4. Rule-based-checks to reject tables:
|
138 |
+
a) We reject 25M tables that have fewer than 6 rows (so we can do at least k=5-shot learning)
|
139 |
+
b) We reject tables with > 20% non-English text as measured by [SpaCy](https://spacy.io/)
|
140 |
+
c) Given 2 Million passing tables we consider each table column as a potential output column, and concatenate all other columns to form the input (which produces 5.6 M candidate tasks)
|
141 |
+
5. Rule-based-checks to reject tasks
|
142 |
+
a) We reject a task if it has less than 6 rows. Note that tasks may have fewer rows than their origin tables since we remove rows where the output column is empty.
|
143 |
+
b) We reject tasks if any input maps to multiple outputs.
|
144 |
+
c) We reject tasks if it has fewer than 2 output classes.
|
145 |
+
d) We reject a task if the output column alone has >20% non-English text.
|
146 |
+
e) We reject a task if the classes are heavily imbalanced.
|
147 |
+
|
148 |
+
6. Lastly we apply domain-level filtering. Initial iterations of our dataset found a significant imbalance in terms of the website of origin for our generated tasks. In particular, we found that the mos-frequent domain in the WDC corpus, Cappex.com, was emphasized by our export criteria such that this website alone represented 41% of our total tasks. Since we want our dataset to represent the diversity of all the tables available on the web, we apply a hard fix for this imbalance by limiting the number of tasks per domain. Starting from the initial corpus of 50M tables from 323160 web domains, our resulting longlist of tasks comprises more than X for a total of 413350 tasks.
|
149 |
+
|
150 |
+
#### Who are the source language producers?
|
151 |
+
|
152 |
+
The dataset is extracted from [WDC Web Table Corpora](http://webdatacommons.org/webtables/).
|
153 |
+
|
154 |
+
### Annotations
|
155 |
+
|
156 |
+
#### Annotation process
|
157 |
+
|
158 |
+
No annotation Process
|
159 |
+
|
160 |
+
#### Who are the annotators?
|
161 |
+
|
162 |
+
-
|
163 |
+
|
164 |
+
### Personal and Sensitive Information
|
165 |
+
|
166 |
+
The data was extracted from [WDC Web Table Corpora](http://webdatacommons.org/webtables/), which in turn extracted tables from the [Common Crawl](https://commoncrawl.org/). We did not filter the data in any way. Thus any user identities or otherwise sensitive information (e.g. data that reveals racial or ethnic origins, sexual orientations, religious beliefs, political opinions or union memberships, or locations; financial or health data; biometric or genetic data; forms of government identification, such as social security numbers; criminal history, etc.) might be contained in our dataset.
|
167 |
+
|
168 |
+
## Considerations for Using the Data
|
169 |
+
|
170 |
+
### Social Impact of Dataset
|
171 |
+
|
172 |
+
The purpose of this dataset is to help develop models that are better at few-shot learning and have higher few-shot performance by fine-tuning few-shot tasks extracted from tables.
|
173 |
+
|
174 |
+
While tables have a similar structure to few-shot tasks and we do see an improved performance on few-shot tasks in our paper, we want to make clear that finetuning on tables also has its risks. First of all, since the tables are extracted from the web, they may contain user identities or otherwise sensitive information which a model might reveal at inference, or which could influence the learning process of a model in a negative way. Second, since tables are very diverse in nature, the model also trains on low-quality data or data with an unusual structure. While it is interesting that training on such data improves few-shot performance on downstream tasks, this could also imply that the model learns concepts that are very dissimilar to human concepts that would be useful for a certain downstream task. In other words, it is possible that the model learns weird things that are helpful on the evaluated downstream tasks, but might lead to bad out-of-distribution behavior.
|
175 |
+
|
176 |
+
### Discussion of Biases
|
177 |
+
|
178 |
+
Since our dataset contains tables that are scraped from the web, it will also contain many toxic, racist, sexist, and otherwise harmful biases and texts. We have not run any analysis on the biases prevalent in our datasets. Neither have we explicitly filtered the content for toxic content.
|
179 |
+
This implies that a model trained on our dataset will reinforce harmful biases and toxic text that exist in our dataset.
|
180 |
+
|
181 |
+
|
182 |
+
### Other Known Limitations
|
183 |
+
|
184 |
+
[Needs More Information]
|
185 |
+
|
186 |
+
## Additional Information
|
187 |
+
|
188 |
+
### Dataset Curators
|
189 |
+
|
190 |
+
[Needs More Information]
|
191 |
+
|
192 |
+
### Licensing Information
|
193 |
+
|
194 |
+
[Needs More Information]
|
195 |
+
|
196 |
+
### Citation Information
|
197 |
+
|
198 |
+
[Needs More Information]
|