https://github.com/arianhosseini/question-answering
Exploration of various deep neural networks for Question Answering and Reading Comprehension
https://github.com/arianhosseini/question-answering
attention deep-neural-networks question-answering reading-comprehension seq2seq-model squad
Last synced: about 2 months ago
JSON representation
Exploration of various deep neural networks for Question Answering and Reading Comprehension
- Host: GitHub
- URL: https://github.com/arianhosseini/question-answering
- Owner: arianhosseini
- License: mit
- Created: 2016-10-05T16:46:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-22T20:58:44.000Z (over 8 years ago)
- Last Synced: 2025-02-27T02:23:12.570Z (2 months ago)
- Topics: attention, deep-neural-networks, question-answering, reading-comprehension, seq2seq-model, squad
- Language: Python
- Homepage:
- Size: 1 MB
- Stars: 21
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Question Answering and Reading Comprehension
=========================================This package contains code for the *Exploration of various deep neural networks for Question Answering.*
## Running and Implementation details
With different configs for different models in `config` directory, you will be able to train a model on the [SQuAD](https://rajpurkar.github.io/SQuAD-explorer/) dataset.
To train a model you should run `python train.py name_of_config` (no **.py** extension for config name). Before that you should get the SQuAD data and tokenize it using the `tokenize_data` function in `utils.py` file. This file also contains functions to create a vocabulary, compute length coverege, etc.
All the models are in the `model` directory, from the basic seq2seq model with attention to the [Match-LSTM](https://arxiv.org/abs/1608.07905) model with pointer networks.
[Fuel](http://fuel.readthedocs.io/en/latest/) is being used for the data pipeline. `Iterator` and `Dataset` classes for SQuAD and CNN/DailyMotion datasets are available in `data.py` as well as a Toy Dataset for debugging purposes.
*Evaluation extensions* for models in `lmu_extensions.py` are implemented to be used with Blocks' *extensions*.
For seq2seq models average recall, average precision, macro F1, average F1 and exact match accuracies are reported.## Some cool heatmaps of the Match-LSTM model
The heatmap shows the **attention paid** to each token of the **question** at each step of encoding the **paragraph**.

## Accumulated Answer Length Coverge
As you can see the SQuAD dataset contains some answers with high lengths which will evidently make sequence to sequence solutions challenging for this task.
(hotizontal axis is the length and vertical axis is the acc coverage)
## Acknowledgments
We would like to thank the developers of Theano, Blocks and Fuel at MILA for their excellent work.