Directional Self-Attention Network

Cite this paper using BibTex:

@inproceedings{shen2018disan,
Author = {Shen, Tao and Zhou, Tianyi and Long, Guodong and Jiang, Jing and Pan, Shirui and Zhang, Chengqi},
Booktitle = {AAAI Conference on Artificial Intelligence},
Title = {DISAN: Directional self-attention network for rnn/cnn-free language understanding},
Year = {2018}
}

Overall Requirements

Python Packages:


This repo includes three part as follows:

  1. Directionnal Self-Attention Network independent file -> file disan.py
  2. DiSAN implementation for Stanford Natural Language Inference -> dir SNLI_disan
  3. DiSAN implementation for Stanford Sentiment Classification -> dir SST_disan

The Usage of disan.py will be introduced below, and as for the implementation of SNLI and SST, please enter corresponding folder for further introduction.

And, Code for the other experiments (e.g. SICK, MPQA, CR etc.) appeared in the paper is under preparation.


Usage of disan.py

Parameters:

Output:

2D tensorflow dense float tensor, which shape is [batch_size, dim] as the encoding result for each sentence.


Acknowledgements