Attention-based Iterative Decomposition for Tensor Product Representation

Taewon Park, Inchul Choi, Minho Lee

Introduction

Deep learning models frequently struggle with systematic generalization—the capacity to understand novel combinations of known concepts. While humans can effortlessly interpret a "blue ball" after learning about "red balls" and "blue cubes," neural networks often fail this compositional test. A promising neuro-symbolic solution is the Tensor Product Representation (TPR), which explicitly separates structural "roles" from content "fillers." However, the effectiveness of TPR is often limited by the mechanism used to decompose raw input into these components.

This paper introduces Attention-based Iterative Decomposition (AID), a drop-in module designed to optimize how neural networks partition sequential data into structured symbolic representations. By employing a competitive attention mechanism, AID significantly enhances the reasoning capabilities of models like Linear Transformers and Fast Weight Memories.

The Decomposition Bottleneck

Existing TPR-based models typically rely on simple Multi-Layer Perceptrons (MLPs) to map raw input features to roles and fillers. The authors identify this as a critical bottleneck: simple MLPs often fail to capture underlying compositional logic, especially when encountering unseen data combinations. This "incomplete decomposition" results in a breakdown of the model's systematic reasoning. AID addresses this by replacing the standard MLP-based approach with a more robust, iterative slot-based attention process.

The AID Module

The AID module functions through several key innovations designed to ensure clean and orthogonal decomposition of input features.

The architecture of the AID module, illustrating the iterative competitive attention process and routing mechanism.
  1. Iterative Competitive Attention: Drawing inspiration from "Slot Attention," AID utilizes structural slots that compete to explain portions of the input. This competition forces the model to partition features more distinctly.
  2. Learnable Routing Mechanism: Unlike permutation-invariant slot mechanisms, AID employs a routing system that maps specific slots to designated TPR components (e.g., Slot 1 always corresponds to Role 1). This allows the resulting representations to be used directly in downstream mathematical operations.
  3. Conditional Initialization: Rather than starting with random noise, AID initializes slots based on context-dependent input features, promoting stable convergence relevant to the specific sequence.
  4. Model Agnosticism: AID is designed to be integrated into various architectures, including TPR-RNNs, Fast Weight Memories (FWM), and Linear Transformers.

Experimental Evaluation

The researchers evaluated AID across a diverse set of benchmarks to test its versatility and reasoning power:

  • Systematic Associative Recall (SAR): A benchmark measuring performance across varying levels of combinatorial complexity.
  • sys-bAbI: A modified version of the bAbI reasoning tasks where entity names are changed in the test set to prevent reliance on memorized patterns.
  • Sort-of-CLEVR: A visual relational reasoning task requiring the identification of object properties and relationships.
  • WikiText-103: A large-scale language modeling dataset used to assess scalability on real-world data.

Results and Discussion

AID demonstrates substantial improvements in generalization and reasoning accuracy across all tested benchmarks. On the sys-bAbI task, AID significantly reduced the "generalization gap"—the performance drop between familiar and unfamiliar data—for the FWM model from 2.06% to just 0.76%.

Accuracy comparison across different task complexities (p values) showing AID consistently outperforming DNC and FWM baselines.

In visual reasoning tasks like Sort-of-CLEVR, the addition of AID to a Linear Transformer boosted accuracy on "Unary" questions from 69.3% to 98.9%. Furthermore, on WikiText-103, AID improved the perplexity of both Linear Transformers and Delta Networks, indicating that structured decomposition is beneficial even for standard language modeling. Qualitative analysis via attention heatmaps confirms that AID successfully learns to focus or "reset" attention at sentence boundaries, maintaining clarity where baseline models often become "muddy" over long sequences.

Conclusion and Future Work

The core insight of this work is that the failure of symbolic neural networks often stems from the process of extracting structure rather than the symbolic representation itself. By enforcing competition and orthogonality, AID creates highly disentangled representations where individual factors (like "who" and "where") are clearly separated.

While AID introduces some computational overhead due to its iterative nature, its parallel operations help minimize this impact. Future research may explore AID within even larger transformer architectures and apply it to multi-modal tasks where structural decomposition remains a significant challenge.

Summary updated

BibTeX
@inproceedings{park2024attention,
  author = {Taewon Park and Inchul Choi and Minho Lee},
  title = {{Attention-based Iterative Decomposition for Tensor Product Representation}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=FDb2JQZsFH},
}
Figure