Compositional Networks Enable Systematic Generalization for Grounded Language Understanding

Yen-Ling Kuo, Boris Katz, Andrei Barbu

Abstract

Systematic generalization remains a significant hurdle for deep learning models in grounded language understanding. We present a compositional network architecture that assembles specialized neural modules based on the linguistic structure of input commands. By restricting inter-module communication to shared attention maps and incorporating lexical semantics, the model achieves superior performance on the gSCAN benchmark, particularly in novel compositions and long-sequence generalization. This approach demonstrates that mirroring the inherent structure of language within the network topology is a powerful inductive bias for learning rules over memorizing patterns.

Introduction

A hallmark of human intelligence is the ability to understand and execute novel commands by composing familiar concepts. For instance, an individual who understands "red circle" and "blue square" can immediately identify a "red square" without explicit training. In contrast, conventional neural networks often "parrot" training data, failing when presented with novel attribute-object pairings. This failure of systematic generalization is a critical bottleneck for robotics and autonomous systems operating in dynamic environments where instructions may involve unseen combinations of known entities.

Methodology

The proposed architecture moves away from monolithic "black box" models in favor of a library of reusable neural modules. The execution pipeline consists of four primary stages:

  1. Linguistic Parsing: Input commands are processed by a linguistic parser to generate a hierarchical tree structure.
  2. Dynamic Assembly: Based on the resulting parse tree, corresponding Recurrent Neural Network (RNN) modules (e.g., modules for 'Push', 'small', 'cylinder') are instantiated and connected.
  3. Attention-Based Communication: Modules interact exclusively through 2D attention maps. This bottleneck forces the model to ground every linguistic token in the visual environment, as the 'small' module must learn to filter the spatial output of the 'cylinder' module.
  4. Lexical Semantics and Constraints: To incorporate prior knowledge, the model utilizes WordNet to identify antonyms (e.g., 'small' vs. 'large'). A negative Hausdorff distance loss is applied to ensure that the attention maps for such pairs are spatially distinct, preventing semantic confusion.
Overview of the compositional network architecture, showing how a parse tree guides the assembly of neural modules that communicate via attention maps.

Experimental Setup: The gSCAN Benchmark

The model was evaluated using the grounded SCAN (gSCAN) benchmark, a 2D grid-world environment. gSCAN is specifically designed to test systematic generalization through several challenging conditions:

  • Condition B (Novel Compositions): Testing on attribute-object pairs never seen during training (e.g., "yellow squares").
  • Condition D (Novel Directions): Requiring the agent to move toward a target in a direction that was never associated with that object type in the training set.
  • Condition I (Length Generalization): Evaluating the model's ability to execute paths significantly longer than those encountered during training.

Key Insights

A central finding of this work is that structure is a feature. By forcing the network's topology to reflect the logical structure of the command, the model learns compositional rules rather than surface-level correlations. Furthermore, the choice of parsing strategy significantly impacts performance.

Comparison of constituency, dependency, and semantic parse trees used to structure the compositional network.

As illustrated in Figure 3, the researchers compared constituency, dependency, and semantic parses. They found that semantic parsing—which captures the logical meaning of the instruction—yielded the most robust generalization. Logic remains more stable across varied grammatical constructions than syntactic structure.

Results and Discussion

The compositional approach significantly outperformed baseline sequence-to-sequence (Seq2Seq) models across the most difficult gSCAN conditions:

  • Novel Combinations: While baselines dropped to 24-55% accuracy on held-out pairs, the compositional model maintained approximately 95% accuracy when using semantic parsing.
  • Novel Directions: This condition typically results in 0% accuracy for standard models. The compositional model achieved 11.5%, representing a significant, albeit incomplete, step toward solving spatial generalization.
  • Length Generalization: Standard models failed completely (<1% accuracy) on longer sequences. The compositional model maintained over 50% accuracy, demonstrating superior structural stability.

Beyond performance metrics, the modular design provides inherent interpretability. By visualizing the attention maps of individual modules, researchers can verify if the model correctly identifies "small" objects or "cylinders" in the grid.

Conclusion and Future Work

Compositional networks offer a promising path toward robots that truly understand language. By grounding communication in spatial attention and mirroring linguistic hierarchy, these models achieve a level of systematic generalization previously unattainable. Future work will focus on reducing dependency on external parsers, improving performance on novel spatial orientations, and scaling the approach to complex 3D environments with high visual noise.

Summary updated

BibTeX
@inproceedings{kuo2021compositional,
  author = {Yen-Ling Kuo and Boris Katz and Andrei Barbu},
  title = {{Compositional Networks Enable Systematic Generalization for Grounded Language Understanding}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.findings-emnlp.21},
}
Figure