Simple and Effective Few-Shot Named Entity Recognition with Structured Nearest Neighbor Learning


Simple and Effective Few-Shot Named Entity Recognition with Structured Nearest Neighbor Learning

Contributions

  1. 作者引入了STRUCTSHOT,这是一个简单的few-shot NER System,在不需要任何用于few-shot上的specific training的基础上达到了SOTA;
  2. STRUCTSHOT中的nearest neighbor learning 和 structured decoding策略解决了现有的few-shot NER模型在O class和model label dependencies上的不足;

A standard evaluation setup

一个标准的评估设置

以往的few-shot NER是仿照few-shot classification literature的方式,采用episode evaluation。特别的,一个NER system是在多个evaluation episodes上进行evaluation的。

  • An episode includes a sampled K-shot support set of labeled examples and a few sampled K-shot test sets.
  • In addition to these prior practices, we propose a more realistic evaluation setting by sampling only the support sets and testing the model on the standard test sets from NER benchmarks.

Test set construction

如上所述,不使用episode的方式,直接用test set!论文作者说这样能够更加真实地反映realistic data。

Support set construction

与常见的方式一样。

Model: STRUCTSHOT

大概的流程如下:

  1. 在source domain上训练一个NER Model,这个NER Model的主要作用就是生成contextual representation;
  2. 在inference结果,1中得到的static representation用于nearest neighbor token classification;
  3. 得到token classification之后,就是NER的传统艺能,使用Viterbi decoder来捕捉标签之间的依赖关系。

Nearest neighbor classification for few-shot NER——得到token-tag emission scores

Pre-trained NER models as token embedders

NLP中,许多元学习方法的思想是在training time中模仿testing time。即,这些方法在训练过程中反复从training data中抽取多个support set和test set,然后学习representation来最小化在source domain上的few-shot loss。而在这篇论文中,作者采用的是机器学习小白都会的fully-supervised的方式pre-train NER Model来学习token-level representation。至于原因是什么?作者没说。

接着采用Nearest Neighbor Classification的方式得到token-tag emission scores:

Structured nearest neighbor learning——得到tag-tag transition scores

CRF:

  • token-tag emission scores
  • tag-tag transition scores

暴力few shot的话,是无法做到实现source domain的tag-tag transition scores迁移到target domain上的。STRUCTSHOT通过使用在source domain上估计来的abstract tag transition distribution来解决这个问题。此外,STRUCTSHOT舍弃了CRF中的训练阶段,仅在inference时使用Viterbi decoder。

前面讲到abstract tag,它是抽象的tag,有三类:$O,I,I-Other$。论文中关于它们的描述如下:

从Abstract transition probabilities向Target transition probabilities迁移的过程:s

abstract transition probabilities的计算也非常简单,就是基于统计的计算。

Viterbi Algorithm

得到token-tag emission scores和tag-tag transition scores之后,就可以使用Viterbi Algorithm求解了。

Experiments

实验作用于两个few-shot NER scenarios:

  • tag set extension
  • domain transfer

这还是我第一次听说few-shot还可以再细分。

实验结果如下:

从上可知,STRUCTSHOT确实可以达到两个任务上SOTA的成绩。

Thinking

  • 论文的方法未免也太短小精悍了,只用了小小的Pre-train的方法,连Fine-tune都没有就达到了SOTA,比起那些做了各种tricks的方法,有点惊艳!
  • 打算再阅读一些Few-shot的论文补充盲点。

知识补充:Training and evaluation of few-shot meta-learning

few-shot meta-learning通常是形成few-shot episodes(集)来训练和评估。An episode就是指代一个task $\mathcal T$。除了C-way K-shot定义的标准few-shot episodes之外,其他episodes也能被使用,只要它们不影响meta-validation或meta-testing中的评估结果。


文章作者: CarlYoung
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 CarlYoung !
 上一篇
A Concise Review of Recent Few-shot Meta-learning Methods A Concise Review of Recent Few-shot Meta-learning Methods
A Concise Review of Recent Few-shot Meta-learning Methods few-shot meta-learning的预期是希望model能像人一样,在prior knowledge的基础上,快速
下一篇 
What is verbose? What is verbose?
z在Deep Learning的编程中,总是会遇到verbose这个概念,我一直理解这个单词就是控制程序打印信息的意思,但是具体是怎么控制打印信息,我一直没理解,查阅资料之后发现,这个参数在Keras中常见,stackoverflow关于它
2021-04-16
  目录