ArXiv: 2404.02258

🎯 Pitch

Transformers waste FLOPs on tokens that don't need them—but Mixture-of-Depths models learn to skip 87.5% of tokens in alternating layers while outperforming isoFLOP baselines. This delivers 50% faster sampling with no performance loss, proving dynamic compute allocation can be both effective and hardware-friendly.


1. Executive Summary

This paper proposes Mixture-of-Depths (MoD) transformers, which learn to dynamically allocate FLOPs across token positions and model depth by using a learned top-k routing mechanism to select which tokens participate in self-attention and MLP computations at each layer—with unselected tokens bypassing the block entirely via residual connections—thereby enforcing a static, user-defined total compute budget per forward pass that is smaller than a vanilla transformer's. Trained on a language modeling objective using decoder-only transformers, MoD models match baseline performance at equivalent training FLOPs and wall-clock time while requiring a fraction of the FLOPs per forward pass, enabling step-time speedups upwards of 50% during post-training sampling. The optimal configuration aggressively routes 87.5% of tokens around every other block (using a 12.5% capacity on interleaved routing blocks) while still outperforming the isoFLOP-optimal baseline, establishing that transformers can recover or exceed baseline performance with substantially reduced per-forward-pass compute—provided the routing decisions are learned rather than stochastic.

2. Context and Motivation

The Core Problem: Uniform Compute Expenditure in Transformers

The fundamental inefficiency this paper tackles is deceptively simple: transformers expend the same amount of FLOPs on every token in every sequence, regardless of how much "thinking" that token actually requires. In a vanilla transformer, every token in a sequence participates fully in self-attention and MLP computations at every layer of the network. Whether a token represents a trivial definite article like "the" or a highly ambiguous word critical to parsing complex syntax, the computational cost is identical.

The authors state this directly in Section 1:

"Not all problems require the same amount of time or effort to solve. Analogously, in language modeling not all tokens and sequences require the same time or effort to accurately make a prediction. And yet, transformer models expend the same amount of compute per token in a forward pass."

This is not merely an aesthetic concern — it represents a genuine misallocation of computational resources. If some tokens are "easy" to predict (e.g., the untoken after a clear noun phrase, closed-class function words in deterministic syntactic contexts), then spending a full self-attention and MLP computation on them is wasteful. Conversely, if some tokens are "hard" (e.g., the first token of a novel named entity, a polysemous word in an ambiguous context, or the next token after a long-range dependency), they might genuinely benefit from deep processing. The ideal system would spend compute where it matters and save it where it doesn't.

Why This Matters: Training Cost, Inference Speed, and the Scaling Paradigm

This inefficiency has practical consequences that compound at scale. Transformer training runs are measured in exaFLOPs (the paper uses budgets of 6e18, 2e19, and 1e20 FLOPs), and each forward pass over billions of tokens involves massive matrix multiplications in self-attention and MLP layers. If a meaningful fraction of those FLOPs are wasted on tokens that don't require deep processing, then reducing that waste translates directly to:

  1. Faster training: Fewer FLOPs per forward pass means shorter wall-clock training time on equivalent hardware — or the ability to train larger models within the same time budget.

  2. Faster inference: For autoregressive generation (where tokens are produced one at a time and the model is stepped repeatedly), reducing per-step FLOPs by 50% means generating responses at roughly twice the speed. For deployed models serving millions of users, this has direct latency and cost implications.

  3. More efficient use of scaling budgets: In the dominant paradigm of scaling laws (where model size and training duration are traded off under a fixed FLOP budget), any technique that reduces per-token compute without sacrificing performance effectively shifts the Pareto frontier — you can train a larger model or train for longer with the same total compute, or achieve the same performance with less compute.

There is also a theoretical significance tied to the nature of language understanding. If transformers can learn to route tokens intelligently — sending easy tokens around heavy computation and reserving deep processing for complex ones — this suggests something about the structure of language itself: that the difficulty of next-token prediction is heterogeneously distributed across positions, and that the network can discern this heterogeneity without explicit supervision. The routing decisions become a window into what the model finds "easy" versus "hard."

Prior Approaches and Where They Fall Short

The paper situates itself within the broader literature on conditional computation — the idea that neural networks should expend compute only when needed, as articulated by Bengio (2013) and explored extensively in subsequent work. The paper identifies several families of prior approaches, each with characteristic limitations:

Early-exit methods (Elbayad et al., 2019; Liu et al., 2021; Schuster et al., 2022) allow tokens to stop progressing through the transformer's depth once a sufficiently confident prediction is made, skipping all remaining layers. The critical limitation, as the authors highlight in Section 2, is that these methods are purely sequential and irreversible: once a token exits, it cannot re-engage with deeper layers, and later tokens cannot attend to it in those deeper layers. This means early-exit models have no ability to route a token around a middle block but then have it participate in deeper computations — something that might be important when the representation built in deeper layers is needed for certain tokens but not for others. The authors explicitly contrast MoD with early-exit:

"In MoD, unlike in early-exit methods, a token can skip middle layers, then be updated via self-attention with tokens that have gone through all the middle layers. We speculate that this might be a useful property."

Adaptive computation time and shared-weight methods (Graves, 2016; Dehghani et al., 2018; Simoulin and Crabbé, 2021) allow the network to dynamically decide how many computational steps to apply at each position, often by iterating through layers with shared weights. These approaches introduce dynamic computation graphs — the number of operations varies at runtime — which is incompatible with modern hardware accelerators (GPUs/TPUs) that are optimized for static, predictable tensor operations. The authors note this tension:

"general formulations of this challenging problem may not work well with existing hardware constraints since they tend to introduce dynamic computation graphs"

This is a central motivation for MoD's design: by fixing the number of tokens processed (capacity kk) while letting the identity of those tokens be learned and context-dependent, MoD maintains static tensor sizes and computation graphs — the hardware always sees the same shape of operations, even though which tokens fill those shapes varies.

Mixture-of-Experts (MoE) transformers (Shazeer et al., 2017; Lepikhin et al., 2020; Fedus et al., 2022) are the most direct technical ancestor of MoD. In MoE, a learned router sends tokens to one of several specialized MLP "experts," keeping total compute roughly constant (since all tokens go through some expert). MoD differs in a crucial way: rather than routing between functionally similar computations (different MLP experts), MoD routes between a full transformer block (self-attention + MLP) and a null operation (pure residual connection). This means MoD can achieve a genuine reduction in total FLOPs — not just a reallocation — because some tokens avoid the computationally expensive self-attention and MLP entirely. The authors frame this explicitly:

"Unlike other conditional computation approaches that try to conserve or expend additional compute, MoE transformers use conditional logic to route tokens to one of many expert MLPs while keeping total compute expenditure constant. Our mixture-of-depths method can be thought of as using the routing logic from MoE transformers, but rather than having multiple experts, MoD deploys a single expert which can be dynamically skipped."

CoLT5 (Ainslie et al., 2023) is perhaps the closest prior work, using conditional routing to select between heavy and light feedforward pathways and between full and sparse attention. However, CoLT5 was developed for an encoder-decoder setting, which sidesteps the causality problem that MoD must address in decoder-only transformers: in a non-causal encoder, you can look at the entire sequence to make routing decisions, but in autoregressive decoding, you cannot use future tokens to decide which current tokens to route. MoD's contribution of a predictive router — where an auxiliary network or loss learns to predict top-k membership using only past information — specifically addresses this gap, as the authors note:

"CoLT5 uses soft top-k for making routing decisions. However, CoLT5 focuses on a encoder-decoder setting, and thus does need to contend with the problem of efficient sequential decoding given the non-causal nature of the top-k operation. In contrast, our current work with MoD focuses on the decoder-only setting, and so we propose a predictive router to enable efficient inference for conditional computation in transformers."

Stochastic routing (analogous to dropout applied at the block level) is the simplest form of conditional compute but suffers from a critical weakness: it has no mechanism for distinguishing which tokens genuinely need processing. The paper includes this as a control and shows it "significantly under-performs relative to vanilla transformers" (Section 3.3), establishing that learned routing is essential — the network must be able to assign different processing levels to different tokens based on their content and context.

Where Existing Approaches Collectively Fall Short

Stepping back, the paper identifies a gap at the intersection of three desiderata that no prior method simultaneously satisfies:

  1. Static computation graphs with predictable FLOPs (for hardware efficiency)
  2. Genuine FLOP reduction (not just reallocation, as in MoE)
  3. Decoder-only compatibility with autoregressive sampling (addressing the causality problem)

Early-exit methods satisfy (2) but fail on (1) and partially on (3) because tokens cannot re-engage after exiting. Adaptive computation time methods satisfy (2) and (3) but fail on (1) due to dynamic computation graphs. MoE satisfies (1) and (3) but fails on (2) because total FLOPs remain roughly constant — compute is reallocated across experts, not reduced. CoLT5 satisfies (1) and (2) but was designed for encoder-decoder models, leaving (3) unaddressed. Stochastic routing fails across the board — it doesn't effectively satisfy (2) because the performance degradation from arbitrary token dropping outweighs any FLOP savings.

MoD's explicit design goal is to hit all three: static compute budgets via per-block token capacities, genuine FLOP reduction by routing tokens around blocks, and decoder-only compatibility via the predictive router for autoregressive sampling.

How This Paper Positions Itself

The paper frames MoD not as a replacement for existing conditional computation methods but as a complementary tool in the efficiency toolkit, one that opens up a new axis for tuning the compute-performance tradeoff. The authors emphasize that MoD can be combined with MoE (creating "MoDE" models, Section 4.3) and with overtraining, and that the routing machinery is generic enough to support routing between arbitrary computation types — not just between a full block and a residual connection, but potentially between different specialized operations (memory lookups, tool use, etc.).

The empirical positioning is also notable. Rather than claiming absolute improvements over baseline transformers at any cost, the paper carefully anchors its comparisons to isoFLOP training budgets — meaning the total pre-training FLOPs are held constant between baseline and MoD models, and the question is whether MoD achieves better performance within that budget. This is a rigorous framing that avoids conflating gains from more compute with gains from smarter compute allocation. The paper's central empirical claim is that MoD shifts the isoFLOP curve "down and to the right" (Section 4.1): the optimal MoD model achieves lower loss and has more parameters than the optimal baseline at the same training FLOP budget, and smaller, faster MoD variants can match or exceed the optimal baseline's performance while being substantially faster to step.

3. Technical Approach

3.1 Reader Orientation

This is fundamentally a systems paper with an empirical analysis component — the authors propose, implement, and evaluate a specific architectural modification to transformer-based language models called Mixture-of-Depths (MoD). The core idea is: rather than having every token participate in every self-attention and MLP computation at every layer (as in vanilla transformers), the network uses a learned top-k routing mechanism at each block to select which tokens actually undergo the expensive computation, and which tokens simply bypass the block via a residual connection. The total number of tokens processed per block is fixed ahead of time (the capacity kk), so the computation graph remains static and predictable, but which specific tokens are processed is determined dynamically and context-sensitively by the model's own learned routing weights. This enables genuine FLOP reduction — not just reallocation — while maintaining hardware-friendly static tensor shapes.

3.2 Big-Picture Architecture (Diagram in Words)

The MoD transformer has five interconnected mechanisms working together:

  1. Token Embeddings (XlX^l) — at each layer ll, we have a sequence of token representations of length SS. This is the standard input that any transformer block would receive.

  2. Per-Block Router (wθw_\theta) — a learned linear projection (a weight vector) that maps each token's embedding to a single scalar weight rilr_i^l. This scalar expresses the router's preference for whether token ii should participate in the block's computations (higher value) or bypass them (lower value).

  3. Top-k Selection (Pβ(Rl)P_\beta(R^l)) — a hard thresholding operation: given a user-specified capacity CC (an integer less than the sequence length SS), the router weights across all tokens in the sequence are sorted, and only the top CC tokens with the highest router weights are selected to participate in the block's computations. The threshold is the (1C/S)(1 - C/S)-th percentile of the router weights. This ensures exactly CC tokens are processed (static computation graph), but the identities of those CC tokens are fluid and learned.

  4. Transformer Block Computation (ff) — the standard self-attention followed by MLP, but crucially operating only on the CC selected tokens rather than all SS tokens. This is where the FLOP savings come from: self-attention's query-key multiplication goes from O(S2)O(S^2) to O(C2)O(C^2), and the MLP processes CC rather than SS token representations.

  5. Routing Decision for Autoregressive Sampling — at inference time, the top-k operation is non-causal (it requires knowing all router weights across the sequence). To enable autoregressive generation, the paper trains either an auxiliary binary classifier (the "predictive router") or uses an auxiliary BCE loss that calibrates the router outputs so they can be thresholded independently without future information.

Information flows as follows: token embeddings enter layer ll → the router produces scalar weights for each token → the top CC tokens are selected → these CC tokens participate in self-attention and MLP, producing updated representations → the router weights for these selected tokens are multiplied onto the block's output (placing the router on the gradient path) → the updated representations are added via residual connection to the original embeddings → the SCS - C tokens that were not selected pass through unchanged (pure residual connection) → the full sequence proceeds to the next layer.

3.3 Roadmap for the Deep Dive

  • First, the compute budget mechanism (Section 3.1 of the paper): how capacity CC defines a static, user-controlled FLOP reduction, and the intuitions behind why some tokens might not need processing.
  • Second, the routing around transformer blocks (Section 3.2): the two-path architecture — full block computation vs. null operation — and the mathematical formulation of how tokens are selectively processed.
  • Third, the routing schemes (Section 3.3): token-choice vs. expert-choice routing, why expert-choice was chosen, and the specific top-k mechanism that ensures exactly CC tokens are selected per block.
  • Fourth, the routing implementation (Section 3.4): the concrete mathematical operations — router weight computation, percentile-based thresholding, block output formulation — and the critical design choice of multiplying router weights onto the block output to place them on the gradient path.
  • Fifth, the autoregressive sampling solution (Section 3.5): the causality problem with top-k routing during inference, and the two solutions (auxiliary BCE loss and predictive router MLP) that enable independent per-token routing decisions.
  • Sixth, training configuration (Section 3.6): the hyperparameters, model sizes, and experimental design used for the isoFLOP analyses, including the key finding that routing every other block with 12.5% capacity is optimal.

3.4 Detailed, Sentence-Based Technical Breakdown

This section provides an exhaustive walkthrough of each mechanism in the MoD transformer, the mathematical formulation, and the design decisions that make it work.


The Compute Budget Mechanism (Capacity)

The fundamental abstraction that enables predictable FLOP reduction is the concept of capacity, borrowed from the Mixture-of-Experts literature but repurposed here for a different goal.

What capacity means in MoE: In Mixture-of-Experts transformers (Shazeer et al., 2017; Fedus et al., 2022), capacity defines the maximum number of tokens that can be routed to a given expert MLP. If more tokens try to route to an expert than its capacity permits, the excess tokens are "dropped" (their representations pass through the residual connection unchanged for that expert's computation). Since MoE transformers have multiple experts per layer and every token goes through some expert, the total capacity across all experts is approximately equal to the sequence length — meaning total FLOPs are roughly constant compared to a vanilla transformer. Capacity in MoE is primarily a load-balancing mechanism to prevent all tokens from routing to a single popular expert.

What capacity means in MoD: In MoD, capacity is used for the opposite purpose — not to reallocate fixed compute, but to genuinely reduce total compute. By setting a single block's capacity CC to some value less than the sequence length SS, the self-attention and MLP in that block process only CC tokens rather than SS tokens. The FLOP implications are concrete and dramatic:

  • For self-attention, the query-key dot-product matrix goes from S×SS \times S to C×CC \times C. The FLOP count scales quadratically with the number of tokens being attended over. If C=S/2C = S/2, then self-attention FLOPs are reduced to (S/2)2/S2=1/4(S/2)^2 / S^2 = 1/4 of the vanilla transformer — a 75% reduction for that block's attention computation.

  • For the MLP, the reduction is linear rather than quadratic: the MLP processes CC token representations rather than SS, so FLOPs are reduced by a factor of C/SC/S. If C=S/2C = S/2, MLP FLOPs are halved.

  • The total per-block FLOP reduction is a combination of these two effects. In the specific configuration the paper finds optimal (C=256C = 256 out of S=2048S = 2048 total tokens, meaning C/S=0.125C/S = 0.125 or 12.5% capacity), self-attention FLOPs are reduced to approximately (0.125)2=0.0156(0.125)^2 = 0.0156, or 1.56% of the original attention FLOPs — a 98.44% reduction for the routing blocks' attention. The MLP processes 12.5% as many tokens, so its FLOPs are 12.5% of the original.

Critically, because CC is defined a priori (before training begins), the computation graph has fixed, known tensor sizes. The hardware always allocates exactly enough memory for CC tokens to be processed, regardless of which specific tokens end up being selected. This is what makes MoD hardware-friendly: there are no dynamic resizes, no variable-length loops, no unpredictable memory allocations. The computation is static in shape but dynamic in content.

The intuition behind capacity reduction: The authors hypothesize that certain tokens in a sequence do not require as much processing as others, and that a trained network can learn to identify these tokens and route them around blocks. The key question is: how aggressively can you reduce capacity before the loss of processing for important tokens outweighs the benefits of reduced FLOPs? The paper's empirical finding — that 12.5% capacity on interleaved routing blocks is optimal — suggests that the overwhelming majority of tokens (87.5%) can safely skip computation at alternating layers without harming, and sometimes even improving, performance. This is a striking result: it implies that vanilla transformers are wasting a massive fraction of their compute on tokens that don't need it.

Relationship to stochastic routing: If capacity reduction were applied randomly — for example, by dropping tokens uniformly at random rather than learning which to drop — performance degrades significantly. The paper includes this as a control condition (Section 3.3 and Figure 3): MoD transformers that use stochastic routing (sampling router weights from a Gaussian distribution and then applying top-k) perform "drastically worse than both the baseline and normal MoD transformer." This establishes that capacity reduction alone is not sufficient; the learned selection of which tokens to process is essential.


Routing Around Transformer Blocks

The MoD transformer modifies each block (or every other block, depending on configuration) to offer tokens two mutually exclusive computational paths:

Path 1: Full block computation. The token participates in self-attention (attending over all other tokens that were also selected for this block) and the subsequent MLP. Its output representation is updated based on contextual information from other selected tokens. This path is computationally expensive but provides the transformer's core reasoning capability.

Path 2: Residual connection only (null operation). The token bypasses self-attention and the MLP entirely. Its output is identical to its input — the token's representation remains unchanged through this block. This is computationally cheap: a simple addition of zero (or near-zero) to the existing residual stream.

The total number of FLOPs per forward pass is fewer than a vanilla transformer whenever the capacity for Path 1 is less than the total number of tokens SS. The paper illustrates with a concrete example:

"if we were to set a block's capacity to T2\frac{T}{2} (i.e., half the number of tokens as would be the case in a vanilla transformer) then query-times-key matrix multiplication during self-attention becomes 25% as FLOP-intensive as in a vanilla transformer ((T/2)2( (T/2)^2 vs. T2T^2 )"

The key design tension is: shrinking capacity reduces FLOPs (faster), but risks degrading performance if important tokens are prevented from participating in computations. At the extremes: capacity equal to SS with all tokens routing to Path 1 recovers a vanilla transformer (no speedup, full performance); capacity equal to 0 with all tokens routing to Path 2 produces a model that never engages with the transformer's parameters (maximum speedup, near-zero performance). The empirical contribution is finding a sweet spot between these extremes where speed improves substantially and performance matches or exceeds the baseline.

Why this is different from dropout: Superficially, routing tokens around blocks might sound like structured dropout applied to entire transformer blocks. The crucial difference is conditioning: dropout randomly masks units independent of the input, while MoD's routing decisions are a learned function of the token's content and context. This means the network can learn systematic patterns — e.g., always process tokens at the end of a sequence (which might be more predictive of the next token), or always process tokens in certain syntactic positions — rather than randomly dropping tokens without regard for their importance. The stochastic routing control experiment (Figure 3) quantifies this difference: random routing performs drastically worse, demonstrating that the learned, content-dependent selection is responsible for MoD's ability to maintain performance under aggressive capacity reduction.


Routing Schemes: Token-Choice vs. Expert-Choice

The paper considers two families of learned routing mechanisms, both drawn from the Mixture-of-Experts literature, and selects one based on specific advantages for the MoD setting.

Token-choice routing (Section 3.3): In this scheme, a router produces a probability distribution for each token over the available computational paths. Each token is then assigned to the path with the highest probability for that token (or sampled from the distribution). This is the "natural" formulation — tokens "choose" where they want to go. However, token-choice routing has a fundamental load-balancing problem: there is no guarantee that tokens distribute themselves evenly across paths. If the router learns to send all tokens to the preferred path (e.g., all tokens want to participate in the block's computation), then capacity constraints are violated, and some tokens must be dropped arbitrarily (typically by sequence position or batch order). Conversely, if all tokens learn to avoid computation (all routing to the residual connection), the block becomes useless. To prevent these degenerate equilibria, token-choice routing requires an auxiliary balancing loss — an additional term in the training objective that penalizes uneven routing distributions. The authors note this explicitly: "auxiliary losses ensure that all tokens don't converge to the same path."

Expert-choice routing (Section 3.3): This scheme inverts the decision process. Instead of tokens choosing paths, each computational path chooses the top-kk tokens based on the tokens' router weights. Specifically, the router produces a scalar weight for each token expressing its "preference" for that path (in MoD's two-path case, there is effectively one weight per token, representing preference for the computation path over the residual path). The path then selects the kk tokens with the highest weights. This guarantees perfect load balance: exactly kk tokens are assigned to each path, by construction. The tradeoff is that some tokens may be "over-processed" (selected by multiple paths) or "under-processed" (selected by no path). In the standard MoE setting with multiple parallel experts, expert-choice routing risks sending the same token to multiple experts or losing tokens entirely. But in MoD's specific two-path case — one computation path, one null path — a single top-kk operation naturally partitions tokens into the top kk (route to computation) and the remaining SkS - k (route to residual), with no possibility of overlap or coverage gaps.

Why expert-choice was selected for MoD: The paper provides three explicit justifications (Section 3.3):

  1. No auxiliary balancing loss needed. Because the top-kk operation enforces exact capacity by construction, there is no risk of degenerate routing distributions, and thus no need for an auxiliary loss term that could interfere with the primary language modeling objective.

  2. Relative routing weights can prioritize critical tokens. The top-kk operation depends on the magnitude of the router weights, meaning tokens compete with each other for limited computation slots. The router can "try to ensure that the most critical tokens are among the top-kk by setting their weight appropriately," which is qualitatively different from token-choice schemes where a token's routing decision is independent of other tokens' router outputs. This is particularly important for MoD since one path is a null operation — the router needs to ensure that genuinely important tokens are not among the tokens routed around the block.

  3. Single top-kk for two paths eliminates over/under-processing. With exactly two paths (computation and residual) and a single top-kk operation with capacity CC, the CC tokens with the highest router weights go to the computation path, and the remaining SCS - C tokens go to the residual path. This creates two mutually exclusive and exhaustive sets — no token is missed, and no token goes to both paths.


Routing Implementation: Mathematics and Mechanics

This is the core algorithmic section of the paper. We walk through the routing mechanism step by step, exactly as implemented.

Step 1: Router weight computation. Given a set of token embeddings at layer ll for a sequence of length SS:

Xl={xili is an integer, 1iS}X^l = \{x_i^l \mid i \text{ is an integer, } 1 \leq i \leq S\}

where xilRdx_i^l \in \mathbb{R}^d is the dd-dimensional embedding for token ii at layer ll.

The router itself is a simple learned linear projection — a single weight vector wθRdw_\theta \in \mathbb{R}^d — that maps each token embedding to a scalar:

ril=wθTxilr_i^l = w_\theta^T x_i^l

where rilRr_i^l \in \mathbb{R} is the router weight for token ii at layer ll.

What this computes: each token's dd-dimensional embedding is projected down to a single number via a dot product with a learned weight vector. This scalar expresses the router's preference for that token to participate in the block's computation — higher values mean "process this token," lower values mean "skip this token."

Why a simple linear projection: the router must be computationally cheap; if the router itself were expensive, it would defeat the purpose of reducing FLOPs. A single linear projection adds only O(d)O(d) computation per token, which is negligible compared to the O(d2)O(d^2) or higher cost of self-attention and MLP.

Step 2: Percentile thresholding. Define Rl={ril1iS}R^l = \{r_i^l \mid 1 \leq i \leq S\} as the set of all router weights for the sequence at layer ll. Let Pβ(Rl)P_\beta(R^l) be the β\beta-th percentile of this set, where:

β=1CS\beta = 1 - \frac{C}{S}

with CC being the user-defined capacity — an integer less than SS specifying how many tokens will be processed by the block — and SS being the sequence length.

What β\beta represents: it is the fraction of tokens that will not be selected for computation. If C=256C = 256 and S=2048S = 2048, then β=1256/2048=10.125=0.875\beta = 1 - 256/2048 = 1 - 0.125 = 0.875. The threshold P0.875(Rl)P_{0.875}(R^l) is the router weight value at the 87.5th percentile — meaning 87.5% of tokens have router weights below this threshold, and 12.5% have router weights above it.

Why percentile-based thresholding: this ensures exactly CC tokens are selected, regardless of the absolute scale of the router weights. If the router learns to produce weights that are all very high or all very low, the percentile threshold adapts — it always selects exactly the top CC tokens relative to each other. This is crucial for maintaining a static computation graph: the hardware always processes exactly CC tokens, never more or less.

Step 3: Block output formulation. The output for each token ii at layer l+1l+1 is defined as:

xil+1={rilfi(X~l)+xil,if ril>Pβ(Rl)xil,if ril<Pβ(Rl)x_i^{l+1} = \begin{cases} r_i^l \, f_i(\tilde{X}^l) + x_i^l, & \text{if } r_i^l > P_\beta(R^l) \\ x_i^l, & \text{if } r_i^l < P_\beta(R^l) \end{cases}

where:

  • X~l={xjlrjl>Pβ(Rl)}\tilde{X}^l = \{x_j^l \mid r_j^l > P_\beta(R^l)\} is the set of tokens whose router weights exceed the threshold (the "selected" tokens), containing exactly CC elements.
  • ff is the standard transformer block computation — multi-head self-attention followed by MLP — but crucially operating only on X~l\tilde{X}^l.
  • fi(X~l)f_i(\tilde{X}^l) is the output of ff specifically for token ii (the ii-th position in the output).
  • xilx_i^l is the residual connection: the token's original embedding before the block.

What this computes, case by case:

For tokens selected for computation (ril>Pβ(Rl)r_i^l > P_\beta(R^l)): The token undergoes self-attention (attending over all other selected tokens in X~l\tilde{X}^l) and the MLP. The resulting transformed representation fi(X~l)f_i(\tilde{X}^l) is then multiplied by the router weight rilr_i^l before being added to the residual connection. This multiplication is a critical design choice — the router weight is on the gradient path for selected tokens, meaning gradient descent can adjust wθw_\theta to increase or decrease this weight based on whether processing the token helped or hurt the language modeling objective. If multiplying by rilr_i^l scales down the block's contribution for a token that didn't benefit from processing, the router can learn to reduce that token's weight in the future (potentially routing it around the block).

For tokens bypassing the block (ril<Pβ(Rl)r_i^l < P_\beta(R^l)): The token's representation passes through unchanged. Its output is exactly its input — a pure residual connection with no transformation.

For tokens at the threshold (ril=Pβ(Rl)r_i^l = P_\beta(R^l)): The paper's formulation uses strict inequalities (>> and <<). In practice, with floating-point router weights and a large sequence, exact equality is vanishingly rare, and the implementation resolves ties deterministically (e.g., by sequence order).

Why multiply the router weight onto the block output: The authors state that this "puts the router weights along the 'gradient path,' thus subjecting them to the forces of gradient descent through the course of the language modeling task." This means the router weight for a selected token directly modulates how much the block's computation affects that token's representation. If the router weight is small, the block's contribution is attenuated, and the router receives gradient signal to either increase the weight (if the block's computation was beneficial) or decrease it (if not). The authors experimented with versions where router weights were also included along the computational path for tokens that bypass the block, but found it "sufficient — and implementationally simpler — to only include the router weights along the computational path for those tokens that do not bypass the block's computations."

The self-attention nuance: A subtle but important point: the output xil+1x_i^{l+1} for a token ii might depend on other tokens xjilx_{j \neq i}^l because of the self-attention operation within ff. Specifically, self-attention computes queries, keys, and values for all selected tokens in X~l\tilde{X}^l, and each selected token attends over all other selected tokens. This means that whether token ii itself is selected affects its output representation (it participates in self-attention as both query and key), but also that which other tokens are selected affects token ii's output (it can only attend to selected tokens). The routing decisions create a dynamic attention pattern: at each routing block, the set of tokens that can be attended to is exactly the set of tokens that were selected for computation. This is a form of learned, content-dependent sparsity in the attention pattern, on top of the learned sparsity in which tokens get updated.

FLOP accounting: The cardinality of X~l\tilde{X}^l is exactly CC (the user-defined capacity). Therefore, self-attention's query-key multiplication involves matrices of size C×CC \times C rather than S×SS \times S, and the MLP processes CC token representations rather than SS. This is where the compute savings materialize. The paper notes: "the mixture-of-depths transformer accrues compute savings relative to the baseline because the input to the block's computations ff comprise fewer tokens than usual (C<SC < S), rendering the self-attention and MLP less expensive."

Routing frequency: The paper found that routing every other block (interleaving routing blocks with standard full-capacity blocks) is "crucial for strong performance" (Section 4.1). This means half the blocks in the transformer are standard (all SS tokens participate), and the other half are MoD routing blocks (only CC tokens participate). The full-capacity blocks provide periodic "full information" processing where every token can attend to every other token, while the routing blocks provide efficient partial processing. The paper does not provide a detailed theoretical justification for why interleaving is necessary, but plausibly: the full-capacity blocks ensure that the model never loses the ability to do global computation across the full sequence, while the routing blocks selectively deepen processing for the tokens that benefit from it.


Autoregressive Sampling: Solving the Causality Problem

The top-k routing mechanism described above has a fundamental problem during autoregressive generation: it is non-causal. To determine whether a given token ii is among the top CC tokens, the router needs access to all router weights rjlr_j^l for j=1,,Sj = 1, \dots, S in the sequence — including tokens that come after token ii. During training, this is fine because the entire sequence is available simultaneously (teacher forcing). During autoregressive sampling, however, future tokens don't exist yet — you cannot compute their router weights, so you cannot perform the top-k operation causally.

The problem in detail: When generating text token by token, at time step tt you have tokens 1,,t1, \dots, t available and are generating token t+1t+1. To route tokens at layer ll, you would need to know whether token tt (or any previous token) is among the top CC in the full sequence — but the full sequence doesn't exist yet. You could compute router weights for tokens 1,,t1, \dots, t and select the top CC among them, but this would mean capacity is always saturated (since CC could be larger than tt for short prefixes), and the routing decisions would change retroactively as the sequence grows, breaking the autoregressive property.

The paper proposes two solutions, both of which convert the non-causal top-k operation into a causal, per-token decision.

Solution 1: Auxiliary binary cross-entropy loss (BCE). During training, the router's outputs rilr_i^l are used as logits for a binary classification task. The target is 1 if token ii was among the top-CC tokens in the full sequence (i.e., ril>Pβ(Rl)r_i^l > P_\beta(R^l)) and 0 otherwise. The auxiliary loss is standard binary cross-entropy:

Laux=1Si=1S[tilog(σ(ril))+(1ti)log(1σ(ril))]\mathcal{L}_{\text{aux}} = -\frac{1}{S} \sum_{i=1}^S \left[ t_i \log(\sigma(r_i^l)) + (1 - t_i) \log(1 - \sigma(r_i^l)) \right]

where ti{0,1}t_i \in \{0, 1\} is the target (1 if selected, 0 if not) and σ(ril)=1/(1+eril)\sigma(r_i^l) = 1/(1 + e^{-r_i^l}) is the sigmoid of the router weight.

What this computes: the standard binary cross-entropy between the sigmoid of each token's router weight and whether that token was actually selected by the non-causal top-kk operation. This loss pressures the router to produce weights such that σ(ril)\sigma(r_i^l) is above 0.5 for tokens that would be in the top-CC and below 0.5 for tokens that would not.

Why this enables causal sampling: After training with this auxiliary loss, at inference time you can make per-token routing decisions independently: if σ(ril)>0.5\sigma(r_i^l) > 0.5, route the token to computation; if σ(ril)<0.5\sigma(r_i^l) < 0.5, route it to the residual. This decision depends only on token ii's own router weight, not on any future tokens. The auxiliary loss has effectively "distilled" the global top-kk decision into a local thresholding rule. The authors report that "this auxiliary loss empirically affects the primary language modeling objective by approximately 0.20.3%0.2-0.3\%" — a small degradation, which they presumably measured as an increase in the primary loss compared to training without the auxiliary loss. The router outputs become centered such that approximately sigmoid(ril)0.5\text{sigmoid}(r_i^l) \approx 0.5 at the decision boundary, with selected tokens above and non-selected tokens below.

Solution 2: Auxiliary MLP predictor (predictive router). Instead of adding a loss term, a separate small MLP (a "second router") is trained to predict, from each token's representation (with gradient stopped), whether that token will be among the top-CC in the full sequence. This predictor receives the same input as the main router but has a stop-gradient applied, meaning its training does not affect the token representations or the primary language modeling objective.

What this computes: the predictive router is a binary classifier that approximates the top-kk selection function ti=1[ril>Pβ(Rl)]t_i = \mathbb{1}[r_i^l > P_\beta(R^l)] using only per-token information. Like Solution 1, it produces a scalar that can be thresholded at inference time to make causal routing decisions.

Why this might be preferable: the authors note that this method "does not affect the language modeling objective, and empirically does not significantly impact the step speed." The predictive router is a small MLP (exact architecture unspecified in the paper) that adds minimal overhead at inference time.

Empirical validation of causal routing: The authors report (Section 4.2, Figure 6) that switching from the non-causal top-kk routing scheme to the predictor-based approach during autoregressive sampling "leads to minimal performance degradation." The auxiliary task is described as "relatively easy" and "quickly achieves 99% accuracy." This high accuracy suggests that the routing decisions are not heavily dependent on future tokens — the router weights for a given token contain enough information to predict whether that token will be selected without knowing the router weights of later tokens. This is somewhat surprising: one might expect that a token's importance in a sequence depends on what comes after it (e.g., a token that introduces a new topic might only be recognizable as important once the subsequent elaboration is seen). The high predictor accuracy suggests either that (a) the routing decisions are predominantly based on local, backward-looking features, or (b) the predictor learns to infer likely future content from past context (e.g., "this token looks like it starts a new paragraph, which usually means the subsequent tokens will be important, so I should route this token to computation now").


Training Configuration and Hyperparameters

The paper's experimental design is built around isoFLOP comparisons: holding total training FLOPs constant and comparing MoD variants against vanilla transformer baselines at the same computational budget.

Base hyperparameters (Section 3.6): All models use the same foundational configuration — cosine learning rate schedules equal to the number of training steps (no warmup specified), batch size 128, sequence length 2048 tokens. These are held constant across all comparisons; the only variations are in model architecture (number of layers, heads, embedding dimension) to create differently sized models for the isoFLOP analyses.

FLOP budgets: The paper reports on three training budgets: 6e18 FLOPs (for hyperparameter tuning), 2e19 FLOPs, and 1e20 FLOPs (for the full isoFLOP analysis). These are total pretraining FLOPs, meaning the cumulative computation across all forward and backward passes during training.

Model size range: For the isoFLOP analysis (Figure 4), models ranged from 60M to 3B parameters, with both baseline and MoD variants trained at multiple sizes to trace out the isoFLOP curve.

Optimal MoD configuration (determined from the 6e18 FLOP sweep, Figure 3):

  • Routing frequency: every other block (interleaved routing blocks and standard blocks). The paper states: "routing every other block was crucial for strong performance."
  • Capacity: 12.5% of the total sequence (256 tokens out of 2048 per batch element). The paper states: "we found that aggressive capacity reduction was best (gradual improvements were observed when reducing the capacity down to 12.5% of the total sequence, corresponding to 87.5% of tokens routing around blocks, with performance degrading beyond this point)."
  • Router architecture: a single learned linear projection (weight vector wθw_\theta) per routing block.
  • Routing scheme: expert-choice routing using the top-kk (top-CC) mechanism, with the router weight multiplied onto the block output for selected tokens.

Stochastic routing baseline: For the control experiment, router weights were sampled from a Gaussian distribution rather than learned, and top-kk was applied to these random weights. This model "performed drastically worse than both the baseline and normal MoD transformer."

IsoFLOP analysis methodology (Figure 4): For each FLOP budget (6e18, 2e19, 1e20), multiple MoD variants of different sizes were trained using the fixed 12.5% capacity, every-other-block configuration. The same was done for vanilla transformer baselines. The isoFLOP curve shows training loss (presumably log perplexity on the training data, though the paper refers to it as "final log probability training objective") as a function of model size for a fixed total training FLOP budget. The "isoFLOP optimal" model is the one that minimizes this loss for that budget.

Key empirical findings from the training configuration:

  1. The optimal MoD transformer "drags the baseline isoFLOP curve down and to the right" — achieving lower loss than the optimal baseline while also having more parameters.
  2. Smaller MoD models exist that "are as- or better-performing than the optimal baseline model while being faster to step." The paper flags a specific 220M parameter MoD variant (model #3 in Figure 3) that slightly outperforms the 220M isoFLOP optimal baseline but is "upwards of 60% faster to step during training."
  3. When run on equivalent hardware, these two models "take approximately the same amount of wall-clock time to train" — the faster per-step speed of the MoD variant (due to reduced FLOPs per forward pass) is offset by the need to train a model that is the same size (same number of parameters, so backpropagation costs are similar). This is a nuanced point: the speed gain is in the forward pass, but the backward pass and optimizer updates depend on the number of parameters, which is unchanged.

Wall-clock time vs. FLOPs: The paper notes that "FLOPs per forward pass" and "wall-clock step time" are "tightly correlated" in their experiments but are not identical. The forward pass FLOP reduction translates to genuinely faster step times because the computationally expensive operations (self-attention, MLP) are operating on fewer tokens. The authors provide normalized FLOPs per forward pass as a proxy for step time, noting that "a similar plot can be produced showing relative wall-clock step times and the same basic trend is present."

Scaling behavior: The paper finds that "it is better to add depth than to add width when adding FLOPs to the model" (Section 4.1). This means that when scaling up an MoD transformer to match the FLOPs per forward pass of the isoFLOP-optimal baseline (which the paper identifies as the condition for optimal MoD performance), one should preferentially add layers rather than increasing the embedding dimension or number of attention heads. The paper does not provide detailed reasoning for why depth is preferred, but this is consistent with the intuition that MoD creates a form of variable-depth processing (different tokens go through different numbers of effective layers), and deeper models can better exploit this flexibility.

Memory savings: The paper briefly notes that MoD transformers showed "memory savings relative to equivalently sized baseline models at larger sizes, with some variants requiring fewer total devices (i.e., a smaller TPU topology)." This is attributed to the reduced number of tokens being processed in self-attention and MLP layers, which reduces the size of intermediate activations and therefore the memory footprint. The paper speculates that these savings "could have significant positive effects in regards to the KV cache size during autoregressive sampling" — the key-value cache for self-attention in the routing blocks would only need to store CC entries rather than SS entries, a substantial reduction for inference.

Mixture-of-Depths-and-Experts (MoDE) integration (Section 4.3): The MoD routing mechanism can be combined with MoE in two ways:

  • Staged MoDE: MoD routing is applied first (deciding which tokens participate in self-attention), followed by MoE routing (deciding which expert MLP each selected token goes to). This allows tokens to skip self-attention entirely.
  • Integrated MoDE: The MoD and MoE routing are unified — tokens are routed to either one of the expert MLPs or to a "no-op" expert (equivalent to the residual path in MoD). This simplifies the routing machinery but means that even tokens routed to the residual path still participate in self-attention (since routing is applied after attention).

The paper reports that integrated MoDE "was distinctly better than simply reducing the capacity of experts in conventional MoE models, and relying on token dropping to implement residual routing." The interpretation is that "tokens explicitly learn to choose the residual path around the experts, as opposed to preferring an expert but being dropped when implemented as a capacity reduction." This suggests that learned routing to a no-op is qualitatively different from capacity-based dropping — in the latter case, tokens are forced to route to an expert they didn't prefer and are then dropped, potentially losing information, whereas in MoDE, tokens can learn that the residual path is the best choice for them and explicitly select it.


Design Choices and Their Justifications (Summary)

  • Expert-choice over token-choice routing: avoids auxiliary balancing loss; enables relative competition among tokens for limited computation slots; naturally partitions tokens into two mutually exclusive sets for the two-path case.

  • Router weight multiplication on block output: places router weights on the gradient path, enabling the router to learn from the downstream language modeling objective which tokens benefit from processing. This is an end-to-end learned signal rather than a separately defined auxiliary objective.

  • Interleaved routing blocks (every other block) rather than routing every block: ensures the model never loses the ability to do full-sequence computation, providing periodic "full information" layers. The paper does not deeply analyze why this is necessary but the empirical result is decisive.

  • Extreme capacity reduction (12.5%) rather than modest reduction: the paper found gradual improvements when reducing capacity all the way down to 12.5%, with degradation only beyond that point. This is a non-obvious result — one might have expected optimal capacity to be closer to 50% or 75% — and it implies that the overwhelming majority of token processing in vanilla transformers is redundant (at least for alternating layers).

  • Linear projection router rather than MLP router: computational efficiency — the router must not add significant overhead, and a single dot product adds minimal FLOPs.

  • Auxiliary predictor or BCE loss for autoregressive sampling rather than redesigning the routing mechanism to be inherently causal: this cleanly separates the training concern (non-causal top-kk for optimal routing) from the inference concern (causal per-token decisions), and the 99% predictor accuracy suggests the non-causal information is not essential for making good routing decisions.

  • Adding depth rather than width when scaling MoD models: this leverages the variable-depth property of MoD — since different tokens go through different numbers of effective layers, deeper models allow more gradations of processing depth and more flexibility in routing.

4. Key Insights and Innovations

Innovation 1: A New Axis for the Compute-Performance Tradeoff — Routing Between Radically Different Computational Paths, Not Just Between Equivalent Experts

The dominant paradigm for conditional computation in transformers, established by Mixture-of-Experts (Shazeer et al., 2017; Fedus et al., 2022; Lepikhin et al., 2020), routes tokens between computationally equivalent alternatives — multiple MLP experts that all perform the same type of operation (a feedforward transformation) but with different learned parameters. The total compute expenditure remains roughly constant because every token goes through some expert. The intellectual contribution of MoD is to break this symmetry: route between qualitatively different computational paths, one of which costs essentially nothing. Specifically, MoD routes between a full transformer block (self-attention + MLP) and a pure residual connection — a null operation that leaves the token's representation unchanged.

This is not an incremental tweak to MoE routing. It fundamentally changes what the routing decision means. In MoE, routing answers the question: "Which specialized MLP is best for this token?" In MoD, routing answers: "Does this token need any computation here at all?" The second question is both more fundamental — it targets the baseline assumption that all tokens require all layers — and more impactful, because answering "no" genuinely reduces total FLOPs rather than reallocating fixed FLOPs across experts. The paper draws this contrast explicitly (Section 2):

"MoE transformers use conditional logic to route tokens to one of many expert MLPs while keeping total compute expenditure constant. Our mixture-of-depths method can be thought of as using the routing logic from MoE transformers, but rather than having multiple experts, MoD deploys a single expert which can be dynamically skipped."

The significance goes beyond the specific implementation. This reframes conditional computation from a load-balancing problem (how to distribute tokens evenly across experts) to a resource allocation problem (how to decide which tokens get processing at all). The fact that a simple linear projection router can learn to make this binary choice — process or skip — for each token at each routing block, and that doing so at an aggressive 12.5% capacity on interleaved layers improves performance relative to an isoFLOP baseline (Figure 3), implies something non-obvious about the standard transformer architecture: a large fraction of the computation in vanilla transformers is not merely redundant, but actively counterproductive in a resource-constrained setting. If random routing (the stochastic control) destroys performance while learned routing improves it, the learned routing isn't just avoiding waste — it's concentrating compute where it has the highest marginal return on the language modeling objective.

This insight also connects MoD to a broader conceptual space that the paper sketches in the Discussion (Section 5): if routing can effectively choose between "full block" and "null," it can plausibly choose between arbitrary computation types — memory lookups, tool-use functions, specialized reasoning modules — with costs balanced by capacity. MoD thus serves as a proof of concept for heterogeneous computation routing in transformers, where different tokens undergo qualitatively different types of processing at different depths, all within a static compute budget.


Innovation 2: Recovering Causal Routing from Non-Causal Top-k via a Distillation Approach — and the Implicit Finding That Future Context Is Largely Unnecessary for Token Importance Decisions

The paper's solution to the autoregressive sampling problem is, at first glance, a straightforward engineering fix: since top-k over the full sequence is non-causal, train an auxiliary mechanism (a BCE loss or a small predictor MLP) that approximates the top-k decision using only per-token information. But the intellectual significance runs deeper than the mechanism itself. The auxiliary predictor achieves ~99% accuracy (Section 3.5, Figure 6), which carries a strong implicit finding: whether a token should be processed at a given layer is almost entirely decidable from its own representation and past context, with negligible dependence on future tokens.

This is not obvious a priori. One might expect that a token's importance in a sequence depends on what comes after it — a seemingly innocuous token might gain retrospective importance when it turns out to introduce a key concept, or a token at the start of a sentence might only be recognizable as "easy" or "hard" once the full sentence is seen. The high predictor accuracy suggests that the router weights ril=wθTxilr_i^l = w_\theta^T x_i^l — which are computed from the token's representation at layer ll, itself a function of all preceding tokens through causal self-attention — already contain sufficient signal to determine whether that token will be among the top-k in the full sequence. In other words, past context is sufficient to predict future routing importance, even though the top-k operation itself uses future router weights to set the percentile threshold.

This finding matters because it cleanly validates the conceptual separation that MoD relies on: the routing decision is not a global optimization over the whole sequence that requires mutual information between distant tokens, but rather a local property of each token conditioned on its history. A token "knows" from its accumulated representation whether it's the kind of token that needs deep processing, independent of what specific tokens will appear later. This is what makes the distillation approach feasible — if the top-k selection were genuinely dependent on complex interactions between widely separated tokens (e.g., "process token 5 only if token 500 is a question mark"), the predictor would fail.

The paper also contributes a practical design pattern that generalizes beyond MoD: when a training-time operation is non-causal but empirically effective, you can distill it into a causal predictor for inference without redesigning the core mechanism. This is a form of amortization — the non-causal top-k provides a target that is computationally cheap to approximate at inference time because the underlying signal is mostly local. The two solutions (BCE loss vs. predictor MLP) offer a tradeoff between simplicity (BCE affects the primary loss by 0.2-0.3%) and modularity (the predictor MLP leaves the primary objective untouched), giving practitioners options depending on whether they prioritize performance purity or architectural cleanliness.


Innovation 3: The "Down and to the Right" IsoFLOP Shift as Evidence That Learned Sparsity Improves Scaling Efficiency — MoD Models Are Both Better and Bigger at the Same Training Budget

The paper's central empirical result — that MoD shifts the isoFLOP curve "down and to the right" (Section 4.1, Figure 4) — is more than a performance improvement. It demonstrates that per-token dynamic compute allocation improves the efficiency of the scaling process itself, not just the efficiency of individual forward passes. At a fixed training FLOP budget, the optimal MoD model achieves lower loss and has more parameters than the optimal vanilla baseline. This means the FLOP savings from routing are sufficient to fund a larger model (more parameters consume more FLOPs per token, but fewer tokens are processed per forward pass in routing blocks), and the net effect is positive — the larger, sparsely-computed model generalizes better than the smaller, densely-computed baseline.

This finding challenges an implicit assumption in the scaling laws literature (Hoffmann et al., 2022; Kaplan et al., 2020): that the primary axis for trading off compute and model size is the ratio of parameters to training tokens, with the per-token compute cost being a fixed function of model size. MoD introduces a new degree of freedom — forward-pass sparsity — that decouples model size from per-token FLOPs. You can have a larger model that costs less per forward pass than a smaller baseline because a large fraction of its parameters are selectively applied. The isoFLOP analysis (Figure 4) shows that this decoupling is beneficial across three orders of magnitude in training budget (6e18, 2e19, 1e20 FLOPs), suggesting it is a robust property of the scaling landscape rather than a small-budget artifact.

The practical consequence — that there exist MoD variants that are both faster to step and better-performing than the isoFLOP-optimal baseline (e.g., model #3 in Figure 3, which is ~60% faster while achieving slightly lower loss) — is significant for deployment economics. Prior to this work, getting a faster model typically meant either training a smaller model (sacrificing performance) or overtraining a small model on more data (which the paper acknowledges is "still possible with MoD transformers, and speed gains should compound"). MoD offers a third path: maintain or improve performance while reducing per-step FLOPs through learned compute allocation, without requiring additional training data.

The paper also contributes a useful heuristic for practitioners: the optimal MoD model is the one that uses as many FLOPs per forward pass as the isoFLOP-optimal baseline (Section 4.1). This provides a concrete recipe — given a target training budget, find the baseline-optimal model size, then scale the MoD variant (preferentially by adding depth) until its per-forward-pass FLOPs match the baseline, and you have the isoFLOP-optimal MoD configuration for that capacity setting. This reduces the hyperparameter search from a 2D grid (model size and capacity) to essentially a 1D search (find the matching FLOPs-per-forward-pass point), which is a substantial practical simplification.


Innovation 4: Verifying That Extreme Capacity Reduction (12.5%) Is Optimal — and What This Implies About Redundancy in Standard Transformers

The hyperparameter sweep in Figure 3 reveals an empirical result that is both surprising and theoretically suggestive: performance improves monotonically as capacity is reduced from 95% down to 12.5%, and only degrades below that point. This means that at a routing block, the model performs better when it processes only 12.5% of tokens and routes the other 87.5% around the block, compared to processing 50% or 75% or 95% of tokens.

This is not merely a "more sparsity is better up to a point" finding — the optimal point is extraordinarily aggressive, with the vast majority of tokens receiving no computation at alternating layers. The implication is that standard transformers are dramatically over-computing at the token level. If a model can achieve better performance by skipping 87.5% of tokens at every other layer, then for those layers in a vanilla transformer, the tokens that were "unnecessarily" processed were not just neutral — their processing was actively interfering with the model's ability to form good representations, perhaps by introducing noise or by consuming capacity in the residual stream that could have been better used for the truly important tokens.

This finding also provides an empirical anchor for a conceptual claim the paper makes in the Discussion: that "FLOPs may be inefficiently used in vanilla transformer models, and that there may be more efficient ways for them to be expended." The 12.5% capacity number quantifies the scale of the inefficiency — at least for interleaved routing blocks, roughly 7/8 of the per-token computation is unnecessary (and possibly harmful) when the network is allowed to choose which tokens to process. This is a much stronger claim than the paper's modest framing of "not all tokens require the same amount of time or effort" — it suggests that at alternating layers, almost no tokens require computation, and the network's performance is limited not by insufficient processing but by the inability of vanilla transformers to withhold processing from tokens that don't need it.

The corollary that "routing every other block was crucial for strong performance" (Section 4.1) adds nuance: full-capacity blocks remain essential, presumably because they provide the global information exchange that allows the routing blocks to be so aggressively sparse. The architecture that works is not uniform sparsity but alternating dense and sparse computation, where the dense blocks ensure that every token periodically gets updated with full-context information, and the sparse blocks selectively deepen processing for the subset of tokens that benefit from it. This alternating pattern is reminiscent of how convolutional networks alternate between spatial pooling (reducing resolution) and convolutional layers (deepening features), but adapted to the token dimension in transformers.

5. Experimental Analysis

Evaluation Methodology

  • Dataset. The paper uses a standard language modeling corpus for pretraining—the exact dataset is not named in the main text, but all experiments train decoder-only transformers on next-token prediction. Training data consists of sequences of length 2048 tokens; autoregressive evaluation is performed on a held-out set of 256,000 sequences (500M tokens). The lack of a named dataset (e.g., C4, The Pile, etc.) is a notable omission, as it makes exact replication difficult without additional information.

  • Base model(s). The paper trains decoder-only transformers from scratch, varying model size from 60M to 3B parameters across experiments. No pretrained model is used; all comparisons are between MoD variants and vanilla transformer baselines trained under identical conditions. The models use standard transformer architecture with multi-head self-attention and MLP blocks. The paper does not specify the exact number of heads or embedding dimensions for each model size, though these would be determined by the standard scaling configurations used.

  • Metrics. The primary metric is training loss on the language modeling objective, measured as "final log probability" (Section 4.1)—this is essentially the negative log-likelihood (or log perplexity, up to a constant factor). For autoregressive evaluation (Section 4.2), the same metric is computed on held-out data. When comparing models, the paper focuses on isoFLOP comparisons: models are trained with the same total pretraining FLOP budget, and the model achieving the lowest training loss at that budget is considered optimal.

  • Baselines. The paper uses three types of baselines: (1) Vanilla transformer — standard decoder-only transformers with the same architecture but no routing (every token participates in every block at every layer). These are trained at multiple sizes to trace out baseline isoFLOP curves. (2) Stochastic routing MoD — same architecture as MoD but with router weights sampled from a Gaussian distribution rather than learned, applying the same top-kk capacity reduction. This is explicitly described as a "control" to isolate the effect of learned routing. (3) Baselines at multiple FLOP budgets — for each of the three training budgets (6e18, 2e19, 1e20 FLOPs), multiple baseline model sizes are trained to establish the isoFLOP-optimal baseline configuration.

  • Generation budget / compute accounting. Compute is measured in total pretraining FLOPs (forward + backward passes). The paper uses three budgets: 6e18, 2e19, and 1e20 FLOPs. Within each budget, models of different sizes are trained to convergence, and the model minimizing training loss is the isoFLOP-optimal configuration. Per-forward-pass FLOPs are also reported (normalized relative to the isoFLOP-optimal baseline) as a proxy for step speed. The paper notes that per-forward-pass FLOPs and wall-clock step time are "tightly correlated" in their experiments. Importantly, the comparison is genuinely isoFLOP: MoD models with reduced per-forward-pass FLOPs do not get to train for more steps within the same total budget—the budget is total FLOPs, so a model with 50% fewer FLOPs per forward pass would need to train for 2× more steps to consume the same total budget. The paper accounts for this, and the headline result is that MoD models match or exceed baseline performance within the fixed total FLOP budget despite (or because of) using fewer FLOPs per step.

  • Cross-validation / statistical protocol. The paper does not report cross-validation or statistical significance testing. Results are reported as point estimates from single training runs at each configuration. The hyperparameter sweep (Figure 3) trains multiple MoD variants at 6e18 FLOPs to select the optimal configuration (12.5% capacity, every-other-block routing), and this configuration is then used at larger FLOP budgets without further tuning. The autoregressive evaluation (Figure 6) uses 256,000 held-out sequences for evaluation.

Main Quantitative Results

Hyperparameter Tuning: Capacity and Routing Frequency Sweep (Figure 3)

The initial sweep at 6e18 FLOPs establishes the optimal MoD configuration. The key findings are:

Capacity: Performance improves monotonically as capacity is reduced from 95% down to 12.5% of the sequence. The paper reports "gradual improvements were observed when reducing the capacity down to 12.5% of the total sequence... with performance degrading beyond this point" (Section 4.1). At 12.5% capacity with sequence length 2048, this means only 256 tokens are processed by each routing block, while 1792 tokens (87.5%) bypass it. The performance improvement from reducing capacity is a central surprise — the model gets better while doing less computation per block.

Routing frequency: The paper states that "routing every other block was crucial for strong performance" (Section 4.1). The optimal configuration interleaves MoD routing blocks (with 12.5% capacity) with standard full-capacity blocks. The paper does not report results for routing every block or routing at other frequencies, but the strong language ("crucial") indicates that the performance gap was substantial.

Learned vs. stochastic routing: MoD transformers with stochastic routing (Gaussian-sampled router weights) perform "drastically worse than both the baseline and normal MoD transformer" (Section 4.1, Figure 3). The stochastic model is shown as a single data point in Figure 3 (left panel, positioned significantly above both the baseline isoFLOP curve and the MoD variants), establishing that capacity reduction alone is harmful without learned token selection.

The "down and to the right" shift: Figure 3 (left panel) shows the isoFLOP curve for MoD variants (grey shaded region) positioned below and to the right of the baseline isoFLOP curve. The optimal MoD model achieves lower training loss than the optimal baseline at the same total FLOP budget, and does so with more parameters. This is the core empirical finding that the paper scales up to larger budgets.

Speed-performance tradeoff discovery: Figure 3 identifies a specific MoD variant — model #3, a 220M parameter configuration — that "slightly outperforms the isoFLOP optimal baseline (also 220M, model #1), but is upwards of 60% faster to step during training" (Section 4.1). The learning curves (Figure 3, right panel) show model #3 and model #1 converging to nearly identical final loss, with model #3 marginally lower. This demonstrates that MoD can achieve performance parity with the baseline while offering substantial speed advantages.

IsoFLOP Scaling Analysis (Figure 4)

The paper extends the analysis to 2e19 and 1e20 FLOPs using the fixed 12.5% capacity, every-other-block configuration. Figure 4 shows isoFLOP curves at three budgets, and the findings are:

The "down and to the right" shift persists across scales: At all three FLOP budgets (6e18, 2e19, 1e20), the optimal MoD transformer achieves lower training loss than the optimal baseline transformer, and has more parameters. This is shown in the left panel of Figure 4, where the MoD curves sit below the baseline curves and extend further to the right (higher parameter counts). The exact loss values are not reported in the text, but the visual separation between the curves is consistent and clear.

Speed advantages are preserved: The right panel of Figure 4 shows normalized FLOPs per forward pass (relative to the isoFLOP-optimal baseline at each budget). At each of the three budgets, there exist MoD variants that achieve lower loss than the isoFLOP-optimal baseline while also requiring fewer FLOPs per forward pass. Specifically:

  • At 6e18 FLOPs: MoD variants at approximately 0.6-0.8× the baseline's forward-pass FLOPs achieve lower loss.
  • At 2e19 FLOPs: The spread is similar, with the optimal MoD requiring roughly 0.7× the baseline's forward-pass FLOPs.
  • At 1e20 FLOPs: The pattern holds, though the paper notes the advantage narrows slightly at larger scales.

Optimal MoD uses matched forward-pass FLOPs: The paper reports a key regularity: "the optimal MoD transformer is that which uses as many FLOPs per forward pass as the isoFLOP optimal baseline" (Section 4.1). This is visible in Figure 4 (right panel): the minimum of each MoD curve (lowest loss) occurs at the point where normalized FLOPs per forward pass equals 1.0 — i.e., matching the baseline's per-step compute. This provides a practical heuristic for practitioners: to find the isoFLOP-optimal MoD configuration, scale the model size (preferentially by adding depth) until its per-forward-pass FLOPs match the optimal baseline's, and you have the best configuration for that capacity setting.

Scaling strategy (depth vs. width): The paper states that "it is better to add depth than to add width when adding FLOPs to the model" (Section 4.1). No ablation is shown comparing depth-scaling vs. width-scaling, but the statement is presented as an empirical finding from the isoFLOP analysis. This is consistent with the intuition that MoD creates variable-depth processing and deeper models can better exploit this flexibility.

Autoregressive Evaluation (Figure 6)

Figure 6 addresses the critical question: does the performance demonstrated during training (with non-causal top-k routing) carry over to autoregressive sampling (with causal routing)?

Predictor accuracy: The auxiliary classifier ("predictive router" or BCE-calibrated router) that enables causal routing achieves "upwards of 97% accurate soon into training" for the 6e18 FLOP model configuration (Section 3.5, Figure 6). Exact accuracy curves are not shown, but the paper reports the 97% figure and 99% for the final accuracy (Section 3.5, text).

Performance retention: When switching from non-causal top-k routing to predictor-based causal routing during autoregressive evaluation, the paper reports "little performance degradation" (Section 4.2). Figure 6 shows the training loss and autoregressive evaluation loss for multiple MoD variants compared to baselines. The key result: "As in the training setting, there exist MoD variants that are better performing than the isoFLOP-optimal baseline, while requiring fewer FLOPs per forward pass" during autoregressive evaluation. This confirms that the FLOP savings and performance advantages are not artifacts of teacher-forcing and translate to the generation setting.

Comparison to baselines: Figure 6 plots both training and evaluation metrics against normalized FLOPs per forward pass. The MoD evaluation points (triangles in the right panel) sit below the baseline evaluation points at several speed points, meaning MoD achieves lower evaluation loss while being faster to step. The exact loss values are not reported numerically.

Mixture-of-Depths-and-Experts (MoDE) Integration (Figure 7)

Figure 7 shows results for combining MoD routing with MoE (Mixture-of-Experts), creating MoDE models. Two integration strategies are tested:

Staged MoDE: MoD routing is applied first (selecting which tokens participate in self-attention), followed by standard MoE routing (selecting which expert MLP each selected token goes to). This allows tokens to skip self-attention entirely.

Integrated MoDE: A single routing operation funnels tokens to either one of the expert MLPs or to a "no-op" expert (equivalent to the residual path). This means all tokens still participate in self-attention (since routing is applied after attention), but some tokens skip the expert MLP computation.

Key finding: The paper reports that "implementing MoDE in the integrated manner was distinctly better than simply reducing the capacity of experts in conventional MoE models, and relying on token dropping to implement residual routing" (Section 4.3). The interpretation is that with integrated MoDE routing, "tokens explicitly learn to choose the residual path around the experts, as opposed to preferring an expert but being dropped when implemented as a capacity reduction." This is a qualitative finding about the learning dynamics: explicit routing to a no-op produces better results than capacity-based dropping because the router can genuinely learn that the residual path is optimal for some tokens, rather than having tokens that wanted computation get arbitrarily dropped when capacity is exceeded.

Figure 7 shows performance curves for both staged and integrated MoDE compared to pure MoD and pure MoE baselines. The integrated MoDE achieves the best performance among the variants shown, suggesting that the routing benefits of MoD and the expert-specialization benefits of MoE can compound.

Memory and Hardware Efficiency (Not Quantified in Detail)

The paper briefly notes memory savings from MoD but does not provide quantitative analysis. The observation in Section 4.1 is: "We noticed that MoD transformers had memory savings relative to equivalently sized baseline models at larger sizes, with some variants requiring fewer total devices (i.e., a smaller TPU topology)." The paper speculates that this "could have significant positive effects in regards to the KV cache size during autoregressive sampling" because the key-value cache for routing blocks would only store entries for CC tokens rather than SS tokens. However, no measurements of actual KV cache size, memory footprint, or device count are reported.

Ablation Studies and Robustness Checks

  • Capacity sweep (12.5% to 95%): The paper reports a range of capacities tested during the 6e18 FLOP sweep (Figure 3). Capacity was varied from 95% down to 12.5% of the sequence length. The finding is that performance improves as capacity decreases, with the optimum at 12.5% and degradation below that point. The sweep is shown in Figure 3 (left), where models with lower capacity (higher sparsity) generally achieve lower loss. The paper does not report intermediate capacity points or the exact loss values, making it difficult to assess how sharp the optimum is — whether 15% or 10% would perform similarly, or whether 12.5% is a precise sweet spot.

  • Routing frequency (every block vs. every other block): The paper states that routing every other block was "crucial" but does not show the comparison data. Figure 3 presumably includes models with different routing frequencies, but the specific results for routing-every-block are not discussed. This is a significant omission, as the performance penalty of routing every block would help characterize how much full-capacity computation is necessary.

  • Stochastic routing (learned vs. random): The stochastic routing baseline — using top-k on Gaussian-sampled router weights — performs "drastically worse" than learned routing (Figure 3). This establishes that the performance of MoD is not attributable to structured dropout or regularization effects from token dropping. However, the paper does not explore why stochastic routing fails — whether it's because important tokens get dropped, because unimportant tokens get processed (wasting capacity), or both. A finer-grained analysis (e.g., measuring the correlation between stochastic selection and token "importance" as determined post-hoc) is not provided.

  • Router weight multiplication (on vs. off the gradient path): The paper mentions that router weights are multiplied onto the block output for selected tokens, placing them "along the gradient path" (Section 3.4). The authors note they "experimented with versions where the router weights are also included along the computational path for those tokens that bypass the block's computations, but it seems to be sufficient — and implementationally simpler — to only include the router weights along the computational path for those tokens that do not bypass." No quantitative comparison is shown. This is a minor ablation that the paper treats as an implementation detail rather than a central finding.

  • Autoregressive routing: BCE loss vs. predictor MLP: Two solutions are proposed for causal routing at inference (Section 3.5): an auxiliary BCE loss that calibrates router outputs, and a separate predictor MLP trained with stop-gradient. The paper states that the BCE loss "empirically affects the primary language modeling objective by approximately 0.2-0.3%" while the predictor MLP "does not affect the language modeling objective." However, Figure 6 does not distinguish between these two methods — the autoregressive evaluation results are presumably from one of them (likely the predictor, since it doesn't affect the primary loss), but this is not explicitly stated. A direct comparison of the two approaches would clarify whether the 0.2-0.3% degradation from the BCE approach is visible in downstream performance or is negligible in practice.

  • Token-level routing analysis (Figure 5): The paper provides a qualitative analysis of routing decisions in a trained MoD model. Figure 5 (left) visualizes which tokens are selected (dark) vs. bypassed (light) across layers for a truncated 64-token sequence. The paper notes a "vertical band of dark blue towards the end of the sequence," suggesting the model preferentially routes late-sequence tokens to computation. Preliminary analysis "suggest that the tokens that engage with blocks more frequently are correlated with output predictions that have higher entropy, which possibly corresponds to predictions that are more difficult to make" (Section 4.1). This is a correlational observation rather than a causal ablation, but it provides face validity that the router is learning something sensible about token difficulty.

  • Scaling to larger FLOP budgets (Figure 4): The isoFLOP analysis at 6e18, 2e19, and 1e20 FLOPs can be viewed as a robustness check: does the MoD advantage persist at larger scales? Figure 4 shows that the "down and to the right" shift is present at all three budgets, though the gap between the MoD isoFLOP curve and the baseline curve appears to narrow slightly at 1e20 FLOPs. The paper does not comment on this narrowing or whether it might continue at even larger scales (e.g., 1e21 FLOPs). This is a potentially important limitation — if the advantage continues to diminish with scale, MoD might provide diminishing returns in the regime of frontier models trained on 1e22+ FLOPs.

  • Depth vs. width scaling: The paper's claim that "it is better to add depth than to add width" is stated as an empirical finding without supporting ablation data. An experiment varying model shape (deep-narrow vs. shallow-wide) while holding total parameters and capacity constant would strengthen this claim. As presented, it may be a configuration choice rather than a robustly tested finding.

Critical Assessment

Claim 1: "MoD transformers learn to dynamically allocate compute and match baseline performance for equivalent FLOPS and wall-clock times to train, but require a fraction of the FLOPs per forward pass"

What the evidence shows: This claim is supported with qualifications. Figure 3 shows a specific MoD variant (model #3, 220M parameters) that matches the isoFLOP-optimal baseline (also 220M) in training loss while being ~60% faster per step. Figure 4 shows that across three FLOP budgets, there exist MoD variants that achieve lower training loss than the isoFLOP-optimal baseline while requiring fewer FLOPs per forward pass. The autoregressive evaluation in Figure 6 confirms that these advantages persist at inference time.

Qualifications and limitations:

  • The "60% faster" figure is from a single model size (220M) at a single FLOP budget (6e18). It is not clear whether this speed advantage is typical or represents the best-case scenario. The paper does not report the average speed improvement across all MoD variants or provide confidence intervals.
  • "Equivalent wall-clock time to train" is true for the specific comparison of model #3 vs. model #1 (both 220M, both trained at 6e18 FLOPs), but this is because the models have the same parameter count. The MoD model trains faster per step but needs more steps to use the same total FLOPs; these effects approximately cancel for equal-sized models. For the isoFLOP-optimal MoD models (which are larger than the baseline-optimal), the wall-clock training time would be longer than the baseline-optimal because the larger model has higher per-step cost that is only partially offset by MoD's FLOP savings.
  • The claim that MoD models "require a fraction of the FLOPs per forward pass" is accurate but should be contextualized: this is true for the routing blocks (12.5% capacity), but the interleaved full-capacity blocks still process all tokens, and the router itself adds a small FLOP overhead (not quantified).

Claim 2: "The optimal configuration aggressively routes 87.5% of tokens around every other block while still outperforming the isoFLOP-optimal baseline"

What the evidence shows: Figure 3 demonstrates that 12.5% capacity (87.5% bypass) on interleaved routing blocks produces the best performance among MoD variants at 6e18 FLOPs. The claim that this "outperforms the isoFLOP-optimal baseline" is supported: the optimal MoD variant achieves lower loss than any baseline model at the same total FLOP budget.

Qualifications and limitations:

  • The optimal capacity of 12.5% was determined at a single FLOP budget (6e18). It is possible that the optimal capacity depends on the total training budget — larger models trained on more FLOPs might benefit from different capacity settings. The paper assumes the 12.5% finding transfers to 2e19 and 1e20 FLOPs without re-tuning.
  • The claim that MoD "outperforms" the baseline refers to training loss, not downstream task performance. No downstream benchmarks (e.g., perplexity on standard test sets, zero-shot or few-shot task evaluations) are reported. The relationship between training loss improvements and downstream task improvements is well-established in the scaling laws literature but is not directly tested here.
  • The "outperforms" claim is about the optimal MoD configuration — the best model at the best hyperparameters. A practitioner without the budget for extensive hyperparameter tuning might not achieve this level of performance. The paper provides a heuristic (match the baseline's per-forward-pass FLOPs) that reduces the search space, but the sensitivity of performance to capacity and routing frequency is not fully characterized.

Claim 3: "MoD models can be upwards of 50% faster to step during post-training sampling"

What the evidence shows: The 60% faster figure for model #3 (Figure 3) and the normalized FLOPs per forward pass data (Figure 4, right panel) show that some MoD variants require 0.4-0.8× the forward-pass FLOPs of the isoFLOP-optimal baseline while achieving similar or better loss. Figure 6 shows these speed advantages persist during autoregressive evaluation.

Qualifications and limitations:

  • The paper measures speed in terms of FLOPs per forward pass, which it says is "tightly correlated" with wall-clock step time. However, actual wall-clock measurements are not reported. The correlation between FLOPs and wall-clock time depends on hardware utilization — if the routing mechanism introduces irregular memory access patterns or underutilized tensor cores (e.g., because the effective batch size for computation varies), wall-clock speedup might be less than the FLOP reduction would suggest.
  • The "upwards of 50%" figure appears to come from the model that is 60% faster at 6e18 FLOPs. At larger budgets, Figure 4 (right) shows the optimal MoD requiring roughly 0.7× the baseline FLOPs (a 30% reduction, not 50%). The headline "50%" is therefore representative of the best case at the smallest scale, not the typical case across all configurations.
  • The autoregressive sampling speedup depends on the causal routing mechanism (predictor or BCE-calibrated router), which adds a small computational overhead (not quantified). The paper states this overhead "does not significantly impact the step speed," but no measurement is provided.
  • The KV cache reduction claim (smaller cache for routing blocks) is speculative and unmeasured. This could be a significant practical advantage for long-sequence generation, but without benchmarks, it remains a hypothesis.

Claim 4: "Learned routing is crucial — stochastic routing performs drastically worse"

What the evidence shows: Figure 3 clearly shows the stochastic routing variant far above both the MoD and baseline isoFLOP curves — meaning much worse loss at the same FLOP budget. This is a clean and decisive result.

Qualifications and limitations:

  • The stochastic routing baseline uses a specific implementation (Gaussian router weights + top-k), but alternative baselines are not explored. For example, what about a static routing strategy (always route the first/last kk tokens, or always route tokens at certain syntactic positions)? What about a "uniform" routing strategy where capacity is reduced but tokens are selected evenly across the sequence? These would be informative baselines for understanding whether the benefit comes from any non-random selection or specifically from learned, content-dependent selection.
  • The paper does not analyze why stochastic routing fails. Is it because important tokens get dropped (hurting performance) or because unimportant tokens get processed (wasting capacity that could be used for important tokens), or both? An analysis measuring the "importance" of tokens (e.g., by the loss increase when they are dropped) under stochastic vs. learned routing would strengthen this finding.

Claim 5: "MoD can be integrated with MoE to compound performance improvements (MoDE)"

What the evidence shows: Figure 7 shows MoDE variants achieving better performance than pure MoD or pure MoE baselines. The integrated MoDE approach (unified routing to experts or no-op) is reported to be better than capacity-based token dropping in MoE.

Qualifications and limitations:

  • This is a preliminary result presented in a single figure (Figure 7) with minimal quantitative detail. The FLOP budget, model sizes, and exact performance numbers are not reported in the text. This makes it difficult to assess the magnitude of the compounding effect or whether it justifies the additional complexity.
  • The comparison between integrated MoDE and "reducing the capacity of experts in conventional MoE models" is qualitative — the paper states integrated MoDE is "distinctly better" but does not report the loss difference.
  • It is unclear whether the MoDE results use the same optimal capacity (12.5%) and routing frequency (every other block) as the pure MoD experiments, or whether these hyperparameters were re-tuned for the MoDE setting.

What Experiments Would Have Strengthened the Paper

  1. Downstream task evaluation: All results are reported in terms of training or held-out language modeling loss. Evaluating MoD models on standard benchmarks (e.g., perplexity on WikiText-103, zero-shot performance on Lambada, HellaSwag, MMLU) would demonstrate that the training loss improvements translate to practically relevant capabilities. Without this, the paper's claims about improved model quality are confined to the training objective.

  2. Wall-clock time measurements: The paper uses FLOPs as a proxy for speed. Direct wall-clock measurements on specific hardware (e.g., TPU v4 or A100) for both training steps per second and inference tokens per second would quantify the real-world speedup and reveal any hardware utilization issues from the routing mechanism.

  3. Scaling to larger models and budgets: The largest model tested is 3B parameters at 1e20 FLOPs. Modern frontier models are trained at 1e22+ FLOPs with hundreds of billions of parameters. The narrowing of the MoD advantage from 6e18 to 1e20 FLOPs (visible in Figure 4) raises the question of whether MoD would provide any advantage at all in the 1e22+ regime. An experiment at even one additional scale (e.g., 4e20 or 1e21 FLOPs) would help address this uncertainty.

  4. Ablation of routing frequency with capacity held constant: The paper states routing every other block is "crucial" but does not show data comparing every-block routing to every-other-block routing at the same capacity. This would help distinguish whether the necessary condition is "some full-capacity blocks exist" or specifically "blocks alternate between full and sparse."

  5. Detailed memory and KV cache analysis: The paper speculates about memory savings and KV cache reduction but provides no measurements. Quantifying these would strengthen the practical case for MoD, especially for long-sequence generation where KV cache size is a bottleneck.

  6. Analysis of which tokens get routed where: Figure 5 provides a qualitative routing visualization for one short sequence. A systematic analysis — e.g., which parts of speech, which sequence positions, which entropy levels are associated with routing-to-computation vs. routing-around — would provide insight into what the router learns and whether it generalizes sensibly.

  7. Comparison to other conditional computation methods at matched FLOPs: The paper compares MoD to vanilla transformers and stochastic routing. Comparisons to early-exit methods, token merging (Bolya et al., 2023), or CoLT5 (Ainslie et al., 2023) at matched FLOP budgets would contextualize MoD's efficiency gains relative to alternative approaches.

6. Limitations and Trade-offs

The Scaling Behavior of MoD at Frontier Model Sizes Is Unknown

The assumption or constraint. The largest isoFLOP budget studied is 1e20 FLOPs, training models up to 3B parameters (Section 4.1, Figure 4). The paper observes that the MoD advantage over the baseline narrows from 6e18 to 1e20 FLOPs — the curves in Figure 4 (left panel) show the "down and to the right" shift becoming less pronounced at the largest budget. The paper does not discuss or analyze this narrowing trend. Modern frontier language models are trained at 1e22 FLOPs or more — roughly 100× larger than the paper's largest budget — often with hundreds of billions of parameters. The paper provides no evidence about whether the MoD advantage persists, plateaus, or reverses in that regime.

The consequence. If the trend observed from 6e18 → 2e19 → 1e20 FLOPs continues, the advantage of MoD over the isoFLOP-optimal baseline could shrink to near-zero or become negative at 1e22+ FLOPs. The mechanism is plausible ex ante: as models scale, the fraction of tokens that are "easy" (predictable from shallow processing) might decrease because larger models are trained on longer, more complex sequences where even seemingly simple tokens carry subtle contextual dependencies, or because larger models saturate the available signal such that further improvements require processing more tokens rather than processing fewer tokens more intelligently. The paper's central claim — that MoD can match or exceed baseline performance while reducing per-step FLOPs — is only validated up to 3B parameters at 1e20 FLOPs. Practitioners training or deploying frontier-scale models cannot extrapolate from these results with confidence.

What evidence exists in the paper. Figure 4 provides the direct evidence: the isoFLOP curves at 6e18, 2e19, and 1e20 FLOPs show the MoD-baseline gap narrowing visually, though the paper does not quantify the gap or discuss the trend. No experiment at >1e20 FLOPs or >3B parameters is reported. The paper does not report an ablation examining how the optimal capacity or routing frequency might depend on model scale — the 12.5% capacity configuration was determined at 6e18 FLOPs and assumed to transfer to larger budgets without re-tuning. If the optimal capacity increases with scale (i.e., larger models benefit from less aggressive sparsity), the reported results at 2e19 and 1e20 FLOPs would be suboptimal, and the narrowing gap might partly reflect using a fixed hyperparameter that becomes increasingly mismatched.

Mitigation status. The paper does not address this limitation. No discussion of the narrowing trend, no extrapolation analysis, and no suggestion that future work should test MoD at larger scales. The paper's framing — that MoD "opens the doors to many extensions" (Section 5) — implicitly positions it as a proof of concept, but the title and abstract make performance claims that readers might reasonably assume transfer to larger scales. A practitioner would need to verify the scaling behavior on their target budget and model size before adopting MoD.


Wall-Clock Time Speedups Are Not Directly Measured — Only FLOP Counts

The assumption or constraint. The paper uses FLOPs per forward pass as a proxy for step speed, stating that FLOPs and wall-clock time are "tightly correlated" in their experiments (Section 4.1). However, no wall-clock time measurements are reported anywhere in the paper — neither for training steps per second nor for autoregressive sampling tokens per second. The headline claim "upwards of 50% faster to step during post-training sampling" (Abstract) is therefore an inference from FLOP counts, not a direct measurement. The relationship between FLOP reduction and actual speedup on hardware depends on factors that FLOP counting ignores: memory bandwidth, kernel launch overhead, whether the routing mechanism causes irregular memory access patterns, and whether the reduced token count in routing blocks leads to underutilized tensor cores (since accelerators are optimized for large, dense matrix multiplications; operating on 256 tokens rather than 2048 could leave compute units idle if the implementation is not carefully tuned).

The consequence. The actual wall-clock speedup experienced by a practitioner deploying MoD could be substantially less than the FLOP reduction would suggest. For example, if the routing mechanism requires gathering and scattering token embeddings (to form the X~l\tilde{X}^l set from the top-k selection), this introduces memory operations that do not scale down with the token count. If the router computation or the auxiliary predictor adds latency on the critical path, the effective speedup could be further reduced. The paper does not provide the measurements that would allow a practitioner to estimate real-world throughput improvements on their specific hardware stack. This is particularly important for inference: a claimed 50% reduction in FLOPs per forward pass might translate to only 20-30% improvement in tokens-per-second if the routing overhead and hardware utilization effects are non-negligible.

What evidence exists in the paper. The paper provides no wall-clock measurements. The normalized FLOPs per forward pass data (Figure 4, right panel) serves as the sole evidence for speedup claims. The paper notes the correlation without quantifying it: "from our experiments the two are tightly correlated. A similar plot can be produced showing relative wall-clock step times and the same basic trend is present" (Section 4.1). No such plot is shown. The autoregressive evaluation (Figure 6) compares FLOPs per forward pass, not measured latency. The auxiliary predictor overhead is described as not "significantly impact[ing] the step speed" (Section 3.5), but this is a qualitative statement with no supporting measurement.

Mitigation status. The paper does not address this limitation. The authors commit to publishing a wall-clock time plot but do not include it. A practitioner evaluating MoD for deployment would need to implement and benchmark the method on their target hardware to determine actual speedup, as the FLOP-based claims provide only an upper bound.


No Downstream Task Evaluation — All Results Are on Language Modeling Loss Alone

The assumption or constraint. Every quantitative result in the paper — the hyperparameter sweep (Figure 3), the isoFLOP analysis (Figure 4), the autoregressive evaluation (Figure 6), and the MoDE integration (Figure 7) — reports language modeling loss (log probability on next-token prediction). No downstream task is evaluated: no perplexity on standard test corpora (e.g., WikiText, C4), no zero-shot or few-shot benchmarks (e.g., Lambada, HellaSwag, MMLU, GSM8K), no generation quality metrics. The implicit assumption is that improvements in language modeling loss translate to improvements on downstream tasks of practical interest. While scaling laws (Hoffmann et al., 2022; Kaplan et al., 2020) have established a strong correlation between training loss and downstream performance for vanilla transformers, this relationship has not been verified for architectures with dynamic token-level sparsity.

The consequence. MoD's routing mechanism could produce models that achieve lower training loss but underperform on specific downstream tasks relative to isoFLOP baselines. This could happen for several reasons. First, the routing decisions are trained solely to optimize next-token prediction; they might learn patterns that are locally optimal for the training objective but degrade performance on tasks requiring different types of representations (e.g., the model might systematically route tokens in certain syntactic positions around blocks, making those positions' representations less rich for tasks like syntactic parsing or translation). Second, the token-level sparsity might disproportionately affect long-range dependencies: a token that routes around a block cannot be attended to by future tokens in that block's self-attention, potentially degrading the model's ability to track entities or maintain coherence over long contexts. Third, training loss is an average over all tokens; MoD might improve loss on easy tokens (where skipping computation is beneficial) while degrading loss on rare or difficult tokens that are disproportionately important for downstream tasks (e.g., named entities in knowledge-intensive tasks, mathematical symbols in reasoning tasks). Without downstream evaluation, a practitioner cannot assess whether the training loss improvement is "real" in the sense of translating to practically useful capabilities.

What evidence exists in the paper. None. The paper reports only language modeling loss. The autoregressive evaluation (Figure 6) confirms that the loss improvement generalizes from the training distribution (with non-causal top-k) to held-out sequences (with causal predictor-based routing), but this is still measuring the same next-token prediction objective. No task evaluation, no generation examples, no probing analysis of how MoD representations differ from baseline representations on downstream-relevant dimensions.

Mitigation status. The paper does not address this limitation or acknowledge it as a gap. This is a significant omission given the paper's applied focus: the claimed practical benefits (faster inference, better performance for the same training cost) are meaningful to practitioners only if "better performance" extends beyond the training objective. A practitioner considering MoD for a deployment where the model will be used for specific tasks (summarization, question answering, code generation) would need to run their own task evaluations to determine whether the routing mechanism preserves task-relevant capabilities.


Autoregressive Sampling Relies on an Auxiliary Predictor Whose Failure Mode Is Not Characterized

The assumption or constraint. The top-k routing mechanism used during training is non-causal: it uses the full sequence's router weights to make per-token routing decisions. At inference time, this is impossible for autoregressive decoding. The paper's solution — training an auxiliary predictor (BCE loss or predictor MLP) to approximate the top-k decision from per-token information — achieves "99% accuracy" (Section 3.5) and leads to "minimal performance degradation" on held-out loss (Section 4.2, Figure 6). The assumption is that 99% accuracy is sufficient, and that the 1% of tokens where the predictor disagrees with the top-k decision do not meaningfully degrade output quality.

The consequence. The 1% error rate, while seemingly small, could have disproportionate effects for two reasons. First, it is an aggregate accuracy figure — the predictor could be systematically wrong on specific types of tokens (e.g., tokens in the middle of long sequences, tokens in rare syntactic contexts, or tokens that are critical for factual accuracy) while achieving high overall accuracy by correctly routing the most common token types. If the predictor fails to route important tokens to computation — tokens where processing is genuinely needed for correct prediction — those tokens' representations will be impoverished, potentially causing factual errors, incoherence, or other generation failures that would not occur under the non-causal routing scheme used during training. Second, the predictor accuracy is measured during training (where teacher forcing provides the full sequence context), not during actual autoregressive generation where the model's own outputs become the context. If the predictor relies on distributional properties that hold for ground-truth text but break down for model-generated text (which may have different statistics), the accuracy at deployment could be lower than the reported 97-99%.

Additionally, the paper does not characterize which tokens the predictor gets wrong. If the errors are concentrated on tokens that are difficult to predict (high-entropy positions), the impact on generation quality could be larger than the 1% error rate suggests, because those tokens are precisely the ones where routing-or-not matters most. A predictor that achieves 99% accuracy by correctly routing all easy tokens but missing 50% of hard tokens could preserve aggregate loss while causing noticeable degradation on challenging generations.

What evidence exists in the paper. The paper reports the predictor accuracy (97% during training, 99% final) and held-out loss with the predictor-based router (Figure 6). It does not report: (a) per-token-type accuracy breakdown, (b) whether errors are correlated with token difficulty or sequence position, (c) autoregressive generation quality beyond held-out loss (e.g., no perplexity or human evaluation of generated text), or (d) whether the accuracy holds when generating from the model's own outputs rather than teacher-forced ground-truth text. The held-out loss comparison in Figure 6 is the only validation that the predictor works, and it shows the loss tracks the training loss closely — but this is a coarse metric that may not capture the types of errors described above.

Mitigation status. The paper provides two methods (BCE loss and predictor MLP) and shows they both work, but does not deeply analyze their failure modes or compare them beyond noting the BCE approach affects the primary loss by 0.2-0.3%. A practitioner would need to evaluate generation quality directly — through perplexity on a target corpus, task-specific benchmarks, or human evaluation — to ensure the predictor does not introduce systematic degradation. The paper also does not explore whether the predictor approach could be improved (e.g., by training on model-generated data, by using a more expressive predictor architecture, or by ensembling multiple predictors), leaving this as an open risk.


The Difficulty Estimation Overhead of Capacity Tuning Is Not Accounted for in Efficiency Claims

The assumption or constraint. The paper's optimal MoD configuration — 12.5% capacity on interleaved routing blocks — was determined through a hyperparameter sweep at 6e18 FLOPs (Figure 3) that tested capacities from 95% down to 12.5%. This sweep required training multiple complete models from scratch at the full 6e18 FLOP budget. The paper then assumes this configuration transfers to larger budgets (2e19 and 1e20 FLOPs) without re-tuning. A practitioner wanting to deploy MoD on a new model family, dataset, or scale would need to perform a similar sweep to determine the optimal capacity and routing frequency for their specific setting. The cost of this sweep — training multiple models at scale — is not included in any of the paper's efficiency calculations. The headline claims of 4×4\times efficiency or 50% speedup are computed after the optimal configuration is known, without amortizing the cost of finding it.

The consequence. The practical cost of adopting MoD includes not just the training run of the final model, but also the hyperparameter search to determine the right capacity and routing frequency. If the optimal capacity depends on model scale (which the paper does not test — the 12.5% figure comes from 6e18 FLOPs and is assumed to hold at 2e19 and 1e20), then a practitioner targeting a new scale would need to run a sweep at that scale, which could cost multiple full training runs. For a 1e20 FLOP training budget, running even a modest sweep (e.g., testing capacities at 10%, 12.5%, 15%, 20%, 25%) would multiply the total compute cost by the number of configurations tested — completely erasing the efficiency gains MoD provides for a single training run. Additionally, the paper provides limited guidance for predicting optimal capacity without a full sweep. The only heuristic offered is that the optimal MoD model matches the baseline's per-forward-pass FLOPs (Section 4.1), but this does not specify which capacity setting achieves that match until you know the model size and routing frequency.

This limitation is analogous to the difficulty estimation overhead problem in the test-time compute paper discussed in the reference example: the cost of learning how to allocate compute (in this case, which capacity to use) can dominate the savings from the optimized allocation if not amortized across many deployments. For a one-off training run, the hyperparameter sweep cost could make MoD a net loss in total compute. For a foundation model that will be trained once and deployed widely, the sweep cost is amortizable across millions of inference queries — but the paper provides no guidance on whether the optimal capacity transfers across datasets, model architectures, or training objectives, which would determine how often re-tuning is necessary.

What evidence exists in the paper. The paper acknowledges none of this. The hyperparameter sweep is framed as a one-time empirical determination, and the results are presented as if the optimal configuration is a fixed property of MoD rather than a setting that must be discovered for each new context. The paper does not report: (a) how many configurations were tested in the sweep, (b) the total FLOPs consumed by the sweep relative to the FLOP budgets being studied, (c) whether the optimal capacity depends on model scale, dataset, or training duration, or (d) whether a cheaper proxy (e.g., training on a subset of data, using a smaller model to predict optimal capacity for a larger model) can approximate the sweep results. This makes it difficult for a practitioner to estimate the true cost of adopting MoD.

Mitigation status. Not addressed. The paper provides no practical guidance for reducing or avoiding the hyperparameter sweep cost, no transfer learning results showing that optimal capacity generalizes across settings, and no cheap proxy method for estimating the optimal capacity without full-scale training runs. A practitioner adopting MoD at a new scale would need to budget for a hyperparameter sweep or accept the risk of using a potentially suboptimal configuration.


Memory and KV Cache Savings Are Speculated But Not Measured

The assumption or constraint. The paper briefly notes (Section 4.1) that MoD transformers showed "memory savings relative to equivalently sized baseline models at larger sizes, with some variants requiring fewer total devices (i.e., a smaller TPU topology)," and speculates that "these savings could have significant positive effects in regards to the KV cache size during autoregressive sampling." No quantitative measurements of memory footprint, KV cache size, or device count are reported. The claim about KV cache savings is purely speculative: the routing blocks process only CC tokens rather than SS, so in principle the key-value cache for those blocks could be C/SC/S of the baseline size, but whether this is realized depends on the implementation (e.g., whether the cache is allocated for the full sequence length with unused entries padded, or dynamically sized).

The consequence. For many practitioners, memory footprint and KV cache size are more important practical constraints than FLOP count. Long-sequence generation is often bottlenecked not by FLOPs but by the KV cache outgrowing accelerator memory, forcing shorter context windows or slower offloading strategies. If MoD genuinely reduces KV cache size for routing blocks by 87.5% (from 2048 entries to 256 entries), this could substantially increase the maximum context length for generation or reduce the memory cost of serving, which would be a more impactful practical benefit than the reported FLOP-based speedup. Conversely, if the implementation allocates full-size KV caches with padding for the unused positions (which static-graph implementations might do for simplicity), the memory savings would be zero. Without measurements, a practitioner cannot assess whether the speculative memory benefits are realizable on their hardware stack.

Similarly, the claim about requiring "fewer total devices" is vague and unquantified. If MoD reduces per-device memory sufficiently to change the TPU topology (e.g., from 4×4 to 2×2 for some layer), this could substantially reduce the cost and complexity of training. But without specifics — what model sizes, what topologies, what memory reduction was observed — a practitioner cannot evaluate whether this benefit would apply to their use case.

What evidence exists in the paper. None beyond the qualitative observation quoted above. No memory profiling, no KV cache size measurements, no device count comparisons between MoD and baseline models at equivalent parameter counts. The paper treats these as anecdotal observations rather than systematically studied benefits.

Mitigation status. Not addressed. The paper acknowledges this is speculative ("We did not study this extensively") but does not commit to future measurement or provide implementation guidance for realizing the potential savings. A practitioner deploying MoD for long-sequence generation would need to profile memory usage and KV cache behavior on their specific hardware and implementation to determine whether the speculated benefits materialize.

7. Implications and Future Directions

How This Work Changes the Landscape

This paper introduces a new axis for transformer efficiency that is conceptually distinct from prior work: learned, token-level dynamic compute allocation that genuinely reduces total FLOPs while maintaining static, hardware-friendly computation graphs. This is not a refinement of existing sparsity or conditional computation techniques — it is a different category of efficiency mechanism, positioned between Mixture-of-Experts (which reallocates fixed compute across equivalent operations) and early-exit methods (which reduce depth but introduce dynamic computation graphs and irreversible token dropout from the attention pool).

The primary conceptual shift is the demonstration that transformers can learn to distinguish tokens that require computation from those that don't, and that this learned distinction can be exploited to aggressively reduce per-forward-pass FLOPs without the hardware-unfriendly dynamic graphs that have historically plagued conditional computation. Prior to this work, the dominant efficiency paradigms were:

  • MoE: Keep total FLOPs roughly constant, but specialize the computation (different experts for different tokens).
  • Pruning/distillation: Reduce the size of the model itself (fewer parameters).
  • Early-exit: Let tokens exit the depth dimension early (but they cannot re-engage).
  • Sparse attention: Reduce the quadratic cost of self-attention by attending over a subset of tokens (but MLP costs remain unchanged, and sparsity patterns are typically fixed rather than learned per-token).

MoD creates a fifth path: keep the model architecture and total depth intact, but let the network decide whether to apply each block's computation to each token, with the total number of tokens processed per block capped at a fixed, user-defined capacity. The fact that this works — and works at an extreme 12.5% capacity on interleaved blocks, improving over the isoFLOP-optimal baseline (Figure 3, Figure 4) — challenges a quiet assumption in the field: that every token genuinely benefits from every layer's full computation. The paper provides strong evidence that this assumption is false, and that the marginal benefit of processing many tokens at many layers is negative — not just zero, but actively harmful — when the model is constrained by a fixed total compute budget.

This finding reframes the efficiency conversation in two ways:

First, it makes token-level compute allocation a first-class design dimension for transformer architectures, alongside model width, depth, attention mechanism, and training data quantity. Prior work treated per-token compute as a fixed function of model architecture; MoD shows it can be a learned, dynamic property that meaningfully impacts the scaling behavior. The isoFLOP curves in Figure 4 — which show MoD shifting the optimal model "down and to the right" (lower loss, more parameters) across three orders of magnitude in training budget — demonstrate that this new axis interacts with model size in a way that improves the Pareto frontier. This is not a small tweak; it is the scaling-laws equivalent of discovering that you can train larger models at the same total cost if you let them skip computation intelligently.

Second, it demonstrates that static computation graphs and dynamic compute allocation are not in tension — the top-k capacity mechanism enforces a fixed number of tokens processed per block, but the identities of those tokens are fluid and learned. This resolves a long-standing tension in the conditional computation literature, where methods that achieved genuine FLOP reduction (e.g., Graves, 2016; Dehghani et al., 2018) typically required dynamic computation graphs that were incompatible with modern accelerators. MoD shows that you can have both: the hardware sees the same tensor shapes every forward pass, but the content filling those tensors is adaptively selected by the network. This is a design pattern that can be applied beyond language modeling to any domain using transformer-like architectures.

The paper also reconciles a subtle tension in the MoE literature. MoE models achieve impressive scaling properties (Fedus et al., 2022) but keep total FLOPs roughly constant — the sparsity gains come from which parameters are applied, not from reducing how much computation occurs. Some practitioners have questioned whether MoE's complexity is justified given that it doesn't reduce inference cost. MoD provides a complementary mechanism that does reduce inference cost, and Section 4.3 (MoDE) shows the two can be combined — the benefits compound. This suggests a future where large-scale models use MoE for parameter specialization and MoD for compute reduction, with routing mechanisms handling both dimensions.

Finally, the paper shifts attention toward heterogeneous computation routing — the idea that different tokens might benefit from qualitatively different types of computation, not just different amounts. The Discussion (Section 5) sketches this vision explicitly: routing between memory lookups, tool use, standard transformer blocks, and null operations, with capacities set to balance costs. This is a genuinely new research direction that MoD validates by showing that routing between any computation and a null operation is learnable and beneficial. If routing to "do nothing" works, routing to "do something different" is a natural extension.

One less obvious implication: the paper makes verifier/auxiliary loss research more attractive for deployment-critical routing mechanisms. The autoregressive sampling solution — distilling a non-causal top-k operation into a causal predictor — is an instance of a broader pattern: train with a powerful but non-causal mechanism, then amortize it into a causal approximation for inference. The fact that the predictor achieves 99% accuracy (Section 3.5) and that the performance degradation is "minimal" (Figure 6) provides a template for other non-causal mechanisms that practitioners might want to deploy in autoregressive settings. This is not MoD-specific; the auxiliary predictor approach generalizes to any setting where a globally-optimal but non-causal decision can be distilled into a locally-computable function.

Follow-Up Research This Work Enables

1. Scaling MoD to frontier model sizes (1e22+ FLOPs, 100B+ parameters) to determine whether the advantage persists or decays. The paper's isoFLOP analysis (Figure 4) shows the MoD advantage narrowing from 6e18 to 1e20 FLOPs, but the paper does not discuss this trend or test larger budgets. A direct follow-up would train MoD and baseline models at 1e21 and 1e22 FLOPs (or use the largest publicly available training budget), measuring whether the "down and to the right" shift continues to narrow, plateaus, or reverses. The specific question: does the optimal capacity (12.5% at 6e18 FLOPs) increase with model scale, and is there a scale beyond which MoD provides no advantage? This experiment would also test whether the heuristic "optimal MoD matches baseline forward-pass FLOPs" (Section 4.1) holds at larger scales. If MoD ceases to help at frontier scales, the technique would remain valuable for smaller models but would not impact the largest training runs; if it persists, it could meaningfully change how the next generation of large language models is trained.

2. Downstream task evaluation of MoD models to determine whether language modeling loss improvements translate to practically useful capabilities. The paper reports only training and held-out language modeling loss. A natural follow-up would evaluate the isoFLOP-optimal MoD and baseline models from Figure 4 on a standard suite: perplexity on WikiText-103 and C4; zero-shot performance on Lambada, HellaSwag, PIQA, and ARC; few-shot performance on MMLU and GSM8K. The specific question: does the 0.2-0.3% auxiliary loss impact from the BCE-based causal router (Section 3.5) disproportionately affect certain task categories? Does MoD's token-level sparsity degrade performance on tasks requiring long-range dependency tracking (e.g., narrative comprehension, multi-hop reasoning) more than on tasks requiring local pattern recognition? If MoD models underperform on specific task categories despite better training loss, this would reveal a hidden cost of token-level routing and motivate research into task-aware routing objectives.

3. Systematic analysis of which tokens get routed to computation vs. residual, and whether those patterns are linguistically interpretable. Figure 5 provides a single qualitative visualization showing a "vertical band of dark blue towards the end of the sequence." A rigorous follow-up would analyze routing decisions across a large corpus, correlating routing decisions with: part-of-speech tags, dependency parse depth, token position in the sequence, token frequency, surprisal (as measured by a separate language model), and the entropy of the MoD model's own output distribution at that position. The specific question: does the router learn to skip closed-class function words (determiners, prepositions) and process open-class content words (nouns, verbs), as one might expect if routing tracks linguistic difficulty? Or does it learn something less intuitive, like processing tokens at the beginning and end of sentences while skipping mid-sentence tokens? This analysis would provide interpretability and build confidence that the routing mechanism is learning generalizable patterns rather than exploiting dataset-specific artifacts.

4. KV cache reduction measurement and long-context generation benchmarks. The paper speculates that MoD's reduced token count in routing blocks "could have significant positive effects in regards to the KV cache size during autoregressive sampling" (Section 4.1). A concrete follow-up would: (a) measure the actual KV cache memory footprint for MoD vs. baseline models at equivalent parameter counts during long-sequence generation (e.g., 8K, 32K, 128K tokens); (b) benchmark the maximum context length achievable on fixed hardware (e.g., a single A100-80GB) for MoD vs. baseline; (c) evaluate perplexity on long-context benchmarks (e.g., PG-19, BookCorpus) as context length increases. The specific question: does the 87.5% reduction in tokens processed by routing blocks translate to a proportional reduction in KV cache memory, and if so, does this enable meaningfully longer context windows at deployment? If the KV cache for routing blocks only stores CC entries rather than SS, this could be a more impactful practical benefit than the FLOP-based speedup, especially as context lengths grow.

5. Routing between heterogeneous computation types (not just full-block vs. null), as sketched in the Discussion. The paper's final section envisions extending MoD to route between "memory lookup functions, tool use functions, and other types of computation." A concrete first step: implement a MoD variant where the two paths are (a) standard transformer block and (b) a lightweight "skim" operation — perhaps a smaller MLP or a local attention window — rather than a pure residual connection. Train at isoFLOP and compare to both the pure MoD (full vs. null) and baseline. The specific question: does having a cheap-but-not-null alternative improve performance over the binary process-or-skip decision, and at what capacity ratio? This would establish whether the benefit of MoD comes specifically from skipping computation entirely or more generally from dynamically allocating different amounts of compute to different tokens. If the latter, it opens the door to a spectrum of computation paths at different FLOP costs.

6. Testing MoD on encoder-decoder and non-autoregressive architectures to determine whether the routing benefits are specific to decoder-only causal language models. The paper focuses exclusively on decoder-only transformers and develops the auxiliary predictor specifically to handle the causality problem (Section 3.5). Encoder-decoder models (e.g., T5) and bidirectional encoders (e.g., BERT) do not have this causality constraint — the entire input sequence is available when making routing decisions. A follow-up would implement MoD in an encoder-decoder setting (using the simpler non-causal top-k without auxiliary predictors) and measure whether the performance gains are larger (because routing can use bidirectional context) or smaller (because the different training objective — masked language modeling or seq2seq — changes which tokens benefit from computation). The specific question: does MoD's advantage depend on the autoregressive next-token prediction objective, or is it a general property of transformer architectures regardless of training task?

Practical Applications and Downstream Use Cases

1. Cost-efficient deployment of medium-scale language models for high-throughput inference. For organizations serving language models at scale (e.g., customer support chatbots, content moderation, code completion), the dominant cost is inference FLOPs per query. The paper shows that MoD variants matching the isoFLOP-optimal baseline in training loss can require 0.6-0.8× the FLOPs per forward pass (Figure 4, right panel), with one 220M parameter variant being ~60% faster to step (Figure 3). For a deployment serving millions of queries per day, a 40-60% reduction in inference FLOPs translates directly to reduced hardware costs or increased throughput on existing hardware. The practical path is: train a baseline model to convergence, identify the isoFLOP-optimal size, then train an MoD variant at the same total training budget that matches baseline performance but with lower per-step FLOPs. The paper's heuristic — match the baseline's per-forward-pass FLOPs by scaling MoD model depth (Section 4.1) — provides a concrete recipe for finding this variant without an exhaustive hyperparameter sweep.

2. On-device or edge deployment where per-token FLOPs directly constrain feasibility. For applications running on phones, laptops, or embedded devices (e.g., on-device keyboard prediction, voice assistant processing, real-time translation), the absolute FLOP budget per token is fixed by hardware constraints. The paper's finding that MoD can achieve baseline performance with 12.5% capacity on interleaved routing blocks (Section 4.1) means that a model with MoD routing can provide the same predictive accuracy as a vanilla model while consuming dramatically fewer FLOPs per token. The practical path: take an existing on-device transformer model, interleave MoD routing blocks at every other layer with 12.5% capacity, retrain at the same total FLOP budget, and deploy with the causal predictor for autoregressive inference. The 99% predictor accuracy (Section 3.5) and minimal performance degradation (Figure 6) suggest this can be done without sacrificing quality. The reduction in KV cache size for routing blocks (speculated but unmeasured in the paper) could further expand the feasible context length for on-device generation.

3. Training data generation and self-improvement pipelines where models are run on large corpora in batch mode. When using language models to generate training data for themselves (e.g., rejection sampling, knowledge distillation, synthetic data generation), the model is run over enormous text corpora in a for-loop, and inference speed directly determines the volume of data that can be generated within a compute budget. The paper's autoregressive evaluation (Figure 6) confirms that the FLOP savings from MoD persist during sampling. For a self-improvement pipeline generating billions of tokens, a 40% reduction in per-token FLOPs means either 40% more data generated within the same time budget, or the same data generated in 40% less wall-clock time. Crucially, the paper shows this speedup comes without loss degradation — the MoD evaluation points in Figure 6 sit below the baseline evaluation curve, meaning MoD models can be both faster and better. The practical path: after pretraining the base model with MoD, use it for downstream data generation with the causal predictor, amortizing the one-time hyperparameter sweep cost across billions of inference tokens.

4. Long-context processing where KV cache memory is the bottleneck rather than FLOPs. Although the paper does not measure KV cache reduction directly (see Limitations, Section 6 of prior sections), the architecture strongly implies it: routing blocks process only CC tokens rather than SS, so their key-value cache should, in principle, require only C/SC/S of the memory. For the optimal 12.5% capacity configuration, this would mean routing block KV caches are 87.5% smaller than baseline. For applications processing very long sequences (document summarization, codebase analysis, long-form dialogue), KV cache memory often limits the maximum context length before running out of accelerator memory. Even if only half the blocks benefit (since MoD routes every other block), the aggregate KV cache reduction could extend the feasible context window meaningfully. A practitioner deploying MoD for long-context processing would need to confirm the KV cache savings experimentally on their hardware, but the architecture provides a clear mechanism for the benefit.