混合模型结合注意力与状态空间优势,实现小规模高效精准建模。
Expressivity-Efficiency Tradeoffs for Hybrid Sequence Models
- 通过理论证明非混合模型需大参数或大内存解决特定任务
- 构建小型混合模型可精确解决选择性复制和关联回忆任务
- 实验证明混合模型更擅长长序列泛化与分布外鲁棒性
混合序列模型将Transformer与状态空间模型层结合,旨在兼顾注意力机制的表达能力与状态空间模型的计算效率。尽管该方向备受关注,但对混合模型在何种条件下及如何优于单一模型仍缺乏基础理解。本文聚焦一类核心合成任务,理论上证明:任何单独的Transformer或状态空间模型解决此类任务均需大量参数或大工作内存。而在两个典型任务——选择性复制与关联回忆中,我们构造出参数量与工作内存均小的混合模型,并可严格证明其有效性,实现性能与效率的最优平衡。实验验证了理论结果。更重要的是,即使超出理论设定,学习得到的混合模型也优于参数量高达6倍的非混合模型;且混合模型展现出更强的序列长度泛化能力和分布外鲁棒性。
原文摘要 · Abstract (English)
Hybrid sequence models--combining Transformer and state-space model layers--seek to gain the expressive versatility of attention as well as the computational efficiency of state-space model layers. Despite burgeoning interest in hybrid models, we lack a basic understanding of the settings where--and underlying mechanisms through which--they offer benefits over their constituent models. In this paper, we study this question, focusing on a broad family of core synthetic tasks. For this family of tasks, we prove the existence of fundamental limitations for non-hybrid models. Specifically, any Transformer or state-space model that solves the underlying task requires either a large number of parameters or a large working memory. On the other hand, for two prototypical tasks within this family--namely selective copying and associative recall--we construct hybrid models of small size and working memory that provably solve these tasks, thus achieving the best of both worlds. Our experimental evaluation empirically validates our theoretical findings. Importantly, going beyond the settings in our theoretical analysis, we empirically show that learned--rather than constructed--hybrids outperform non-hybrid models with up to 6x as many parameters. We additionally demonstrate that hybrid models exhibit stronger length generalization and out-of-distribution robustness than non-hybrids.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。