Skip to main content
QUICK REVIEW

[Paper Review] Compositional Generalization with Tree Stack Memory Units

Forough Arabshahi, Zhichu Lu|arXiv (Cornell University)|Nov 5, 2019
Topic ModelingComputer Science35 references5 citations
TL;DR

This paper proposes Tree Stack Memory Units (Tree-SMU), a recursive neural network architecture that enhances compositional generalization by integrating differentiable stack memory units into each node. By enabling soft push and pop operations that combine child node states and stacks, Tree-SMU captures long-range dependencies and preserves structural ordering, achieving state-of-the-art zero-shot generalization on mathematical reasoning benchmarks compared to Transformers and Tree-LSTMs.

ABSTRACT

We study compositional generalization, viz., the problem of zero-shot generalization to novel compositions of concepts in a domain. Standard neural networks fail to a large extent on compositional learning. We propose Tree Stack Memory Units (Tree-SMU) to enable strong compositional generalization. Tree-SMU is a recursive neural network with Stack Memory Units (\SMU s), a novel memory augmented neural network whose memory has a differentiable stack structure. Each SMU in the tree architecture learns to read from its stack and to write to it by combining the stacks and states of its children through gating. The stack helps capture long-range dependencies in the problem domain, thereby enabling compositional generalization. Additionally, the stack also preserves the ordering of each node's descendants, thereby retaining locality on the tree. We demonstrate strong empirical results on two mathematical reasoning benchmarks. We use four compositionality tests to assess the generalization performance of Tree-SMU and show that it enables accurate compositional generalization compared to strong baselines such as Transformers and Tree-LSTMs.

Motivation & Objective

  • To address the failure of standard neural networks in zero-shot compositional generalization, especially under distributional shifts.
  • To overcome error propagation and limited long-range dependency capture in recursive neural networks like Tree-LSTMs.
  • To design a memory-augmented recursive architecture that supports systematic generalization to novel compositions.
  • To evaluate generalization performance across multiple compositionality tests, including depth extrapolation and semantic equivalence.
  • To demonstrate that internal memory integration improves both zero-shot generalization and sample efficiency.

Proposed method

  • Tree-SMU is a recursive neural network where each node contains a Stack Memory Unit (SMU) with a differentiable stack structure.
  • Each SMU learns to read from and write to its stack using soft push and pop gates controlled by gating mechanisms.
  • The parent node's stack is formed by combining the stacks and hidden states of its children through a gating mechanism.
  • The soft push and pop operations allow the model to store and retrieve information from descendants, enabling indirect access to non-local dependencies.
  • The stack structure preserves the ordering of descendants, maintaining locality and supporting hierarchical composition.
  • The architecture integrates memory within the cell, avoiding the failure of external memory modules observed in prior work.

Experimental results

Research questions

  • RQ1Can a recursive neural network with internal stack memory achieve better zero-shot generalization on novel compositions than standard architectures?
  • RQ2Does the stack memory mechanism improve generalization to deeper or shallower compositions than seen during training?
  • RQ3Can the model learn semantically equivalent representations for structurally different but functionally identical expressions?
  • RQ4How does the integration of stack memory affect sample efficiency and error correction in recursive networks?
  • RQ5Does the proposed architecture outperform strong baselines like Transformers and Tree-LSTMs on compositional reasoning tasks?

Key findings

  • Tree-SMU achieved 98.86% accuracy on the test set for the Localism Test, significantly outperforming Tree-LSTM (91.58%) and Tree-RNN (85.36%).
  • On the Compositionality Test, Tree-SMU achieved 83.29% accuracy, surpassing Tree-LSTM (83.06%) and Tree-RNN (83.06%), with improved robustness to distributional shifts.
  • In the Depth Extrapolation Test, Tree-SMU achieved 79.57% accuracy, a notable improvement over Tree-LSTM (77.58%) and Tree-RNN (75.00%).
  • Tree-SMU demonstrated consistent performance across all four compositionality tests, showing strong zero-shot generalization capabilities.
  • The model showed improved sample efficiency, with training accuracy of 95.04% on the training set (depths 5–13), indicating better learning from limited data.
  • The ablation study confirmed that a trivial extension of stack-augmented RNNs to tree-structured networks fails, validating the necessity of the integrated SMU design.

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.