A Structured Self-attentive Sentence Embedding

Zhouhan Lin, Minwei Feng, Cicero Nogueira dos Santos, Mo Yu, Bing Xiang +2 more
3/9/2017
2,361 citations
cs.CLcs.AIcs.LG
transformer-attention

No official code found. Best implementation: kaushalshetty/Structured-Self-Attention (493 stars). 4 more below.

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(5)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
kaushalshetty/Structured-Self-AttentionCommunity493–––
ExplorerFreda/Structured-Self-Attentive-Sentence-EmbeddingCommunity433–––
flrngel/Self-Attentive-tensorflowCommunity192–––
yufengm/SelfAttentiveCommunity108–––
roomylee/self-attentive-emb-tfCommunity88–––

A Structured Self-attentive Sentence Embedding

493101

An open-source implementation of the paper ``A Structured Self-Attentive Sentence Embedding'' (Lin et al., ICLR 2017).

43395

Tensorflow implementation of "A Structured Self-Attentive Sentence Embedding"

19237

Implementation of A Structured Self-attentive Sentence Embedding

10826

Simple Tensorflow Implementation of "A Structured Self-attentive Sentence Embedding" (ICLR 2017)

8832

Similar Papers

Cite this paper

@article{lin2017structured,
  title  = {A Structured Self-attentive Sentence Embedding},
  author = {Zhouhan Lin and Minwei Feng and Cicero Nogueira dos Santos and Mo Yu and Bing Xiang and Bowen Zhou and Yoshua Bengio},
  year   = {2017},
  eprint = {1703.03130},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1703.03130}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1703.03130.svg)](https://codeofpaper.com/paper/1703.03130)

Discussion