Source-linked AI summary
Routing Networks and the Challenges of Modular and Compositional Computation
Clemens Rosenbaum, Ignacio Cases, Matthew Riemer, Tim Klinger
TL;DR
Compositional models require jointly learning their modules and how to combine them, creating training challenges that remain relatively under-investigated. This paper empirically examines those challenges in routing networks and compares design choices; it reports that routing outcomes depend strongly on training choices and that policy-gradient approaches fall short of value-based learning.
Problem
Jointly learning modules and their composition creates distinctive training challenges, yet relatively little research has examined these challenges in dynamic routing networks.
Source: §1 · p. 2Method
The paper empirically investigates routing-network challenges and compares router-training strategies, optimization choices, reward designs, and regularization.
Source: §1 · p. 2, §6 · p. 23Results
Policy-gradient approaches, including reparameterization techniques, fall short compared with value-based learning, and routing performance is strongly affected by training choices.
Source: §6 · pp. 22–23Takeaways & Limitations
Routing networks often need externally provided structure, such as metainformation or guided curricula, to stabilize and achieve maximal performance on typical dataset sizes.
Source: §6 · p. 23Finding optimal online selections remains open because future rewards are difficult to anticipate.
Source: §3.4 · p. 9
Abstract
from arXiv · showhide
Compositionality is a key strategy for addressing combinatorial complexity and the curse of dimensionality. Recent work has shown that compositional solutions can be learned and offer substantial gains across a variety of domains, including multi-task learning, language modeling, visual question answering, machine comprehension, and others. However, such models present unique challenges during training when both the module parameters and their composition must be learned jointly. In this paper, we identify several of these issues and analyze their underlying causes. Our discussion focuses on routing networks, a general approach to this problem, and examines empirically the interplay of these challenges and a variety of design decisions. In particular, we consider the effect of how the algorithm decides on module composition, how the algorithm updates the modules, and if the algorithm uses regularization.
1 Introduction
Modularity offers a way to reduce complexity and improve generalization, but learning compositional systems requires jointly learning both modules and how to compose them. The paper examines the resulting training challenges in routing networks and evaluates design choices that affect them.
1 Introduction
- Routing jointly optimizes module parameters and their composition strategy, addressing the general compositional-learning problem.Earlier work often fixed either the composition strategy or the modules.Source: §1 · pp. 1–2
- A routing network uses a router to select trainable modules that transform successive activations, making each possible module sequence a candidate model.The router and modules are jointly trained.Source: §1 · p. 2, Figure 1 · p. 2
- The paper investigates routing-network training challenges and empirically examines how composition decisions, module updates, and regularization interact.It identifies five main challenges, including unstable interaction between module and composition training, module collapse, and overfitting.Source: §1 · p. 2
2 Background and Related Work
The related work connects routing to modular networks, conditional computation, architecture search, biological accounts of coordination, and hierarchical reinforcement learning. These approaches differ in how they compose modules, share parameters, and structure decisions.
2 Background and Related Work
- Mixtures of experts use input-dependent soft weighting, while hard routing permits greater specialization by eliminating weight sharing across modules.The cited work also includes sparse and attention-based variants, though sparse differentiable models approximate effects such as exploration versus exploitation.Source: §2 · pp. 2–3
2.1 Existing Approaches to Routing Networks
- Earlier routing approaches address generalization, collapse, architectural diversity, linguistic guidance, and rapid task adaptation, with some relying on pre-trained transformations.Alet et al. [2018] rely on pre-trained composable transformations.Source: §2.1 · p. 3
2.2 Generalized Architecture based Meta-Learning
- Architecture-based meta-learning overlaps with routing, but routing also emphasizes architectural biases beyond parameter sharing across examples.The passage relates routing to one-shot neural architecture search and other architecture-search methods.Source: §2.2 · p. 3
2.3 Biological Plausibility
- Biological accounts link task-specific routing to coordinated neural activity and the interaction of specialized regions.The passage also relates routing networks to coagent networks, described as more biologically plausible than full end-to-end backpropagation networks.Source: §2.3 · pp. 3–4
2.4 Other Similar Forms of Modular Learning
- Hierarchical reinforcement-learning options also face collapse; unlike routing, they decide how long each selection lasts, which this paper excludes from its analysis.The paper focuses on module selection at every time step to study module diversity without adding selection duration as a factor.Source: §2.4 · pp. 4–5
3 Challenges to Compositional Computation
The section identifies five challenges in training compositional architectures: stability, module collapse, overfitting, performance extrapolation, and formalization. It connects these difficulties to balancing transfer against interference and exploration against exploitation.
3 Challenges to Compositional Computation
- Compositional training faces five challenges: instability, module collapse, overfitting, performance extrapolation, and a lack of formalization.The paper presents them as a systematic joint treatment of challenges that had previously been considered separately.Source: §3 · p. 5
3.1 Training Stability
- Early training can remain unstable because the router evaluates initially unformed modules while pathways and gradients are still unsettled.Slowing the router’s learning rate can help; curriculum learning requires data that can be ordered by complexity, and neither strategy is general.Source: §3.1 · p. 6
3.2 Module Collapse
- Collapse arises when the router favors one or two modules, which then receive more training and become still more dominant.Proposed responses include diversity rewards, EM-like sample grouping, and routing by discrete metadata.Source: §3.2 · pp. 6–7
3.3 Overfitting
- Input-dependent routing can overfit noisy data by assigning different paths to subsets of samples, enabling local approximations with few examples.The authors say possible remedies remain speculative because this problem is not well investigated; they discuss regularization, module diversity, and router–module capacity balance.Source: §3.3 · pp. 7–8
The Flexibility Dilemma for Modular Learning
- Too little router flexibility can underfit or collapse, while too much can create hyperlocal approximations that overfit; any modular method using local approximations faces this dilemma.Good localization can support generalization, but the two extremes are collapse and overfitting.Source: The Flexibility Dilemma for Modular… · p. 8
3.4 Module Diversity
- Architecturally diverse modules may expand functional coverage, but online selection is difficult because exploration noise can interfere with training and future rewards are hard to anticipate.The full selection problem for arbitrary learning characteristics has been explored only offline; optimal online selection remains open.Source: §3.4 · p. 9
3.5 A uniform formal framework
- A principled account is lacking for how router updates interact with changing modules; static-action MDP framing motivates reparameterized updates or coagent networks as alternatives.The paper describes these approaches as more principled in particular scenarios, while noting that broader supervised-learning coverage for coagent networks remains a possible extension.Source: §3.5 · pp. 9–10
4 Routing
Routing networks compose trainable function modules by repeatedly having a trainable router choose the next module. The section focuses on neural-network modules and considers reinforcement learning and stochastic reparameterization for training hard routing decisions.
4 Routing
- A routing network repeatedly selects compatible trainable function modules, using the current activation and router decision to produce the next activation or final output.The router and modules are trained jointly.Source: §4 · p. 10
- In neural routing, modules are neural networks or subnetworks, and the router assembles them into a model that processes the input.Source: §4 · p. 10
- Because routing makes hard module choices, the paper focuses on reinforcement learning and stochastic reparameterization to train the router.Other approaches, including genetic algorithms and stochastic training techniques, are noted as possible alternatives.Source: §4 · p. 10
4.1 Reinforcement Learning
The section frames routing as sequential decision-making, then discusses reward design and reinforcement-learning algorithms for jointly training routers and modules. It highlights trade-offs in reward signals and the difficulty of learning choices as module parameters change.
4.1.1 Routing MDPs
- Routing can be modeled as an MDP over samples, transformed activations, and meta-information, with a policy seeking to maximize expected reward.The paper adopts this common formalism to discuss relevant concepts, despite concerns about existing models of compositional computation.Source: §4.1.1 · p. 11
4.1.2 Reward Design
- Routing rewards include task-performance feedback and regularization signals computed over trajectories or as immediate action responses.Source: §4.1.2 · p. 11
- A final reward can be binary or the negative module loss, but the richer loss-based reward does not necessarily perform better in practice.Using negative loss also supports regression, for which a binary correct-or-false reward is not suitable.Source: §4.1.2 · p. 11
- Regularization rewards can encode computational cost or domain knowledge, or encourage sharing or diversity, with positive sharing incentives risking selection collapse.The paper describes contrasting positive and negative values of α for encouraging sharing and diversity.Source: §4.1.2 · pp. 11–12
4.1.3 Algorithms
- Algorithms face changing module values that can invalidate replay and bias value estimates, potentially locking the router into early choices; advantage estimates may help avoid collapse.Prior work uses varied RL algorithms, including multi-agent learning, Q-learning, REINFORCE-based training, and PPO.Source: §4.1.3 · p. 12
4.2 Stochastic Reparameterization
In the gradient analysis, Gumbel estimates have lower variance but greater mean squared error than policy-gradient estimates, while RELAX has low variance at high dimensions but high error. The section compares these estimators and cautions that the practical comparison remains unclear.
4.2 Stochastic Reparameterization
- The paper contrasts reparameterized decisions with policy gradients: Gumbel is biased, while REINFORCE is unbiased but has high variance.REBAR adds a Concrete-based control variate to reduce REINFORCE's variance, and RELAX generalizes the approach with a neural-network control variate.Source: §4.2 · p. 13
- The analysis compares sampled gradient estimates with analytically computed ground-truth gradients for a known policy and reward function.REINFORCE, Gumbel, and RELAX are used to approximate the same gradients.Source: §4.2 · p. 13
- For each dimensionality, the experiment samples gradients across policy and reward values and averages gradient differences and variances over parameters.The caption specifies a REINFORCE baseline with α = 0.1 and temperature 0.5 for all approaches.Source: §4.2 · p. 13, Figure 9 · p. 13
- Gumbel estimates have lower variance but higher average mean squared error than policy-gradient algorithms, while RELAX has low variance at high dimensions but higher error than REINFORCE and Gumbel.The authors suggest RELAX's trained surrogate may be insufficiently initialized in the single-sample experiments, and say practical conclusions remain difficult.Source: §4.2 · p. 13, Figure 9 · p. 13
4.3 Simultaneously Selecting Multiple Function Blocks
The section considers selecting multiple parallel routing paths to improve sample efficiency and argues for explicit selection of expert subsets when richer combinations than sparse mixtures permit are desired.
4.3 Simultaneously Selecting Multiple Function Blocks
- Combining outputs from multiple parallel routing paths may improve sample efficiency beyond using a single function block at each step.Source: §4.3 · p. 14
- Sparse mixtures of experts use weighted averaging of top-K experts, but their implicit exploration–exploitation dilemma motivates noise and load-balancing procedures.The section proposes modeling subset selection as an explicit reinforcement-learning problem for a more general solution.Source: §4.3 · p. 14
4.4 Training
Training updates the router and modules after each episode using a combined loss, while also examining optimizer sensitivity, exploratory-action updates, and split training data.
4.4 Training
- After each forward-pass episode, the backward step forms module and router losses, sums them, and backpropagates the combined objective.The summed-loss update allows higher mini-batch parallelization.Source: §4.4 · p. 14
- Routing networks can be highly sensitive to the choice of optimization algorithm.Source: §4.4 · p. 14
- Exploratory choices can reduce module step sizes along a trajectory, with κ controlling the reduction from none to effectively no training.For κ = 0, exploratory actions are treated no differently; for very large κ, the transformations are effectively not trained on the trajectory.Source: §4.4 · pp. 14–15
- The authors investigate splitting samples between transformation and router training to address overfitting.Source: §4.4 · p. 15
4.5 Architectures
Routing can apply to many model architectures, with choices about how routers divide decisions and which routing actions are available.
4.5 Architectures
- Layered architectures can route parallel copies of a layer, while non-layered routing reduces to the model-selection problem.The cited prior work had studied routing among differently architected modules only in one case.Source: §4.5 · p. 15
- A single router makes decisions over activations at any depth, but may require curriculum learning, separate grouping, or soft routing for stabilization.Source: §4.5 · p. 15
- Per-decision subrouters constrain decisions to depth-specific activations and can ease routing, but limit recursion depth to the number of subrouters.Source: §4.5 · p. 15
- Dispatched routing first clusters samples in input space, then assigns each sample to an activation-space subrouter.Source: §4.5 · p. 16
- Termination stops routing, while skip bypasses one subrouter; dividing decisions among subrouters can make router training easier.Source: §4.5 · p. 16
5 Evaluation
Across the evaluated settings, value-based approaches generally outperformed policy-gradient methods, while routing without task information remained difficult and performed below meta-information models.
5 Evaluation
- The experiments evaluate image classification and natural-language inference, including CIFAR 100 fine-label prediction conditioned on coarse labels and three-way implicative inference.The study compares routing with and without task-label meta-information; results are test-set results, and the authors did not conduct extensive hyperparameter searches.Source: §5 · p. 16
5.1.1 Learning with meta-information
- Value-based reinforcement learning consistently outperformed policy-gradient and reparameterization approaches in experiments using meta-information.Source: Figure 12 · p. 17, §5.1.1 · p. 17
- As routing depth increased, the gap grew; WPL was the strongest policy-gradient approach, which the authors link to its lower exploration and interference.Source: Figure 12 · p. 17, §5.1.1 · p. 17
- In language inference, Q-Learning and Advantage learning had an edge over policy-gradient methods, with each value-based method later stabilizing and pulling ahead.Source: Figure 12 · p. 17, §5.1.1 · p. 17
5.1.2 Learning without meta-information
- Without meta-information, a single router must interpret activation distributions across depths that change as its policy and transformations update.This creates multiple modes and non-stationarity that make the routing problem harder.Source: §5.1.2 · pp. 17–18
- Fixing routing depth stabilized some methods, but most policy-gradient approaches collapsed or performed poorly; final performance remained about 30% below meta-information models.Only Q-Learning and Advantage learning learned while maintaining selection entropy.Source: Figure 14 · p. 18, §5.1.2 · pp. 18–19
5.1.3 Reparameterization Techniques and Exploration Strategies
- An ϵ-greedy REINFORCE variant behaved more like a value-based approach, while reparameterization methods also lost performance in deeper architectures.The authors suggest that routing may benefit from targeted decision-making algorithms, especially for exploration.Source: §5.1.3 · p. 19
5.2 Reward Design
Reward design and other training choices affect routing performance and stability, with effects that vary by domain and optimizer.
5.2 Reward Design
- Q-Learning exploration exceeded 0.4 during its first five epochs, but the authors suggest exploitation strategy dominates the results.Source: §5.2 · p. 19
- Correct/incorrect classification rewards outperformed negative classification-loss rewards, which the authors say may overemphasize outliers and destabilize greedy choices.Source: §5.2 · pp. 19–20, Figure 16 · p. 20
- Intermediate rewards had no discernible effect on CIFAR but changed SCI convergence behavior without clearly changing final performance.Source: Figure 17 · p. 20, §5.2 · p. 20
- The authors propose exploring final rewards that use negative-loss information with fewer problems and adaptive intermediate rewards that eventually anneal to zero.Source: §5.2 · p. 20
5.3 Other Design Choices
- Using all training data for transformations benefited both performance and entropy when the training set was split between transformations and router.The plotted curves show the percentage of data used to train transformations.Source: Figure 19 · p. 21, §5.3 · p. 21
- Reducing transformation updates for exploratory actions had little effect on performance and only a mild effect on entropy.Source: §5.3 · p. 20, Figure 18 · p. 21
- Among tested optimizers, plain SGD consistently yielded the best performance; the authors attribute adaptive-optimizer instability to incompatible parameter-specific estimates across changing routing paths.Source: Figure 20 · p. 21, §5.3 · p. 21
5.4 Stability
Routing can destabilize because router and modules learn from one another's initially random decisions and representations. Experiments show collapse across algorithms in one dispatched CIFAR architecture and overfitting in a language-inference setting.
5.4 Stability
- Both router and modules act randomly at initialization, leaving the router unable to assign credit and exposing modules to interfering samples and activations.This interaction can destroy learning progress and may leave a routing network unable to learn.Source: §5.4 · p. 21
5.5 Module Collapse
- In the dispatched CIFAR experiment, test-time selection entropy approaches zero within ten epochs; WPL and Advantage learning are the only algorithms that do not collapse completely.The authors assume WPL's resistance reflects its design for non-stationary returns and Advantage learning's reflects an argument from Section 4.1.3.Source: §5.5 · p. 22
- On CIFAR, all routing algorithms collapse in the dispatched architecture, yet results reach standard non-routed performance.The dispatch action uses activations after convolutional layers, while dispatched subrouters are tabular and do not consider intermediate activations.Source: §5.5 · p. 21, Figure 21 · p. 22
5.6 Overfitting
- On SCI, both basic and routed networks exceed 99.5% train accuracy, but the routing architecture flattens earlier and reaches accuracy around 10% lower than the basic model.The authors note that overfitting is less of a problem with metainformation, which lets the router ignore spurious activations, and call for investigating regularization.Source: §5.6 · p. 22
6 Conclusion
The conclusion reports that routing performance depends strongly on design choices, with reparameterization methods behaving like policy gradients and policy-gradient approaches falling short of value-based learning. It highlights the need to balance modular flexibility against collapse and overfitting, while identifying unresolved challenges for future work.
- Routing performance depends heavily on design and hyperparameter choices, including reward design and optimization; simple rewards can outperform harder-to-interpret high-information rewards, and simple SGD can outperform sophisticated algorithms.Source: §6 · pp. 22–23
- In routing, reparameterization techniques often behave similarly to reinforcement-learning policy-gradient approaches, sometimes with identical performance and selection behavior.Source: §6 · p. 22
- All policy-gradient approaches, including reparameterization techniques, fall short of value-based learning; the authors identify exploitation strategy as the problem.Source: §6 · p. 22
- Routing networks often need externally provided structure, such as metainformation or guided curricula, to stabilize and reach maximal performance on typical dataset sizes; modular learning must balance flexibility to avoid collapse and overfitting.Source: §6 · p. 23
- Stability, module collapse, overfitting, mathematical justification, and learning across architectures remain open challenges before a fully compositional architecture can quickly adapt to new tasks or contexts.Source: §6 · p. 23