解开混合线性注意力转换方法中的组件不平衡问题
Untangling Component Imbalance in Hybrid Linear Attention Conversion Methods
AI总结:
针对混合线性注意力转换方法中线性组件被绕过的问题,提出推理时混合、HedgeCATs和SSD三种方案,确保组件均衡使用并恢复性能归因有效性。
摘要:
尽管Transformers性能卓越,但其二次计算复杂度限制了可扩展性。虽然线性注意力将其降至线性复杂度,但在多数情况下,从头预训练此类模型成本依然过高。近期的训练后线性化方法能高效地将预训练Transformers转换为线性模型,通常采用结合线性注意力与滑动窗口softmax的混合方法。我们发现了一个关键缺陷:现有混合方法无意中绕过了线性组件,几乎完全依赖SWA。组件级诊断揭示,这种此前未被察觉的行为源于在常识基准上被忽视的评估实践。我们提出三种确保组件均衡使用的解决方案:(i) 将纯线性转换与滑动窗口softmax进行推理时混合;(ii) HedgeCATs,结合注意力权重迁移与定向LoRA微调;(iii) Scheduled Sliding-window Dropout (SSD),在训练期间随机抑制softmax分支以防止组件崩溃。我们的方法在保持计算效率的同时,恢复了大部分基础模型性能,并确保了真正的线性注意力采用,从而恢复了混合转换中性能归因的有效性。
英文摘要:
Transformers' quadratic computational complexity limits their scalability despite remarkable performance. While linear attention reduces this to linear complexity, pre-training such models from scratch remains, in most cases, prohibitively expensive. Recent post-training linearisation methods convert pre-trained Transformers to linear models efficiently, often using hybrid approaches that combine linear attention with sliding-window softmax. We identify a critical flaw: existing hybrid methods inadvertently bypass the linear component, relying almost entirely on SWA. Component-level diagnostics reveal this previously undetected behaviour stems from overlooked evaluation practices on common-sense benchmarks. We propose three solutions to ensure balanced component usage: (i) inference-time hybridisation of linear-only conversions with sliding-window softmax; (ii) HedgeCATs, combining attention-weight transfer with targeted LoRA fine-tuning; and (iii) Scheduled Sliding-window Dropout (SSD), which stochastically suppresses the softmax branch during training to prevent component collapse. Our methods maintain computational efficiency while recovering most base model performance and ensuring genuine linear attention adoption, restoring the validity of performance attributions in hybrid conversions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。