[论文解读] Structured Attention Networks
本文提出结构化注意力网络,将基于图模型的注意力嵌入到神经网络中,通过使用可微分推理(CRF和依存句法分析器)作为神经层,实现分割和解析感知的注意力。它在几个任务上展示了端到端可训练的相对于标准注意力的改进。
Attention networks have proven to be an effective approach for embedding categorical inference within a deep neural network. However, for many tasks we may want to model richer structural dependencies without abandoning end-to-end training. In this work, we experiment with incorporating richer structural distributions, encoded using graphical models, within deep networks. We show that these structured attention networks are simple extensions of the basic attention procedure, and that they allow for extending attention beyond the standard soft-selection approach, such as attending to partial segmentations or to subtrees. We experiment with two different classes of structured attention networks: a linear-chain conditional random field and a graph-based parsing model, and describe how these models can be practically implemented as neural network layers. Experiments show that this approach is effective for incorporating structural biases, and structured attention networks outperform baseline attention models on a variety of synthetic and real tasks: tree transduction, neural machine translation, question answering, and natural language inference. We further find that models trained in this way learn interesting unsupervised hidden representations that generalize simple attention.
研究动机与目标
- 将结构偏差整合到注意力机制中以建模子序列和潜在解析结构。
- 开发基于线性链CRF和一阶图模型解析器的可微分结构化注意力层。
- 在多个人工智能任务的神经网络中展示这些层的端到端训练。
- 表明结构化注意力能带来更好性能并学习可解释的潜在结构。
提出的方法
- 将结构化注意力定义为一组潜在变量向量上的CRF,其团势来自神经网络。
- 通过CRF的边际期望来计算上下文,使用前向-后向(线性链CRF)或inside-outside 推理。
- 通过可微分的过程对推理进行反向传播,处理对数空间计算和梯度的带符号对数空间。
- 实例化两种基于CRF的注意力变体:线性链用于子序列分段,一阶图模型解析器用于潜在依赖结构。
- 将结构化注意力层作为神经网络模块应用,替代编码器-解码器和问答/自然语言推理管线中的标准softmax注意力。
实验结果
研究问题
- RQ1能否在深度网络中端到端训练CRF-base结构化注意力层来建模子序列分段和潜在树结构?
- RQ2CRF注意力变体在需要结构偏差的任务(如树形转换、带分段的机器翻译、问答和自然语言推理)上是否优于标准注意力?
- RQ3通过这些结构化层学习的边际概率是否能产生类似解析树或分段的可解释内部表征?
主要发现
| 深度 | 无注意力 | 简单 | 结构化 |
|---|---|---|---|
| 2 | 7.6 | 87.4 | 99.2 |
| 3 | 4.1 | 49.6 | 87.0 |
| 4 | 2.8 | 23.3 | 64.5 |
| 5 | 2.1 | 15.0 | 30.8 |
| 6 | 1.5 | 8.5 | 18.2 |
- 结构化注意力在合成树转换任务和带分段的神经机器翻译上优于基线注意力。
- 在机器翻译中,分段注意力(两状态线性链CRF)相较简单和sigmoid注意力提升BLEU分数,且结构化注意力展现最佳的平均结果。
- 在问答实验中,使用线性链CRF进行多事实推理,证明回答准确性和推理行为相对于Memory Networks具有竞争力或改进。
- 具语法(依存树)注意力的自然语言推理显示出强烈的内部结构和相对于标准注意力的改进的定性行为。
- 在结构化注意力下学习的内部表征揭示潜在结构偏置,如边界和树状模式,比简单注意力更显著。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。