Skip to main content
QUICK REVIEW

[Paper Review] Hierarchical Memory Networks

Sarath Chandar, Sungjin Ahn|arXiv (Cornell University)|May 24, 2016
Topic ModelingComputer Science22 references49 citations
TL;DR

This paper proposes Hierarchical Memory Networks (HMNs) that use K-Maximum Inner Product Search (K-MIPS) to enable scalable, differentiable attention over large external memories in question-answering tasks. By organizing memory hierarchically and leveraging approximate K-MIPS algorithms, HMNs achieve faster training and inference than full softmax attention while maintaining higher accuracy than hard attention, with 62.2% accuracy on SimpleQuestions using only 1,290 average memory accesses per query.

ABSTRACT

Memory networks are neural networks with an explicit memory component that can be both read and written to by the network. The memory is often addressed in a soft way using a softmax function, making end-to-end training with backpropagation possible. However, this is not computationally scalable for applications which require the network to read from extremely large memories. On the other hand, it is well known that hard attention mechanisms based on reinforcement learning are challenging to train successfully. In this paper, we explore a form of hierarchical memory network, which can be considered as a hybrid between hard and soft attention memory networks. The memory is organized in a hierarchical structure such that reading from it is done with less computation than soft attention over a flat memory, while also being easier to train than hard attention over a flat memory. Specifically, we propose to incorporate Maximum Inner Product Search (MIPS) in the training and inference procedures for our hierarchical memory network. We explore the use of various state-of-the art approximate MIPS techniques and report results on SimpleQuestions, a challenging large scale factoid question answering task.

Motivation & Objective

  • To address the scalability limitations of soft attention in large-memory neural networks, which scale linearly with memory size.
  • To overcome the training instability and high variance of hard attention mechanisms based on reinforcement learning.
  • To develop a hybrid attention mechanism that combines the differentiability of soft attention with the efficiency of hard attention.
  • To enable end-to-end training of memory networks on large-scale factoid question-answering tasks without relying on dataset-specific heuristics.
  • To evaluate the effectiveness of approximate K-MIPS techniques in maintaining performance while significantly reducing computational cost.

Proposed method

  • The model organizes the external memory in a hierarchical structure to reduce the search space for attention mechanisms.
  • It employs K-MIPS as the core retrieval mechanism, where the top-K memory vectors with highest inner product to the query are selected.
  • The K-MIPS operation is integrated into a differentiable attention module, enabling end-to-end backpropagation through the reader and writer components.
  • Approximate K-MIPS algorithms—such as clustering, WTA-Hash, and PCA-Tree—are used to accelerate inference and training while maintaining performance.
  • The authors introduce three strategies—Top-K, Sample-K, and Rand-block—to reduce approximation bias in clustering-based K-MIPS.
  • Hyperparameters are tuned to ensure comparable speedup across methods, enabling fair comparison of accuracy and convergence.

Experimental results

Research questions

  • RQ1Can K-MIPS attention be effectively used in a differentiable, end-to-end trainable memory network for large-scale knowledge-based reasoning?
  • RQ2How does the performance of approximate K-MIPS methods compare to full softmax attention in terms of accuracy and training efficiency?
  • RQ3Which combination of K-MIPS approximation strategies (e.g., Top-K, Sample-K) minimizes approximation bias while maintaining computational speedup?
  • RQ4Does the hierarchical memory structure enable faster convergence and better generalization than flat memory architectures?
  • RQ5Can the proposed method outperform heuristic-based filtering methods used in prior work on large-scale question-answering tasks?

Key findings

  • The exact K-MIPS attention mechanism achieved 62.2% accuracy on the SimpleQuestions test set, outperforming full softmax (59.5%) while using only 1,290 average memory accesses per query.
  • The clustering-based K-MIPS method provided the best trade-off between speed and accuracy, significantly outperforming WTA-Hash (40.2%) and PCA-Tree (32.4%) on the same benchmark.
  • Combining Top-K and Sample-K strategies reduced approximation bias and improved performance to 53.1% accuracy with 2,000 clusters, compared to 50.2% when Sample-K was omitted.
  • The model converged faster with K-MIPS than with full softmax, indicating that the reduced search space does not hinder learning and may even improve optimization stability.
  • The Rand-block strategy did not improve performance and was found to be ineffective, suggesting that random block sampling does not help reduce bias in clustering-based K-MIPS.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.