Routing in Gradient Space: Balanced Usage Is Not Expert Specialization
Organizations: University of Sydney · University of New South Wales
Abstract
Sparse expert models can distribute traffic evenly while still grouping incompatible training signals within the same experts. We study routing as a gradient-partitioning problem and introduce gradient-aligned routing (GAR), whose load-normalized router objective rewards grouping observations with aligned gradients. On five multi-task text-classification mixtures, we compare GAR with task-loss-only routing, gradient-combination and gradient-conflict methods, and load-balancing losses. With a fully trainable RoBERTa backbone and classification-head experts, GAR has the highest aggregate validation accuracy, 1.07 percentage points above task-loss-only routing. With frozen DeBERTa and Qwen3-1.7B backbones and low-rank adapter experts, it again ranks first, 1.10 points above task-loss-only routing, with better-balanced expert load and higher gradient-mass purity, the share of each expert's gradient-norm mass from its dominant task; the load-balancing losses flatten load further but leave this purity near its task-loss-only level. Top-1 routing, trainable full-parameter feed-forward network (FFN) experts, and a larger backbone also show positive aggregate gains. The results distinguish expert-load balance from gradient-based routing organization and indicate the predictive value of gradient-informed routing in multi-task text classification.
Figures & tables
| (a) Method | RoBERTa- head † | Head, top-1 † | DeBERTa- FFN † | Frozen- LoRA | Qwen3-8B | Single- task ‡ |
|---|---|---|---|---|---|---|
| Baseline | 0.7902 | 0.8039 | 0.8478 | 0.7593 | 0.7328 | 0.8820 |
| CAGrad | 0.7824 | 0.8066 | 0.8507 | 0.7625 | 0.7401 | 0.8799 |
| GAR | 0.8008 | 0.8145 | 0.8594 | 0.7702 | 0.7452 | 0.8913 |
| (pp) | ||||||
| 95% CI |
Appendix figures & tables33 assets
Supplementary material from the paper’s appendix.
Appendix
| Analyzed property | Appendix subsection | Formal support |
|---|---|---|
| Idealized setting | Appendix C.1 | Assumptions on manifold priors, gradient concentration, finite-window sampling, and the baseline dynamics. |
| Idealized baseline feedback | Appendix C.2 | Proposition C.1 . |
| Load-normalized anti-amplification | Appendix C.3 | Proposition C.2 . |
| Static directional tilt and coherence preference | Appendix C.4 and Appendix C.5 | Proposition C.4 plus Lemmas C.3 , C.6 , and C.7 . |
| Collapsed assignments are not local maxima | Appendix C.6 | Theorem C.8 for the leading-order alignment surrogate. |
| Mixture | Constituent classification datasets |
|---|---|
| Five tasks | QNLI, BoolQ, RTE, PAWS, WiC |
| Six tasks | QNLI, BoolQ, RTE, PAWS, ANLI, CB |
| Seven tasks (PAWS) | QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2 |
| Seven tasks (MRPC) | QNLI, BoolQ, RTE, WiC, CoLA, SST-2, MRPC |
| Eight tasks | QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2, CB |
| Method | Learning rate | Grad. clip | CAGrad | GAR |
|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC] | ||||
| Baseline | 1.2 | – | – | |
| CAGrad | 1.2 | 0.22 | – | |
| GAR | 1.2 | – | ||
| [QNLI, BoolQ, RTE, PAWS, ANLI, CB] | ||||
| Baseline | 1.0 | – | – | |
| Method | Learning rate | Grad. clip | Weight decay | Method-specific setting |
| [QNLI, BoolQ, RTE, PAWS, WiC] (5 tasks) | ||||
| Baseline | – | |||
| CAGrad | ; inner lr | |||
| GAR | ; load norm. | |||
| [QNLI, BoolQ, RTE, PAWS, ANLI, CB] (6 tasks) | ||||
| Baseline | – | |||
| Task | Method | Learning rate | Grad. clip | Weight decay | Method-specific setting |
|---|---|---|---|---|---|
| CoLA | Baseline | – | |||
| CAGrad | ; inner lr | ||||
| GAR | ; load norm. | ||||
| MRPC | Baseline | – | |||
| CAGrad | ; inner lr | ||||
| GAR | ; load norm. |
| Task | Method | Learning rate | Grad. clip | Weight decay | Method-specific setting |
|---|---|---|---|---|---|
| CoLA | Baseline | – | |||
| CAGrad | ; inner lr | ||||
| GAR | ; load norm. | ||||
| MRPC | Baseline | – | |||
| CAGrad | ; inner lr | ||||
| GAR | ; load norm. |
| Mixture | LR | Clip | WD | Batch/group | Seq. |
|---|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC] | 1.1 | 0.010 | 32/8 | 256 | |
| [QNLI, BoolQ, RTE, PAWS, ANLI, CB] | 0.8 | 0.010 | 32/8 | 256 | |
| [QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2 ] | 0.8 | 0.010 | 32/8 | 256 | |
| [QNLI, BoolQ, RTE, WiC, CoLA, SST-2 , MRPC] | 0.8 | 0.010 | 32/8 | 256 | |
| [QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2 , CB] | 0.8 | 0.010 | 32/8 | 256 |
| Mixture | LR | Clip | WD | Batch/group | Seq. |
|---|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC] | 1.0 | 0.032 | 32/8 | 256 | |
| [QNLI, BoolQ, RTE, PAWS, ANLI, CB] | 0.8 | 0.010 | 32/8 | 256 | |
| [QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2 ] | 0.8 | 0.010 | 32/8 | 256 | |
| [QNLI, BoolQ, RTE, WiC, CoLA, SST-2 , MRPC] | 1.1 | 0.020 | 32/8 | 256 | |
| [QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2 , CB] | 1.0 | 0.010 | 32/8 | 256 |
| Method | Objective | Auxiliary gradient path |
|---|---|---|
| Baseline | None. | |
| STGC | Through logits; conflict masks detached. | |
| STGC+Load | Through logits; conflict masks and hard frequencies detached. | |
| LoadPen | Directly through the router; routing inputs detached. | |
| SwitchAux | Directly through the router for frozen FFN; ordinary routing path for the trainable head. |
| Setting | Method | Step (s) | Wall (s) | Factor |
|---|---|---|---|---|
| Single-task MRPC | ||||
| Frozen LoRA | Baseline | 0.0528 | 13.27 | 1.00 |
| Frozen LoRA | GAR | 0.0593 | 14.77 | 1.12 |
| Trainable FFN | Baseline | 1.00 | ||
| Trainable FFN | GAR | 1.03 | ||
| Five-task mixture [QNLI, BoolQ, RTE, PAWS, WiC] | ||||
| Method | Acc | Seed std | LVar | Purity | Util. |
|---|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC] | |||||
| Baseline | 0.7268 | 0.0077 | 0.01229 | 0.5835 | 0.600 |
| CAGrad | 0.7360 | 0.0030 | 0.00966 | 0.6466 | 0.700 |
| GAR | 0.7326 | 0.0033 | 0.00790 | 0.6401 | 0.650 |
| [QNLI, BoolQ, RTE, PAWS, ANLI, CB] | |||||
| Baseline | 0.6950 | 0.0113 | 0.05777 | 0.4679 | 0.375 |
| Method | Acc | Seed std | LVar | Purity | Util. |
|---|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2] | |||||
| Baseline | 0.7466 | 0.0088 | 0.01096 | 0.3761 | 0.625 |
| CAGrad | 0.7509 | 0.0075 | 0.01623 | 0.3934 | 0.600 |
| GAR | 0.7641 | 0.0059 | 0.00713 | 0.4391 | 0.775 |
| [QNLI, BoolQ, RTE, WiC, CoLA, SST-2, MRPC] | |||||
| Baseline | 0.7475 | 0.0048 | 0.01020 | 0.5165 | 0.725 |
| Scope | Method | Acc | LVar | Purity | Util. |
|---|---|---|---|---|---|
| Five mixtures | Baseline | 0.7328 | 0.02183 | 0.4633 | 0.560 |
| CAGrad | 0.7401 | 0.01890 | 0.4789 | 0.595 | |
| GAR | 0.7452 | 0.00813 | 0.5233 | 0.690 |
| Scope | GAR Baseline | GAR CAGrad |
|---|---|---|
| Five mixtures | [ , ] | [ , ] |
| Scope | GAR Baseline | GAR CAGrad |
|---|---|---|
| RoBERTa | [ , ] | [ , ] |
| DeBERTa | [ , ] | [ , ] |
| Qwen3-1.7B | [ , ] | [ , ] |
| Two-backbone mean (DeBERTa, Qwen3-1.7B) | [ , ] | [ , ] |
| Three-backbone mean | [ , ] | [ , ] |
| Method | Acc | Seed std | LVar | Gradient-mass purity | Util. |
|---|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC] (5 tasks) | |||||
| Baseline | 0.6294 | 0.0091 | 0.01398 | 0.4734 | 0.575 |
| CAGrad | 0.6288 | 0.0093 | 0.00937 | 0.4222 | 0.700 |
| GAR | 0.6367 | 0.0076 | 0.00848 | 0.4966 | 0.675 |
| [QNLI, BoolQ, RTE, PAWS, ANLI, CB] (6 tasks) | |||||
| Baseline | 0.6375 | 0.0069 | 0.02184 | 0.4472 | 0.575 |
| Quantity | GAR Baseline | GAR CAGrad |
|---|---|---|
| Five mixtures (five to eight tasks) | ||
| Accuracy (pp) | [ , ] | [ , ] |
| LVar | [ , ] | [ , ] |
| Gradient-mass purity | [ , ] | [ , ] |
| Utilization | [ , ] | [ , ] |
| Accuracy by task-count bin (pp) | ||
| Metric | GAR Baseline | GAR CAGrad | GAR STGC |
|---|---|---|---|
| Accuracy (pp) | [ , ] | [ , ] | [ , ] |
| LVar | [ , ] | [ , ] | [ , ] |
| Utilization | [ , ] | [ , ] | [ , ] |
| Grad. purity | [ , ] | [ , ] | [ , ] |
| Struct. purity | [ , ] | [ , ] | [ , ] |
| NMI | [ , ] | [ , ] | [ , ] |
| Method | Acc | Seed std | LVar | Gradient-mass purity | Util. |
|---|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC] (5 tasks) | |||||
| Baseline | 0.7864 | 0.0101 | 0.10806 | 0.1976 | 0.125 |
| CAGrad | 0.7897 | 0.0081 | 0.03731 | 0.5230 | 0.375 |
| GAR | 0.8038 | 0.0074 | 0.02377 | 0.5832 | 0.525 |
| [QNLI, BoolQ, RTE, PAWS, ANLI, CB] (6 tasks) | |||||
| Baseline | 0.7818 | 0.0064 | 0.04267 | 0.2903 | 0.350 |
| Quantity | GAR Baseline | GAR CAGrad |
|---|---|---|
| Five mixtures (five to eight tasks) | ||
| Accuracy (pp) | [ , ] | [ , ] |
| LVar | [ , ] | [ , ] |
| Gradient-mass purity | [ , ] | [ , ] |
| Utilization | [ , ] | [ , ] |
| Accuracy by task-count bin (pp) | ||
| Method | Acc | Seed std | LVar | Purity | Util. |
|---|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC] (5 tasks) | |||||
| Baseline | 0.8464 | 0.0027 | 0.00365 | 0.4015 | 0.825 |
| CAGrad | 0.8418 | 0.0059 | 0.00393 | 0.4208 | 0.825 |
| GAR | 0.8528 | 0.0043 | 0.00284 | 0.4102 | 0.900 |
| [QNLI, BoolQ, RTE, PAWS, ANLI, CB] (6 tasks) | |||||
| Baseline | 0.8311 | 0.0110 | 0.00325 | 0.3537 | 0.875 |
| Quantity | GAR Baseline | GAR CAGrad |
|---|---|---|
| Five mixtures (five to eight tasks) | ||
| Accuracy (pp) | [ , ] | [ , ] |
| LVar | [ , ] | [ , ] |
| Gradient-mass purity | [ , ] | [ , ] |
| Utilization | [ , ] | [ , ] |
| Accuracy by task-count bin (pp) | ||
| Adapt. | Method | Acc | Seed std | LVar | Util. |
|---|---|---|---|---|---|
| LoRA | Baseline | 0.8783 | 0.0081 | 0.0300 | 0.690 |
| CAGrad | 0.8802 | 0.0110 | 0.0324 | 0.720 | |
| GAR | 0.8896 | 0.0065 | 0.0274 | 0.710 | |
| FFN | Baseline | 0.8857 | 0.0090 | 0.0700 | 0.530 |
| CAGrad | 0.8797 | 0.0103 | 0.0847 | 0.460 | |
| GAR | 0.8929 | 0.0075 | 0.0653 | 0.540 |
| Comparison | Mean difference (pp) | 95% paired CI (pp) | Paired |
|---|---|---|---|
| GAR Baseline | |||
| GAR CAGrad |
| Mixture | |||||
|---|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC] | |||||
| [QNLI, BoolQ, RTE, PAWS, ANLI, CB] | |||||
| [QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2 ] | |||||
| [QNLI, BoolQ, RTE, WiC, CoLA, SST-2 , MRPC] | |||||
| [QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2 , CB] | |||||
| Five-mixture mean |
| Task / metric | |||||
|---|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC] (5 tasks) | |||||
| QNLI | 77.04 | 78.54 | 79.02 | 79.84 | 78.89 |
| BoolQ | 61.36 | 61.85 | 62.13 | 61.90 | 61.41 |
| RTE | 54.15 | 55.74 | 55.88 | 57.18 | 56.61 |
| PAWS | 56.36 | 56.83 | 57.00 | 57.26 | 59.14 |
| WiC | 54.26 | 54.67 | 55.14 | 54.73 | 54.36 |
| Mixture | |||||
|---|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC] | |||||
| [QNLI, BoolQ, RTE, PAWS, ANLI, CB] | |||||
| [QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2 ] | |||||
| [QNLI, BoolQ, RTE, WiC, CoLA, SST-2 , MRPC] | |||||
| [QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2 , CB] | |||||
| Five-mixture mean |
| Task / metric | |||||
|---|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC] (5 tasks) | |||||
| QNLI | 86.12 | 87.99 | 88.10 | 88.15 | 87.93 |
| BoolQ | 72.06 | 72.51 | 71.91 | 73.02 | 71.86 |
| RTE | 71.05 | 72.71 | 72.85 | 73.57 | 72.64 |
| PAWS | 91.05 | 91.34 | 91.42 | 91.75 | 90.53 |
| WiC | 64.04 | 65.61 | 65.05 | 68.06 | 65.27 |
| Mixture | Acc | Seed std | LVar | Purity | Util. |
|---|---|---|---|---|---|
| [QNLI, BoolQ, RTE, PAWS, WiC] | 78.98 | 1.07 | 0.00561 | 0.5020 | 0.750 |
| [QNLI, BoolQ, RTE, PAWS, ANLI, CB] | 76.95 | 0.95 | 0.00615 | 0.5586 | 0.775 |
| [QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2 ] | 80.46 | 0.71 | 0.00605 | 0.3964 | 0.700 |
| [QNLI, BoolQ, RTE, WiC, CoLA, SST-2 , MRPC] | 80.17 | 0.56 | 0.00692 | 0.3761 | 0.750 |
| [QNLI, BoolQ, RTE, PAWS, WiC, CoLA, SST-2 , CB] | 80.41 | 0.42 | 0.00602 | 0.6280 | 0.725 |
Sparse Mixture-of-Experts
Sparse mixture-of-experts models route each input to a small subset of specialized networks to increase capacity while limiting computation.
See all 121 papers