Self-attention and transformers have been widely used in deep learning. Recent efforts have been devoted to incorporating transformer blocks into different neural architectures, including those with convolutions, leading to various visual transformers for computer vision tasks. In this paper, we propose a novel and compact transformer block, Transformer with Learnable Token Merging (LTM), or LTM-Transformer. LTM-Transformer performs token merging in a learnable scheme. LTM-Transformer is compatible with many popular and compact transformer networks, and it reduces the FLOPs and the inference time of the visual transformers while maintaining or even improving the prediction accuracy. In the experiments, we replace all the transformer blocks in popular visual transformers, including MobileViT, EfficientViT, ViT, and Swin, with LTM-Transformer blocks, leading to LTM-Transformer networks with different backbones. The LTM-Transformer is motivated by reduction of Information Bottleneck, and a novel and separable variational upper bound for the IB loss is derived. The architecture of the mask module in our LTM blocks, which generates the token merging mask, is designed to reduce the derived upper bound for the IB loss. Extensive results on computer vision tasks evidence that LTM-Transformer renders compact and efficient visual transformers with comparable or much better prediction accuracy than the original visual transformers. The code of the LTM-Transformer is available at https://github.com/Statistical-Deep-Learning/LTM}
Accelerating Transformers with Spectrum-Preserving Token Merging
University of Science - VNUHCM(胡志明市国家大学自然科学大学);Max Planck Research School for Intelligent Systems (IMPRS-IS)(马克斯·普朗克智能系统研究院(IMPRS-IS));University of Stuttgart(斯图加特大学);Dublin City University(都柏林城市大学);University of Queensland(昆士兰大学);University of Arkansas(阿肯色大学);MBZUAI(穆罕默德·本·扎耶德人工智能大学);German Research Center for Artificial Intelligence (DFKI)(德国人工智能研究中心);UC San Diego(加利福尼亚大学圣地亚哥分校);Oldenburg University(奥尔登堡大学);Stanford University(斯坦福大学)
Variable-Length Tokenization via Learnable Global Merging for Diffusion Transformers
Kim Jaechul Graduate School of AI, KAIST, Daejeon, South Korea(韩国科学技术院金载哲人工智能研究生院,大田,韩国);School of Computing, KAIST, Daejeon, South Korea(韩国科学技术院计算学院,大田,韩国)
MergeOver: Post-Training Token Merging for Recursive Vision Transformers
University of Twente(特文特大学);Faculty of Engineering Technology, University of Twente(特文特大学工程技术学院);Computer Architecture for Embedded Systems, University of Twente(特文特大学嵌入式系统计算机架构实验室)
StructSAM: Structure- and Spectrum-Preserving Token Merging for Segment Anything Models
University of Stuttgart(斯图加特大学);DFKI;Max Planck Research School(马克斯·普朗克研究学校);University of Oldenburg(奥尔登堡大学);Technical University of Darmstadt(达姆施塔特技术大学);VinRobotics;VinUniversity(Vin大学);Aalto University(阿莱大学);Queensland University of Technology(昆士兰技术大学);HUST(华中科技大学);Technical University of Denmark(丹麦技术大学);University of Arkansas(阿肯色大学);UC San Diego(圣地亚哥大学);Stanford University(斯坦福大学)
开放词汇扩散模型永远地改变了图像生成的前景。然而,这些模型的核心是使用Transformers,这使得发电速度很慢。已经出现了更好的实现来增加这些Transformers的吞吐量,但它们仍然评估整个模型。在本文中,我们反而加快扩散模型,利用自然冗余生成的图像合并冗余令牌。在对令牌合并(ToMe)进行了一些特定于扩散的改进之后,我们的ToMe for Stable Diffusion可以将现有稳定扩散模型中的令牌数量减少多达60%,同时仍然可以生成高质量的图像,而无需任何额外的训练。在此过程中,我们将图像生成速度提高了2倍,并将内存消耗减少了5.6倍。此外,这通过xFormers等高效实现加快了堆栈速度,对质量的影响最小,同时对于大型图像的速度提高了5.4倍。代码可在https://github.com/dbolya/tomesd上获得。
LapMerge: Differentiable Exact-Budget Token Merging in Linear Time
Jagiellonian University in Kraków(克拉科夫雅盖隆大学);Institute of Fundamental Technological Research, Polish Academy of Sciences(波兰科学院基础技术研究所);Centre for Credible AI, Warsaw University of Technology(华沙理工大学可信人工智能中心)
Token Merging via Spatiotemporal Information Mining for Surgical Video Understanding
Department of Electronic and Computer Engineering, The Hong Kong University of Science and Technology(电子与计算机工程系,香港科学与技术大学);School of Electronic Information and Communications, Huazhong University of Science and Technology(电子信息与通信学院,华中科技大学)
MergeTok: Unified Continuous and Discrete Visual Tokenization via Token Merging
Tsinghua University(清华大学);Westlake University(西湖大学);Zhejiang University(浙江大学);Hong Kong University of Science and Technology(香港科学与技术大学);OPPO;Shanghai AI Lab(上海人工智能实验室)
ViGT: Proposal-free Video Grounding with Learnable Token in Transformer
Hefei University of Technology(合肥工业大学);Key Laboratory of Knowledge Engineering with Big Data, Ministry of Education(教育部大数据知识工程重点实验室);Intelligent Interconnected Systems Laboratory of Anhui Province(安徽省智能互联系统实验室);Institute of Artificial Intelligence, Hefei Comprehensive National Science Center(合肥综合性国家科学中心人工智能研究院)