Enhanced LTSM for natural language inference
Python Shell
Switch branches/tags
Nothing to show
Clone or download
Latest commit e551c4b May 10, 2018
Failed to load latest commit information.
data Add files via upload Aug 10, 2017
scripts Add files via upload Aug 10, 2017
LICENSE Create LICENSE Nov 27, 2017
Readme.md Update Readme.md Aug 10, 2017


Enhanced LSTM for Natural Language Inference

Source code for "Enhanced LSTM for Natural Language Inference" runnable on GPU and CPU based on Theano. If you use this code as part of any published research, please acknowledge the following paper.

"Enhanced LSTM for Natural Language Inference" Qian Chen, Xiaodan Zhu, Zhenhua Ling, Si Wei, Hui Jiang, Diana Inkpen. ACL (2017)

  author    = {Chen, Qian and Zhu, Xiaodan and Ling, Zhenhua and Wei, Si and Jiang, Hui and Inkpen, Diana},
  title     = {Enhanced LSTM for Natural Language Inference},
  booktitle = {Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (ACL 2017)},
  month     = {July},
  year      = {2017},
  address   = {Vancouver},
  publisher = {ACL}

Homepage of the Qian Chen, http://home.ustc.edu.cn/~cq1231/

The code is modified from GitHub - nyu-dl/dl4mt-tutorial.

The code for tree-LSTM version has been released. Tree-LSTM part is modified from GitHub - dallascard/TreeLSTM, but support minibatches.


To run it perfectly, you will need:

  • Python 2.7
  • Theano 0.8.2

Running the Script

  1. Download and preprocess
cd data
bash fetch_and_preprocess.sh
  1. Train and test model for ESIM
cd scripts/ESIM/
bash train.sh
  1. Train and test model for TreeLSTM-IM
cd scripts/TreeLSTM-IM/
bash train.sh

The result is in log.txt file.