Abstract
Traditional semantic segmentation networks utilize static architectures that process every image through a fixed sequence of layers, regardless of the scale of objects present. This paper introduces Dynamic Routing, a framework that adaptively modifies the network's forward path for each specific image on-the-fly. By tailoring computation to the scale of objects, the proposed method significantly improves both accuracy and efficiency compared to "one-size-fits-all" models.
Introduction: The Challenge of Scale Variance
Semantic segmentation—the task of assigning a class label to every pixel in an image—is fundamentally challenged by scale variance. In typical urban scenes, a model must simultaneously process large foreground objects, such as a bus, and minute background details, such as distant pedestrians.
Standard architectures like FCN, U-Net, or DeepLab are "static." They pass every image through an identical sequence of resolutions and operations. This approach is inherently inefficient: simple images with large objects may not require high-resolution processing, while complex images with tiny objects demand it. While Neural Architecture Search (NAS) has automated some design aspects, it typically produces a single static model that acts as a "jack of all trades" but fails to specialize for diverse real-world distributions.
The Dynamic Routing Framework
The authors propose a "routing space" defined as a grid of potential processing cells at varying resolutions. Instead of a fixed pipeline, the network dynamically selects a path through this space.
1. Routing Space and Soft Conditional Gates
The network consists of $L$ layers. At each layer, the model can choose to process features at various scales (ranging from 1/4 to 1/32 resolution). The core of this system is the Soft Conditional Gate, a lightweight, differentiable module that analyzes input features to generate a selection probability for each potential path. If a path's probability is zero, its associated computation is skipped entirely.
2. Differentiable Training and Budget Constraints
Unlike previous dynamic methods that relied on complex Reinforcement Learning, Dynamic Routing uses a custom differentiable activation function: $\delta(x) = \max(0, \tanh(x))$. This allows the entire system, including routing decisions, to be optimized via standard backpropagation. To prevent the model from simply activating all paths, a "budget loss" term is added to the objective function, forcing the gating mechanism to be selective and meet a target computational cost (FLOPs).
Key Insights: Data-Dependent Architectures
The most significant outcome of this approach is that the network "shapes" itself to the input image.
As shown in the figure above, the model learns to prioritize different resolutions based on the content:
- Large-scale objects: The model often ignores low-level, high-resolution features to save computational cost.
- Small-scale objects: The model prioritizes high-resolution paths to capture fine-grained details.
- Emergent Design: Analysis of common paths reveals that the model naturally "discovers" patterns found in human-designed networks, such as early downsampling for context and late upsampling for refinement.
Experimental Results
The framework was evaluated on the Cityscapes and PASCAL VOC 2012 benchmarks.
- Cityscapes Performance: The "Dynamic-C" variant achieved 74.6% mIoU, outperforming DeepLabV3, U-Net, and HRNetV2 while maintaining lower computational costs. Under a budget of ~45G FLOPs, Dynamic Routing provided a 5.8% absolute gain in mIoU over a modeled DeepLabV3.
- PASCAL VOC 2012: The approach surpassed Auto-DeepLab (a leading NAS method), achieving 84.0% mIoU on the test set with superior efficiency.
- Flexibility: The framework can be tuned to different computational budgets (Dynamic-A, B, or C), allowing for a seamless trade-off between speed and accuracy without the need for network redesign.
Conclusion and Future Work
Dynamic Routing represents a shift from static to adaptive network design. By learning to be sparse and economical, the model achieves state-of-the-art performance with high efficiency.
However, some limitations remain. The total parameter count is higher (17.8M) than some static baselines because the model must store all potential cells in the routing space, even if they are skipped during inference. Additionally, while the gating modules are lightweight, they do introduce a small overhead. Future work may extend dynamic routing beyond scale to address other image properties like lighting, texture, or specific object categories.
Summary updated