Papers › From Sparse to Soft Mixtures of Experts

From Sparse to Soft Mixtures of Experts

2 Aug 2023arXiv:2308.00951archive 2025-07-28

Joan Puigcerver, Carlos Riquelme, Basil Mustafa, Neil Houlsby

Sparse mixture of expert architectures (MoEs) scale model capacity without significant increases in training or inference costs. Despite their success, MoEs suffer from a number of issues: training instability, token dropping, inability to scale the number of experts, or ineffective finetuning. In this work, we propose Soft MoE, a fully-differentiable sparse Transformer that addresses these challenges, while maintaining the benefits of MoEs. Soft MoE performs an implicit soft assignment by passing different weighted combinations of all input tokens to each expert. As in other MoEs, experts in Soft MoE only process a subset of the (combined) tokens, enabling larger model capacity (and performance) at lower inference cost. In the context of visual recognition, Soft MoE greatly outperforms dense Transformers (ViTs) and popular MoEs (Tokens Choice and Experts Choice). Furthermore, Soft MoE scales well: Soft MoE Huge/14 with 128 experts in 16 MoE layers has over 40x more parameters than ViT Huge/14, with only 2% increased inference time, and substantially better quality.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Syntology holds a reference implementation of Soft MoE, generated from the paper text (not the authors' code), at level 3 on Syntology's ladder: V2 “two implementations GENERATED from the paper's signature and spec agree numerically (1e-6) on fixture inputs” “neither of the two ever read the authors' own code, so V2 measures how unambiguously the paper specifies the method, not fidelity to the authors' implementation (measured 2026-09-11, commit 75eaa77: cross_checked_by is a second LLM on 2,628 of 2,831 served samples)”; V3 “paper-derived property tests pass on both of those same two generations.” (quoted from Syntology's server card). No rung compares this code against the authors' implementation. For agents: get_reference_implementation(name='Soft MoE') (how to connect); the free check have('2308.00951') needs no token.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 33 code samples: 30 from 5 repositories linked to this paper, 3 identical to code harvested from another paper's repository. Across all 33: 29 ran (of which 5 constructed an object rather than computing a result; 18 with no instrument failure: 3 honoured, 4 violated, 11 with no contract checked; 11 where Syntology's instrument failed) · 4 unverified. Where Syntology's instrument failed: 9 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 3 samples from 1 repository, 3 ran (2 with no instrument failure; 1 where Syntology's instrument failed); community (archive-listed): 27 samples from 4 repositories, 24 ran (14 with no instrument failure; 10 where Syntology's instrument failed); 3 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 7 of the 29 samples that ran have no recorded date.

google-research/vmoe officialmentioned in paperjaxSyntology: 3 samples, 3 ran (1 instrument-failed) · 0 unverified report
bwconrad/soft-moe mentioned on GitHubpytorchSyntology: 3 samples, 3 ran (2 instrument-failed) · 0 unverified report
fkodom/soft-mixture-of-experts mentioned on GitHubpytorchSyntology: 2 samples, 2 ran (0 instrument-failed) · 0 unverified report
lucidrains/soft-moe-pytorch mentioned on GitHubpytorchSyntology: 17 samples, 15 ran (6 instrument-failed) · 2 unverified report
umbertocappellazzo/petl_ast mentioned on GitHubpytorchSyntology: 5 samples, 4 ran (2 instrument-failed) · 1 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

33 samples harvested: 29 ran (of which 5 constructed an object rather than computing a result; 18 with no instrument failure: 3 honoured, 4 violated, 11 with no contract checked; 11 where Syntology's instrument failed) · 4 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

3ran · honoured contract
4ran · violated contract
9ran · our draft was wrong
2ran; the contract check could not run
11ran
4unverified

Licence: 8 of the 33 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 5 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. 3 samples are listed last, in a group without a repository. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 3 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

google-research/vmoe official repository 3 samples, 3 ran (1 instrument-failed) · 0 unverified
compute_capacity vmoe/moe.py ran · honoured contract Apache-2.0 (permissive) · d9d07130e203c96f · report fixture: signature num_tokens:int/0/int, num_experts:int/0/int, capacity_factor:float/0/float, ceil_or_round:str/0/str, multiple_of:int/0/int · returned int · level recorded, date not recorded
get_default_moe_num_experts_and_last_n vmoe/projects/soft_moe/configs/pretrain_jft4b.py ran · honoured contract Apache-2.0 (permissive) · 3c1f6eb9bbce7fc8 · report fixture: signature variant:str/0/str, patch_size:int/0/int · returned tuple · level recorded, date not recorded
get_hyper in 8 papers vmoe/projects/soft_moe/configs/pretrain_jft4b.py ran · our draft was wrong Apache-2.0 (permissive) · 896382e782635552 · report fixture: signature hyper:HyperStandIn/0/?, model:str/0/str · returned dict · level recorded, date not recorded
bwconrad/soft-moe community (archive-listed) 3 samples, 3 ran (2 instrument-failed) · 0 unverified
softmax in 240 papers
census: 53 implementations from 63 papers, 16 distinct outputs across 8 buckets, one shared input per bucket this sample: bucket 1 of 8, arg 1: rank 2, kind float, dtype float32
soft_moe/soft_moe.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 348d3e3d68c0c2dc · report fixture: signature x:Tensor/2/float, dim:int/0/int · returned Tensor · level recorded, date not recorded
SoftMoELayerWrapper soft_moe/soft_moe.py ran · metamorphic tier: invariant Apache-2.0 (permissive) · aaeb459d76d3691b · report fixture: signature x:Tensor/3/float · returned Tensor · level recorded 2026-09-22
softmax in 240 papers
census: 53 implementations from 63 papers, 16 distinct outputs across 8 buckets, one shared input per bucket this sample: bucket 1 of 8, arg 1: rank 2, kind float, dtype float32
soft_moe/soft_moe.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 84195cc106a2908b · report fixture: signature x:Tensor/2/float, dim:int/0/int · returned Tensor · level recorded 2026-09-22
fkodom/soft-mixture-of-experts community (archive-listed) 2 samples, 2 ran (0 instrument-failed) · 0 unverified
MultiExpertLayer soft_mixture_of_experts/soft_moe.py ran MIT (permissive) · 4767b6942d7a9c14 · report fixture: signature x:Tensor/3/float · returned Tensor · level recorded 2026-09-24
SoftMoE soft_mixture_of_experts/soft_moe.py ran MIT (permissive) · b51fa28596d7a766 · report fixture: signature x:Tensor/3/float · returned Tensor · level recorded 2026-09-24
lucidrains/soft-moe-pytorch community (archive-listed) 17 samples, 15 ran (6 instrument-failed) · 2 unverified
AllGather in 13 papers soft_moe_pytorch/soft_moe.py ran fingerprinted MIT (permissive) · f86d2cc1b619c3a7 · report fixture: returned AllGather · level recorded 2026-09-22
AllGatherFunction soft_moe_pytorch/soft_moe.py ran MIT (permissive) · 737c5706bfd26931 · report fixture: returned AllGatherFunction · level recorded 2026-09-22
Experts soft_moe_pytorch/soft_moe.py ran MIT (permissive) · b1dce0b4095f9c1c · report fixture: returned Experts · level recorded 2026-09-22
FeedForward in 198 papers soft_moe_pytorch/soft_moe.py ran · our draft was wrong MIT (permissive) · 14ed968c0a8fcc78 · report fixture: signature dim:int/0/int, mult:int/0/int, dropout:float/0/float · returned Sequential · level recorded 2026-09-22
GLUFeedForward soft_moe_pytorch/soft_moe.py ran · our draft was wrong MIT (permissive) · 49960f76a7235e60 · report fixture: signature dim:int/0/int, mult:int/0/int, dropout:float/0/float · returned Sequential · level recorded 2026-09-22
LayerNorm in 121 papers
census: 5 implementations from 5 papers, 5 distinct outputs across 3 buckets, one shared input per bucket
soft_moe_pytorch/soft_moe.py ran MIT (permissive) · 58f8445dde42979a · report fixture: returned LayerNorm · level recorded 2026-09-22
RMSNorm in 61 papers soft_moe_pytorch/soft_moe.py ran MIT (permissive) · 024a5f1d96cb0afb · report fixture: returned RMSNorm · level recorded 2026-09-22
all_gather_same_dim soft_moe_pytorch/soft_moe.py ran; the contract check could not run (RAISES) MIT (permissive) · 07572c9d0ff527a5 · report fixture: signature t:Tensor/2/float · returned list · level recorded 2026-09-22
all_gather_variable_dim soft_moe_pytorch/soft_moe.py ran MIT (permissive) · f42235237f40a9fd · report fixture: returned tuple · level recorded 2026-09-22
chunk_num soft_moe_pytorch/soft_moe.py ran · honoured contract fingerprinted MIT (permissive) · 279540af53f03369 · report fixture: signature num:int/0/int, chunks:int/0/int · returned list · level recorded 2026-09-22
cumsum_exclusive soft_moe_pytorch/soft_moe.py ran; the contract check could not run (RAISES) fingerprinted MIT (permissive) · 4607f03213358cab · report fixture: signature t:Tensor/3/float, dim:int/0/int · returned Tensor · level recorded 2026-09-22
divisible_by in 33 papers soft_moe_pytorch/soft_moe.py ran · violated contract fingerprinted MIT (permissive) · f912c209e9c899ca · report fixture: signature num:int/0/int, den:int/0/int · returned bool · level recorded, date not recorded
gather_sizes soft_moe_pytorch/soft_moe.py ran · our draft was wrong MIT (permissive) · d3b9292d51192dc2 · report fixture: signature t:Tensor/3/float, dim:int/0/int · returned Tensor · level recorded 2026-09-22
has_only_one_value soft_moe_pytorch/soft_moe.py ran · violated contract fingerprinted MIT (permissive) · 2924465c3aecc7f6 · report fixture: signature t:Tensor/1/float · returned Tensor · level recorded 2026-09-22
unpack_one in 8 papers soft_moe_pytorch/soft_moe.py ran · our draft was wrong MIT (permissive) · 57fd83aecedfe674 · report fixture: signature t:Tensor/2/float, ps:list/1/Size, pattern:str/0/str · returned Tensor · level recorded 2026-09-22
SoftMoE soft_moe_pytorch/soft_moe.py unverified MIT (permissive) · 0193b08b6700ed29 · report
split_by_rank soft_moe_pytorch/soft_moe.py unverified MIT (permissive) · 7079481b9b2287ec · report
umbertocappellazzo/petl_ast community (archive-listed) 5 samples, 4 ran (2 instrument-failed) · 1 unverified
Bottleneck_adapter src/MoA.py ran · metamorphic tier: invariant no licence file found · pointer only · ebb62e0a151b812e · report fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-22
Convpass_adapter src/MoA.py ran · metamorphic tier: invariant no licence file found · pointer only · 9da4a23bc3ecddd2 · report fixture: signature x:Tensor/3/float · returned Tensor · level recorded 2026-09-22
l2_normalize in 40 papers
census: 15 implementations from 13 papers, 5 distinct outputs across 3 buckets, one shared input per bucket this sample: bucket 1 of 3, arg 1: rank 2, kind float, dtype float32
src/MoA.py ran · our draft was wrong fingerprinted no licence file found · pointer only · 4760e36330feac9d · report fixture: signature x:Tensor/2/float, axis:int/0/int, eps:float/0/float · returned Tensor · level recorded 2026-09-22
make_adapter src/MoA.py ran · our draft was wrong no licence file found · pointer only · d1be2ead9db77c59 · report fixture: signature in_dim:int/0/int, reduction_rate:int/0/int, out_dim:int/0/int, adapter_block:str/0/str · returned Bottleneck_adapter · level recorded 2026-09-22
SoftMoA src/MoA.py unverified no licence file found · pointer only · 11e34ef59abccf2b · report
Repository not located 3 samples, 2 ran (0 instrument-failed) · 1 unverified
3 samples are identical to code Syntology harvested from another paper's repository; this paper's own copy was not located, so no repository is named and no licence is recorded.
default in 430 papers repository not located ran · violated contract fingerprinted licence of this copy not recorded · 60fff7c3c400d7ff · report fixture: signature val:int/0/int, d:int/0/int · returned int · level recorded, date not recorded
exists in 528 papers
census: 5 implementations from 103 papers, 1 distinct output on one shared input this sample: bucket 1 of 1, arg 1: rank 1, kind int, dtype int64
repository not located ran · violated contract licence of this copy not recorded · aa5486a3650902d8 · report fixture: signature val:Tensor/1/int · returned bool · level recorded, date not recorded
pack_one in 14 papers repository not located unverified licence of this copy not recorded · ab03f61657f300bc · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. For a generated assembly, an independent peer is a second implementation generated separately from the same paper text; neither implementation read the authors' code. At level 2 the two agreed numerically on the fixture's inputs; level 3 is recorded when property tests derived from the paper also passed on both, and each level 3 card prints how many its report lists. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. A generated assembly's label was set when its code was generated for the method, and no model judged it; its card prints it as "by construction" or "not judged by a model". Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another. Where an assembly's phrase has no constructed figure, a brick that ran is not among the harvested samples this build reads, and whether a brick's run only constructed an object is read from that brick's harvested sample, so the figure was not counted; it does not say there were none.

5 assemblies on this paper: 4 harvested, 1 generated, listed in 2 groups (siblings lifted in one batch form one group).

generated Assembly for Soft MoE (graph method: Soft MoE), generated from the paper text, not the repository's code. 1 brick; individually on a fixture: 1 ran (0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified. Ran end-to-end against an independent peer (level 3; 4 property tests passed on both).

label matches by construction: the code was generated for this method (not judged by a model)

  1. soft_moe_layer entry · level 3 · ran; the contract check could not run · 739c5f7e7f04b74126ca709313aee4115f8af68614d3a873729fc36e1a637701

4 sibling assemblies for Soft MoE (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for Soft MoE (graph method: Soft MoE). 24 bricks; individually on a fixture: 21 ran (of which 5 constructed an object rather than computing a result; 12 with no instrument failure: 2 honoured, 3 violated, 7 with no contract checked; 9 where Syntology's instrument failed) · 3 unverified. The assembly has not been run end-to-end.

one of 4 siblings

  1. SoftMoE entry · level 0 · unverified · 0193b08b6700ed29
  2. Experts model · level 1 · ran · b1dce0b4095f9c1c
  3. FeedForward model · level 1 · ran · our draft was wrong · 14ed968c0a8fcc78
  4. GLUFeedForward model · level 1 · ran · our draft was wrong · 49960f76a7235e60
  5. LayerNorm helper · level 1 · ran · 58f8445dde42979a
  6. RMSNorm helper · level 1 · ran · 024a5f1d96cb0afb
  7. default helper · level 1 · ran · violated contract · 60fff7c3c400d7ff
  8. exists helper · level 1 · ran · violated contract · aa5486a3650902d8
  9. gumbel_noise helper · level 1 · ran · honoured contract · d85a55ec5c2984ef
  10. AllGather helper · level 1 · ran · f86d2cc1b619c3a7
  11. chunk_num helper · level 1 · ran · honoured contract · 279540af53f03369
  12. cumsum_exclusive helper · level 1 · ran; the contract check could not run (RAISES) · 4607f03213358cab
  13. gather_sizes helper · level 1 · ran · our draft was wrong · d3b9292d51192dc2
  14. has_only_one_value helper · level 1 · ran · violated contract · 2924465c3aecc7f6
  15. pack_one helper · level 0 · unverified · ab03f61657f300bc
  16. split_by_rank helper · level 0 · unverified · 7079481b9b2287ec
  17. unpack_one helper · level 1 · ran · our draft was wrong · 57fd83aecedfe674
  18. GEGLU model · level 1 · ran · 31ca3469b530bd9a
  19. l2norm helper · level 1 · ran · our draft was wrong · 3eb58dae620046d3
  20. log helper · level 2 · ran · our draft was wrong · b5472673332de78e
  21. AllGatherFunction helper · level 1 · ran · 737c5706bfd26931
  22. all_gather_same_dim helper · level 1 · ran; the contract check could not run (RAISES) · 07572c9d0ff527a5
  23. all_gather_variable_dim helper · level 1 · ran · f42235237f40a9fd
  24. pad_dim_to helper · level 1 · ran · our draft was wrong · d3d5bf1b20109dcd

harvested Assembly for Soft MoE (graph method: Soft MoE). 6 bricks; individually on a fixture: 5 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 2 where Syntology's instrument failed) · 1 unverified. The assembly has not been run end-to-end.

one of 4 siblings

  1. SoftMoA entry · level 0 · unverified · 11e34ef59abccf2b
  2. l2_normalize helper · level 1 · ran · our draft was wrong · 4760e36330feac9d
  3. make_adapter helper · level 1 · ran · our draft was wrong · d1be2ead9db77c59
  4. Bottleneck_adapter helper · level 1 · ran · ebb62e0a151b812e
  5. Convpass_adapter helper · level 1 · ran · 9da4a23bc3ecddd2
  6. QuickGELU helper · level 1 · ran · 990ae00bb84c8cce

harvested Assembly for Soft MoE (graph method: Soft MoE). 2 bricks; individually on a fixture: 2 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified. The assembly has not been run end-to-end.

one of 4 siblings

  1. SoftMoELayerWrapper entry · level 1 · ran · aaeb459d76d3691b
  2. softmax helper · level 1 · ran · our draft was wrong · 84195cc106a2908b

harvested Assembly for Soft MoE (graph method: Soft MoE). 2 bricks; individually on a fixture: 2 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified. The assembly has not been run end-to-end.

one of 4 siblings

  1. SoftMoE entry · level 1 · ran · b51fa28596d7a766
  2. MultiExpertLayer model · level 1 · ran · 4767b6942d7a9c14

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2308.00951") returns these assemblies with each brick's role and wiring (how to connect).

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionAttention DropoutBPECosine AnnealingDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxSparse TransformerTransformerWeight Decay

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections