Abstract
Multi-task learning (MTL) with neural networks leverages commonalities in tasks to improve performance, but often suffers from task interference which reduces the benefits of transfer. To address this issue we introduce the routing network paradigm, a novel neural network and training algorithm. A routing network is a kind of self-organizing neural network consisting of two components: a router and a set of one or more function blocks. A function block may be any neural network - for example a fully-connected or a convolutional layer. Given an input the router makes a routing decision, choosing a function block to apply and passing the output back to the router recursively, terminating when a fixed recursion depth is reached. In this way the routing network dynamically composes different function blocks for each input. We employ a collaborative multi-agent reinforcement learning (MARL) approach to jointly train the router and function blocks. We evaluate our model against cross-stitch networks and shared-layer baselines on multi-task settings of the MNIST, mini-imagenet, and CIFAR-100 datasets. Our experiments demonstrate a significant improvement in accuracy, with sharper convergence. In addition, routing networks have nearly constant per-task training cost while cross-stitch networks scale linearly with the number of tasks. On CIFAR-100 (20 tasks) we obtain cross-stitch performance levels with an 85% reduction in training time.
Introduction
Multi-task learning (MTL) aims to improve model performance by leveraging shared knowledge across related tasks. However, a persistent challenge is balancing positive transfer (sharing knowledge between related tasks) with the risk of negative transfer (interference between unrelated tasks). Traditionally, researchers solve this by manually designing shared and task-specific layers—a labor-intensive process that scales poorly as the number of tasks grows.
Existing automated solutions, like "cross-stitch" networks, often suffer from high computational costs because they compute activations for all possible paths and then weight them. The Routing Network paradigm offers a dynamic, self-organizing alternative. By making discrete "hard" routing decisions—picking exactly one path per input—the model automatically learns when to share parameters and when to specialize, achieving state-of-the-art accuracy with massive efficiency gains.
The Routing Network Paradigm
A Routing Network consists of two primary components: a set of function blocks (e.g., convolutional or fully connected layers) and a router. For any given input, the router recursively selects a function block to apply, dynamically composing a unique computational path for each task and input.
Training via Collaborative MARL
Because routing decisions are discrete and non-differentiable, the system cannot be trained using standard backpropagation alone. Instead, the authors employ a hybrid approach: function blocks are updated via backpropagation, while the router is trained using Collaborative Multi-Agent Reinforcement Learning (MARL). Each task is assigned its own routing agent.
To handle the "non-stationarity" of the environment—where function blocks are constantly changing as they learn—the authors utilize the Weighted Policy Learner (WPL) algorithm. WPL dampens oscillations in the learning process, helping the agents converge to stable, "pure" routing strategies that eventually specialize in specific paths.
Experimental Results
The model was evaluated on three image classification benchmarks: MNIST-MTL (10 tasks), Mini-Imagenet (10 tasks), and CIFAR-100 (20 tasks).
- Superior Accuracy: Routing networks consistently outperformed cross-stitch networks and shared-layer baselines. On CIFAR-100, they beat cross-stitch networks by 7% and the best static baseline by 11%.
- Massive Efficiency Gains: On the CIFAR-100 20-task challenge, routing networks reduced training time from 38 hours to just 5.6 hours—an 85% improvement. Unlike cross-stitch networks, which scale linearly with the number of tasks, routing networks maintain a nearly flat computational cost per task.
- Emergent Specialization: The network demonstrated an ability to discover optimal bottlenecks. For instance, on MNIST, the router learned to compress information through a smaller number of blocks in middle layers before expanding for final classification, suggesting the discovery of an internal optimal architecture.
Conclusion
Routing Networks represent a significant step toward automated, adaptive MTL architectures. By replacing manual design with a self-organizing RL-based approach, they achieve high performance with significantly reduced computational overhead. While scaling to extremely deep architectures remains a challenge for future work, the paradigm's ability to mitigate negative transfer through hard routing decisions makes it a compelling approach for large-scale multi-task systems.
Summary updated