Transfer Learning to Learn with Multitask Neural Model Search

Catherine Wong, Andrea GesmundoarXiv 2017

TL;DR

This paper introduces Multitask Neural Model Search (MNMS), a framework that enables Neural Architecture Search (NAS) to learn from multiple tasks simultaneously. By leveraging this multitask learning, MNMS significantly speeds up the search for optimal neural network architectures on new, unseen tasks through transfer learning, while still discovering high-performing models.

What Problem Does This Paper Address?

Designing effective deep learning models is a laborious process involving extensive architecture exploration and hyperparameter tuning, often relying on human expertise and manual search strategies. While Neural Architecture Search (NAS) automates this process using reinforcement learning, it typically requires training hundreds or thousands of models from scratch for each new task. This is computationally expensive and inefficient. The core problem this paper addresses is the lack of a mechanism to transfer generalizable knowledge learned from previous NAS tasks to accelerate the search for new tasks, mirroring how human experts leverage past experience.

Methods

The paper proposes the Multitask Neural Model Search (MNMS) controller, which extends the standard NAS framework with three key modifications:

  1. Learned Task Representation and Task Conditioning: MNMS trains a single controller on multiple tasks concurrently. Each task is assigned a unique, learnable embedding vector. This task embedding is concatenated with the controller's input at each step, allowing it to condition the architecture search process on the specific task at hand. This enables the controller to learn differentiated architectures for each task.
  2. Off-Policy Training using Multitask Replay: Instead of on-policy training (which can lead to premature convergence on a single "good enough" model for all tasks), MNMS uses an off-policy actor-critic approach (specifically, PPO). This allows the controller to continue exploring diverse parameter choices for each individual task, fostering better differentiation and learning of task-specific optima. A replay bank stores past sampled models and rewards.
  3. Per-Task Baseline and Reward Normalization: To handle tasks with different reward distributions, the paper employs per-task baselines and normalizes the advantage (reward minus baseline) by the baseline. This ensures stable training across tasks with varying performance metrics.

For transfer learning, a pre-trained MNMS controller's weights are reused, and a new, randomly initialized task embedding is added for the unseen task. The controller and new task embedding are then fine-tuned using standard policy gradient steps.

Datasets

The paper uses the following datasets:

  • For Multitask Training:
    • Stanford Sentiment Treebank (SST): For binary sentiment classification.
  • Binary Spanish Language Identification: A custom dataset created from high-frequency Wikipedia tokens across several languages, where the label indicates if a token is Spanish.
  • For Transfer Learning:
    • IMDB Large Movie Review Dataset: For binary sentiment classification.
  • CorpusCine Dataset: For binary sentiment classification, consisting of Spanish movie reviews.

Key Insights and Ideas

  • Knowledge Transfer is Crucial for NAS Efficiency: Just as human experts don't start from zero for every new problem, automated architecture search can benefit immensely from learned knowledge across tasks.
  • Task Embeddings Encode Relationships: The learned task embeddings implicitly capture relationships between tasks, grouping similar tasks together (e.g., IMDB and SST, Spanish language ID and CorpusCine).
  • Off-Policy Training Prevents Premature Convergence: Using off-policy RL is key to allowing the controller to explore and learn distinct, optimal architectures for each task, rather than settling for a single, generalized model.
  • Transfer Learning Accelerates Search: Pre-training on a set of tasks provides a significant head start for searching new tasks, leading to faster convergence to high-performing models.

Key Results

  • Simultaneous Multitask Training: MNMS successfully trains a single controller to discover well-performing, specialized models for multiple tasks concurrently, demonstrating its ability to differentiate between tasks.
  • Transfer Learning Speedup: Pre-trained MNMS controllers achieved significant speedups in model search on new, unseen tasks compared to training from scratch. The paper shows that transfer learning allows models to start from a better location in the search space and converge much faster.
  • Competitive Performance: The models discovered by MNMS, even when transfer learned, outperformed published human-designed models on benchmark tasks like IMDB and Corpus Cine.
  • Learned Parameter Distributions: Figure 4 illustrates that MNMS learns distinct parameter distributions for different tasks. For instance, it learns to use Spanish word embeddings for Spanish tasks and English embeddings for English tasks, and favors higher layer dimensions and more training iterations for more complex tasks like SST.

Limitations and Future Work

  • Future Work on Replay Bank: The authors suggest that future work could explore retaining and sampling from previously seen tasks in the experience replay bank during transfer learning, potentially allowing the controller to better retain memory of former tasks.
  • Scope of Search Space: While MNMS discovers models that outperform some benchmarks, the paper notes that the best performance on certain tasks might be achieved by architectures outside the defined search space (e.g., more complex models than feed-forward networks).
  • Trivial Tasks: For very simple tasks (like the Spanish language identification), the model found no significant difference between training word embeddings or using fixed, pre-trained ones, highlighting that the learned behavior is task-dependent.

Summary updated

Abstract

Deep learning models require extensive architecture design exploration and hyperparameter optimization to perform well on a given task. The exploration of the model design space is often made by a human expert, and optimized using a combination of grid search and search heuristics over a large space of possible choices. Neural Architecture Search (NAS) is a Reinforcement Learning approach that has been proposed to automate architecture design. NAS has been successfully applied to generate Neural Networks that rival the best human-designed architectures. However, NAS requires sampling, constructing, and training hundreds to thousands of models to achieve well-performing architectures. This procedure needs to be executed from scratch for each new task. The application of NAS to a wide set of tasks currently lacks a way to transfer generalizable knowledge across tasks. In this paper, we present the Multitask Neural Model Search (MNMS) controller. Our goal is to learn a generalizable framework that can condition model construction on successful model searches for previously seen tasks, thus significantly speeding up the search for new tasks. We demonstrate that MNMS can conduct an automated architecture search for multiple tasks simultaneously while still learning well-performing, specialized models for each task. We then show that pre-trained MNMS controllers can transfer learning to new tasks. By leveraging knowledge from previous searches, we find that pre-trained MNMS models start from a better location in the search space and reduce search time on unseen tasks, while still discovering models that outperform published human-designed models.
BibTeX
@misc{wong2017transfer,
  author = {Catherine Wong and Andrea Gesmundo},
  title = {{Transfer Learning to Learn with Multitask Neural Model Search}},
  year = {2017},
  eprint = {1710.10776},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1710.10776},
}
Figure