『 论文阅读』Slot-Gated Modeling for Joint Slot Filling and Intent Prediction

来自论文:《Slot-Gated Modeling for Joint Slot Filling and Intent Prediction》
发表在NAACL HLT 2018,自然语言四大顶会之一。

基于Attention的RNN模型在联合意图识别(ID)和槽位填充(SF)上实现最好性能(其ID和SF的attention权重独立)。作者认为其通过损失函数将两者关联只是隐式地关联,本文提出slot gate结构,其关注于学习intent和slot attention向量之间的关系,通过全局优化获得更好的semantic frame。通过在ATIS和Snips数据集实验,相比于attention模型semantic frame准确率提升了4.2%。

1. 创新点:

  1. 提出slot-gate方法实现了最好的性能表现。
  2. 通过数据集实验表明slot-gate的有效性。
  3. slot-gate有助于分析槽位和意图的关系。

『 论文阅读』Slot-Gated Modeling for Joint Slot Filling and Intent Prediction

2. 模型

2.1 底层特征:

使用BiLSTM结构,输入:x=(x1,x2,...xT)x = (x_1, x_2,... x_T),输出:ht=[ht,ht]h_t = [\overrightarrow{h_t}, \overleftarrow{h_t}]

2.2 attention:

  1. slot filling attention:

    1. 权重计算:

    (1)ciS=j=1Tαi,jShj, c_i^S = \sum^T_{j=1} \alpha^S_{i,j} h_j,\tag{1}

(2)αi,jS=exp(ei,j)k=1Texp(ej,k) \alpha^S_{i,j} = \frac{exp(e_{i,j})}{\sum_{k=1}^T exp(e_{j,k})} \tag{2}

(3)ei,k=σ(WheShk) e_{i,k} = \sigma(W_{he}^S h_k) \tag{3}

  1. SF

(4)yiS=softmax(WhyS(hi+ciS)) y_i^S = softmax(W_{hy}^S (h_i+c_i^S)) \tag{4}

  1. Intent Prediction:其输入时BiLSTM的最后一个单元的输出hTh^T以及其对应的context向量,c的计算方式和slot filling的一致,相当于其i=T。
    (5)yI=softmax(WhyI(hT+cI)) y^I = softmax(W_{hy}^I (h_T+c^I)) \tag{5}

2.3 slot-Gate:

利用意图上下文向量来建模槽意图关系,以提高槽填充性能。如图3:

  1. 槽位的context向量和意图的context向量组合通过门结构(其中v和W都是可训练的):
    g=vtanh(ciS+WcI) g = \sum v \cdot tanh(c_i^S + W \cdot c^I)

  2. 用g作为预测yiSy_i^S的权重向量:
    yiS=softmax(WhyS(hi+ciSg)) y_i^S = softmax(W_{hy}^S(h_i+c_i^S \cdot g))

『 论文阅读』Slot-Gated Modeling for Joint Slot Filling and Intent Prediction

a). 使用了intent和slot的attention。

b). 只使用intent的attention。

实验结果:

『 论文阅读』Slot-Gated Modeling for Joint Slot Filling and Intent Prediction

Liu论文中ic error:1.57,SF f1:95.87

slot-gate学习了intent和slot之间的关系-提供intent context向量。实现了更好的性能。

conclusion

本文提出了一种明确学习slot-intent关系的机制-“slot-gated”,学习意图的结果来促进slot filling。实验证明取得了state of art性能,且推广到多个数据集。

感想:

本文提出的一种将intent detect和slot filling显示关联学习的架构,并实验证明有效,说明可以深挖如何在ID和SF显示关联上设计更好的架构,例如本文是单向的门结构,ID结果输入到SF,是否能够将二者相互关联,SF结果也可以输入到ID。或者提出更优雅表征显式关系的结构。

slot filling对比:

  1. LSTM+CRF:

yiS=CRF(WS(hi+bS)) y_i^S = CRF(W^S(h_i+b^S))

  1. attention预测:
    yiS=softmax(WhyS(hi+ciS)) y_i^S = softmax(W_{hy}^S(h_i+c_i^S))

  2. slot-Gate:
    yiS=softmax(WhyS(hi+ciSg)) y_i^S = softmax(W_{hy}^S(h_i+c_i^S \cdot g))

Data Set # Train # Dev # Test |V| # Intents # Slots
ATIS 4,978 - 893 900 17 79

csdn原文:https://blog.csdn.net/shine19930820/article/details/83052300

Reference

  1. http://www.aclweb.org/anthology/N18-2118
  2. 代码:https://github.com/MiuLab/SlotGated-SLU
  3. https://blog.csdn.net/shine19930820/article/details/83052232