Skip to content

Do Dynamic Routers Need Memory? HeRo: History-Aware Routing for Efficient LLM Inference

Sep 2026 · 0 citations · 30 references
Computer Science

TL;DR

History-Aware Routing is proposed, a dynamic routing framework that resolves this mismatch by introducing a router memory mechanism to maintain an explicit routing state across model depth, validating that explicit routing memory enables more accurate and adaptive dynamic routing than solely conditioning on hidden state.

Abstract

Dynamic layer routing reduces the inference cost of Large Language Models (LLMs) by learning to skip layers for individual tokens. Existing methods, however, treat each routing decision as a local operation conditioned solely on the current hidden state which is a formulation that overlooks the sequential, path-dependent nature of routing across depth: earlier decisions shape the representations seen by downstream routers, and the layer-usage objective couples all decisions jointly. We propose History-Aware Routing (HeRo), a dynamic routing framework that resolves this mismatch by introducing a router memory mechanism to maintain an explicit routing state across model depth. The memory is constructed via linear attention, incrementally aggregating preceding routing scores and their induced residual updates into a compact history representation. At each routed layer, the router conditions jointly on this accumulated state and the current hidden representation to select the executed branch. Instantiated for token-wise FFN routing, HeRo trains only lightweight routers and adapters on a frozen backbone, requiring no modification to pretrained parameters. Across Llama 3.1-8B, Llama 2-7B, and Llama 2-13B, HeRo consistently achieves the highest aggregate performance retention among ten baselines. On Llama 3.1-8B, it bypasses 26.87% of model parameters while achieving 100.24% of dense model performance across seven benchmarks, and retains 97.01% while bypassing 38.82% of model parameters under a tighter computation budget. Ablation studies confirm that removing routing history consistently degrades performance, most notably on multistep reasoning and code generation, validating that explicit routing memory enables more accurate and adaptive dynamic routing than solely conditioning on hidden state.

View source

Similar papers

#natural language process... Preprint Sep 2026

RouteRelay: Event-Triggered Cross-Layer Route Reuse for Efficient Dynamic Sparse Attention

This work introduces RouteRelay, a router-agnostic method that reuses only route metadata across depth while continuing to compute attention with the current layer's queries, keys, and values and gives a top-$k$ stability condition, a probabilistic bound on missed challengers, and a row-selective GPU execution design.

Bin Li, Si Liu, Chen-Yang Hu et al. · 0 citations
#artificial intelligence Preprint Aug 2026

Pro-Router: Token-Aware Progressive Model Routing with Adaptive Edge-Cloud Collaboration for Efficient Multimodal LLM Inference

Pro-Router is proposed, a token-aware progressive model routing method with adaptive edge-cloud collaboration for efficient multimodal LLM inference and achieves the highest routing accuracy and improves routing speed by more than 10x.

Xin-Yuan Gui, Shao-Wen Wang, Sheng Sun et al. · 0 citations
#artificial intelligence Preprint Sep 2026

Attention-Aware Routing: Coupling Routing and Attention in MoEs

Attention-Aware Routing (AAR), which augments the router with temporal and spectral features extracted from a sliding window of attention weights that represent a summary of the model's contextual state, disentangled from the hidden state, is proposed.

Despoina Kosmopoulou, Anastasios Tsetsilas, Efthymios Georgiou et al. · 0 citations
#artificial intelligence Preprint Sep 2026

Pretrain Once, Route Anywhere: Towards a Foundation Model for LLM Routing

This work introduces RouteFM, which learns to characterize anonymous candidate models from behavioral context and infer their target-specific capabilities, rather than binding routing decisions to fixed model identities or a single environment, and shows transfer across changes in domains, modalities, candidate pools,...

Guannan Lai, Han-Jia Ye · 0 citations
#artificial intelligence Preprint Sep 2026

FlexEE: Self-Speculative and KV-Compatible Early Exiting for Offloading-Aware LLM Inference

Large language model (LLM) inference is often constrained by both computation and memory, especially in offloading-based deployments where model weights are transferred across memory hierarchies during autoregressive decoding. In this setting, reducing the number of executed layers can lower per-token latency while als...

Qi-Hu Xie, Zi-Wei Li, Yi Kang · 0 citations

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.