DepthGraft:通过分层跨层KV重建实现结构正则化
研究论文 · 2026/11/11
DepthGraft 是一种分层跨层 KV 重建架构,旨在缓解 Pre-LN 模型中的深度信息稀释问题。它通过从步长对齐的浅层-中层源对重建深层 KV,将跨层 KV 共享转化为隐式结构正则化器,从而锐化键检索方向并丰富值内容子空间。该设计在保持预填充早期完成的同时减少约三分之一的 KV 缓存,并在 0.5B 至 16B 的密集和 MoE 模型上(GQA 和 MLA)取得一致的下游性能提升,其中 16B MoE 模型在 MMLU-Pro 上绝对提升 7.0%,CMMLU 提升 6.6%,C3 提升 6.4%。
该工作为深度扩展中的信息稀释问题提供了一种高效且可扩展的结构正则化方案,实验覆盖多种模型规模与注意力机制,并在大规模 MoE 模型上取得显著性能提升,对大规模预训练设计具有参考价值。
Scaling depth is a key route to stronger large language models, but Pre-LN architectures often suffer from depth-wise information dilution, limiting the effective use of deep layers. While cross-layer connectivity has proven effective at mitigating this problem, existing designs usually introduce additional computation or memory access. We revisit cross-layer KV sharing as an efficient form of such connectivity. Beyond cache compression, each KV reuse edge creates a direct gradient path from deep layers to source KV projections, turning KV sharing into an implicit structural regularizer for KV representation geometry. We provide a systematic analysis of this mechanism, showing that proper sharing topologies sharpen key retrieval directions while enriching the value content subspace, whereas existing adjacent or global-anchor designs do not fully exploit this effect. Motivated by this, we propose DepthGraft, a hierarchical KV-sharing architecture that reconstructs deep-layer KV from stride-aligned shallow-middle source pairs. DepthGraft distributes non-local gradient flow across source layers, while preserving prefill early completion and reducing KV cache by roughly one third. Experiments on dense and MoE models from 0.5B to 16B parameters show consistent downstream improvements under both GQA and MLA. Notably, on the 16B MoE model, DepthGraft achieves a 7.0% absolute improvement on MMLU-Pro, along with gains of 6.6% on CMMLU and 6.4% on C3. These results validate the potential of DepthGraft as a scalable design for large-scale pretraining. The project page is available at https://github.com/jianke0604/DepthGraft.