arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.09596cs.CVcs.LG

使用线性加性注意力Transformer的高效生成对抗网络

Efficient generative adversarial networks using linear additive-attention Transformers

Facultad de Ingeniería, Universidad Nacional Autónoma de México(墨西哥国立自治大学工程学院);Instituto de Investigaciones en Matematicas Aplicadas y en Sistemas, Universidad Nacional Autónoma de México(墨西哥国立自治大学应用数学与系统研究所)

Emilio Morales-Juarez, Gibran Fuentes-Pineda

AI总结:

针对现有深度生成模型计算成本高的问题,提出基于线性加性注意力Transformer模块Ladaformer的混合GAN模型LadaGAN,在保持生成性能的同时大幅提升效率,可单GPU高效训练。

摘要:

尽管扩散模型(DMs)、生成对抗网络(GANs)等深度生成模型已取得出色的图像生成性能,但它们通常依赖计算成本高昂的架构,限制了可及性,还推高了训练与推理成本。我们提出LadaGAN——一种围绕Ladaformer(一种高效的线性注意力Transformer模块)构建的Transformer-卷积混合GAN。其线性加性注意力机制为每个注意力头计算单个注意力向量,规避了点积注意力的二次复杂度。通过在生成器和判别器中结合Ladaformer与卷积层,LadaGAN在降低计算复杂度的同时,提升了基于Transformer的GAN的训练稳定性。在基准数据集上,LadaGAN的性能与对比的卷积GAN和Transformer GAN相当或更优,同时效率大幅提升;且仅需少几个数量级的计算资源,就能与多步生成模型保持竞争力。在保持有竞争力的FID分数的同时,LadaGAN的推理吞吐量比ADM高出600倍以上(在CelebA 64x64数据集上为333张/秒对比0.50张/秒),所需FLOPs减少100倍以上。与单步一致性模型不同,LadaGAN可在单块GPU上高效训练。

英文摘要:

Although deep generative models such as Diffusion Models (DMs) and Generative Adversarial Networks (GANs) achieve remarkable image generation performance, they often rely on computationally expensive architectures that limit accessibility and increase training and inference costs. We introduce LadaGAN, a hybrid Transformer-convolutional GAN built around Ladaformer, an efficient linear-attention Transformer block. Its linear additive-attention mechanism computes a single attention vector per head, avoiding the quadratic complexity of dot-product attention. By combining Ladaformer with convolutional layers in both the generator and discriminator, LadaGAN reduces computational complexity while improving the training stability of Transformer-based GANs. LadaGAN matches or surpasses the compared convolutional and Transformer GANs on benchmark datasets while being substantially more efficient, and remains competitive with multi-step generative models using orders of magnitude fewer computational resources. While maintaining competitive FID scores, LadaGAN achieves over 600x higher inference throughput than ADM (333 vs. 0.50 images/s on CelebA 64x64) and requires over 100x fewer FLOPs. Unlike one-step Consistency Models, LadaGAN can be trained efficiently on a single GPU.

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

↑