Sparse Activation Architecture Evolution: A Technical Look at Asymmetric Compute
This article examines how sparse activation architectures are evolving through asymmetric compute, shared KV caching, two-level sparse indexing, and externalized memory lookup. It explains why parameter count and inference cost rise together, why symmetric prefill and decode graphs create bottlenecks in long-context workloads, and how splitting the network into encoder and decoder stages changes the cost curve. The article also outlines practical evaluation and load-testing guidance, along with deployment recommendations for building observable and rollback-capable inference pipelines.
Sparse Activation Architecture Evolution: A Technical Look at Asymmetric Compute and Externalized Memory
1. The Starting Point: Why Parameter Scale and Inference Cost Rise Together
Over the past two years, the parameter count of large models has kept climbing, yet the share of parameters that actually participate in computation during a single inference pass has been shrinking. Sparse activation—roughly equivalent to mixture-of-experts routing—has become the mainstream approach precisely because it aims to expand model capacity while keeping the compute per token within an acceptable range.
In practice, however, an awkward pattern shows up: even with a low activation ratio, inference cost in long-context scenarios remains high, and time to first token often cannot be satisfied at the same time as generation speed. The cause is not the parameter count itself, but the fact that traditional sparse structures apply a symmetric compute graph to the two phases of prefill and decode—both phases follow the same forward path, activate the same set of parameters, and build the same key-value cache (KV Cache).
Using the public technical observation that a new generation of minimum-size sparse activation models adopts asymmetric activation as a thread, this article abstracts a reusable architectural methodology. It discusses four designs—asymmetric activation, shared KV caching, two-level sparse indexing, and externalized memory lookup—and offers practical recommendations for evaluation and load testing.
2. From Symmetric Activation to Asymmetric Activation
2.1 The Hidden Constraint of Symmetric Activation
A traditional sparse expert structure can be simplified into the following illustrative logic:
# Traditional symmetric activation (pseudocode)def forward(tokens, is_prefill):h = embed(tokens)for layer in layers:idx, gate = router(layer, h) # independent routing per layerh = layer.experts[idx](h, gate) # prefill and decode use the same expertsh = layer.attn(h, kv_cache)return h
The key detail is that is_prefill never enters the compute graph. In other words, whether the context is 128K or 1K, and whether the step is processing a long prompt or continuing a single token, the number of activated parameters stays constant.
2.2 Causal Encoder-Decoder: Splitting One Forward Pass into Two Stages
The representative approach to asymmetric activation splits the network along the depth dimension into two stages: the lower half serves as an encoder, running only during prefill to compress long context into a compact representation; the upper half serves as a decoder, running during token-by-token generation. Its global KV cache is projected directly from the last encoder layer’s hidden states, rather than being reconstructed at every layer.
# Asymmetric activation (pseudocode)def prefill(prompt):h = embed(prompt)for layer in encoder_layers: # runs only during prefillh = layer(h)kv_global = project(h) # global KV projected from the final layerreturn kv_globaldef decode(kv_global, token):h = embed(token)for layer in decoder_layers: # runs only during decodeh = layer.attn(h, kv_global) # reuse the compact global representationh = layer.ffn(h)return h
This split has two direct consequences. First, the prefill stage activates fewer parameters than the decode stage, producing an asymmetric curve that is “cheap to read, slightly more expensive to write.” Second, once the context is compressed into a compact representation, the cache that must be moved and computed at each decode step shrinks. Since memory access in the decode stage is usually the throughput bottleneck, the gains are amplified.
2.3 Why Agent Workloads Benefit Most
A typical agent task is “read a lot, write comparatively little”: retrieved passages, code repository context, and tool return values make up a large portion of the input, while the output is often only short structured text. Under this workload distribution, prefill accounts for a large share of cost, and asymmetric design places the cost precisely on the heaviest segment. It is worth stressing that the magnitude of the benefit depends on the implementation and hardware, so evaluation should rely on measurements from your own workload rather than citing external numbers.
3. Attention and Memory: Shared KV Caching, Two-Level Sparse Indexing, and Lookup-Based Externalization
3.1 Shared KV Caching and Two-Level Sparse Indexing
Once the global KV cache is produced uniformly by the encoder, the attention structure naturally evolves into a two-level form of “shared cache plus sparse indexing”: the first level uses lightweight scoring to quickly filter candidate blocks, and the second level performs precise attention within those candidates. The benefit is that attention overhead in long context degrades from growing quadratically with length to growing approximately linearly.
3.2 Externalized Memory: Hash Lookup Instead of Compute
A parallel route splits capability into two categories: parts that require multi-step reasoning are handled by the backbone network, while a large amount of memory-type content (local collocations, entity names, fixed expressions) is indexed via hashing into an explicit memory table, replacing computation with lookup. Such designs typically include both a retrieval path and a write path, and engineering must design eviction and update policies at the same time; otherwise the memory table will grow over time and introduce stale content.
# Minimal illustration of memory lookupdef recall(h):key = hash_n-gram(h) # build an index from local n-gramsreturn memory_table[key] # O(1) lookup replacing one expert computation
4. How to Scientifically Evaluate New-Generation Sparse Models
- Separate prefill and decode metrics: Looking only at total elapsed time can be masked by cache hit rate; measure time to first token and per-token decode time separately.
- Fix cache conditions: Report cache hit rate and input/output ratio, otherwise the numbers are not comparable.
- Fix the input/output mix: Long-input/short-output and short-input/long-output should be treated as two independent benchmarks.
- Account for engineering overhead end to end: Retrieval, tool calls, and result assembly often make up a substantial share of total duration.
- Watch memory and concurrency: The value of a compact cache is more evident under concurrency, so load tests should include concurrency gradients.
5. Deployment Recommendations
To achieve stable throughput in your own environment, start from a combination of general-purpose capabilities: use a container platform to host inference services with elastic scaling, use object storage to persist context and datasets, use a message queue to smooth out traffic peaks and troughs, and use logging services with monitoring and alerting to build dashboards for latency and hit rate. On Baidu AI Cloud, these general capability categories can be combined as needed to build an observable and rollback-capable inference pipeline.
6. Conclusion
Asymmetric activation, shared KV caching, two-level sparse indexing, and externalized memory lookup all answer the same question in essence: how to make “reading long text” and “writing short text” follow different cost curves. Understanding this holds more long-term value than memorizing the parameter sheet of any single model variant.
