Abstract
Visual grounding—the task of localizing objects in images based on natural language descriptions—requires sophisticated compositional reasoning. Existing models often treat sentences as flat sequences or simple triplets, failing to capture the inherent hierarchical structure of language. We present NMTREE (Neural Module Tree), a framework that decomposes complex queries into a hierarchy of neural modules based on dependency parsing trees. By learning to assemble these modules using the Gumbel-Softmax trick, NMTREE provides a transparent, step-by-step reasoning path. Our approach achieves state-of-the-art results on the RefCOCOg benchmark and demonstrates superior interpretability in human evaluations.
Introduction
Visual grounding is a cornerstone of human-AI interaction. When a user describes an object, such as "the half-empty coffee mug next to the laptop," the system must perform a sequence of logical steps: identify the laptop, find the mugs, determine spatial relationships, and finally isolate the specific target. Most existing AI models treat this complex reasoning as a "black box," either compressing the entire sentence into a single vector or over-simplifying it into a basic subject-predicate-object triplet.
Researchers from the University of Science and Technology of China and Nanyang Technological University have introduced NMTREE to address these limitations. By grounding language through a structure that mirrors human logic, the model moves away from monolithic architectures toward modular, explainable reasoning.
The Challenge of Compositional Reasoning
The core difficulty in visual grounding lies in the hierarchical nature of language. Traditional models suffer from two primary issues:
- Brittleness: Models often rely on dataset biases (e.g., associating "carried" with "person") rather than understanding the actual relationship between objects.
- Lack of Explainability: In monolithic models, it is difficult to diagnose failure points. It is often unclear whether a model failed to identify the primary object or failed to understand a specific modifier.
As shown in the figure above, holistic and triplet-based approaches often fail to capture the full nuance of complex descriptions like "a pink umbrella carried by a girl in pink boots."
The NMTREE Architecture
The NMTREE architecture operates in three distinct phases to ensure grounding is as intuitive as human reasoning, accumulating evidence from the bottom up.
1. Sentence to Tree
The model utilizes a standard dependency parser (Spacy) to convert a sentence into a tree structure. Each word becomes a node, and edges represent grammatical relationships.
2. Bidirectional Tree LSTM
To ensure each word retains its context, a specialized LSTM propagates information both up and down the tree. This allows a node (e.g., "umbrella") to "know" its relationship to other nodes (e.g., "carried").
3. Module Assembly
For every node, the model selects one of three neural modules:
- Single: Used for leaf nodes (e.g., "pink") to calculate primitive grounding scores.
- Sum: A transitional module that accumulates scores from child nodes (e.g., combining "pink" and "boots").
- Comp (Composite): The reasoning engine that uses child grounding scores to find contextual regions (e.g., using the "girl's" location to find the "umbrella").
To train this discrete assembly process end-to-end, the authors employed the Gumbel-Softmax trick, allowing the model to explore different module configurations during training while maintaining gradient flow.
Experimental Evaluation
The model was evaluated on standard benchmarks including RefCOCO, RefCOCO+, and RefCOCOg. The latter is particularly significant due to its longer, more complex descriptions, which serve as a rigorous test for compositional reasoning.
- State-of-the-Art Performance: NMTREE consistently outperformed previous models like MAttNet. On the RefCOCOg dataset (using ground-truth regions), NMTREE achieved 78.57% accuracy, surpassing the previous best of 78.12%.
- Explainability: In human evaluation studies, NMTREE received a clarity score of 2.96/4.0, significantly higher than the 2.28/4.0 scored by previous modular baselines. This confirms that the model's internal logic aligns more closely with human intuition.
- Robustness: The model showed particular strength in processing very long sentences (20+ words), where monolithic models typically struggle to maintain focus.
Conclusion
NMTREE demonstrates that disentangling perception from reasoning through a hierarchical, modular approach leads to both higher accuracy and better interpretability. While the model currently relies on external dependency parsers, it sets a new standard for explainable visual grounding. Future work may involve learning the tree structures directly from data to further increase flexibility across different languages and domains.
Summary updated