通过语义感知的时间累积剪枝时空令牌
Prune Spatio-temporal Tokens by Semantic-aware Temporal Accumulation
AI总结:
本文提出语义感知的时间累积分数 STA,通过同时衡量时间冗余和语义重要性来逐步剪枝视频 Transformer 中的时空令牌,在几乎不损失准确率的情况下实现超过 30% 的计算量降低。
摘要:
Transformer 因其出色的性能已成为计算机视觉领域的主要骨干网络。然而,不友好的计算成本阻碍了其在视频识别领域的潜力。为了优化速度与准确率之间的权衡,我们提出语义感知的时间累积分数(Semantic-aware Temporal Accumulation score,STA)来整体剪枝时空令牌。STA 分数考虑两个关键因素:时间冗余和语义重要性。前者通过聚合连续帧中令牌到令牌的相似性,根据某个区域是新出现的还是已见过的实体来刻画该区域;后者则根据每个令牌对整体预测的贡献来评估其重要性。因此,STA 分数较高的令牌携带更多时间冗余且语义较低,从而被剪枝。基于 STA 分数,我们能够逐步剪枝令牌,而无需引入任何额外参数或进行进一步重新训练。我们直接将 STA 模块应用于现成的 ViT 和 VideoSwin 骨干网络,在 Kinetics-400 和 Something-Something V2 上的实验结果表明,计算量减少超过 30%,而准确率下降可忽略不计,约为 0.2%。代码已发布在 https://github.com/Mark12Ding/STA。
英文摘要:
Transformers have become the primary backbone of the computer vision community due to their impressive performance. However, the unfriendly computation cost impedes their potential in the video recognition domain. To optimize the speed-accuracy trade-off, we propose Semantic-aware Temporal Accumulation score (STA) to prune spatio-temporal tokens integrally. STA score considers two critical factors: temporal redundancy and semantic importance. The former depicts a specific region based on whether it is a new occurrence or a seen entity by aggregating token-to-token similarity in consecutive frames while the latter evaluates each token based on its contribution to the overall prediction. As a result, tokens with higher scores of STA carry more temporal redundancy as well as lower semantics thus being pruned. Based on the STA score, we are able to progressively prune the tokens without introducing any additional parameters or requiring further re-training. We directly apply the STA module to off-the-shelf ViT and VideoSwin backbones, and the empirical results on Kinetics-400 and Something-Something V2 achieve over 30% computation reduction with a negligible ~0.2% accuracy drop. The code is released at https://github.com/Mark12Ding/STA.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。