arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2504.14260cs.CVcs.CL
收藏

基于状态的RWKV-7模型的交叉注意力机制

Cross-attention for State-based model RWKV-7

Liu Xiao, Li Zhiyuan, Lin Yueyu

AI总结:

提出CrossWKV,一种用于RWKV-7的交叉注意力机制,通过线性复杂度的WKV架构和广义delta规则增强跨模态对齐,在ImageNet上达到SOTA性能,具备高表达力和线性扩展性。

摘要:

我们提出了CrossWKV,一种用于基于状态的RWKV-7模型的新型交叉注意力机制,旨在增强文本到图像生成的表达能力。利用RWKV-7的线性复杂度加权键值(WKV)架构,CrossWKV在单次前向传播中整合文本和图像模态,采用带有向量值门控和低秩适配(LoRA)的广义delta规则,以实现卓越的跨模态对齐。与基于Transformer的模型不同,CrossWKV的非对角、输入相关的转移矩阵使其能够表示超出$\mathrm{TC}^0$复杂度类的复杂函数,包括所有正则语言,这通过其执行状态跟踪任务(如$S_5$排列建模)的能力得到证明。在Diffusion in RWKV-7(DIR-7)框架内,在LAION-5B和ImageNet等数据集上进行评估,CrossWKV在ImageNet 256x256上实现了2.88的Frechet Inception Distance(FID)和0.33的CLIP分数,匹配最先进的性能,同时在不同提示下提供稳健的泛化能力。该模型增强的表达能力,结合恒定的内存使用和线性扩展,使其成为高级跨模态任务的强大解决方案,在高分辨率生成和动态状态操作方面具有潜在应用。代码位于https://github.com/TorchRWKV/flash-linear-attention

英文摘要:

We introduce CrossWKV, a novel cross-attention mechanism for the state-based RWKV-7 model, designed to enhance the expressive power of text-to-image generation. Leveraging RWKV-7's linear-complexity Weighted Key-Value (WKV) architecture, CrossWKV integrates text and image modalities in a single pass, utilizing a generalized delta rule with vector-valued gating and low-rank adaptations (LoRA) to achieve superior cross-modal alignment. Unlike Transformer-based models, CrossWKV's non-diagonal, input-dependent transition matrix enables it to represent complex functions beyond the $\mathrm{TC}^0$ complexity class, including all regular languages, as demonstrated by its ability to perform state-tracking tasks like $S_5$ permutation modeling. Evaluated within the Diffusion in RWKV-7 (DIR-7) on datasets such as LAION-5B and ImageNet, CrossWKV achieves a Frechet Inception Distance (FID) of 2.88 and a CLIP score of 0.33 on ImageNet 256x256, matching state-of-the-art performance while offering robust generalization across diverse prompts. The model's enhanced expressivity, combined with constant memory usage and linear scaling, positions it as a powerful solution for advanced cross-modal tasks, with potential applications in high-resolution generation and dynamic state manipulation.Code at https://github.com/TorchRWKV/flash-linear-attention

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

↑