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

Hydra:基于广义矩阵混合器的双向状态空间模型

Hydra: Bidirectional State Space Models Through Generalized Matrix Mixers

Carnegie Mellon University(卡内基梅隆大学);Princeton University(普林斯顿大学);Cartesia AI

Sukjun Hwang, Aakash Lahoti, Tri Dao, Albert Gu

AI总结:

该研究提出序列混合器的统一矩阵混合器视角,据此开发出双向Mamba扩展模型Hydra,作为注意力层即插即用替代方案,在GLUE、ImageNet等基准上取得优于BERT、ViT的性能。

摘要:

大量序列模型都建立在仿照Transformer的框架之上,由交替排列的序列混合层与通道混合层构成。本文研究了序列混合器的统一矩阵混合器视角,该视角可将序列混合器概念化为输入序列上的线性映射。这一框架涵盖了众多知名序列模型,包括Transformer的自注意力机制,以及结构化状态空间模型(SSMs)等近期表现优异的替代方案,还能通过其结构化矩阵类的属性来理解效率、表达能力等下游特性。我们识别出矩阵参数化的一个关键维度,称为序列对齐,它提升了矩阵混合器的灵活性与性能,为Transformer及Mamba等近期SSM的优异性能提供了解释。此外,矩阵混合器框架为开发具备所需属性的序列混合器提供了系统化方法,使我们得以开发出若干新的次二次复杂度序列模型。具体而言,我们提出了Mamba模型的一种自然双向扩展——Hydra,它被参数化为拟可分矩阵混合器,在非因果任务上展现出优于包括Transformer在内的其他序列模型的性能。作为注意力层的即插即用替代方案,Hydra在GLUE基准上比BERT高出0.8个点,在ImageNet上的Top-1准确率比ViT高2%。

英文摘要:

A wide array of sequence models are built on a framework modeled after Transformers, comprising alternating sequence mixer and channel mixer layers. This paper studies a unifying matrix mixer view of sequence mixers that can be conceptualized as a linear map on the input sequence. This framework encompasses a broad range of well-known sequence models, including the self-attention of Transformers as well as recent strong alternatives such as structured state space models (SSMs), and allows understanding downstream characteristics such as efficiency and expressivity through properties of their structured matrix class. We identify a key axis of matrix parameterizations termed sequence alignment, which increases the flexibility and performance of matrix mixers, providing insights into the strong performance of Transformers and recent SSMs such as Mamba. Furthermore, the matrix mixer framework offers a systematic approach to developing sequence mixers with desired properties, allowing us to develop several new sub-quadratic sequence models. In particular, we propose a natural bidirectional extension of the Mamba model (Hydra), parameterized as a quasiseparable matrix mixer, which demonstrates superior performance over other sequence models including Transformers on non-causal tasks. As a drop-in replacement for attention layers, Hydra outperforms BERT by 0.8 points on the GLUE benchmark and ViT by 2% Top-1 accuracy on ImageNet.

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

↑