TL;DR
OneSparse unifies two dominant but historically isolated sparse activation paradigms—Mixture-of-Experts (MoE) and memory-based modules—into a single, elegant "dispatch, process, combine" framework. Leveraging this unified view, the authors introduce the Nexus Layer, a hybrid architecture that combines highly efficient static memory lookups with dynamic expert computation. The Nexus Layer establishes a new performance-efficiency frontier across vision tasks, outperforming standard MoE baselines while using significantly less computation.
What Problem Does This Paper Address?
As deep learning models scale, their computational demands skyrocket, creating massive bottlenecks for training and deployment. Sparse activation layers offer a solution by decoupling a model's total parameter capacity from its actual computational cost per token. Instead of activating the entire network for every input, they only trigger a small subset of parameters.
Currently, two paradigms dominate this space:
- Mixture-of-Experts (MoE): Routes tokens dynamically to specialized neural network "experts" (usually Feed-Forward Networks). It is highly expressive but computationally expensive.
- Memory-Based Modules: Treats tokens as queries to retrieve values from a massive static key-value bank. It is incredibly efficient but lacks the dynamic transformation capabilities of MoE.
Despite their conceptual similarities, these two approaches have evolved independently, particularly in computer vision where memory-based modules remain largely underexplored. This fragmentation has prevented researchers from systematically comparing them or combining their unique strengths.
Methods
The OneSparse Framework
The authors introduce OneSparse, a unified abstraction that breaks down any sparse activation layer into a three-stage pipeline:
- Dispatch: Maps input tokens to a sparse subset of processing units.
- Process: The selected units process the incoming tokens. (Crucially, MoE uses dynamic, content-aware FFN transformations here, while memory modules perform a static lookup).
- Combine: Aggregates the outputs from the processing units back into token representations using routing weights.
By decoupling the routing logic from the processing function, OneSparse exposes a continuous design space spanning from hard to soft token assignments, and from static lookups to fully dynamic transformations.
The Nexus Layer
Guided by this framework, the authors design the Nexus Layer, a hybrid architecture that bridges the gap between MoE and memory modules through two key innovations:
- Unified Routing (Uni-router): Instead of using separate routing mechanisms, a cross-attention-based router softly assigns tokens to heterogeneous processing units (both memory groups and MoE experts). Because every processing unit is allocated the same number of processing slots, the layer inherently achieves load balancing without needing finicky auxiliary regularization losses.
- Adaptive Processing Strategy: The layer splits its processing units into a Coarse Branch (efficient memory units that sketch out broad contextual patterns) and a Fine Branch (dynamic expert FFNs that refine complex, semantically critical regions).
Datasets
The authors evaluated OneSparse and the Nexus Layer across three fundamental computer vision benchmarks, integrating them into both Transformer (ViT) and Convolutional (ConvNeXt) backbones:
- Image Classification: ImageNet-1K
- Object Detection & Instance Segmentation: COCO 2017 (using Mask R-CNN)
- Semantic Segmentation: ADE20K
Key Insights and Ideas
- Spectrum, Not Silos: The core "aha moment" is realizing that MoE and memory modules are not fundamentally different architectures, but rather opposite ends of the same computational spectrum.
- Exploiting Visual Redundancy: Natural images contain vast amounts of redundant background information alongside sparse, highly detailed objects. The Nexus Layer exploits this perfectly: cheap memory units handle the background context, while expensive, expressive experts are reserved for complex boundaries and objects.
- Functional Specialization: Visualizing the routing maps confirms this intuition. Memory units naturally capture broad, diffuse contextual patterns, whereas expert units tightly concentrate on salient foreground objects.
Key Results
The Nexus Layer consistently outperforms both dense baselines and state-of-the-art sparse alternatives:
- ImageNet-1K (ViT-S): The Nexus-enhanced model achieved 81.2% Top-1 accuracy, matching the FLOPs of the dense baseline (4.3G) but improving accuracy by 2.4 points. It also outperformed the strongest MoE baseline (SoftMoE) while using 20% less computation.
- Object Detection (COCO): With a ViT-S backbone, Nexus achieved 42.7% $\text{AP}_{\text{bbox}}$, outperforming the dense baseline (40.2%) and beating the best MoE variant by 0.5 points while requiring fewer FLOPs.
- Semantic Segmentation (ADE20K): Nexus reached 45.8% mIoU, yielding a 1.2-point gain over the dense baseline and outperforming all other sparse configurations.
Limitations and Future Work
While OneSparse represents a major step forward for hybrid sparse modeling, the authors note a couple of limitations:
- Empirical Allocation: The ratio of memory units to expert units in the Nexus Layer is currently fixed and determined empirically via hyperparameter tuning. Future work could explore dynamic or learned allocation strategies that adjust to input complexity on the fly.
- Hardware Latency Gap: Although the framework successfully reduces theoretical compute (FLOPs) and boosts accuracy, translating these gains into actual wall-clock latency speedups remains a challenge. Fully realizing the speed benefits will require downstream, hardware-aware optimizations tailored to sparse operations.
Summary updated