[Paper Review] Working Memory Networks: Augmenting Memory Networks with a Relational Reasoning Module
This paper proposes the Working Memory Network (W-MemNN), a memory network architecture that integrates a relational reasoning module from Relation Networks (RNs) into a hierarchical attention mechanism, reducing computational complexity from O(n²) to O(n) while preserving relational reasoning performance. The model achieves a new state-of-the-art on the jointly trained bAbI-10k benchmark with a mean error below 0.5%, and a simple two-model ensemble solves all 20 tasks.
During the last years, there has been a lot of interest in achieving some kind of complex reasoning using deep neural networks. To do that, models like Memory Networks (MemNNs) have combined external memory storages and attention mechanisms. These architectures, however, lack of more complex reasoning mechanisms that could allow, for instance, relational reasoning. Relation Networks (RNs), on the other hand, have shown outstanding results in relational reasoning tasks. Unfortunately, their computational cost grows quadratically with the number of memories, something prohibitive for larger problems. To solve these issues, we introduce the Working Memory Network, a MemNN architecture with a novel working memory storage and reasoning module. Our model retains the relational reasoning abilities of the RN while reducing its computational complexity from quadratic to linear. We tested our model on the text QA dataset bAbI and the visual QA dataset NLVR. In the jointly trained bAbI-10k, we set a new state-of-the-art, achieving a mean error of less than 0.5%. Moreover, a simple ensemble of two of our models solves all 20 tasks in the joint version of the benchmark.
Motivation & Objective
- To address the lack of complex relational reasoning in standard Memory Networks (MemNNs), which are limited to attention-based retrieval without deeper inference.
- To overcome the quadratic computational cost of Relation Networks (RNs), which scales poorly with increasing memory size.
- To integrate relational reasoning into a memory network framework while maintaining efficiency and interpretability through attention mechanisms.
- To enable end-to-end learning from raw input statements without reliance on external NLP tools, particularly for visual question answering.
- To demonstrate that a hybrid architecture combining memory networks and relational reasoning can achieve state-of-the-art performance on complex reasoning benchmarks.
Proposed method
- The model uses a GRU-based input module to encode textual or visual inputs into vector representations stored in a short-term memory storage.
- An attentional controller performs multiple hops, attending to relevant memory vectors and updating a compact working memory buffer at each step.
- A relational reasoning module processes the contents of the working memory buffer, enabling inference over relationships between entities in a linear-time fashion.
- The attention mechanism filters irrelevant information, reducing the number of relational computations and enabling scalable reasoning.
- For visual QA, an additive attention mechanism computes attention weights by feeding the concatenation of memory and statement vectors into a feed-forward network.
- The architecture is trained end-to-end with a cross-entropy loss, and inference is performed through iterative attention and reasoning steps across multiple hops.
Experimental results
Research questions
- RQ1Can a memory network architecture be enhanced with relational reasoning to solve complex reasoning tasks without incurring quadratic computational costs?
- RQ2How does the integration of a relational reasoning module affect performance on multi-hop reasoning benchmarks like bAbI?
- RQ3To what extent can the proposed model achieve state-of-the-art results on jointly trained bAbI-10k without task-specific fine-tuning?
- RQ4Can the model perform visual question answering using only raw input statements, without structured linguistic preprocessing?
- RQ5Does the proposed architecture maintain interpretability through attention weights while enabling scalable relational reasoning?
Key findings
- The W-MemNN achieved a mean error of less than 0.5% on the jointly trained bAbI-10k benchmark, setting a new state-of-the-art.
- A simple ensemble of two W-MemNN models solved all 20 tasks in the joint bAbI-10k benchmark, demonstrating robust generalization.
- The model achieved performance comparable to Module Neural Networks on the NLVR visual QA dataset, but without requiring external NLP tools for input processing.
- Wall-clock time measurements showed a 20× speedup for W-MemNN over standard RNs when processing 30 memories, reducing time from 930s to 50s for a single batch.
- Qualitative analysis confirmed that the relational reasoning module is crucial for tasks requiring relational inference, as attention weights highlight relevant memory interactions.
- The computational complexity of the reasoning module scales linearly with the number of memories, unlike the quadratic scaling of standard RNs, making it viable for larger-scale problems.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.