Skip to content
ElastixAI

Frontier models have already embraced conditional parameter access with Mixture-of-Experts (MoE). Now, we’re proposing a more radical next step: making physical depth conditional.

What we’re proposing isn’t early exit. And it’s not "use fewer layers for easy tokens." It’s even more extreme: the model may only need one physical MoE layer.

Run that one layer recurrently. Let its router choose different experts on every pass. Let attention choose different information. Let a bounded scratchpad carry state across passes. Let the model stop when the current token is ready.

If those pieces are expressive enough, the layer is no longer just a layer. It becomes a programmable substrate from which the model constructs a different virtual neural graph for each token.

That is the central thesis behind ElastixAI CEO Mohammad Rastegari’s paper, Depth Becomes Time. Read on to learn about how Depth Becomes Time works, how it differs from early-exit methods, and why it could reimagine the way we approach inference moving forward.

For details on the formal model, training objectives, routing mechanism, memory semantics, and systems implications, read the full paper here.

MoE solved one dimension of the problem

The industry has already moved a long way toward conditional computation.

Many of the most capable publicly documented large models use MoE architectures.

  • DeepSeek V3 has 671B total parameters but activates about 37B per token.
  • Qwen3-235B-A22B has 235B total parameters and activates about 22B.
  • Kimi K2 has 1T total parameters and activates about 32B.

The key idea is familiar: a token should not have to touch every parameter in the model. The router selects a small subset of experts, giving the model substantial stored capacity without requiring dense computation across the entire expert bank.

But look at what stayed fixed.

  • DeepSeek-V3 still has 61 physical Transformer layers.
  • Qwen3-235B A22B has 94.
  • Kimi K2 has 61.

A token may activate only a small fraction of the available experts at each layer, but it still advances through a long, pre-materialized sequence of physical blocks

Figure 1: MoE made width conditional, not depth. Publicly documented frontier-scale MoE models activate only a fraction of stored parameters, yet still retain dozens of physical Transformer layers. Sources: DeepSeek-V3 technical report/config; Qwen3 official release; Kimi K2 official model card.

A period still pays the full depth bill

Take one of the easiest next-token decisions imaginable:

The capital of France is Paris → "."

A modern MoE model is already much smarter than a dense model about width: the period does not activate every stored parameter. But it still typically traverses the entire physical Transformer stack. At every stage, it executes attention, routing, expert dispatch, residual updates, synchronization, and data movement before the next token can be emitted.

Consider the real example of DeepSeek-V3. Its public architecture reports 671B stored parameters, about 37B activated parameters per token, and 61 physical Transformer layers. The period and a difficult reasoning token can choose different experts, but both are budgeted the same physical depth.

So even after MoE has removed a large amount of unnecessary parameter activation, a trivial token can still drive a forward path involving tens of billions of active weights and the full layer stack. That represents substantial arithmetic and data movement for a decision that may require far less computation.

Figure 2: Easy and hard tokens still inherit the same physical depth. DeepSeek-V3 is used only as a concrete public architecture example: the expert route can differ by token, but both trajectories still traverse 61 physical layers. The reported 37B activated parameters per token is a model-side parameter count, not 37B independent DRAM reads; batching and weight residency can amortize hardware memory traffic.

This distinction is what we care about.

  • MoE asks, "Which parameters should this token use?"
  • Depth Becomes Time adds, "Why should this token traverse a fixed number of physical layers at all?"

Different than an early-exit architecture

Adaptive depth and early-exit papers ask an important question: if a token is easy, can it stop before reaching the end of a deep network?

That question still assumes the deep network is the underlying object. The 60 or 90 physical layers exist; the model decides where to leave them.

Depth Becomes Time starts from the opposite end.

Do not build 60 or 90 physical MoE layers and then learn how many to skip. Build one sufficiently expressive MoE layer and learn what graph to construct by revisiting it.

In the strongest version of the idea, the whole physical model is one recurrent MoE layer.

Recurrent computation, sparse expert routing, and adaptive depth are not new concepts on their own. The proposal brings them together with indexed expert retrieval, writable working memory, and learned halting in a unified architecture.

Figure 3: Physical depth versus virtual depth. A conventional MoE model materializes topology as many distinct blocks. The proposal keeps one physical MoE layer and generates virtual depth by recurrently applying it to an evolving state.

"One layer" means one shared Transformer-like MoE block: attention, a router, a large expert bank, state update, writable working memory, and a halting controller. It does not mean one linear transform or one expert.

The distinction is fundamental: the same physical layer does not mean the same computation on every iteration.

Proposing a dynamically terminated walk

At recurrent step t, the hidden state is different. Attention can retrieve different evidence. The router can select different experts. The resulting computation can update working memory differently on each pass. The next pass therefore implements a different conditional transformation.

Mathematically, the recurrent block can be written schematically as:

at = Attend(ht, history, memoryt) | St = TopK(Route(at)) | ht+1 = F(ht, ESt)

Because the selected expert set St depends on the evolving state, unrolling the recurrent layer produces a sequence of different operators. Top-k expert mixtures create branches and merges. Attention creates data-dependent read edges. Scratchpad writes create edges from one latent step to a later step. Halting decides where the graph ends.

What we’re proposing is stronger than variable chain length. With a sufficiently rich expert library and state/memory addressing, the unrolled recurrent block can select nodes, form mixtures, carry state forward, and create long-range dependencies. In that precise sense, one physical MoE layer can synthesize a broad class of finite neural computation graphs from a learned supergraph.

The right mental model is therefore not "one layer repeated." It is a dynamically terminated walk through a learned computational supergraph.

DEEPER TECHNICAL DETAIL

For more information, the paper formalizes this graph view, including conditional simulation results, recurrent state, writable memory, indexed expert retrieval, and the distinction between physical depth and latent computation time.

One physical layer, many virtual neural graphs

Suppose the current token is easy. The first pass might attend to the relevant history and select experts E2 and E12. The second pass might select E7 and E31, conclude that the distribution is already sharp enough, and halt.

A harder token can use the same physical layer four or eight times, and each pass can invoke a different expert subset. Information written into the scratchpad at step 1 can be read again at step 3. The resulting computation graph is longer, with different nodes and different dependency edges. In the baseline design, the scratchpad persists across recurrent passes for a single token, then resets when that token is committed.

Figure 4: The graph is a runtime object. The same physical MoE layer and the same expert bank can produce a short trajectory for an easy token and a longer, stateful graph for a harder token. Expert calls act as conditional operators; scratchpad dependencies create edges across latent time.

This idea is the extreme point of the paper: physical depth and computational graph depth do not have to be the same thing.

Given sufficiently expressive state, routing, experts, and memory, one recurrent MoE layer can represent a very large family of finite computation graphs. The paper presents this idea as an architectural and expressivity thesis. It doesn’t claim evidence that such a system is easy to train or that a recurrent single-layer model has already matched the strongest deep models in empirical evaluations.

Expressivity tells us what the substrate can represent. Optimization tells us whether learning will discover the right trajectories. Systems design tells us whether those trajectories can be executed efficiently. All three have to work.

Why a large expert bank becomes natural

If physical depth collapses toward one shared layer, much of the model's specialized capacity can move into the expert bank.

Experts stop being "the FFN attached to layer 37." They become reusable operators that can be invoked at any latent step. An expert that is useful early in one token's trajectory might be useful late in another's.

This situation immediately creates a scaling problem. A bank of tens of experts can use a dense router. A bank containing thousands, hundreds of thousands, or even millions of fine-grained experts should not require evaluating every expert at every recurrent step.

That is why the paper recasts routing as retrieval. Project the current state into a query, use an approximate index to retrieve a small candidate set, and exactly re-rank only those candidates. The expert bank begins to look less like a conventional layer and more like an addressable library of neural operators.

MoE made capacity sparse. Indexed MoE can make the search for capacity sparse too.

Watch one MoE layer build depth in time

The animation below shows the execution loop directly. The diagram does not move because the physical model does not change. What changes is the state flowing through it and the experts selected on each pass.

Figure 5: Depth Becomes Time recurrent inference. One physical MoE layer is revisited. Each pass attends, routes to a top-k expert subset, updates state and working memory, and then either emits a token or returns for another latent step.

If the model is recurrent, the serving platform must change

A conventional inference engine is organized around a layer pipeline. A batch moves through layer 1, then layer 2, then layer 3. Different serving optimizations can overlap and shard this work, but physical layer index remains a major organizing principle.

A one-layer recurrent MoE model has a different execution contract. Token A may be at latent step 2 while token B is at step 7. Both still return to the same physical MoE engine. Their state and selected experts differ, but their physical destination is the same.

This setup shifts the system's problem from pipelining layers to scheduling work.

Figure 6: Latent depth becomes scheduler metadata. Active tokens occupy a work queue, share one recurrent MoE engine, are grouped into expert-local micro-batches, and either halt or return to the queue. Efficient execution depends on compaction, batching, expert locality, KV placement, and memory scheduling.

At this point, the modeling idea becomes an inference-platform problem:

  • Continuous batching across latent depth. Tokens do not need to be on the same recurrent iteration to share the physical core.
  • Expert-local batching. The runtime can regroup routed tokens by expert and turn sparse requests into efficient GEMMs.
  • Active-token compaction. Halted tokens leave immediately; surviving tokens are compacted and new work can fill the freed slots.
  • Memory hierarchy becomes part of scheduling. Immutable token KVs, small writable scratchpads, router metadata, and expert weights have different locality requirements.
  • Routing latency matters. If the expert bank is large, indexed retrieval and prefetch must be co-designed with execution.

Dynamic computation does not automatically make inference cheaper. If every routing decision creates a synchronization bottleneck or every expert selection requires an inefficient weight fetch, the architecture's potential efficiency gains disappear.

The paper therefore treats wall-clock latency, bytes moved, energy per token, route fallback rate, and active-depth distributions as first-class metrics rather than just floating-point operations (FLOPs).

The broader shift: from sparse parameter activation to programmable computation

MoE was an important step because it broke a hidden assumption: model capacity and per-token compute do not have to grow together.

Depth Becomes Time asks whether another hidden assumption can be broken: model capability and physical depth do not have to grow together either.

  • Once both are relaxed, the architecture starts to look less like a stack and more like a program:
  • Attention chooses information
  • The router chooses operators
  • The expert bank provides conditional parameter capacity
  • Working memory carries intermediate state
  • Recurrence supplies virtual depth
  • Halting decides when the computation is complete

That is a much larger design space than "which Transformer layer should we skip?"

The next efficiency frontier may not be executing a fixed neural graph faster. It may be learning the graph that should exist for each token.

Why this points toward adaptable inference infrastructure

All of these concepts lead to an uncomfortable systems implication. Accelerators are designed years before the models that will ultimately run on them.

Today's hardware works extremely well because the industry has learned how to map Transformer workloads onto regular matrix engines. But the workload is already changing: MoE, new precision formats, long-context attention, structured sparsity, speculative execution, and test-time compute all alter the shape of inference.

A recurrent one-layer MoE architecture pushes this further. The important operations are no longer only large matrix multiplies arranged in a fixed sequence. The runtime must support conditional expert access, dynamic schedules, compact working state, rapid changes in precision and kernel structure, and data movement that follows the graph being created at runtime.

The ideas in this paper are closely aligned with how we think about the future at ElastixAI.

We do not believe the ML architecture is finished. So we don't believe the optimal inference architecture can be permanently frozen either.

Our focus on reconfigurable inference is about keeping the compute substrate adaptable as modeling ideas change. So ML, serving software, and hardware can be co-designed instead of forcing every new model back into the execution pattern of the previous generation.

Depth Becomes Time is a research paper, not a product announcement. But it is a useful example of the future we are designing for: a future in which the model itself is more dynamic, and the serving platform has to be equally programmable.

What would prove—or disprove—the thesis?

The architecture makes a strong claim, so it should face strong tests.

A serious evaluation has to ask

  • Can one recurrent MoE layer recover the representational specialization of many distinct physical layers?
  • Can experts specialize by function rather than collapse?
  • Do recurrent steps actually increase quality on difficult tokens?
  • Does a writable state carry causal utility?
  • Can approximate retrieval stay stable over long trajectories?
  • Will the runtime convert variable latent depth into real throughput and energy gains?

If those conditions fail, the idea is wrong or incomplete.

But if they hold, the consequence is larger than a new early-exit mechanism.

We may not need 60 or 90 physical MoE layers to get 60 or 90 steps of useful neural computation. One sufficiently expressive MoE layer may be enough—if routing, memory, and recurrence let it build the graph through time.

READ THE TECHNICAL PAPER

Depth Becomes Time: Recurrent Sparse Transformers with Writable Memory, Indexed Expert Retrieval, and Learned Halting

Mohammad Rastegari, ElastixAI

The paper includes the formal architecture, related-work positioning, training and conversion recipes, indexed-router analysis, continuous-batching formulation, hardware implications, and falsification criteria.

Architecture sources used in this article: DeepSeek-V3 Technical Report and public model config; Qwen3 official release; Kimi K2 official model card. Exact parameter and layer counts are included only for publicly documented architectures.

Keep up with what’s next.

Research, product updates, and a closer look at efficient AI inference.

Explore our insights