Example: Task with single supporting fact
John is in the kitchen. Bob is in the gardeb.
Where is John?
kitchen (one with max. probability)
- Neural Network model with external memory.
- Reads the memory with soft attention.
- It accesses memory multiple times; each step being called a hop.
- Uses back propagation to update the model.
The tasks in babi/tasks
correspond to those from the original dataset as
follows:
Task | Class name |
---|---|
1 Basic factoid QA with single supporting fact | WhereIsActor |
2 Factoid QA with two supporting facts | WhereIsObject |
3 Factoid QA with three supporting facts | WhereWasObject |
4 Two argument relations: subject vs. object | IsDir |
5 Three argument relations | WhoWhatGave |
6 Yes/No questions | IsActorThere |
7 Counting | Counting |
8 Lists/Sets | Listing |
9 Simple Negation | Negatio |
10 Indefinite Knowledge | Indefinite |
11 Basic coreference | BasicCoreference |
12 Conjunction | Conjunction |
13 Compound coreference | CompoundCoreference |
14 Time manipulation | Time |
15 Basic deduction | Deduction |
16 Basic induction | Induction |
17 Positional reasoning | PositionalReasoning |
18 Reasoning about size | Size |
19 Path finding | PathFinding |
20 Reasoning about agent's motivation | Motivations |
-
Python 3 and above
-
Numpy, Flask, TensorFlow (only for web-based demo) can be installed via pip:
-
bAbI dataset should be downloaded to
data/tasks_1-20_v1-2
:
$ wget -qO- http://www.thespermwhale.com/jaseweston/babi/tasks_1-20_v1-2.tar.gz | tar xvz -C data
docker pull tushargl016/cognitivefinalproject
docker run -p 80:8000 -d -ti tushargl016/cognitivefinalproject
- Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, Rob Fergus, "End-To-End Memory Networks", arXiv:1503.08895 [cs.NE].