Language to Network: Conditional Parameter Adaptation with Natural Language Descriptions

Tian Jin, Zhun Liu, Shengjia Yan, Alexandre E. Eichenberger, Louis-Philippe MorencyACL 2020 · DOI

Overview

The $N^3$ (Neural Networks from Natural Language) framework introduces a novel meta-modeling approach to zero-shot learning (ZSL). Unlike traditional methods that rely on fixed visual features or manually engineered attributes, $N^3$ synthesizes task-specific neural networks directly from natural language descriptions, such as Wikipedia entries.

The $N^3$ framework synthesizes a specialized CNN classifier from natural language descriptions to recognize new categories.

The Challenge of Zero-Shot Learning

Traditional computer vision relies heavily on transfer learning, which requires labeled images for fine-tuning. Zero-shot learning aims to recognize unseen objects without training images. While attribute-based ZSL is common, it suffers from scalability issues due to the labor-intensive nature of manual attribute engineering. Using natural language is more scalable, but existing text-based methods often only adapt the final classification layer, leaving the internal feature extraction process static and potentially misaligned with the new task.

Methodology: Hierarchical Parameter Adaptation

The core innovation of $N^3$ is its ability to "re-wire" a pre-trained CNN by generating parameter adaptations across all layers.

1. Parameter Delta Generation

Instead of generating millions of weights from scratch, $N^3$ produces a "delta" ($\Delta\Theta$) that is added to the original pre-trained weights ($\Theta$). The final parameters are calculated as $\Theta' = \Theta + \mu \cdot \Delta\Theta$, where $\mu$ is a trainable scaling factor. This approach mimics the efficiency of traditional fine-tuning while operating in a zero-shot regime.

2. Hierarchical Transformer Architecture

To manage the complexity of mapping long text to high-dimensional weight matrices, $N^3$ employs a two-stage hierarchical transformer:

Hierarchical architecture of the $N^3$ meta-model, featuring the Tokens2Label and Labels2Adaptation encoders.
  • Tokens2Label Encoder: This component processes word-level tokens from the input description to create a compact "label embedding."
  • Labels2Adaptation Encoder-Decoder: This sequence-to-sequence transformer translates label embeddings into weight matrices. By generating weights sequentially and sharing layers, the model significantly reduces memory overhead.

3. Whole-Model Adaptation

By adapting parameters throughout the entire network—not just the final layer—$N^3$ allows the model to adjust its low-level visual filters. This enables the network to actively search for specific visual cues mentioned in the text, such as unique beak shapes or plumage patterns.

Experimental Evaluation

The researchers evaluated $N^3$ on four major ZSL benchmarks: CUB-200-2011, AWA2, NAB, and a custom Flowers-Species dataset. Natural language descriptions were sourced from Wikipedia.

Key Results

$N^3$ achieved state-of-the-art performance across all datasets:

  • CUB-200-2011: Accuracy reached 17.6%, more than doubling the previous best of 7.5%.
  • AWA2: Performance improved from 22.6% to 34.0%.
  • Architecture Robustness: The method proved effective across various architectures, including ResNet-18 and SqueezeNet. Interestingly, SqueezeNet performed nearly as well as ResNet-18 despite having 9x fewer parameters, suggesting that efficient parameter adaptation is more important than raw model size.

Conclusion and Future Work

$N^3$ demonstrates that natural language can serve as a powerful form of "virtual supervision" for synthesizing neural networks. By adapting the entire model hierarchy, it bridges the gap between semantic descriptions and visual feature extraction. Future research will focus on scaling this approach to deeper architectures and expanding its application to tasks like object detection and segmentation.

Summary updated

BibTeX
@inproceedings{jin2020language,
  author = {Tian Jin and Zhun Liu and Shengjia Yan and Alexandre E. Eichenberger and Louis-Philippe Morency},
  title = {{Language to Network: Conditional Parameter Adaptation with Natural Language Descriptions}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.acl-main.625},
}
Figure