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

Mamba-ST:用于高效风格迁移的状态空间模型

Mamba-ST: State Space Model for Efficient Style Transfer

University of Parma(帕尔马大学)

Filippo Botti, Alex Ergasti, Leonardo Rossi, Tomaso Fontanini, Claudio Ferrari, Massimo Bertozzi, Andrea Prati

AI总结:

针对风格迁移中Transformer和扩散模型存在的计算负担问题,本文提出Mamba-ST,通过调整Mamba的线性方程模拟交叉注意力层行为,无需额外模块,在ArtFID和FID指标上提升了质量且更高效。

摘要:

风格迁移的目标是,给定一张内容图像和一个风格源,生成一张保留内容但具有风格源艺术表现形式的新图像。大多数最先进的架构使用Transformer或基于扩散的模型来执行此任务,尽管它们需要沉重的计算负担。特别是,Transformer使用自注意力和交叉注意力层,这些层具有较大的内存占用,而扩散模型则需要较长的推理时间。为了克服上述问题,本文探索了一种名为Mamba-ST的新型Mamba设计,Mamba是一种新兴的状态空间模型(SSM),用于执行风格迁移。为此,我们调整了Mamba的线性方程以模拟交叉注意力层的行为,交叉注意力层能够将两个独立的嵌入合并为一个输出,但大幅减少了内存使用和时间复杂度。我们修改了Mamba的内部方程,使其能够接受来自两个独立数据流的输入并将它们合并。据我们所知,这是首次尝试调整SSM的方程以应用于风格迁移等视觉任务,而无需任何其他模块(如交叉注意力或自定义归一化层)。大量实验表明,与Transformer和扩散模型相比,我们的方法在执行风格迁移时具有优越性和高效性。结果显示,在ArtFID和FID指标方面,质量均有提升。代码可在https://github.com/FilippoBotti/MambaST获取。

英文摘要:

The goal of style transfer is, given a content image and a style source, generating a new image preserving the content but with the artistic representation of the style source. Most of the state-of-the-art architectures use transformers or diffusion-based models to perform this task, despite the heavy computational burden that they require. In particular, transformers use self- and cross-attention layers which have large memory footprint, while diffusion models require high inference time. To overcome the above, this paper explores a novel design of Mamba, an emergent State-Space Model (SSM), called Mamba-ST, to perform style transfer. To do so, we adapt Mamba linear equation to simulate the behavior of cross-attention layers, which are able to combine two separate embeddings into a single output, but drastically reducing memory usage and time complexity. We modified the Mamba's inner equations so to accept inputs from, and combine, two separate data streams. To the best of our knowledge, this is the first attempt to adapt the equations of SSMs to a vision task like style transfer without requiring any other module like cross-attention or custom normalization layers. An extensive set of experiments demonstrates the superiority and efficiency of our method in performing style transfer compared to transformers and diffusion models. Results show improved quality in terms of both ArtFID and FID metrics. Code is available at https://github.com/FilippoBotti/MambaST.

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

↑