How to Evaluate Asymmetrically Activated Causal Encoder–Decoder Multimodal Architectures

    Asymmetrically activated causal encoder–decoder architectures aim to optimize long-context and read-heavy workloads by separating prefill from decoding, sharing global KV representations, using sparse indexing, and integrating memory lookup. This article examines their potential benefits, engineering trade-offs, multimodal design considerations, evaluation methodology, suitable workloads, and deployment checklist. Performance conclusions remain architectural hypotheses and should be validated through production-like load tests, business evaluations, and release documentation.

    1. The Core Idea: Not “A Larger MoE,” but Split Activation Paths

    Traditional sparse Mixture-of-Experts (MoE) models address the trade-off between total parameter capacity and compute cost: the model may contain many parameters, but each token is routed to only a small number of experts. Prefill and decoding generally still share the same main network and differ mainly in batch shape and execution pattern.

    The more significant idea in the architecture described here is not simply increasing parameter count. It is splitting the network into a causal encoder–decoder structure:

    • The encoder primarily handles prefill and compresses long context into compact representations.
    • The decoder primarily performs autoregressive, token-by-token generation.
    • Instead of constructing a complete global KV representation from its own hidden states, each decoder layer obtains shared global KV representations projected from the encoder’s final layer.
    • Prefill and decoding can use different activation budgets, creating asymmetric activation.

    This changes the role of prefill and decoding. They are no longer merely two execution phases of the same model; they become two computational paths that can be optimized separately.

    This design is particularly relevant to workloads that read a large amount of context but produce relatively short outputs, including long-document question answering, codebase analysis, retrieval-augmented generation, and agent task planning. In these workloads, the input may contain many context tokens while the generated response is comparatively short. Reducing the activation budget during prefill could theoretically lower the cost before the first token, while allowing decoding to retain greater capacity.

    However, this type of architecture should not be evaluated solely by total parameter count or single-request generation speed. More meaningful dimensions include:

    1. How many parameters are activated during prefill and decoding;
    2. KV-cache bytes per token;
    3. The overhead and quality impact of shared-KV projection;
    4. Cache hit rates and invalidation behavior under long-context workloads;
    5. End-to-end cost per successful task rather than raw tokens per second.

    2. Asymmetric Activation: Savings in Prefill, Challenges in Decoding and Scheduling

    The intuition behind asymmetric activation is straightforward. Prefill reads the context and can reduce per-token cost through encoder compression, sparse indexing, and shared KV representations. Decoding writes the result and requires stronger representational capacity and stable token-by-token execution, so it can retain a higher activation budget.

    This aligns well with long-context applications, especially read-heavy agent workflows.

    However, the design introduces new engineering challenges:

    • Long outputs can reverse the cost advantage. If a workload generates many output tokens, the higher decoding activation budget continues to increase cost. The savings from prefill may eventually be offset.
    • Prefill and decoding have different resource profiles. Prefill is more dependent on large matrix operations and context compression, while decoding is more constrained by memory bandwidth, KV reads, and batching efficiency. When both are colocated, prefill bursts can negatively affect decoding latency.
    • Cache benefits depend on hit rates. Prefix caching and shared-KV reuse can be valuable in multi-turn conversations, repeated questions over the same document, and continuous codebase analysis. Benefits decline when context is frequently edited, tenant isolation is strict, or cache entries are often invalidated.
    • Quality risk is concentrated in compression. If the encoder compresses context too aggressively, detail retrieval, numerical comparison, and cross-paragraph multi-hop reasoning may degrade. These risks must be measured on real tasks rather than inferred from general benchmarks.

    In production evaluation, prefill and decoding should be load-tested separately. At minimum, record time to first token (TTFT), time per output token, P95 and P99 latency under concurrency, cache hit rate, memory usage, and retry rate. The following is an evaluation configuration example that is not tied to any specific product:

    1. workloads:
    2. - name: long_context_qa
    3. input_distribution: "Preserve P50/P95/P99 from production sampling"
    4. output_profile: "Read-heavy, write-light"
    5. multi_turn: true
    6. - name: long_form_generation
    7. input_distribution: "Medium-length context"
    8. output_profile: "Write-heavy, read-light"
    9. multi_turn: false
    10. metrics:
    11. - ttft_p95
    12. - tpot_p95
    13. - output_tokens_per_second
    14. - cache_hit_rate
    15. - kv_cache_bytes_per_token
    16. - cost_per_successful_task
    17. - quality_regression
    18. - timeout_and_oom_rate

    3. Shared KV and Two-Level Sparse Indexing: Memory Savings Without Losing Retrieval Recall

    Another important element is reorganizing attention-related structures around shared KV representations and two-level sparse indexing.

    In a conventional design, every decoder layer may need to construct global KV representations from its own hidden states. As the number of layers increases, both KV construction and KV access become more expensive. If global KV can instead be projected directly from the encoder’s final representation, all decoder layers can share the same global contextual representation. This may reduce repeated construction, lower memory usage, and make prefix caching more compact.

    From a systems perspective, this can provide at least three potential benefits:

    1. More centralized caching. Shared KV is better suited to block-level caching, prefix reuse, and reuse across requests.
    2. More manageable long-context execution. After the context is compressed by the encoder, decoding does not need to repeatedly move the complete history.
    3. Sparser attention computation. Two-level indexing can perform a coarse filtering step followed by fine-grained computation, reducing attention over irrelevant content.

    Shared KV also has clear limitations:

    • Representation bottlenecks. If all decoder layers share the same projected representation, the model may lose some layer-specific modeling capacity. Projection design, dimensionality, and normalization all affect quality.
    • Cross-layer alignment difficulty. The encoder’s final representation may not be naturally suitable for every decoder layer. Training objectives, auxiliary losses, or gating mechanisms may be needed to maintain alignment.
    • Recall risks in sparse indexing. In a coarse-to-fine process, if the coarse stage misses a critical segment, later decoding may not be able to recover it. Negations, qualifying conditions, and table footnotes in long documents are especially vulnerable.
    • Cache consistency. In multi-turn interactions, history edits, corrected tool results, or permission changes must trigger precise invalidation. Otherwise, the system may respond quickly while citing outdated context.

    A rough capacity estimate can be used for planning. KV usage is generally related to the number of layers, KV heads, head dimension, sequence length, and bytes per data type. Shared KV can reduce the repeated overhead associated with the number of layers, but it does not eliminate growth caused by sequence length. It should therefore be combined with paged memory management, block alignment, prefix hashing, eviction policies, and tenant isolation.

    Evaluation should include long-context needle-in-a-haystack tests, multi-hop question answering, numerical comparisons in tables, and cache invalidation after permission changes—not only average response time.

    4. Native Multimodality: A Unified Representation Does Not Mean Unified Computation

    “Native multimodality” is often misunderstood as requiring every modality to follow exactly the same computational path. More precisely, it usually means that the model jointly learns text, images, audio, video, or other modalities during training and aligns them in a shared representation space, rather than connecting several independent models after the fact.

    The main engineering challenges include:

    • Different modalities have very different token densities. Images and videos can generate large amounts of redundant tokens.
    • Fine-grained information and semantic information require different compression strategies. Optical character recognition, chart values, and table structure require detailed preservation, while general scene understanding may tolerate more aggressive compression.
    • Fully expanded cross-modal attention can cause long-context costs to grow rapidly.
    • The quality, alignment, and safety filtering of multimodal training data directly affect downstream stability.

    A causal encoder–decoder architecture can use the encoder to process and compress multimodal context during prefill, while the decoder retains only the compact representations needed for generation. The stronger the compression, however, the more important task-aware routing becomes.

    For example, document question answering may need to preserve layout and text-region information; video question answering may need timestamps and key frames; general summarization may favor semantic compression. In practice, a more robust strategy is unified representations with hierarchical compression and a recoverable detail channel, rather than applying one compression ratio to every task.

    5. N-Gram Hash-Table Memory: Separating Memorization from Computation

    The architecture also includes a memory-enhancement module based on N-gram hash-table lookup. Its central idea is to divide model capabilities into two categories:

    • Neural networks handle reasoning, composition, and generalization.
    • Frequently repeated entities, fixed expressions, local patterns, and domain-specific terms are obtained through lookup or retrieval at lower cost.

    This design has an immediate benefit. For frequent entities and fixed expressions, lookup can be cheaper than repeatedly storing the same information in model parameters. It is also easier to update. In enterprise knowledge bases, product terminology, code symbols, and ticket templates, a memory module can reduce pressure on model capacity and allow knowledge updates without fully retraining the model.

    The risks are equally important:

    1. Hash collisions and incomplete coverage. N-gram lookup depends on hash-space size and table capacity. Collisions can produce incorrect retrievals, while long-tail entities may not be covered.
    2. Stale or contaminated data. If the memory table is not updated promptly, it may return outdated information. Weak permission controls may also expose content across tenants.
    3. Shortcut learning. If the memory module is too powerful during training, the model may rely excessively on lookup and weaken its underlying reasoning capability.
    4. Security and compliance. Memory entries require encryption, auditing, TTL policies, tenant isolation, and deletion mechanisms. Being retrievable does not mean that content is permitted for every use.

    A practical integration pattern is gated auxiliary memory. Lookup results should be injected as side information rather than directly replacing model output. Low-confidence results should fall back to the neural model, and sensitive, permission-related, and time-sensitive fields should receive additional validation.

    1. def forward_with_memory(tokens, context, memory_table, model):
    2. memory, confidence = memory_table.lookup(tokens)
    3. hidden = model.encode(context)
    4. if confidence >= threshold and is_safe_and_fresh(memory):
    5. hidden = fuse(hidden, memory, weight=confidence)
    6. return model.decode(hidden)

    6. Model–Runtime Co-Design: End-to-End Gains Matter More Than Isolated Improvements

    The architecture description also emphasizes deep integration between model training and the serving runtime. This direction is reasonable because tool-call formatting, context trimming, retry behavior, cache granularity, and batching all affect end-to-end performance.

    If the model is trained with runtime-like context organization, deployment may achieve better tool-call success rates, format adherence, and multi-turn stability.

    However, deeper integration also increases coupling risk:

    • Lower portability. A model optimized for a particular context template, tool protocol, or batching strategy may lose its advantages when moved to another runtime.
    • More complex regression testing. Changes to the model version, runtime version, prompt template, or caching policy can all affect final quality.
    • Higher observability requirements. Model, runtime, cache, and business metrics must be connected; otherwise it is difficult to determine whether a regression comes from the model or the scheduler.
    • The need for stable interface contracts. The model and runtime should communicate through a stable abstraction layer. Context compression, tool calling, retries, and cache invalidation should be replaceable modules rather than implementation details directly used by application code.

    7. Evaluation Methodology: Do Not Draw Conclusions from a Single Tokens-Per-Second Number

    A layered evaluation matrix is recommended:

    Dimension Recommended metrics Notes
    Quality Task success rate, factual consistency, citation accuracy, fine-grained recall Use real business samples rather than relying only on general benchmarks
    Latency Time to first token, time per output token, P95/P99 Measure prefill and decoding separately
    Throughput Output tokens/s, requests/s, concurrency utilization Observe batching efficiency and tail latency together
    Cost Cost per successful task, cache hit rate, memory usage Do not evaluate only per-token pricing
    Stability Timeout rate, OOM rate, fallback success rate, retry rate Long-context and multi-tenant workloads are especially important
    Operability Logs, tracing, metrics, rollback capability The system must help isolate model, cache, and scheduling failures

    Cold-cache and warm-cache results can differ substantially. The same is true for short and long contexts, single-turn and multi-turn interactions, and single-tenant and multi-tenant deployments.

    A strong generation-speed result measured with high cache hit rates, short outputs, and low concurrency should not be treated as representative of production performance.

    8. Suitable and Cautionary Workloads

    The architecture is worth prioritizing for evaluation in workloads such as:

    • Long-document reading and question answering;
    • Codebase analysis;
    • Retrieval-augmented generation;
    • Agent task planning;
    • Multimodal document and media understanding;
    • Read-heavy batch analysis.

    These workloads can benefit from prefill compression, shared KV, cache reuse, and memory lookup.

    More caution is needed for:

    • Very long-form generation;
    • Highly deterministic output;
    • Frequently edited contexts;
    • Complex permission boundaries;
    • Tasks requiring extremely accurate table and footnote handling;
    • High-concurrency interfaces with very short requests and extremely low-latency requirements.

    In these cases, decoding cost, cache invalidation, and quality regressions may offset the benefits of prefill optimization.

    9. Deployment Checklist

    1. Build a realistic workload profile. Sample input length, output length, read-to-write ratio, multi-turn frequency, cache reuse rate, and tenant distribution.
    2. Benchmark prefill and decoding separately. Record first-token latency, per-token latency, throughput, and memory usage for each.
    3. Establish a quality baseline. Run A/B evaluations on business samples covering detail retrieval, numerical comparison, multi-hop reasoning, and safe refusal behavior.
    4. Verify cache correctness. Test prefix invalidation, multi-turn edits, permission changes, tenant isolation, and failure rollback.
    5. Evaluate sparse-index recall. Create dedicated tests for critical passages, negation, qualifying conditions, and table footnotes in long documents.
    6. Govern the memory table. Define update procedures, TTL, collision handling, permission controls, and deletion mechanisms.
    7. Control runtime coupling. Maintain stable abstractions and regression tests to prevent uncontrolled drift after version upgrades.
    8. Prepare fallback paths. When caching fails, sparse retrieval is insufficient, or long-output costs exceed expectations, the system should be able to switch to a more conservative mode.

    10. Conclusion

    The combination of asymmetric activation, a causal encoder–decoder, shared KV, sparse indexing, and memory lookup is a meaningful architectural direction. It attempts to separate prefill from decoding, reasoning from memory access, and the model from the runtime, while targeting long-context and read-heavy workloads.

    When implemented effectively, it may improve time to first token, cache efficiency, long-context cost, and end-to-end throughput.

    However, no single metric is sufficient to evaluate it. Production value depends on preserving quality after compression, maintaining shared-KV consistency, achieving adequate sparse-index recall, governing the memory table securely, and retaining portability after model–runtime co-design.

    The most reliable evaluation method is end-to-end testing with realistic business workloads. The primary decision criteria should be cost per successful task, quality regression, tail latency, and operability—not parameter count or one isolated generation-speed figure.