CommNet model for bAbI tasks

December 6, 2016 ยท View on GitHub

This code is for training CommNet model on toy Q&A dataset bAbI, where one has to answer to a simple question after reading a short story. The model solves this problem by assigning each sentence of the story to separate agents, and let them communicate. After several steps of communication, agents produce a single answer. For more details, see our paper.

Usage

The code is written in Matlab. After downloading the code, go to the code directory and type run in Matlab. This will start training on the first task. To train on different task, change task variable in file run.m. The data directory contains older 10k version of tasks, but the latest version can be downloaded from here.

You can change model settings in config_babi.m. With the default configuration, we obtained the following result, which included in the paper.

TaskTest error (%)
1: 1 supporting fact0.00
2: 2 supporting facts3.23
3: 3 supporting facts68.35
4: 2 argument relations0.00
5: 3 argument relations1.71
6: yes/no questions0.00
7: counting0.60
8: lists/sets0.50
9: simple negation0.00
10: indefinite knowledge0.00
11: basic coherence0.00
12: conjunction0.00
13: compound coherence0.00
14: time reasoning0.00
15: basic deduction0.00
16: basic induction51.31
17: positional reasoning15.12
18: size reasoning1.41
19: path finding0.00
20: agent's motivation0.00
Mean7.11
failed tasks3