Routing in Gradient Space
Interactive Visual Tutorial • arXiv:2609.36724v2 (Revised 16 Nov 2026)

Routing in Gradient Space:
Balanced Usage Is Not Expert Specialization

A Mixture-of-Experts router can send exactly 12.5% of tokens to every one of its 8 experts—achieving zero load variance and 100% utilization—and still completely fail to specialize. Let’s build the geometry from the ground up.

Authors: Yuchen Li, Mingyu Du, Zongqi Fan, Nguyen H. Tran, Ken-Tye Yong • arXiv Abstract PDF (v2) arXiv HTML (v2) Official Repo (pending release)
Interactive motif • hover any expert box
GAR (Aligned Clusters): Load is balanced (6 vectors per expert) and gradients inside every expert point together, building a strong resultant update. LVar = 0.000 • Coherence = 98%
Before We Start • Plain-English Reader’s Guide

The Whole Paper in 60 Seconds

Modern AI models often use a design called Mixture-of-Experts (MoE). Instead of using one giant neural network for every question, an MoE model has several smaller sub-networks called experts, plus a small decision-maker called a router. Whenever a piece of text arrives, the router chooses which expert should handle it.

In theory, this should let different experts become specialists—just like different doctors in a hospital. In practice, however, training an MoE router runs into a famous problem: collapse. One expert gets slightly lucky at the start, receives most of the data, learns faster, and takes over almost everything while the other experts sit idle.

For years, the standard fix has been a load-balancing loss: a penalty that forces the router to send roughly the same amount of traffic to every expert. This paper makes a sharp, surprising point: sending equal traffic to every expert does not make them specialists. In fact, standard load balancing can force conflicting tasks into the same expert, making training worse instead of better.

The authors propose a clean new idea called Gradient-Aligned Routing (GAR). Instead of asking only “Are all experts equally busy?”, GAR asks: “Are the training signals (gradients) going into the same expert pointing in the same direction?”

Quick Plain-English Dictionary (10 Terms Used in This Blog)
Expert
A small sub-network inside an MoE model (for example, one LoRA — Low-Rank Adaptation — adapter or one feed-forward block, FFN).
Router (Gate)
A lightweight layer that looks at the input and gives a probability score pmk to each expert k.
Gradient (g~m)
An arrow showing the steepest direction of error change for a batch of examples (training steps opposite to it to lower error).
Load (dk)
How much total traffic (probability mass) the router sends to expert k.
Load Variance (LVar ↓)
How uneven expert workloads are. 0 means every expert gets the exact same share of traffic.
Utilization (↑)
The fraction of experts that are actually active (not dead or starved of traffic).
Gradient-Mass Purity (↑)
The share of an expert’s total gradient norm coming from its single largest task (note: task gradient scale also affects this metric).
NMI (Task–Expert)
A 0-to-1 score measuring how strongly knowing the task tells you which expert was chosen.
stopgrad (Stop-Gradient)
A one-way wall in backpropagation: treat a value as a fixed number so no extra gradient flows backward through it.
Pareto Frontier
The set of methods that no other method can match or beat on every metric (while strictly beating them on at least one).
Chapter 1 • The Paradox

Why Can a Perfectly Balanced Router Still Fail to Specialize?

To feel why load balance is not enough, imagine a hospital with 4 doctors and 4 kinds of patients: heart patients, bone patients, eye patients, and skin patients.

Now suppose the hospital manager only tracks one number: “Does every doctor see exactly 25% of the patients?” To get a perfect score, the manager sends 1 heart patient, 1 bone patient, 1 eye patient, and 1 skin patient to every single doctor.

Look at the manager’s dashboard: every doctor is equally busy! Load variance is zero. Utilization is 100%. Yet not a single doctor gets to specialize. Every doctor must handle four completely different specialties at once.

The exact same thing happens inside a neural network during multi-task training. In Li et al. (Sec. 1), the authors separate two ideas that people often mix up:

Load Balance = Equal Headcount Only

Checks only the marginal distribution qe: “How many items went to each expert?” Even completely random routing can score a perfect LVar = 0 while carrying zero information about which tasks belong together.

Specialization = Clean Task–Expert Grouping

Checks the joint task–expert structure (selection counts qt,e and per-task expert gradient norms): “Do compatible training signals land in the same expert?” Measured by Gradient-Mass Purity and Task–Expert NMI.

The Geometry Inside Each Expert: Pushing a Heavy Cart

Why does mixing incompatible tasks inside one expert hurt accuracy so much? Think of each gradient vector as a person pushing a heavy cart in a certain direction.

If two tasks want the expert’s weights to move in the same direction, they push together. Their combined push (the vector sum Gk) becomes twice as strong, so the expert learns fast and cleanly.

If two tasks pull in opposite directions (negative inner product, ⟨g~A,g~C⟩<0), they act like two teams pulling a rope in opposite directions. Their forces cancel out. The cart barely moves, and the expert makes poor progress on both tasks.

Key Geometric Idea Inside an expert, gradients add as arrows
When task T1 and task T3 pull in opposite directions, their arrow sum shrinks toward zero (destructive interference). When aligned tasks land together, their arrows stack end-to-end into a long, clean update (constructive reinforcement).
Guided Tour of Lab 1 — Try These 3 Clicks
  1. Start on Preset 1 (Balanced Uniform): notice LVar = 0.0000 and Util = 1.000, yet every expert’s coherence ring is 0% and the black resultant arrow disappears!
  2. Click Preset 2 (Aligned Specialized): LVar is still 0.0000, yet watch the arrows point in the same direction—coherence jumps to 100%, Purity hits 1.000, and GAR’s score jumps from 0.000 to 7.980!
  3. Click Preset 5 (Imbalanced Mix): when Task T1 has 5 batches and T2/T3/T4 have 1 each, forcing strict 2-per-expert balance spills T1 into E2, E3, and E4, hurting coherence. Click E1 on g̃₃, g̃₄, g̃₅ to see GAR reward clean clustering instead.

Lab 1 — Interactive Gradient-Space Sandbox (Balanced vs. Specialized Routing)

Assign 8 gradient vectors across 4 tasks (T1–T4) to 4 experts (E1–E4). Watch vector sums cancel or reinforce in real time.

Toy symmetric-Jacobian model

Task T1 Task T2 Task T3 Task T4 Resultant aggregate Gk = ∑ pmk g̃m
Load Variance (LVar ↓)
0.0000
0 = perfectly balanced (max 0.1875)
Utilization (↑)
1.000
share with ℓe ≥ 1/(2E)
Grad-Mass Purity (↑)
0.250
0 w/ dead experts; 1/T = 0.25 if all active & uniform; ideal 1.00
Task–Expert NMI
0.000
0 = independent; 1 = 1-to-1
GAR Load-Norm Aε (↑)
0.000
∑ ||Gk||² / (dk + ε)
Numerator Only (↑)
0.000
∑ ||Gk||² (no load denom.)
Measurement Seam (App. E): How This 2D Toy Differs from Real MoE Template Space

This sandbox uses fixed 2D unit task gradients with symmetric Jacobians so you can manipulate pmk directly. In real MoE training, gm lives in a high-dimensional common parameter template (Sec. 3.3), and Appendix E computes FFN load from post-top-k probability mass and classification-head load / NMI from discrete top-k selection counts.

Check Your Intuition • Challenge 1

Switch Lab 1 between Preset 1 (Balanced Uniform) and Preset 2 (Aligned Specialized) at 90° spread. Both have LVar = 0.0000 and Utilization = 1.000. What changes dramatically?

Chapter 2 • The Variational Formulation (Sec. 3 & App. A–B)

Scoring Entire Gradient Partitions: How GAR Turns Intuition into Math

Now let’s design a simple mathematical score that teaches the router to send aligned gradients to the same expert. We need to solve two practical puzzles along the way.

Puzzle 1: How do we compare gradients from different experts?

Suppose we have M training groups (called observations) and K experts. Each expert e has its own separate weights θe. So how can we put every item m into one shared vector space to measure whether two items agree?

GAR uses a clean trick (Sec. 3.3). Every expert has the exact same parameter shape (such as the same LoRA matrix size). For each item m, we sum the gradient entries across all K experts into one vector gm. Then we freeze it with stopgrad so it acts as a fixed arrow during the router update:

Why Sum Across Experts? The Shared-Perturbation Meaning
Adding ∇θeℓm across all experts answers a simple question: “If every expert shifted its weights by the same small change Δ, how would item m’s loss change?” This gives every item a single common arrow g~m∈ℝd while keeping all experts independently parameterized.
Common-Template Gradient Observation & Surrogate AggregatePaper Sec. 3.3
gm := ∑e=1K ∇θeℓm ∈ℝd , g~m =stopgrad(gm) , Gk := ∑m=1M pmk g~m

In plain English: g~m is item m’s frozen gradient arrow, pmk is how much the router sends item m to expert k, and Gk is the total combined arrow inside expert k. (Note: Gk is a surrogate score in template space, not the actual physical weight update of expert k; Sec. 3.1 & 3.3.)

Puzzle 2: Why can’t we just maximize ∑k‖Gk‖2?

Here is a subtle trap! Suppose we have 4 unit-length arrows: two identical arrows from Task A and two identical arrows from Task B (with ε=0). Even if Task A and Task B are only mildly similar (cosine similarity ρ=+0.4), compare the raw squared length ∑k‖Gk‖2:

  • Separate them (2 in E1, 2 in E2): Score = 22+22=8.0.
  • Put all 4 into E1 (Collapse!): Score = 4+4+2×2×2×0.4=11.2!

Because squaring a sum grows quadratically with group size, a raw sum rewards putting all arrows into one giant expert! The fix is remarkably simple: divide each expert’s squared norm by its traffic load dk(P)+ε, where dk(P)=∑mpmk. Watch the same 4-arrow example reverse immediately:

  • Separate them: 4/2+4/2=4.0 (Winner!).
  • Put all 4 into E1: 11.2/4=2.8 (Penalized!).

That single division gives us the complete GAR objective (Eqs. 1–3, Prop. 3.1):

Load-Normalized Partition Reward & Practical Auxiliary Loss (τ = 0)Eqs. (1)–(3), Prop. 3.1
𝒜ε(P;W) := Tr (Dε(P)−1P⊤WP) = ∑k=1K ‖Gk‖2 dk(P)+ε , ℒnorm =−𝒜ε(P;W)

How to read this formula in 3 steps: (1) For each expert k, add up its routed arrows to get Gk and square its length. (2) Divide by how much traffic went to expert k (dk+ε, with tiny ε=10−8 to avoid dividing by zero). (3) Put a minus sign in front so minimizing ℒnorm maximizes alignment! Practical GAR sets τ=0.

The “Aha!” Geometric Identity (Thms. B.1 & B.2) GAR = Soft k-Means & Spectral Clustering in Gradient Space
Let μk=Gk/dk be expert k’s average gradient (its centroid). Under hard assignments at ε=0, GAR satisfies an exact conservation law: 𝒥k-means+𝒜0=∑m‖g~m‖2 (Thm. B.1). Because the right-hand side is fixed, maximizing GAR is literally identical to running k-means clustering on the gradient arrows! Its continuous relaxation recovers the top-K spectral eigenvectors of the Gram matrix W (the table of all pairwise dot products, Thm. B.2). Try Tab E below!

How Does the Router Decide Where to Move One Item? (The Marginal Score smk)

Think of each expert as a study group. When a new student (item m) considers joining study group k, two things happen:

  1. Good effect (Compatibility): If the student’s topic aligns well with the group’s current direction Gk, the group becomes stronger.
  2. Cost (Load Dilution): Adding another person increases the denominator dk, slightly diluting the group’s existing focus.

Taking the exact derivative of 𝒜ε with respect to pmk produces this exact two-part balance (Sec. 3.3 & Prop. A.1, Eq. 4). Even better, at ε=0, it simplifies to smk=‖g~m‖2−‖g~m−μk‖2—meaning higher smk simply means item m is closer to expert k’s center!

Marginal Assignment Score (Quotient Rule = Compatibility minus Dilution Cost)Sec. 3.3 & Prop. A.1, Eq. (4)
smk(P) := ∂𝒜ε∂pmk = 2⟨Gk,g~m⟩dk(P)+ε ⏟ compatibility with expert k − ‖Gk‖2(dk(P)+ε)2 ⏟ load-dilution cost

In plain English: Moving a small weight δ of item m from expert a to expert b improves the total score whenever smb>sma. Notice this works even when no two tasks directly oppose each other!

Guided Tour of Lab 2 — What Each of the 5 Tabs Teaches
  • Tab A (3D S² Sphere): Shows why GAR beats conflict-only methods like STGC (Solving Token Gradient Conflict) even when all angles are acute. Drag the sphere to inspect the 3D angles!
  • Tab B (Self vs. Cross Terms): Splits GAR into two pieces: how sharply each item commits to one expert (self) vs. how well different items agree (cross).
  • Tab C (Why Divide by Load?): Shows directly why removing the denominator breaks routing and causes collapse when ρ>0.
  • Tab D (Marginal Score smk): Visualizes compatibility minus dilution cost as you slide traffic between Expert a and Expert b.
  • Tab E (k-Means & Spectral): Drag dots and click Run 1 k-Means Step to watch GAR reward 𝒜0 and k-means error 𝒥k-means change by the exact same amount in opposite directions!

Lab 2 — Step-by-Step Visual Derivation of the GAR Objective

Explore all five mathematical lenses that distinguish GAR from binary conflict detection (STGC) and unnormalized objectives.

Exact equations verified in verify_gar_math.py

Paper Sec. 3.3 exact worked example: Take three gradient vectors g~1,g~2,g~3 partitioned into two nonempty experts (ε=0). At equal unit norms, any pair with ⟨g~i,g~j⟩>−1 has positive cosine with its mean μC, so STGC flags zero conflicts—yet GAR decisively ranks {{1,2},{3}} highest! Try dragging the 3D sphere or raising ‖g~3‖ with negative c13 to trigger genuine STGC conflict flags.

PartitionGAR A0 (↑)STGC FlagsWinner?
Check Your Intuition • Challenge 2

Suppose two distinct task clusters have positive cosine similarity ρ = +0.40 (mildly correlated, not opposing). What happens if you drop the load denominator and maximize ∑k ||Gk||² directly?

Chapter 3 • Collapse Dynamics vs. Alignment Geometry (Sec. 4.3 & App. C)

Why Task-Loss Routing Collapses—and How GAR Pushes Back

If you train an MoE model with only the ordinary task loss (Baseline), something dramatic happens very often: one expert takes over almost all the data while the other experts stop learning. In fact, under top-1 RoBERTa-head routing (App. F.4), Baseline collapsed onto a single expert in 17 out of 25 training runs!

The Snowball Effect (Why Tiny Luck Becomes a Monopoly)

Why does this happen even when all experts start with symmetric random weights? Imagine two restaurants opening side by side on Day 1. By pure chance, Restaurant 1 gets 50.5% of the first day’s customers and Restaurant 2 gets 49.5%:

1
Slightly more traffic → slightly more practice: Expert 1 sees slightly more examples, so its skill κ1 grows faster (κ˙k=αpk).
2
More practice → lower error: Because Expert 1 is slightly better trained, its loss ℓ1 drops lower than Expert 2’s loss (ℓk=ℓ0−aκk).
3
Lower error → even more traffic: The router naturally rewards the lower-loss expert (p˙k=βpk(ℓ¯−ℓk)). Traffic jumps from 50.5% → 55% → 75% → 99.9%. Expert 2 starves completely.

The Three Fates of a Router

Once you see the snowball effect, you can compare all three routing strategies in one glance:

  • Baseline (Task Loss Only): Falls straight into the snowball loop and collapses onto one expert (unbalanced AND unspecialized).
  • Load-Balancing Losses (SwitchAux, LoadPen): Stop the snowball by forcing equal traffic. This pushes the router toward the middle, where each expert receives a broad mix of tasks (balanced, but NOT specialized).
  • GAR (Gradient-Aligned Routing): Breaks the snowball in two ways. Its dk denominator caps the marginal reward of an already-busy expert, and splitting a coherent task off a crowded expert always increases the GAR score (balanced AND specialized).
Honest Reading of the Theory (App. C, Table 3) What the Math Proves Dynamically vs. Statically
Good science is honest about what its proofs cover. In Appendix C, the authors prove:
  • For Baseline (Prop. C.1 — Dynamic Proof over Time): A full continuous-time differential equation (ODE) proves that any tiny early advantage η>0 grows quadratically in log-odds space until p1(t)→1.
  • For GAR (Props. C.2, C.4 & Thm. C.8 — Static Snapshot Proofs): Appendix C proves three geometric properties at a fixed snapshot: (1) busy experts do not get linearly larger marginal scores (𝔼[smk]→γ); (2) tilting an expert toward one coherent task raises its reward; and (3) a collapsed state is never a local peak because splitting off a pure task increases the score. Appendix C explicitly notes it does not prove a full closed-loop training ODE for GAR.
Guided Tour of Lab 3 — See All Three Regimes in Action
  • Tab A (Exact Prop. C.1 ODE): Drag the initial luck η down to 0.001 (50.1% vs 49.9%) and watch Expert 1 still reach 99% monopoly!
  • Tab B (Exact GAR Static Theorems): Compare the green GAR line (flat & bounded) against the crimson no-denominator line (rising rapidly with traffic).
  • Tab C (Interactive 2D Phase Portrait): Switch between Baseline, Load-Balancing, and GAR, and click anywhere inside the square to watch the vector arrows carry your starting point!

Lab 3 — Winner-Take-All Collapse ODE & GAR Geometric Counter-Pressure

Panel A simulates the exact Prop. C.1 Baseline ODE in logit coordinates. Panel B plots the exact static Appendix C GAR theorems. Panel C offers a clearly badged illustrative toy.

Exact Logit-RK4 & App. C Formulas
Exact 2-Expert Replicator + Load-Competence ODE (Logit Form: z = log(p1/(1−p1)))App. C.2, Prop. C.1
z˙(t)=βaΔκ(t) , Δκ˙(t)=αtanh(z(t)2) , z(t)≥z(0)+βa(Δκ(0)t+c2t2)

Integrating directly in unbounded logit space z(t) avoids probability-clamp saturation and confirms the proven quadratic divergence bound with c=α(2p1(0)−1)=2αη>0.

Check Your Intuition • Challenge 3

In Proposition C.2 (homogeneous mixing, ε = 0), how does GAR’s expected in-window marginal score E[smk] behave as an expert’s load Lk grows larger?

Chapter 4 • Practical Algorithm & Experimental Design (Sec. 5, App. D, E & G)

How GAR Trains Fast Without Expensive Second Derivatives (Algorithm 1)

At first glance, you might worry: “Wait! If the router loss depends on gradients, won’t backpropagation take a gradient of a gradient—which is very slow and uses huge GPU memory?”

That is a great engineering question, and GAR solves it cleanly using two one-way walls (stopgrad) so it stays 100% first-order and adds only 3% to 12% extra step time! Here is what happens in one ordinary training step of GAR:

1
Normal forward & backward pass: Split each task’s batch (32 examples per task in multi-task runs) into micro-batches of 8 examples. Run the model forward through the router and experts, compute the normal task loss ℒtask, and accumulate ordinary gradients for all weights.
2
One-Way Wall #1 — Freeze gradient arrows (stopgrad(g_m)): For each 8-example group m, add up the expert gradients you already computed into gm, and freeze it as g~m. Because it is frozen, autograd never needs second derivatives!
3
One-Way Wall #2 — Freeze hidden features (stopgrad(h)): Pass the detached pre-router hidden states through the router again to get differentiable group probabilities pm. This ensures GAR’s extra loss never distorts the language backbone—it teaches only the router!
4
Score & update once: Compute ℒnorm=−∑k‖Gk‖2/(dk+ε), add λ∇θrℒnorm to the router’s gradient only, clip all gradients together once, and take one normal AdamW step.

How fast is this on a real GPU? On DeBERTa (Table 23), GAR takes 1.04× Baseline step time on a 5-task LoRA-FFN mixture (0.584s vs 0.561s/step, 20 observations/update). On single-task MRPC probes, it takes 1.03× for trainable full FFN experts and 1.12× for frozen LoRA. You get gradient-aware routing for almost the same compute cost as standard MoE training.

Lab 4 — Interactive Training Flow (Fig. 1 / Fig. 6 / Alg. 1) & Complete Protocol Explorer

Click any block in the schematic to inspect tensor contracts and gradient recipients, or spotlight a specific signal path below.

Grounded in Sec. 5, App. D, E & G
MAIN TASK PATHWAY (SHARED WITH BASELINE — SOLID) GAR DETACHED ALIGNMENT PATHWAY (ROUTER ONLY) λ∇(θ_router) L_norm (router only) ∅ stopgrad(h) ∅ stopgrad(g_m) 1. Matched Batches B=32/task → groups |m| = 8 examples 2. Router Gate E8K4 or Top-1 STE input: h (task-blind) 3. Expert Dispatch LoRA or Full FFN y_n = ∑ π_ne u_ne 4. Task Loss Equal task weight L_task = (1/T)∑l_t 7. Global Clip + 1 AdamW Step Non-router: L_task Router: +λL_norm 5A. Recompute p_m From stopgrad(h) p_m = (1/|m|)∑ q_n 6. L_norm G_k = ∑ p_mk g̃_m -∑ ||G_k||²/(d_k+ε) 5B. Template Gradients Sum across experts & detach g̃_m = sg(∑_e ∇_θe l_m)
Important Subtlety (App. D.2 & F.6) Task-Blind Router vs. Same-Task Micro-Batching
At both training and inference, the router never receives the task ID—it routes strictly from token or pooled hidden states h (task identity only selects the prediction head and loss in FFN settings, and isn’t even given to the head in the shared-logit RoBERTa-head stress test!). During training, GAR’s observation units m reuse the shared same-task micro-batches of 8 examples. Does GAR only work because micro-batches are grouped by task? No: the paper’s DeBERTa single-task E4K2 controls (where every micro-batch comes from the same single task) still show a paired GAR−Baseline gain of +0.93 [+0.21, +1.65] pp across [CoLA, MRPC, RTE, SST-2, QQP] (Table 1a, App. F.6)!

Complete v2 Scope: Settings, 7 Exact Comparators, 5 Mixtures & Metric Seams

Chapter 5 • Empirical Evidence, Pareto Frontier & Ablations (Sec. 6 & App. F)

What Actually Happens in Real Experiments?

Theory is only convincing if it works on real neural networks. To test GAR fairly, the authors ran 6 different experimental setups across 4 language backbones (RoBERTa-base, DeBERTaV3-base, Qwen3-1.7B, and Qwen3-8B) and 5 multi-task text-classification mixtures (combining GLUE, SuperGLUE, PAWS, and ANLI tasks). They tested both LoRA adapters and full-parameter FFN experts, both top-4 and hard top-1 routing, and even single-task controls.

Four Big Stories Hidden Inside the Tables

  1. GAR wins every single setup on accuracy: Across all 6 settings in Table 1(a), GAR ranks #1. It beats Baseline (task loss only) by +0.93 to +1.24 percentage points (pp), with all six 95% Student-t confidence intervals strictly above zero over 5 seeds. On competitive NLP benchmarks, a steady ~1.1 pp gain across 4 model families without adding model parameters is a reliable improvement.
  2. Load-balancing and conflict-penalty losses flatten traffic—but hurt accuracy in Frozen LoRA-FFN: Look at STGC, LoadPen, SwitchAux, and STGC+Load in Tab 2 (and Figure 2 at the top of Tab 3). They make expert traffic very flat (LVar down to 0.001, Utilization up to 97%), yet all four score lower accuracy than Baseline! Their Gradient-Mass Purity stays around 0.41–0.44, while GAR raises purity to 0.5645.
  3. Under hard top-1 routing, GAR stops catastrophic collapse: When each example picks only 1 expert out of 8 (E8K1), Baseline collapses onto one expert in 17 out of 25 runs. GAR cuts this to 1 out of 25 runs while gaining +1.06 pp.
  4. Honest science — look at the caveats too: In Appendix F.1, just 2 of the 10 backbone–mixture cells (Qwen3-1.7B 5-task and 6-task) account for 85.2% of GAR’s aggregate LVar reduction. Yet when you remove those 2 cells, GAR’s accuracy gain on the remaining 8 cells grows even larger (+1.20 pp vs. +1.10 pp)! In a few specific cells (Qwen3-8B 5/6-task and DeBERTa Full-FFN 6-task), CAGrad (a conflict-averse gradient baseline) stays very close or slightly ahead.
Guided Tour of Lab 5 — Hover Any Bar or Dot for Exact Numbers
  • Tab 1: Compare GAR’s accuracy gains across all 6 model setups (expand the Appendix F box for per-cell nuances).
  • Tab 2 (Pareto Scatter): Toggle All 10 Cells ↔ Leave-2-Out (8 Cells) and hover any dot to highlight its row in the table!
  • Tab 3 (Task Scale & RoBERTa-Head): See how GAR’s advantage grows from 5–6 tasks (+0.73 pp) to 7–8 tasks (+1.34 pp), while load-balancing methods stay negative in both bins.
  • Tab 4 (Ablations): Check the λ sweep peak at 10−3 and confirm empirically that removing the load denominator costs −0.47 pp accuracy and worsens load variance.
6 / 6 Settings Won (Table 1a)
+0.93 to +1.24 pp
Paired GAR − Baseline validation accuracy gain (all 95% Student-t CIs > 0).
Top-1 Collapse Cut 17×
17/25 → 1/25
Single-expert collapse runs under E8K1 RoBERTa-head routing (App. F.4).
Balanced ≠ Specialized
−1.55 pp (STGC)
STGC flattens LVar to 0.001 yet drops below Baseline; GAR raises purity to 0.565.
Near-Free Compute (Table 23)
1.03× – 1.12×
Step-time overhead (first-order only, router-only auxiliary gradient).

Lab 5 — Interactive Results, Pareto Frontier & Ablation Explorer

All values verified verbatim against arXiv:2609.36724v2 Tables 1, 2, 23, 39, 51, 52 & Figure 2.

Real v2 Paper Measurements
Top-1 Collapse Spotlight (App. F.4) One-Hot Dispatch Exposes WTA Collapse
Under trainable RoBERTa classification-head top-1 routing (E8K1), task-loss-only Baseline collapses onto a single expert (Util = 1/8) in 17 of 25 runs (mean LVar 0.08619, Purity 0.1602, Util 0.215). GAR collapses in only 1 of 25 runs (mean LVar 0.03275, Purity 0.4799, Util 0.465) and gains +1.06 [+0.83, +1.28] pp over Baseline and +0.79 [+0.30, +1.27] pp over CAGrad, winning all 5 mixtures.
Appendix F Per-Cell Nuances & Secondary Controls (Click to expand)
  • Frozen RoBERTa Top-1 E8K1 (App. F.2, Tables 35–36): GAR gains +0.77 [+0.59, +0.94] pp over Baseline and +0.58 [−0.24, +1.40] pp over CAGrad (CI crosses zero vs. CAGrad).
  • Subgroup cells where CAGrad beats GAR: On Qwen3-8B, CAGrad edges GAR on the 5-task (0.7360 vs 0.7326) and 6-task (0.7066 vs 0.7038) mixtures; on DeBERTa Full-FFN, CAGrad edges GAR on the 6-task mixture (0.8534 vs 0.8456, 5–6 bin GAR−CAGrad CI crosses zero at +0.166 [−0.512, +0.843] pp) and GAR−Baseline grad-mass purity CI crosses zero (+0.0120 [−0.0135, +0.0375]).
  • Runtime measurement scope (Table 23): The 1.04× (5-task LoRA-FFN) and 1.03× (full FFN) overheads were measured over 500-update timing runs, and 1.12× (single-task LoRA) over a 1-epoch probe.
Check Your Intuition • Challenge 4

In Table 1(b) (frozen DeBERTa + Qwen3-1.7B aggregate), STGC achieves LVar = 0.00101 and Utilization = 0.9725—far flatter than GAR (LVar = 0.01542, Util = 0.6225). Why does GAR still outperform STGC by +2.64 pp in accuracy?

Chapter 6 • Official Paper Figures Guide, Limitations & Provenance

Reading Guide to All 6 Official Figures in arXiv:2609.36724v2

Licensing & Non-Rehost Notice: This paper is distributed on arXiv under the arXiv non-exclusive distribution license (1.0), where authors retain copyright (not CC-BY). Accordingly, this tutorial does not rehost binary figure copies from the paper; instead, every figure was inspected directly from the downloaded v2 source (source/tex/figures/) and is linked directly to the official arXiv v2 HTML/PDF below with a concise reading guide.

Official FigureLocation in v2What to Look For (From Local Inspection)Official Link
Figure 1
methodology_overview_compact
Sec. 5.1 (p. 5) Solid top row = ordinary MoE task pathway (Batch → Router → Experts → Task loss). Dashed lower branch = detached template gradients g~m + group-mean pm feeding ℒnorm with direct gradient only to the router. Compare with Lab 4 above. View Fig. 1 ↗
Figure 2
task_scale_accuracy_gain
Sec. 6.3 (p. 8) Δ accuracy vs Baseline across 5–6 task (n=4) and 7–8 task (n=6) bins on frozen DeBERTa + Qwen3-1.7B. GAR gains +0.73 pp and +1.34 pp; STGC, STGC+Load, LoadPen, and SwitchAux average negative in both bins. Interactive view in Lab 5 Tab 3. View Fig. 2 ↗
Figure 3
gradient_manifold_intuition.png
App. A (p. 11) Left: warped grey grid (“Entangled gradient manifold”) with 9 mixed colored arrows. Center crimson arrow (“Route by gradient geometry”). Right: 4 tilted grids (Experts 1–4), each holding 3 parallel same-color arrows. Important caption note: illustrates grouping preference, not learned linear subspaces. View Fig. 3 ↗
Figure 4
implb_roberta_5_8_mechanism_main.pdf
App. F.3.1 4-panel checkpoint trajectories (200–2,000 updates, ±1 SE over 5 seeds, trainable RoBERTa-head): Load variance [0..0.012], Utilization [0.60..0.90], Task–expert NMI [0.02..0.06], Structure purity [0.42..0.46]. STGC/STGC+Load flatten load immediately but collapse NMI & structure purity within 0.008 of the task-independent lower bound; GAR beats Baseline & CAGrad at every checkpoint. View Fig. 4 ↗ · PDF ↗
Figure 5
implb_roberta_5_8_mechanism_extra.pdf
App. F.3.1 5 complementary trajectories (200–2,000 updates): ARI [0.01..0.03], Gradient-mass purity [0.30..0.45], Intra-expert coherence [0.00..0.18], Inter-expert similarity [−0.02..0.02], Norm. routing entropy (H/log 8, [0.615..0.660], max 2/3 ≈ 0.667). GAR reaches highest endpoint intra-expert coherence (+0.0315 over Baseline) and lowest normalized routing entropy. View Fig. 5 ↗ · PDF ↗
Figure 6
07_training_flow.tex
App. G (p. 55) Full side-by-side training-step schematic comparing GAR vs. Baseline from multi-task dataloaders through detached alignment branch to shared global clip + AdamW step. Interactive clickable version in Lab 4 above. View Fig. 6 ↗

If You Only Remember 5 Things from This Paper

1. Balanced traffic ≠ expert specialization: Sending 12.5% of tokens to each of 8 experts gives LVar = 0. However, if conflicting tasks are mixed inside every expert, their gradients cancel out and accuracy drops.
2. Route by gradient alignment, divided by load: GAR maximizes ∑k‖Gk‖2/(dk+ε). The numerator rewards putting aligned arrows together; the denominator stops one busy expert from taking all the traffic.
3. GAR is mathematically soft k-means in gradient space: Under hard routing, maximizing GAR is identical to minimizing within-expert gradient variance (𝒥k-means+𝒜0=∑‖g~m‖2). Every item is pulled toward the expert whose average gradient is closest.
4. Two stopgrad walls keep it almost free: Freezing g~m and h avoids expensive second derivatives and sends the extra alignment gradient only to the router (while ℒtask still trains the experts). Total step time is only 1.03×–1.12× Baseline (3%–12% overhead).
5. Real gains—with honest scope limits: GAR wins all 6 multi-task and single-task text-classification settings (+0.93 to +1.24 pp over Baseline) and cuts top-1 collapse 17×. Large-scale generative pretraining and multi-layer MoEs remain open questions for future work.

Practical Advice for Engineers Training MoE Models

If you train multi-task MoE or multi-LoRA models today, do not watch only Load Variance and Utilization on your dashboard. Also log a specialization metric, such as Gradient-Mass Purity or intra-expert gradient cosine coherence. That tells you right away whether your load-balancing loss is helping experts specialize or forcing incompatible tasks to cancel each other out.

Best 60-second experiment before closing this page: Jump to Lab 2 → Tab C (Why Divide by Load?), set ρ=+0.40, and watch Numerator-Only pick Collapse (71.2 > 52.0) while Load-Normalized GAR picks Separation (10.0 > 7.12). Then visit Lab 2 → Tab E and click Run 1 k-Means Step to watch GAR jump from 0.104 to 8.609 in a single move.

Scope & Limitations (Sec. 8 & App. D/F)
  • All experiments study supervised fine-tuning on English text classification (GLUE, SuperGLUE, PAWS, ANLI); large-scale pretraining and other modalities remain future work (Sec. 8).
  • All 95% Student-t confidence intervals (n=5, df=4) are conditional on HPO-selected configurations without multiplicity adjustment (App. E).
  • Official repository lyclyq/MoE_arxiv was verified empty (0 commits) on 2026-12-03, matching the paper’s statement that code “will be released.” All math identities and table cross-checks in this tutorial were independently verified via local Python scripts (scripts/verify_gar_math.py and scripts/verify_paper_tables.py).
  • arXiv v2 abstract–PDF discrepancy: On 16 Nov 2026, the authors updated the arXiv v2 metadata abstract to mention three component ablations (cross-observation terms alone, task-blind observations, task-label router supervision), but the uploaded v2 TeX/PDF tarball retains v1 .tex timestamps (29 Sep 2026) and omits those tables.
Beyond the Paper Critical Review & New Research Directions (Not Paper Claims)

The ideas below are independent research extensions inspired by the paper’s formulation and gaps—not claims made by Li et al. (2026).

  1. Streaming CountSketch / JL GAR for Token-Level Generative MoEs: Combine App. G.2’s factorized rank-1 gradients with random projections + EMA expert sketches (O(MEr) instead of O(MEPtr)) to scale GAR to multi-layer autoregressive LLM pretraining without task labels.
  2. Gauge-Invariant Output-Space / NTK-GAR: Replace coordinate-wise template summation across diverging LoRA experts (which breaks under orthogonal gauge rotations BeR,R−1Ae) with gauge-invariant functional-gradient kernels WijNTK=⟨∇yiℓi,∇yjℓj⟩⟨xi,xj⟩.
  3. Closed-Loop Coupled Bifurcation Analysis: Couple Prop. C.1’s competence ODE with GAR’s marginal alignment term to derive the critical threshold λcrit separating WTA collapse from stable specialization and explaining the inverted-U peak near λ≈10−3.
  4. Scale-Normalized & Off-Diagonal-Decoupled GAR: Separate gradient magnitude dominance from directional alignment via cosine-normalized Gram matrices and tunable diagonal weight α∈[0,1] for mixtures with heterogeneous loss scales.
  5. Aux-Loss-Free Soft-Floor Capacity Control + GAR: Pair GAR with DeepSeek-V3-style gradient-free bias updates enforcing only a soft floor dk≥dmin to push out the 4-metric Pareto frontier without hurting gradient purity.
  6. Shared-Expert + Mean-Centered Residual GAR: Absorb common-mode positive overlap g¯ in an always-active shared expert and run GAR on centered residuals g~m−g¯ to amplify separation margins in high-overlap mixtures.
  7. Emergent Gradient-Cluster Discovery for Multi-Domain Query / Adapter Routing: Use GAR offline during multi-domain encoder/SLM training to discover gradient-coherent latent domain clusters (rather than brittle human taxonomy splits) and distill into a sub-millisecond inference router.