Skip to main content
QUICK REVIEW

[论文解读] A Structured Self-attentive Sentence Embedding

Zhouhan Lin, Minwei Feng|arXiv (Cornell University)|Mar 9, 2017
Topic Modeling被引用 1,463
一句话总结

论文提出了一种自注意力的二维矩阵句子嵌入,通过结构化注意力机制对句子多个部分进行关注,从而实现可视化并在作者画像、情感分析和文本蕴含等任务上提升性能。

ABSTRACT

This paper proposes a new model for extracting an interpretable sentence embedding by introducing self-attention. Instead of using a vector, we use a 2-D matrix to represent the embedding, with each row of the matrix attending on a different part of the sentence. We also propose a self-attention mechanism and a special regularization term for the model. As a side effect, the embedding comes with an easy way of visualizing what specific parts of the sentence are encoded into the embedding. We evaluate our model on 3 different tasks: author profiling, sentiment classification, and textual entailment. Results show that our model yields a significant performance gain compared to other sentence embedding methods in all of the 3 tasks.

研究动机与目标

  • 使用实现为二维矩阵的自注意力来开发可解释的句子嵌入。
  • 使能多次注意力跃迁以捕捉句子不同的语义方面。
  • 提供正则化项以降低注意力跃迁之间的冗余并提高可解释性。
  • 在作者画像、情感分析和文本蕴含任务上演示该方法。
  • 提供可视化技术以解释哪些句子部分有助于嵌入。

提出的方法

  • 双向LSTM为每个标记产生隐藏状态。
  • 通过两层MLP(对跃迁进行softmax)来计算一组注意力权重向量,从而形成注释矩阵A。
  • 构造一个固定大小的嵌入 M = AH,其中 H 是LSTM隐藏状态序列,A 编码 r 个注意力跃迁。
  • 在嵌入中扩展到多跳(r 行),以捕获多样的语义层面。
  • 引入惩罚项 P = ||AA^T - I||_F^2 以促进注意力跃迁之间的多样性和聚焦。
  • 可选地逐跳可视化和聚合注意力以解释哪些词汇影响嵌入。

实验结果

研究问题

  • RQ1自注意力的、基于矩阵的句子嵌入是否能在多样的NLP任务上优于传统向量嵌入?
  • RQ2鼓励多样性的惩罚是否提升可解释性和模型性能?
  • RQ3多跳注意力(变化的 r)如何影响随句子长度增加的任务的性能?
  • RQ4模型是否能提供与人类对句子语义解释一致的直观可视化?

主要发现

模型YelpAge
Our Model64.21%80.45%
BiLSTM + Max Pooling + MLP61.99%77.40%
CNN + Max Pooling + MLP62.05%78.15%
  • 在 Yelp 情感分类上,所提模型达到 64.21% 的准确率,优于 61.99%(BiLSTM+Max)和 62.05%(CNN+Max)。
  • 在 Age 作者画像任务上,模型达到 80.45% 的准确率,优于 77.40%(BiLSTM+Max)和 78.15%(CNN+Max)。
  • 惩罚项提升了 Yelp 和 Age 的性能,在惩罚为 1.0 时的结果为 64.21% 和 80.45%,而惩罚为 0.0 时分别为 61.74% 和 79.27%。
  • 在 SNLI 上,所提出的方法获得具有竞争力的结果(84.4% 测试准确率),与其他基于句子嵌入的模型相比,通常接近最先进的方法。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。