通过表示层次解析剪枝何时有效
Demystifying When Pruning Works via Representation Hierarchies
AI总结:
本文通过分析语言模型内部计算的三个空间,揭示剪枝在非生成任务中有效而在生成任务中失效的原因,为剪枝应用提供指导。
摘要:
网络剪枝通过移除不重要的参数或架构,通常预期提高效率并保持性能。然而,这一期望在语言任务中并不一致:剪枝模型在非生成任务中表现良好,但在生成设置中经常失败。为理解这一差异,我们从表示层次视角分析网络剪枝,将语言模型的内部计算分解为三个连续空间:嵌入(隐藏表示)、logit(softmax前输出)和概率(softmax后分布)。我们发现嵌入和logit空间的表示对剪枝引起的扰动具有较大鲁棒性。然而,从logits到概率的非线性转换放大了这些偏差,这些偏差在时间步上累积,导致生成过程中显著退化。相比之下,分类-令牌概率子空间的稳定性以及嵌入空间的鲁棒性,支持剪枝在检索和多项选择等非生成任务中的有效性。我们的分析解开了剪枝在不同任务中的影响,并为其应用提供了实用指导。代码可在https://github.com/CASE-Lab-UMD/Pruning-on-Representations获取。
英文摘要:
Network pruning, which removes less important parameters or architectures, is often expected to improve efficiency while preserving performance. However, this expectation does not consistently hold across language tasks: pruned models can perform well on non-generative tasks but frequently fail in generative settings. To understand this discrepancy, we analyze network pruning from a representation-hierarchy perspective, decomposing the internal computation of language models into three sequential spaces: embedding (hidden representations), logit (pre-softmax outputs), and probability (post-softmax distributions). We find that representations in the embedding and logit spaces are largely robust to pruning-induced perturbations. However, the nonlinear transformation from logits to probabilities amplifies these deviations, which accumulate across time steps and lead to substantial degradation during generation. In contrast, the stability of the categorical-token probability subspace, together with the robustness of the embedding space, supports the effectiveness of pruning for non-generative tasks such as retrieval and multiple-choice selection. Our analysis disentangles the effects of pruning across tasks and provides practical guidance for its application. Code is available at https://github.com/CASE-Lab-UMD/Pruning-on-Representations
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。