NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Task-Driven Modular Networks for Zero-Shot Compositional Learning

Senthil Purushwalkam, Maximilian Nickel, Abhinav Gupta, Marc'Aurelio Ranzato · DOI

Introduction

Humans possess a remarkable ability to recognize novel concepts by composing known primitives. For instance, if a person understands the attribute "wet" from seeing a wet cat and the object "dog" from seeing a cute puppy, they can immediately recognize a "wet dog" without ever having seen one. In computer vision, this is known as Compositional Zero-Shot Learning (CZSL).

A wet cat illustrates the primitive concepts of 'wet' and 'cat' used in compositional learning.

Standard deep learning models often struggle with CZSL because they treat every attribute-object combination as a distinct category, requiring extensive data for each. Furthermore, they often fail to account for contextuality—the fact that an attribute like "wrinkled" looks different on a piece of paper than on a dog's face. This paper introduces Task-Driven Modular Networks (TMN), an architecture designed to address these challenges through dynamic, task-dependent reconfiguration.

Task-Driven Modular Networks (TMN)

The core innovation of TMN is its modular approach to recognition. Instead of a static feed-forward path, the network "rewires" its internal logic based on the specific attribute-object pair it is tasked to identify.

Architecture Overview

  1. Feature Extraction: A frozen ResNet-18 backbone processes the input image into a semantic concept space.
  2. The Modular Network: The main network consists of multiple layers, each containing several small, fully-connected neural modules.
  3. The Gating Network: This component acts as the controller. It takes the target attribute and object (e.g., "wet" + "dog") as input and generates gating weights. These weights determine which modules are activated and how they are connected for that specific task.
  4. Joint Compatibility: TMN produces a single compatibility score by processing the image, object, and attribute together, rather than treating them as independent embeddings.
The TMN architecture uses a gating network to dynamically rewire module connections based on the target concept, such as a 'Cute Dog'.

To enhance generalization, the authors also introduced ConceptDrop, a regularization technique that randomly masks certain attribute-object pairs during training, forcing the model to rely on its compositional logic rather than memorization.

Experimental Setup

The model was evaluated on two major benchmarks:

  • MIT-States: A challenging dataset with 245 objects and 115 attributes (~53k images) characterized by high ambiguity.
  • UT-Zappos50k: A fine-grained dataset of shoes (12 objects, 16 attributes, ~33k images).

The study emphasizes the Generalized CZSL (GCZSL) setting. Unlike traditional evaluations that only test on unseen pairs, GCZSL requires the model to recognize both seen and unseen pairs simultaneously, providing a more realistic measure of performance.

Results and Discussion

TMN consistently outperformed state-of-the-art baselines like RedWine and AttrAsOp in the Generalized setting:

  • MIT-States: TMN achieved a Test AUC of 2.9, surpassing the best baseline of 2.4.
  • UT-Zappos: TMN reached a Test AUC of 29.3, significantly higher than the 27.1 achieved by RedWine.
  • Harmonic Mean: TMN showed marked improvement in balancing accuracy between seen and unseen pairs, particularly on MIT-States (13.0 vs. 11.6).

Beyond raw performance, TMN offers high interpretability. By visualizing the gating paths, the authors found that visually similar concepts (e.g., "dry river" and "dry forest") activate similar internal topologies. Additionally, TMN is highly efficient, using up to 38x fewer parameters than competing modular architectures.

Conclusion

Task-Driven Modular Networks provide a robust framework for compositional reasoning by treating recognition as a dynamic configuration problem. While absolute performance on ambiguous datasets like MIT-States remains a challenge for the field, TMN's combination of parameter efficiency, interpretability, and superior performance in generalized settings marks a significant step forward for zero-shot learning.

Summary updated

BibTeX
@inproceedings{purushwalkam2019task,
  author = {Senthil Purushwalkam and Maximilian Nickel and Abhinav Gupta and Marc'Aurelio Ranzato},
  title = {{Task-Driven Modular Networks for Zero-Shot Compositional Learning}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2019},
  doi = {10.1109/iccv.2019.00369},
}
Figure