Manuscript Offprint

arXiv:2610.06725

BRANCH-MoE: Balance-Aware Tree Routing for Large Embedding Models

Gang Fu, Adel Javanmard, MohammadHossein Bateni, Vahab Mirrokni

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Mixture-of-experts (MoE) layers increase model capacity without a proportional increase in per-example computation. However, conventional flat routers can yield imbalanced expert utilization and treat experts as an unstructured collection, whose indices carry no topological meaning. We introduce BRANCH-MoE, a routing architecture that places E experts at the leaves of a binary decision tree of depth log⁡2E\log_2 E. At each internal node the branching probability is centered on the arrival-weighted mean score of the traffic reaching that node. This mean is estimated using an exponential moving average, which promotes utilization of both child subtrees without an auxiliary load-balancing loss. We show that this moving-average estimate admits an explicit noise-lag trade-off. We prove that for linear node maps and log-concave arrival distributions, this mechanism prevents routing-mass collapse. We further establish that, under a frozen router, an expert's execution frequency controls its stochastic-gradient convergence rate, and that confident decisions near the root bound cross-device communication when experts are assigned to devices by tree prefix. We evaluate BRANCH-MoE against Switch softmax, DeepSeek-V3 dynamic-bias, Skywork logit-normalized, and deterministic hash routing on Criteo click-through-rate prediction, Forest Covertype, HIGGS, and YearPredictionMSD, using E = 16, top-4 routing, and five random seeds. BRANCH-MoE matches the predictive performance of the strongest baselines, attaining the lowest mean held-out loss on Forest Covertype and showing no statistically significant difference from the best-performing methods on Criteo, HIGGS, or YearPredictionMSD across random seeds. It also maintains balanced expert load without an auxiliary penalty. Unlike flat routers, BRANCH-MoE induces input-conditional co-routing locality: for each input token, the experts selected together tend to lie closer to one another in the routing tree. On all three UCI benchmarks, linear node maps yield a normalized tree distance of 0.710–0.718 between co-selected experts, compared with 0.817 for random expert pairs—a reduction of 12–13%. Every flat-routing baseline remains within 3.5% of the random-pair distance. Together, these results show that hierarchical routing can preserve task quality and balanced utilization while inducing a topology that supports localized expert co-activation and reduced communication.

1 Introduction

Mixture-of-experts (MoE; Jacobs et al., 1991) layers increase parameter capacity while activating only a small subset of expert networks for each token (Shazeer et al., 2017; Lepikhin et al., 2021; Fedus et al., 2022). A standard token-choice layer uses a flat E-way router followed by top-K selection. This design has enabled very large sparse models, but it leaves several properties to losses, constraints, or systems heuristics rather than building them into the routing geometry.

Limitations of flat routing. First, a flat softmax or top-K gate provides no distribution-free positive lower bound on the mass assigned to every expert: small initial routing advantages can produce highly unequal update frequencies, and an underused expert, receiving little data, can improve slowly (Eigen et al., 2013; Shazeer et al., 2017). Auxiliary load-balancing losses, capacity constraints, balanced assignment, and expert-choice routing mitigate this problem (Shazeer et al., 2017; Fedus et al., 2022; Lewis et al., 2021; Zhou et al., 2022), but the protection does not follow from the geometry of a flat gate. Second, a flat expert label is an unstructured categorical index that does not encode which experts share a device, node, rack, or other hardware cut, so the router offers no prefix locality for a distributed implementation to exploit. Third, preventing early routing collapse requires an auxiliary load-balancing penalty that competes with the task objective or an external bias controller (Wang et al., 2024; DeepSeek-AI, 2024). We do not claim that every conventional MoE collapses or incurs the same communication cost, only that these guarantees do not arise from flat routing alone.

Our proposal, BRANCH-MoE, changes the routing architecture itself. Its novelty is the combination of three coupled mechanisms within one routing tree: (i) a depth-D binary routing tree for E=2DE = 2^{D} experts; (ii) EMA score anchors and induced offsets that center every routing decision on the tokens arriving at its node; and (iii) a routing-mask cascade whose prefixes can serve as hierarchical expert or device addresses. The cascade determines the incoming mask used to update each node's anchor, the anchor determines the routing offset, and the final mask selects the experts each token is dispatched to, with the tree path giving each leaf a structured binary address rather than an arbitrary flat label.

Our contributions. We summarize our contributions as follows:

  1. Architecture. BRANCH-MoE couples a soft mask cascade with one scalar EMA score anchor per node, updated with mask weights and a single shared decay α\alpha (Section 3). The anchor induces the inference-time bias bj=−νjb_j = -\nu_j, so no auxiliary balancing loss, separately learned bias, or d-dimensional centroid is needed; the full soft router evaluates E−1E - 1 internal nodes in O(log⁡2E)O(\log_2 E) sequential depth, and inference uses the stored anchors as fixed biases without EMA updates.

  2. Theory (Section 4). (1) The mask-weighted constant-decay EMA tracks each node's incoming mean score with an explicit noise-lag trade-off. (2) For linear routing under log-concave arrival distributions, anchoring prevents vanishing expected branch mass and yields a positive soft leaf-mass bound that degrades quantitatively with anchor error. (3) Under a frozen router and strongly convex conditional expert risks, the realized expert-execution frequency controls the convergence rate of expert SGD (the soft-mass bound does not itself guarantee top-K execution). (4) We formalize the communication locality induced by tree routing: a token's experts are determined by its path, so co-routed tokens share path prefixes and confident upper-level decisions concentrate a token's routing mass within a shared-prefix subtree; under tree-aligned expert placement, the depth at which two paths diverge bounds whether their dispatches cross a hardware boundary, giving explicit bounds on cross-domain communication (Section 4.4).

  3. Experiments. We compare BRANCH-MoE against flat softmax (Switch), auxiliary-loss-free (DeepSeek-V3), logit-normalized (Skywork; Wei et al., 2024), and deterministic hash routing on four tabular benchmarks, namely Criteo click-through-rate prediction (Criteo AI Lab, 2015), Forest Covertype (Blackard & Dean, 1999; Blackard, 1998), HIGGS (Baldi et al., 2014; Whiteson, 2014), and YearPredictionMSD (Bertin-Mahieux et al., 2011; Bertin-Mahieux, 2011) (see Appendix D for description of datasets). As experiments show BRANCH-MoE matches the strongest baselines, with the lowest mean held-out loss on Forest Covertype and ties within seed noise on Criteo, HIGGS, and MSD. On all three UCI benchmarks, it is the only router whose co-routing statistics fall materially below the analytical random-pair baseline, reducing normalized tree distance to 0.710–0.718 against 0.817 (12–13% lower) and the leaf index gap by 18–23%, while every flat router stays within 3.5% of random (Table 2).

References (27)