All Projects → vanzytay → Emnlp2018_nli

vanzytay / Emnlp2018_nli

Licence: gpl-3.0
Repository for NLI models (EMNLP 2018)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Emnlp2018 nli

Coarij
Corpus of Annual Reports in Japan
Stars: ✭ 55 (-11.29%)
Mutual labels:  natural-language-processing
Comet
A Neural Framework for MT Evaluation
Stars: ✭ 58 (-6.45%)
Mutual labels:  natural-language-processing
Textblob Ar
Arabic support for textblob
Stars: ✭ 60 (-3.23%)
Mutual labels:  natural-language-processing
Research papers
Record some papers I have read and paper notes I have taken, also including some awesome papers reading lists and academic blog posts.
Stars: ✭ 55 (-11.29%)
Mutual labels:  natural-language-processing
Joint Lstm Parser
Transition-based joint syntactic dependency parser and semantic role labeler using a stack LSTM RNN architecture.
Stars: ✭ 57 (-8.06%)
Mutual labels:  natural-language-processing
Char Rnn Tensorflow
Multi-layer Recurrent Neural Networks for character-level language models implements by TensorFlow
Stars: ✭ 58 (-6.45%)
Mutual labels:  natural-language-processing
Emotion Detector
A python code to detect emotions from text
Stars: ✭ 54 (-12.9%)
Mutual labels:  natural-language-processing
How To Mine Newsfeed Data And Extract Interactive Insights In Python
A practical guide to topic mining and interactive visualizations
Stars: ✭ 61 (-1.61%)
Mutual labels:  natural-language-processing
Mindspore Nlp Tutorial
Natural Language Processing Tutorial for MindSpore Users
Stars: ✭ 58 (-6.45%)
Mutual labels:  natural-language-processing
Bidaf Keras
Bidirectional Attention Flow for Machine Comprehension implemented in Keras 2
Stars: ✭ 60 (-3.23%)
Mutual labels:  natural-language-processing
Hmtl
🌊HMTL: Hierarchical Multi-Task Learning - A State-of-the-Art neural network model for several NLP tasks based on PyTorch and AllenNLP
Stars: ✭ 1,084 (+1648.39%)
Mutual labels:  natural-language-processing
Li emnlp 2017
Deep Recurrent Generative Decoder for Abstractive Text Summarization in DyNet
Stars: ✭ 56 (-9.68%)
Mutual labels:  natural-language-processing
Nlg Rl
Accelerated Reinforcement Learning for Sentence Generation by Vocabulary Prediction
Stars: ✭ 59 (-4.84%)
Mutual labels:  natural-language-processing
Demos
Some JavaScript works published as demos, mostly ML or DS
Stars: ✭ 55 (-11.29%)
Mutual labels:  natural-language-processing
Language Models
Build unigram and bigram language models, implement Laplace smoothing and use the models to compute the perplexity of test corpora.
Stars: ✭ 59 (-4.84%)
Mutual labels:  natural-language-processing
Vietnamese Electra
Electra pre-trained model using Vietnamese corpus
Stars: ✭ 55 (-11.29%)
Mutual labels:  natural-language-processing
Teapot Nlp
Tool for Evaluating Adversarial Perturbations on Text
Stars: ✭ 58 (-6.45%)
Mutual labels:  natural-language-processing
Slate
A Super-Lightweight Annotation Tool for Experts: Label text in a terminal with just Python
Stars: ✭ 61 (-1.61%)
Mutual labels:  natural-language-processing
Fromscratch
Stars: ✭ 61 (-1.61%)
Mutual labels:  natural-language-processing
Botsharp
The Open Source AI Chatbot Platform Builder in 100% C# Running in .NET Core with Machine Learning algorithm.
Stars: ✭ 1,103 (+1679.03%)
Mutual labels:  natural-language-processing

NLI models (EMNLP 2018)

This repository contains the TensorFlow Implementation of:

  1. "Compare, Compress and Propagate: Enhancing Neural Architectures with Alignment Factorization for Natural Language Inference" (EMNLP 2018)
  2. "Co-Stack Residual Affinity Networks with Multi-level Attention Refinement for Matching Text Sequences" (EMNLP 2018)

This repository implements and supports:

  1. CAFE model and CSRAN (EMNLP'18)
  2. CAFE + ELMo model (88.7-89.0) / CSRAN + ELMo model (88.9-89.0)
  3. Using ELMo and CoVe (McCann et al.) in NLI models.
  4. Using CuDNN versions of CoveLSTM and also BiLSTMs. (much faster)

For CAFE, you should be able to get 88.1-88.3 score easily on SNLI. (88.5 was the best we obtained). CSRAN can be thought of a better version of CAFE (since it's multi-level CAFE plus residual attention), the best score obtained was 88.65 (i.e., 88.7 reported in the paper) on SNLI. To give a better idea of the training process, the exact log file can be found at saved_logs/csran.txt. With ELMo only at the embedding layer, CSRAN gets about 88.9-89.0 and CAFE gets about 88.8-89.0. We did not tune the ELMo models much (only 1-2 runs max and only after paper acceptance, so it probably can get higher performance if we tune some HPs).

Setup

We provide a preprocessed SNLI file that works nicely with our input format. We host it on dropbox for your convenience.

bash ./setup/setup_snli.sh

We use POS embeddings, Char Embeddings and EM features. You can also use setup_mnli.sh and setup_scitail to download pre-processed versions of the other NLI datasets.

Running the code

An example run to train our CSRAN model can be found:

python train_acc.py --rnn_type SOFT_HP_CHAR_CAFE_RESFM_HIGH_LSTM --char_enc RNN --char_max 16 --use_cudnn 1 --batch-size 128 --gpu 0 --opt Adam --lr 1E-3 --epochs 100 --early_stop 0 --num_dense 2 --dataset SNLI --decay_lr 0.96 --decay_epoch 10 --l2_reg 1E-8 --cnn_size 64 --translate_proj 1 --num_proj 1 --rnn_size 200 --hdim 300 --rnn_layers 3 --sort_batch 1 --use_pos 1 --pos_emb_size 10 --clip_norm 5 --aggr_layers 2

For CAFE, please switch --rnn_type SOFT_HP_CHAR_FF2_MM_LSTM.

Using ELMo and CoVE

For CoVe please use dl_cove.sh. For ELMo, you need Tensorflow Hub. We ported CoVe into CuDNN LSTMs for faster speed

Some random (possibly helpful) notes

  1. The original naming of CAFE was FF2 (FactorFlow) and also RESFM was the code for CSRAN. It might be helpful if you're looking at the model code.
  2. Even though both models have been accepted in EMNLP'18, experiments for CAFE was conducted in Nov 2017 and CSRAN was conducted around April 2018. (This is relevant if we want to consider for different TF versions.) CAFE was tested using non-cudnn LSTM while CSRAN mainly used CuDNN LSTMs.

References

If you find our repository useful, please consider citing our work! Thanks!

@inproceedings{emnlp2018,
  author    = {Yi Tay and
               Luu Anh Tuan and
               Siu Cheung Hui},
  title     = {Compare, Compress and Propagate: Enhancing Neural Architectures with Alignment Factorization for Natural Language Inference},
  booktitle = {Proceedings of EMNLP 2018},
  year      = {2018}
}

@inproceedings{emnlp2018,
  author    = {Yi Tay and
               Luu Anh Tuan and
               Siu Cheung Hui},
  title     = {Co-Stack Residual Affinity Networks with Multi-level Attention Refinement for Matching Text Sequences},
  booktitle = {Proceedings of EMNLP 2018},
  year      = {2018}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].