Diversity and Depth in Per-Example Routing Models

Prajit Ramachandran, Quoc V. LeICLR 2019

TL;DR

This paper explores how to make "routing models"—neural networks that dynamically choose different computational paths for different inputs—more powerful. By introducing architectural diversity (a "toolbox" of different expert types) and increasing routing depth, the authors slashed error rates by 35% on multi-task benchmarks. However, scaling the number of routing decisions remains a significant optimization challenge.

The Problem with "One Size Fits All"

Most modern neural networks are static: every single input, whether it's a simple cat photo or a complex medical X-ray, passes through the exact same sequence of mathematical operations. This contrasts sharply with the human brain, which activates specific subnetworks depending on the task at hand.

"Routing models" (often implemented as Mixture-of-Experts) attempt to mimic this biological efficiency by training a "supernetwork" containing many "experts." For each input, a router decides which experts to activate.

Per-example routing allows different inputs to take unique paths through the network layers.

However, prior work in routing models faced two major limitations:

  1. Homogeneity: All experts typically shared the same architecture (e.g., all were 3x3 convolutions), differing only in their learned weights.
  2. Shallow Routing: Models usually made very few routing decisions (often five or fewer), severely limiting the number of possible unique paths through the network.

Methods: Building a Diverse Supernetwork

The authors build upon the noisy top-$k$ gating technique, where a router network learns to select the best $k$ experts for a given input. To push the boundaries of these models, they introduced key architectural innovations:

  • Architectural Diversity: Instead of identical experts, the supernetwork is populated with a diverse "menu" of operations. The router can choose from 3x3, 5x5, and 7x7 convolutions, as well as max pooling, average pooling, and identity layers.
  • $k$-annealing: To prevent the model from overfitting or ignoring certain experts, the authors introduced a regularization trick. The number of active experts ($k$) is kept higher in early layers to encourage weight sharing, and lower in later layers to encourage specialization.
  • Scaling Depth: The researchers tested models capable of making up to 96 internal routing decisions—an order of magnitude more than previous state-of-the-art routing models.
The diverse routing architecture allows the network to choose from a variety of operations, effectively performing a per-example architecture search.

Key Insights and Results

The researchers evaluated their approach across several challenging benchmarks, including Omniglot (a multi-task setup with 50 different alphabets), CIFAR-10, and fine-grained classification datasets like Stanford Cars and Food101.

By providing diverse experts, the router effectively performs a per-example architecture search on the fly. If an image requires a wide receptive field, the router selects a 7x7 convolution; if it needs to preserve fine detail, it opts for a 3x3 convolution.

Breakthrough Performance on Multi-Task Learning

The diverse routing model achieved a 7.81% test error on the Omniglot benchmark. This represents a massive 35% improvement over the previous state-of-the-art (CMTR at 12.18%). Crucially, an ablation study showed that removing architectural diversity (reverting to only 3x3 convolutions) caused the error rate to jump back up to ~16%, proving that the variety of experts was the primary driver of this performance boost.

The Specialization Paradox and Depth Challenges

While deeper routing theoretically allows for exponentially more paths through the network, it makes the loss function landscape much harder to navigate. The authors found that without proper regularization (like $k$-annealing), routing models tend to "collapse"—the router repeatedly picks the same few experts that performed well early in training, wasting the rest of the network's capacity.

Furthermore, on datasets like CIFAR-10, the routing models struggled to beat "one-shot" static baselines as depth increased. This highlights a critical bottleneck: the problem isn't a lack of representational capacity, but rather that deep, complex decision trees are exceedingly difficult to optimize using current gradient-based routing methods.

Limitations and Future Work

The most significant hurdle identified by the paper is optimization at scale. As routing depth increases, the model becomes increasingly difficult to train using standard gradient descent. While these models possess high representational capacity, they often underperform simpler static models when the number of routing decisions becomes very large.

Future research must focus on finding better ways to optimize "hard" routing decisions. Additionally, exploring ways to combine architectural diversity with parameter prediction models could lead to even more flexible, input-dependent neural architectures.

Summary updated

BibTeX
@inproceedings{ramachandran2019diversity,
  author = {Prajit Ramachandran and Quoc V. Le},
  title = {{Diversity and Depth in Per-Example Routing Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2019},
}
Figure