arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.01026cs.CV
收藏

Token Fusion:弥合 Token 剪枝与 Token 合并之间的差距

Token Fusion: Bridging the Gap between Token Pruning and Token Merging

Samsung Research America(三星美国研究院)

Minchul Kim, Shangqian Gao, Yen-Chang Hsu, Yilin Shen, Hongxia Jin

AI总结:

本文提出 Token Fusion(ToFu)方法,结合 Token 剪枝与 Token 合并的优势,并引入 MLERP 合并以保持特征范数分布,在分类和图像生成任务中同时提升计算效率与模型精度。

摘要:

视觉 Transformer(ViTs)已成为计算机视觉中强大的骨干网络,其性能超越了许多传统 CNN。然而,其计算开销主要来自自注意力机制,这使得在资源受限的边缘设备上部署变得困难。多种解决方案依赖于 Token 剪枝或 Token 合并。本文提出“Token Fusion”(ToFu),一种融合了 Token 剪枝和 Token 合并优势的方法。当模型对输入插值表现出敏感性时,Token 剪枝具有优势;而当模型对输入表现出接近线性的响应时,Token 合并则更为有效。我们将二者结合,提出了一种名为 Token Fusion 的新方案。此外,我们还解决了平均合并的局限性,平均合并不保留固有的特征范数,从而导致分布偏移。为缓解这一问题,我们引入了 MLERP 合并,这是 SLERP 技术的一种变体,专门用于合并多个 Token 同时保持范数分布。ToFu 具有通用性,适用于有或没有额外训练的 ViTs。我们的实证评估表明,ToFu 在计算效率和模型精度方面,在分类和图像生成任务中均建立了新的基准。

英文摘要:

Vision Transformers (ViTs) have emerged as powerful backbones in computer vision, outperforming many traditional CNNs. However, their computational overhead, largely attributed to the self-attention mechanism, makes deployment on resource-constrained edge devices challenging. Multiple solutions rely on token pruning or token merging. In this paper, we introduce "Token Fusion" (ToFu), a method that amalgamates the benefits of both token pruning and token merging. Token pruning proves advantageous when the model exhibits sensitivity to input interpolations, while token merging is effective when the model manifests close to linear responses to inputs. We combine this to propose a new scheme called Token Fusion. Moreover, we tackle the limitations of average merging, which doesn't preserve the intrinsic feature norm, resulting in distributional shifts. To mitigate this, we introduce MLERP merging, a variant of the SLERP technique, tailored to merge multiple tokens while maintaining the norm distribution. ToFu is versatile, applicable to ViTs with or without additional training. Our empirical evaluations indicate that ToFu establishes new benchmarks in both classification and image generation tasks concerning computational efficiency and model accuracy.

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

↑