Vision Transformers (ViTs) deliver state-of-the-art accuracy but their quadratic attention cost and redundant computations severely hinder deployment on latency and resource-constrained platforms. Existing pruning approaches treat either tokens or heads in isolation, relying on heuristics or first-order signals, which often sacrifice accuracy or fail to generalize across inputs. We introduce HEART-ViT, a Hessian-guided efficient dynamic attention and token pruning framework for vision transformers, which to the best of our knowledge is the first unified, second-order, input-adaptive framework for ViT optimization. HEART-ViT estimates curvature-weighted sensitivities of both tokens and attention heads using efficient Hessian-vector products, enabling principled pruning decisions under explicit loss budgets.This dual-view sensitivity reveals an important structural insight: token pruning dominates computational savings, while head pruning provides fine-grained redundancy removal, and their combination achieves a superior trade-off. On ImageNet-100 and ImageNet-1K with ViT-B/16 and DeiT-B/16, HEART-ViT achieves up to 49.4 percent FLOPs reduction, 36 percent lower latency, and 46 percent higher throughput, while consistently matching or even surpassing baseline accuracy after fine-tuning, for example 4.7 percent recovery at 40 percent token pruning. Beyond theoretical benchmarks, we deploy HEART-ViT on different edge devices such as AGX Orin, demonstrating that our reductions in FLOPs and latency translate directly into real-world gains in inference speed and energy efficiency. HEART-ViT bridges the gap between theory and practice, delivering the first unified, curvature-driven pruning framework that is both accuracy-preserving and edge-efficient.


翻译:视觉Transformer(ViTs)实现了最先进的精度,但其二次注意力计算成本与冗余计算严重阻碍了在延迟和资源受限平台上的部署。现有剪枝方法通常孤立地处理令牌或注意力头,依赖于启发式或一阶信号,这常常以牺牲精度为代价或无法在不同输入间泛化。我们提出了HEART-ViT,一种用于视觉Transformer的Hessian引导高效动态注意力与令牌剪枝框架;据我们所知,这是首个统一、二阶、输入自适应的ViT优化框架。HEART-ViT通过高效的Hessian-向量积估计令牌与注意力头的曲率加权敏感度,从而在明确的损失预算下实现基于原则的剪枝决策。这种双重视角的敏感度揭示了一个重要的结构洞察:令牌剪枝主导计算节省,而注意力头剪枝提供细粒度的冗余消除,二者结合可实现更优的权衡。在ImageNet-100和ImageNet-1K数据集上,基于ViT-B/16和DeiT-B/16模型,HEART-ViT实现了高达49.4%的FLOPs减少、36%的延迟降低和46%的吞吐量提升,同时在微调后始终匹配甚至超越基线精度,例如在40%令牌剪枝时恢复4.7%的精度。除了理论基准测试,我们还在AGX Orin等不同边缘设备上部署了HEART-ViT,结果表明我们在FLOPs和延迟上的减少直接转化为实际推理速度和能效的提升。HEART-ViT弥合了理论与实践之间的差距,提供了首个统一、曲率驱动的剪枝框架,该框架既保持精度又适用于边缘高效部署。

0
下载
关闭预览

相关内容

【NeurIPS2019】图变换网络:Graph Transformer Network
NAACL 2019 | 一种考虑缓和KL消失的简单VAE训练方法
PaperWeekly
20+阅读 · 2019年4月24日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员