arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2602.23795cs.LG
收藏

GRAIL: 通过线性重建进行压缩网络的后验补偿

GRAIL: Post-hoc Compensation by Linear Reconstruction for Compressed Networks

Graz University of Technology(格拉茨技术大学);Complexity Science Hub(复杂性科学中心);ETH Zurich(苏黎世联邦理工学院)

Wenwu Tang, Dong Wang, Lothar Thiele, Olga Saukh

AI总结:

GRAIL通过线性重建在压缩网络后恢复精度,无需微调,适用于多种模型和压缩场景。

摘要:

结构化的深度模型压缩方法在硬件上友好,并显著降低了内存和推理成本。然而,在极端压缩下,所得到的精度下降通常需要压缩后的微调,这可能由于缺少标记数据或训练成本高而变得不切实际。我们提出了后验块级补偿,称为GRAIL,这是一种简单的零微调步骤,在模型压缩后应用,通过小的校准集恢复每个块的输入-输出行为。该方法通过Gram矩阵总结隐藏激活,并应用岭回归对减少的隐藏表示进行线性重建。得到的重建图被吸收进下游投影权重中,同时上游层被压缩。该方法对选择器(幅度、Wanda、Gram-based选择或折叠)是无关的,数据感知(仅需要几次前向传递而无需梯度或标签),并且在Gram矩阵接近恒等矩阵时恢复经典剪枝或折叠,这表明通道间相关性弱。在ResNets、ViTs和解码器-only LLMs上,GRAIL在实际压缩范围内一致地提高了精度或困惑度,相对于无数据和数据感知的剪枝或折叠基线,具有可控的开销且无反向传播。代码可在https://github.com/TWWinde/GRAIL_Compensation获取。

英文摘要:

Structured deep model compression methods are hardware-friendly and substantially reduce memory and inference costs. However, under aggressive compression, the resulting accuracy degradation often necessitates post-compression finetuning, which can be impractical due to missing labeled data or high training cost. We propose post-hoc blockwise compensation, called GRAIL, a simple zero-finetuning step applied after model compression that restores each block's input-output behavior using a small calibration set. The method summarizes hidden activations via a Gram matrix and applies ridge regression to linearly reconstruct the original hidden representation from the reduced one. The resulting reconstruction map is absorbed into the downstream projection weights, while the upstream layer is compressed. The approach is selector-agnostic (Magnitude, Wanda, Gram-based selection, or folding), data-aware (requiring only a few forward passes without gradients or labels), and recovers classic pruning or folding when the Gram matrix is near identity, indicating weak inter-channel correlations. Across ResNets, ViTs, and decoder-only LLMs, GRAIL consistently improves accuracy or perplexity over data-free and data-aware pruning or folding baselines in practical compression regimes, with manageable overhead and no backpropagation. The code is available at https://github.com/TWWinde/GRAIL_Compensation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑