Welcome to FewRel

a Few-shot Relation classification dataset

FewRel is a Few-shot Relation classification dataset, which features 70, 000 natural language sentences expressing 100 relations annotated by crowdworkers.

Please refer to our EMNLP 2018 paper to learn more about FewRel.

We add two more challenging settings: few-shot domain adaptation (DA) and few-shot none-of-the-above detection (NOTA) in FewRel 2.0 dataset. Please refer to our EMNLP 2019 paper for more details.

Baseline models and a series of toolkits are released in this repo:

It is fairly easy for you to get started with FewRel. First, you can download a copy of the dataset by the following links. The dataset is distributed under the CC BY-SA 4.0 license:

To evaluate your model, please sample a pair of input and standard output file from the validation set, and compare your output with the standard one. The sampling scripts and evaluations scripts used in official evaluation are also accessible through the following work sheet.

Once you have built a model that works to your expectations on the validation set, you can submit it to get official scores on the hidden test set. To preserve the integrity of test results, we do not release the test set to the public. Instead, we require you to submit your model so that we can run it on the test set for you. Instructions to submit your model is here!

@inproceedings{han-etal-2018-fewrel,
title = "{F}ew{R}el: A Large-Scale Supervised Few-Shot Relation Classification Dataset with State-of-the-Art Evaluation",
author = "Han, Xu and Zhu, Hao and Yu, Pengfei and Wang, Ziyun and Yao, Yuan and Liu, Zhiyuan and Sun, Maosong",
booktitle = "Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing",
month = oct # "-" # nov,
year = "2018",
address = "Brussels, Belgium",
publisher = "Association for Computational Linguistics",
url = "https://www.aclweb.org/anthology/D18-1514",
doi = "10.18653/v1/D18-1514",
pages = "4803--4809"
}

@inproceedings{gao-etal-2019-fewrel,
title = "{F}ew{R}el 2.0: Towards More Challenging Few-Shot Relation Classification",
author = "Gao, Tianyu and Han, Xu and Zhu, Hao and Liu, Zhiyuan and Li, Peng and Sun, Maosong and Zhou, Jie",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)",
month = nov,
year = "2019",
address = "Hong Kong, China",
publisher = "Association for Computational Linguistics",
url = "https://www.aclweb.org/anthology/D19-1649",
doi = "10.18653/v1/D19-1649",
pages = "6251--6256"
}


# Model Domain Adaptation
5-way-1-shot
Domain Adaptation
5-way-5-shot
Domain Adaptation
10-way-1-shot
Domain Adaptation
10-way-5-shot

1

PAMN
Anonymous
(Jun 8, 2020)
77.5490.4065.9882.03

2

Anonymous Pony

(Jan 17, 2020)
76.7186.6966.7278.46

3

Anonymous Python

(Dec 25, 2019)
66.4183.5251.8573.60

4

Anonymous Groundhog

(Dec 25, 2019)
67.2382.0954.3271.01

5

BERT-PAIR[paper][code]
THUNLP, Tsinghua University
(Nov 3, 2019)
67.4178.5754.8966.85

6

Proto-ADV (CNN)[paper][code]
THUNLP, Tsinghua University
(Nov 3, 2019)
42.2158.7128.9144.35

7

Proto-ADV (BERT)[paper][code]
THUNLP, Tsinghua University
(Nov 3, 2019)
41.9054.7427.3637.40

8

Proto-BERT

(Nov 3, 2019)
40.1251.5026.4536.93

9

Proto-CNN

(Nov 3, 2019)
35.0949.3722.9835.22