mlsanityData to 13 Oct 2026

Layer-wise MoE Routing Locality under Shared-Prefix Code Generation: Token-Identity Decomposition and Compile-Equivalent Fork Redundancy

arXiv 2604.17182 ↗First posted 19 Apr 2026cs.SE cs.AIcited by 1

On the map: Mixture-of-experts → Expert routing strategies

Abstract (arXiv)

In LLM-based code generation, multiple code candidates are often generated in parallel from the same prompt -- for example, in best-of-N sampling or multi-candidate code completion. These requests can share KV caches through a common prefix, yet the extent to which their Mixture-of-Experts (MoE) expert routing overlaps, and how this overlap varies across layers, remains insufficiently understood. We study Qwen3.5-35B-A3B-FP8 (256 routed experts, top-8) by performing tree-search-based branching generation from a shared prefix (851 completed codes, temperature 0.7) and analyzing the results with a compiler-output-based alignment (gcc -S -O0 assembly) that controls for token-identity confounds. Our findings are threefold: (1) At positions where both sequences generated the same token, Jaccard similarity reaches 0.649 (40x random), while even at positions with different tokens it remains 0.175 (11x random). (2) A layer-wise decomposition reveals a crossing pattern: same-token routing similarity exceeds different-token similarity across all layers, but dips in the middle layers (L14-20), while different-token similarity peaks in the middle layers at 14x random. (3) In tree-search code generation, 67% of successfully compiled codes concentrate in the top three assembly-equivalent groups, and 99.6% of within-group differences consist of comments and blank lines. We show that diversity in top-P search, including beam search, poses a significant challenge. These results refine the "context-independent routing" claim of prior work through layer-wise decomposition and suggest opportunities for improving search efficiency in LLM code generation.

Key facts. Cited by 1 paper in the map (data through 13 Oct 2026). Placed in Expert routing strategies, one of 12 directions in Mixture-of-experts. Builds on 8 of its 12 references that are in the map. First posted on arXiv 19 Apr 2026.

Builds on

8 of 12 references.

Closest ancestors · 2

Same direction, newest first

  1. 2026Unveiling Language Routing Isolation in Multilingual MoE Models for Interpretable Subnetwork Adaptation4 Apr
  2. 2026Expert Selections In MoE Models Reveal (Almost) As Much As Text4 Feb

Other references · 6

  1. 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,117
  2. 2023PowerInfer: Fast Large Language Model Serving with a Consumer-grade GPUcited by 213
  3. 2024OpenMoE: An Early Effort on Open Mixture-of-Experts Language Modelscited by 186
  4. 2024Hydragen: High-Throughput LLM Inference with Shared Prefixescited by 72
  5. 2025Taming Latency-Memory Trade-Off in MoE-Based LLM Serving via Fine-Grained Expert Offloadingcited by 24
  6. 2026XShare: Collaborative in-Batch Expert Sharing for Faster MoE Inferencecited by 7

Built on by

Cited by year (2026 to 13 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026Certain Head, Uncertain Tail: Expert-Sample for Test-Time Scaling in Fine-Grained MoE
  2. 2026MoE Routing Testbed: Studying Expert Specialization and Routing Behavior at Small Scale
  3. 2026ELDR: Expert-Locality-Aware Decode Routing for PD-Disaggregated MoE Serving
  4. 2025Not All Models Suit Expert Offloading: On Local Routing Consistency of Mixture-of-Expert Models
  5. 2025Opportunistic Expert Activation: Batch-Aware Expert Routing for Faster Decode Without Retraining
  6. 2026Diagnosing Overhead in Dispatch Operations: Cross-architecture Observatory
  7. 2025Advancing MoE Efficiency: A Collaboration-Constrained Routing (C2R) Strategy for Better Expert Parallelism Design
  8. 2026CIPHER-MoE: Balancing Efficiency and Routing Fidelity in Trillion-Scale MoE Training