arXiv:2604.22050cs.LGcs.CL2026-04

按层智能精简注意力机制,显著提速模型推理而不丢性能。

LayerBoost: Layer-Aware Attention Reduction for Efficient LLMs

论文配图:LayerBoost: Layer-Aware Attention Reduction for Efficient LLMs
图 1 · 摘自论文原文
  • 根据各层敏感度差异,分层选择保留、替换或移除注意力
  • 在高并发下延迟降低68%,吞吐提升,仅需1000万额外训练样本修复
  • 适合需要低延迟的部署场景,如移动端或边缘计算

Transformer模型主要依赖softmax注意力,其复杂度随序列长度呈二次增长,是高效推理的主要瓶颈。以往线性或混合注意力方法通常对所有层统一替换,常导致性能大幅下降或需大量重训练恢复。本文提出LayerBoost,一种分层感知的注意力压缩方法:先对预训练模型进行系统敏感性分析,识别关键层;据此实施三种策略——在高敏感层保留标准softmax注意力,在中等敏感层替换为线性滑动窗口注意力,在低敏感层完全移除注意力。为恢复性能,引入轻量级蒸馏修复阶段,仅需1000万额外训练样本。实验表明,该方法在高并发下可将推理延迟降低68%,显著提升吞吐量,且在多个基准测试中接近基线模型表现,优于现有主流注意力线性化方法,特别适用于高并发服务与硬件受限场景。

原文摘要 · Abstract (English)

Transformers are mostly relying on softmax attention, which introduces quadratic complexity with respect to sequence length and remains a major bottleneck for efficient inference. Prior work on linear or hybrid attention typically replaces softmax attention uniformly across all layers, often leading to significant performance degradation or requiring extensive retraining to recover model quality. This work proposes LayerBoost, a layer-aware attention reduction method that selectively modifies the attention mechanism based on the sensitivity of individual transformer layers. It first performs a systematic sensitivity analysis on a pretrained model to identify layers that are critical for maintaining performance. Guided by this analysis, three distinct strategies can be applied: retaining standard softmax attention in highly sensitive layers, replacing it with linear sliding window attention in moderately sensitive layers, and removing attention entirely in layers that exhibit low sensitivity. To recover performance after these architectural modifications, we introduce a lightweight distillation-based healing phase requiring only 10M additional training tokens. LayerBoost reduces inference latency and improves throughput by up to 68% at high concurrency, while maintaining competitive model quality. It matches base model performance on several benchmarks, exhibits only minor degradations on others, and significantly outperforms state-of-the-art attention linearization methods. These efficiency gains make our method particularly well-suited for high-concurrency serving and hardware-constrained deployment scenarios, where inference cost and memory footprint are critical bottlenecks.

注意力机制大模型推理效率优化分层设计

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。