Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification 2019 AAAI

Idea为了解决few-shot learning 中易受噪声实例影响这一问题,该论文提出了一种基于原形网络的混合attention网络。该模型设计了实例级别和特征级别的attention机制,分别的突出模型中关键样本实例和关键特征。

Contributes

  • 利用实例attention来选择support集中最有价值的样本,来缓解噪声样本对模型的影响。
  • 利用特征attention来突出特征空间中重要的特征维度,来缓解特征稀疏问题。
  • 实验表明,该模型在训练过程中加快了收敛的速度。

 

Methodology

Notations and Definitions

基于Few-shot学习的关系分类被定义为:通过support集合训练模型,然后预测query实例中两个实体节点(h,t)之间存在的关系r。support集合如下:

 Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)代表实例x中两个实体(h,t)之间存在着语义关系r。Few-shot学习被定于为:

                 Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

Framework

Instance Encoder

Embedding Layer:将每个单词的word embedding和position embedding拼接起来作为最后的input embedding。

        Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

Encoding Layer:对于input embedding该模型利用CNN去提取特征,生成最后的instance特征向量x

         Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

            Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

                        Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

Prototypical Networks

在原形网络中,每个类别可以被一个向量代表,即类原形。在vanilla Prototypical中,类原形被如下公式计算:

                       Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

对于query集合中的实例:

                              Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

 

 

 

Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

 

Hybrid Attention

Instance-level Attention. 原始的原形网络计算类原形是通过加权平均的方法,即认为每个实例的地位都是相同的。但由于任务的背景是在few-shot学习中,用来计算类原形的样本数量往往很少。如果出现错误实例或者是和常规句子语义偏差较大的正确实例的话,对于类原形的影响是非常的巨大,故该模型通过实例级别的attention机制来缓解这一问题:

                                Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

                      Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

Feature-level Attention.

                      Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

Experiments

为了证明模型的鲁棒性,故意的标错一定的比例的support实例来作为噪声,分别测试模型在不同噪声比例下的性能表现。

Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

 

 

 

 

 

 

 

 

 

Instance-attention 和 feature-attention的表现:

Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

 

 

Convergence Speed

Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

Hybrid Attention-Based Prototypical Networks for Noisy Few-Shot Relation Classification (2019 AAAI)

 

 

相关文章: