Decoding Next-Generation LLM Architectures: KDA and IndexPool Explained
This article breaks down four next-generation LLM architecture techniques—KDA linear attention, DSA with IndexPool, NoPE MLA, and mHC—and explains how they address the long-context bottlenecks of quadratic attention cost, KV cache growth, positional encoding, and deep-network training stability. It covers the core ideas, engineering trade-offs, and a practical evaluation checklist for choosing the right combination based on context length, retrieval precision, and training resources.
1. Introduction: The Architecture Bottleneck in the Long-Context Era
As large models move from short question answering toward long-document understanding, repository-level code reasoning, and multi-turn agent collaboration, context length has become a core competitive dimension. However, the complexity of standard attention grows quadratically with sequence length, and KV cache memory usage expands linearly with length. The result is high inference cost, low throughput, and large time-to-first-token latency. The main line of next-generation architecture evolution follows four paths: reducing attention complexity, compressing indexes and caches, rethinking how positional information is injected, and improving training stability in deep networks. This article uses four common industry techniques as samples to abstract their design ideas and engineering trade-offs.
2. KDA Linear Attention: From Quadratic to Linear Complexity
2.1 Problem Definition
Standard scaled dot-product attention requires every query to scan all historical keys and values, giving a complexity of O(N²·d). In context scenarios beyond 128K, the combined pressure of computation and memory access makes inference hard to scale.
2.2 Core Idea
KDA (Kimi Delta Attention) belongs to a class of methods that fuse linear attention with state space models. Its key is an incremental state update: it maintains a fixed-size recurrent state matrix and corrects that state incrementally as new tokens arrive, instead of recomputing the full history. The delta rule emphasizes erasing old associations before writing new information, which mitigates the memory interference common in linear attention.
Illustrative pseudocode:
# Pseudocode: incremental state update (dimension and normalization details omitted)state = init_state(size=d_k * d_v) # fixed-size statefor t in range(seq_len):k, v, q = K[t], V[t], Q[t]# erase old associations related to k using the delta rule, then write vstate = state - beta * outer(k, state @ k)state = state + beta * outer(k, v)out[t] = state @ q
2.3 Engineering Benefits and Costs
The benefit is that complexity drops to O(N·d²), throughput on long sequences improves significantly, and the KV cache degrades into a fixed-size state. The cost is that exact retrieval ability is weaker than full attention, so it must be compensated with gating, chunking, or mixing in a small number of full-attention layers. In practice, a common compromise is “linear attention in most layers plus full attention in a few layers.”
3. DSA + IndexPool: Sparse Indexing and a Compressed Indexer
3.1 DSA Sparse Attention
DSA (sparse attention) does not compute over the entire history. Instead, a lightweight scorer first selects the Top-K relevant positions, and exact attention is performed only at those positions. Complexity drops from O(N²) to O(N·K), where K is a constant.
3.2 IndexPool Compressed Indexer
IndexPool (the K-Pool compressed indexer) addresses the second-level bottleneck that “scoring still has to scan the full history.” It pools key vectors into a small number of representative index vectors, performs scoring in the compressed index space, and then maps back to the original positions. The flow can be summarized as:
- Chunking: split historical keys into blocks by window;
- Pooling: apply mean or learnable weighted compression within each block to obtain index vectors;
- Retrieval: score queries against the index vectors and select candidate blocks;
- Exact computation: perform exact attention only within the candidate blocks.
3.3 How They Work Together
KDA handles “broad coarse memory,” while IndexPool + DSA handles “exact retrieval.” The two are complementary: the linear state provides low-cost global context, and the sparse index ensures key details are not diluted. This is the mainstream combination paradigm for current long-context architectures.
4. NoPE MLA: Dropping Rotary Positional Encoding in the Language Backbone
4.1 The Motivation Behind MLA
MLA (Multi-head Latent Attention) compresses keys and values through low-rank latent variables, greatly reducing the KV cache, and is a key means of cutting cost.
4.2 Why Drop RoPE
NoPE means not using rotary positional encoding. The reason is that after latent-variable compression, dimensional semantics become mixed, making the phase relationships of rotary positional encoding hard to preserve stably; at the same time, linear attention and state updates already imply sequential information. After the language backbone switches to NoPE, positional information relies more on the causal mask and hierarchical structure to emerge naturally, reducing implementation complexity and improving extrapolation stability on long sequences.
4.3 Trade-off Guidance
If a task depends heavily on precise relative positions (such as code line numbers or table column alignment), explicit positional encoding should be retained or an extrapolatable positional scheme should be used; if the focus is semantic understanding, NoPE is simpler.
5. mHC: Manifold-Constrained Hyper-Connections
Gradient vanishing and representation degradation in deep networks are core challenges for training stability. mHC (Manifold-Constrained Hyper-Connections) introduces manifold constraints on top of hyper-connections (multi-path connections across layers): it restricts the inter-layer connection matrices to orthogonal or low-rank manifolds, keeping information norm-stable as it passes through many layers and avoiding connection-weight explosion or collapse. The effect is improved trainability of deep networks and reduced sensitivity to hyperparameters.
6. Engineering Evaluation Checklist
- Complexity: confirm whether it is linear or quadratic under long sequences;
- Cache: check whether the KV cache grows linearly with length;
- Retrieval precision: verify whether the recall of sparse Top-K meets business needs;
- Positional encoding: check whether it matches the task’s positional sensitivity;
- Training stability: assess whether deep connections introduce extra tuning cost.
7. Conclusion
KDA, IndexPool, NoPE MLA, and mHC each restructure the long-context architecture from four dimensions: computation, retrieval, position, and connections. When selecting among them, the combination should be chosen under the constraints of business context length, retrieval precision requirements, and training resources, rather than blindly stacking techniques. With the support of general capabilities such as container platforms, object storage, and monitoring and alerting on cloud platforms like Baidu AI Cloud, the evaluation and deployment of such architectures can be engineered and delivered more efficiently.
