TriRoute: Unified Learned Routing for Joint Adaptive Attention, Experts, and KV-Cache Allocation

· Source: Machine Learning · Field: Technology & Digital — Artificial Intelligence & Machine Learning · Depth: Expert, quick

Summary

TriRoute introduces a unified learned routing controller designed for decoder-only language models ranging from 160M to 1.3B parameters. This controller addresses the strong coupling between attention resolution, FFN expert selection, and KV-cache bit-width, which are typically managed in isolation by techniques like Mixture-of-Experts (MoE), Mixture-of-Depths (MoD), and KV-cache quantization. TriRoute emits a coordinated policy for each token at every layer, determining an attention mode (skip/local/full), a sparse set of FFN experts, and a KV-cache bit-width. Trained end-to-end using heterogeneous relaxation and a Lagrangian budget constraint, TriRoute mitigates cross-axis routing-collapse cascades with per-axis normalization and a coupling-aware balancing loss. The system Pareto-dominates independent MoD+MoE+KV-quantization combinations at matched inference FLOPs and memory, notably preserving tail-case robustness on rare entities, code, and arithmetic. Analysis shows it allocates full attention and high-precision cache to critical tokens like named entities.

Key takeaway

For AI Architects designing efficient large language models, TriRoute demonstrates that jointly managing attention, expert selection, and KV-cache allocation significantly outperforms isolated approaches. You should consider unified routing controllers to achieve better Pareto-optimal performance in inference FLOPs and memory, especially when preserving robustness for tail-case data like rare entities or code is critical. This approach offers a path to more resource-efficient and reliable LLM deployments.

Key insights

Jointly optimizing attention, expert selection, and KV-cache bit-width via a unified controller improves LLM efficiency and robustness.

Principles

Method

TriRoute uses a lightweight controller trained end-to-end via heterogeneous relaxation (Gumbel-Softmax, straight-through estimation, top-k gating) under a Lagrangian budget, with per-axis normalization and a coupling-aware balancing loss.

In practice

Topics

Best for: Research Scientist, AI Engineer, NLP Engineer, AI Scientist, Machine Learning Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Machine Learning.