Learning to Assemble Neural Module Tree Networks for Visual Grounding

Daqing Liu, Hanwang Zhang, Feng Wu, Zheng-Jun Zha

TL;DR

Neural Module Tree (NMTREE) is a novel framework for visual grounding that moves away from treating sentences as monolithic vectors. By mirroring the sentence's dependency parsing tree with a hierarchy of neural modules, NMTREE performs fine-grained, step-by-step reasoning that is both state-of-the-art in accuracy and inherently explainable to humans.

What Problem Does This Paper Address?

Visual grounding—the task of localizing an object in an image based on a natural language description—is deceptively difficult. While humans naturally decompose a complex phrase like "a pink umbrella carried by a girl in pink boots" into a sequence of logical steps (find boots $\rightarrow$ find girl $\rightarrow$ find umbrella), most AI models take shortcuts.

Existing methods typically fall into two traps:

  1. Holistic Approaches: They squash the entire sentence into a single embedding, losing the structural nuances of the language.
  2. Coarse Triplets: They simplify language into (subject, predicate, object) triplets, which fail when faced with nested clauses or long, descriptive sentences.

These simplifications often lead to "clever Hans" behavior, where models rely on dataset biases (e.g., always looking for a person when they see the word "umbrella") rather than actual visual reasoning.

Methods

The authors introduce NMTREE, which regularizes the grounding process using the sentence's own linguistic structure. The pipeline consists of four main stages:

  1. Dependency Parsing: The sentence is converted into a Dependency Parsing Tree (DPT) using standard tools (like Spacy). This tree provides a roadmap for reasoning.
  2. Bidirectional Tree LSTM: To ensure each word "understands" its context, a Tree LSTM encodes every node, allowing information to flow both up from the leaves and down from the root.
  3. Modular Assembly: The model assigns one of three specialized neural modules to each node in the tree:
  4. Single: Used for leaf nodes (nouns/adjectives) to calculate initial grounding scores for image regions.
  5. Sum: A transitional module that simply accumulates scores from its children.
  6. Comp (Composition): The core reasoning module. It uses the relationship defined by the node (e.g., a verb like "carried") to shift attention from a "contextual region" (the girl) to the "target region" (the umbrella).
  7. End-to-End Training with Gumbel-Softmax: Choosing which module to use at each node is a discrete decision, which normally breaks backpropagation. The authors use the Gumbel-Softmax trick to make these discrete choices differentiable, allowing the entire system to be trained without needing manual annotations for the module layouts.

Datasets

The model was evaluated on three standard benchmarks derived from MS-COCO:

  • RefCOCO & RefCOCO+: Focus on short, interactive descriptions.
  • RefCOCOg: Contains longer, more complex, and "flowery" expressions, making it the primary test for NMTREE’s structural reasoning capabilities.

Key Insights and Ideas

  • Structure as Regularization: By forcing the neural network to follow the dependency tree, the authors effectively "teach" the model how to reason linguistically, preventing it from over-fitting to simple word-image correlations.
  • Disentangling Perception and Reasoning: The Single modules handle the "what" (visual patterns), while the Comp modules handle the "how" (relationships). This separation allows the model to generalize better to new, unseen combinations of objects and actions.
  • Explainability is a Feature, Not a Side Effect: Because each node in the tree produces its own attention map, researchers can visualize exactly how the model's "certainty" evolves as it moves from the boots to the girl to the umbrella.

Key Results

  • State-of-the-Art Performance: NMTREE consistently outperformed previous models across all three datasets. On the complex RefCOCOg dataset, it achieved a Top-1 accuracy of 78.21%, surpassing the previous best (MAttNet) by a noticeable margin.
  • Human-Verified Explainability: In a human study, evaluators were asked to rate how "clear" the model's reasoning steps were. NMTREE was rated as "clear" or "mostly clear" significantly more often than sequential attention models (like AccumAttn), proving that its internal logic aligns well with human intuition.
  • Ablation Success: The authors showed that removing either the Sum or Comp modules led to a drop in performance, confirming that both simple accumulation and complex relational reasoning are necessary for success.

Limitations and Future Work

  • Parser Dependency: The model's performance is tethered to the accuracy of the off-the-shelf dependency parser. If the parser misidentifies the sentence structure, the NMTREE assembly will be flawed. The authors partially mitigated this by using weighted average embeddings, but a more robust parser-independent approach could be a future direction.
  • Computational Complexity: Constructing a unique tree structure for every input sentence is more computationally expensive than using a fixed-grid or sequential architecture.
  • Future Directions: The authors suggest that this tree-based modular approach could be extended to other multi-modal tasks, such as Visual Question Answering (VQA) or image-text retrieval.

Summary updated

BibTeX
@inproceedings{liu2019learning,
  author = {Daqing Liu and Hanwang Zhang and Feng Wu and Zheng-Jun Zha},
  title = {{Learning to Assemble Neural Module Tree Networks for Visual Grounding}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2019},
  doi = {10.1109/iccv.2019.00477},
}
Figure