All Projects → junfenglx → reasoning_attention

junfenglx / reasoning_attention

Licence: other
Unofficial implementation algorithms of attention models on SNLI dataset

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects
shell
77523 projects

Projects that are alternatives of or similar to reasoning attention

learningspoons
nlp lecture-notes and source code
Stars: ✭ 29 (-14.71%)
Mutual labels:  attention, attention-model
Structured Self Attention
A Structured Self-attentive Sentence Embedding
Stars: ✭ 459 (+1250%)
Mutual labels:  attention, attention-model
Image Caption Generator
A neural network to generate captions for an image using CNN and RNN with BEAM Search.
Stars: ✭ 126 (+270.59%)
Mutual labels:  attention, attention-model
Snn toolbox
Toolbox for converting analog to spiking neural networks (ANN to SNN), and running them in a spiking neuron simulator.
Stars: ✭ 187 (+450%)
Mutual labels:  lasagne
MGAN
Exploiting Coarse-to-Fine Task Transfer for Aspect-level Sentiment Classification (AAAI'19)
Stars: ✭ 44 (+29.41%)
Mutual labels:  attention
pytorch-attention-augmented-convolution
A pytorch implementation of https://arxiv.org/abs/1904.09925
Stars: ✭ 20 (-41.18%)
Mutual labels:  attention
bert attn viz
Visualize BERT's self-attention layers on text classification tasks
Stars: ✭ 41 (+20.59%)
Mutual labels:  attention
Ganotebooks
wgan, wgan2(improved, gp), infogan, and dcgan implementation in lasagne, keras, pytorch
Stars: ✭ 1,446 (+4152.94%)
Mutual labels:  lasagne
AiR
Official Repository for ECCV 2020 paper "AiR: Attention with Reasoning Capability"
Stars: ✭ 41 (+20.59%)
Mutual labels:  attention
chinese ancient poetry
seq2seq attention tensorflow textrank context
Stars: ✭ 30 (-11.76%)
Mutual labels:  attention
attention-ocr
A pytorch implementation of the attention based ocr
Stars: ✭ 44 (+29.41%)
Mutual labels:  attention
lstm-attention
Attention-based bidirectional LSTM for Classification Task (ICASSP)
Stars: ✭ 87 (+155.88%)
Mutual labels:  attention
swin-transformer-pytorch
Implementation of the Swin Transformer in PyTorch.
Stars: ✭ 610 (+1694.12%)
Mutual labels:  attention-model
Alphazero gomoku
An implementation of the AlphaZero algorithm for Gomoku (also called Gobang or Five in a Row)
Stars: ✭ 2,570 (+7458.82%)
Mutual labels:  lasagne
bisemantic
Text pair classification
Stars: ✭ 12 (-64.71%)
Mutual labels:  snli
Psgan
Periodic Spatial Generative Adversarial Networks
Stars: ✭ 108 (+217.65%)
Mutual labels:  lasagne
keras-utility-layer-collection
Collection of custom layers and utility functions for Keras which are missing in the main framework.
Stars: ✭ 63 (+85.29%)
Mutual labels:  attention
how attentive are gats
Code for the paper "How Attentive are Graph Attention Networks?" (ICLR'2022)
Stars: ✭ 200 (+488.24%)
Mutual labels:  attention
dreyeve
[TPAMI 2018] Predicting the Driver’s Focus of Attention: the DR(eye)VE Project. A deep neural network learnt to reproduce the human driver focus of attention (FoA) in a variety of real-world driving scenarios.
Stars: ✭ 88 (+158.82%)
Mutual labels:  attention
Im2LaTeX
An implementation of the Show, Attend and Tell paper in Tensorflow, for the OpenAI Im2LaTeX suggested problem
Stars: ✭ 16 (-52.94%)
Mutual labels:  attention

Attention on SNLI

Unofficial implementation algorithms of attention models on SNLI dataset.

Current include papers:

  1. "Reasoning About Entailment With Neural Attention", arXiv:1509.06664
  2. "Learning Natural Language Inference with LSTM", arXiv:1512.08849

Based on Lasagne.

Requirements

  • Cuda 8(Theano can run with)
  • Python 3
  • Lasagne
  • some others(best install Anaconda)

Run

At source root dir

First extracts preprocessed SNLI data ./extract_data.sh

Then run: python3 ./snli_reasoning_attention.py [condition|attention|word_by_word]

Or run: python3 ./snli_match_lstm.py

Results

The learning curve of word by word attention(best test acc is at epoch 41):

Epoch: 1-20

wordbyword_attention

Epoch: 20-39

wordbyword_attention20_39

Epoch: 40-59

wordbyword_attention40_59

The learning curve of match LSTM with word embedding: mlstm_word2vec_embedding

Notes

About word by word attention:

  1. The test acc of word by word attention is 0.2% smaller than the original paper, 83.29% (41 epochs)
  2. every 20 epochs, we reduce learning_rate, see log files for detail info.

About match LSTM:

  1. The test acc of match LSTM is 1% smaller than the original paper.
  2. not decay learning rate when train
  3. using Word2Vec pre-trained model
  4. tune OOV words in train dataset, like in Reasoning Attention

[3]:

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].