arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2408.02615cs.CV
收藏

LaMamba-Diff:基于局部注意力和Mamba的线性时间高保真扩散模型

LaMamba-Diff: Linear-Time High-Fidelity Diffusion Models Based on Local Attention and Mamba

The University of Hong Kong(香港大学)

Yunxiang Fu, Chaoqi Chen, Yizhou Yu

AI总结:

本文提出LaMamba-Diff,结合局部注意力和Mamba的线性复杂度扩散模型,在ImageNet上超越DiT,GFLOPs减少达62%,实现高保真生成。

摘要:

近年来,基于Transformer的扩散模型表现出卓越的性能,这主要归功于自注意力机制通过计算输入标记间的所有配对交互,能够精确捕捉全局和局部上下文。然而,其二次复杂度对长序列输入构成了显著的计算挑战。相反,最近一种名为Mamba的状态空间模型通过将过滤后的全局上下文压缩到隐藏状态中,提供了线性复杂度。尽管效率高,但压缩不可避免地导致标记间细粒度局部依赖信息的丢失,而这些信息对于有效的视觉生成建模至关重要。基于这些观察,我们引入了局部注意力Mamba(LaMamba)块,结合了自注意力和Mamba的优势,以线性复杂度捕捉全局上下文和局部细节。利用高效的U-Net架构,我们的模型展现出卓越的可扩展性,在ImageNet 256x256分辨率下,在各种模型规模上超越了DiT的性能,同时使用了显著更少的GFLOPs和相当数量的参数。与ImageNet 256x256和512x512上的最先进扩散模型相比,我们最大的模型呈现出显著优势,例如与DiT-XL/2相比,GFLOPs最多减少62%,同时以相当或更少的参数实现了优越的性能。我们的代码可在https://github.com/yunxiangfu2001/LaMamba-Diff获取。

英文摘要:

Recent Transformer-based diffusion models have shown remarkable performance, largely attributed to the ability of the self-attention mechanism to accurately capture both global and local contexts by computing all-pair interactions among input tokens. However, their quadratic complexity poses significant computational challenges for long-sequence inputs. Conversely, a recent state space model called Mamba offers linear complexity by compressing a filtered global context into a hidden state. Despite its efficiency, compression inevitably leads to information loss of fine-grained local dependencies among tokens, which are crucial for effective visual generative modeling. Motivated by these observations, we introduce Local Attentional Mamba (LaMamba) blocks that combine the strengths of self-attention and Mamba, capturing both global contexts and local details with linear complexity. Leveraging the efficient U-Net architecture, our model exhibits exceptional scalability and surpasses the performance of DiT across various model scales on ImageNet at 256x256 resolution, all while utilizing substantially fewer GFLOPs and a comparable number of parameters. Compared to state-of-the-art diffusion models on ImageNet 256x256 and 512x512, our largest model presents notable advantages, such as a reduction of up to 62% GFLOPs compared to DiT-XL/2, while achieving superior performance with comparable or fewer parameters. Our code is available at https://github.com/yunxiangfu2001/LaMamba-Diff.

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

↑