End-To-End Memory Networks — Talks, Press, and Discussion
Press & Blog Coverage
-
End-To-End Memory Networks, arXiv. The paper (NIPS 2015 version, arXiv 1503.08895).
-
Memory Networks, Weston, Chopra and Bordes (2014). The original Memory Network, which needed supporting-fact labels.
-
Towards AI-Complete Question Answering: A Set of Prerequisite Toy Tasks, Weston et al. (2015). The 20 bAbI tasks used in the paper’s main experiments.
-
Key-Value Memory Networks for Directly Reading Documents, Miller et al. (2016). Separates the keys used for attention from the values that are read.
-
Attention Is All You Need, Vaswani et al. (2017). Cites end-to-end memory networks among earlier attention-based models.
Q&A (answers from the paper)
Q1: How does it differ from the original Memory Network? It is “trained end-to-end, and hence requires significantly less supervision during training” (Abstract): attention over the memories is a softmax, so gradients reach every memory and the supporting sentences do not need labels.
Q2: What happens in one hop? The question embedding u is compared with every memory key, p_i = softmax(uᵀ m_i); the output o = Σ_i p_i c_i is a weighted sum of the memory values, and the next hop uses u + o (Section 2.1, Eqs. 1–4).
Q3: Do more hops help? Yes. With position encoding, linear start and joint training on bAbI 1k, the mean error was 25.8% with 1 hop, 15.6% with 2 and 13.3% with 3 (Table 1). In language modelling, “increasing the number of memory hops improves performance” (Table 2).
Q4: What are position encoding and temporal encoding? Position encoding weights each word’s embedding by its position in the sentence, so word order affects the memory; it gave “clear improvements on tasks 4, 5, 15 and 18, where word ordering is particularly important”. Temporal encoding adds a learned vector T_A(i) for how far back sentence i is (Sections 4.1 and 4).
Q5: What is linear start? Training starts with the softmax in each memory layer removed, at learning rate 0.005; when the validation loss stops decreasing the softmax is re-inserted. It “seems to help avoid local minima”: on task 16, LS reduced the error to 1.6% (Sections 4.2 and 4).
Q6: How close does it get to the supervised Memory Network? On bAbI 1k the best MemN2N had a mean error of 12.4% against 6.7% for the Memory Network trained with supporting facts; on 10k, 6.6% against 3.2% (Table 1). On Penn Treebank a 7-hop model with 200 memories reached test perplexity 111, against 115 for an LSTM (Table 2).
Common Misconceptions
-
“It needs to know which sentences matter.” It does not; only question-answer pairs are used. The supporting facts in Figure 2 are shown for illustration and are not used in training.
-
“It matches the supervised Memory Network.” It comes close but not all the way: 12.4% vs 6.7% mean error on bAbI 1k (Table 1).
-
“One attention step is enough.” In Table 1 one hop is clearly worse than two or three.
Real Citations
- Sukhbaatar, S., Szlam, A., Weston, J., Fergus, R. (2015). “End-To-End Memory Networks.” NIPS 2015. arXiv:1503.08895.
- Weston, J., Chopra, S., Bordes, A. (2015). “Memory Networks.” ICLR 2015. arXiv:1410.3916.
- Weston, J. et al. (2015). “Towards AI-Complete Question Answering: A Set of Prerequisite Toy Tasks.” arXiv:1502.05698.
- Miller, A. et al. (2016). “Key-Value Memory Networks for Directly Reading Documents.” arXiv:1606.03126.
- Vaswani, A. et al. (2017). “Attention Is All You Need.” NIPS 2017. arXiv:1706.03762.