基于可学习混合的GSS-Transformer混合架构的长上下文建模
Long-Context Modeling via GSS-Transformer Hybrid Architecture with Learnable Mixing
AI总结:
提出并行混合架构PHA,通过可学习混合机制融合GSS、GQA和FFN,在长上下文建模中实现Transformer级困惑度与更高效率。
摘要:
建模长距离依赖仍然是自然语言处理中的核心挑战。Transformer架构通过自注意力实现强性能,但计算复杂度随序列长度呈二次方增长($O(N^2)$),而状态空间模型(SSM)线性扩展($O(N)$)但存在选择性召回瓶颈,难以从压缩状态中检索精确信息。这导致了效率与困惑度之间的基本权衡。为应对这些挑战,我们提出了\textit{并行混合架构(PHA)},它将门控状态空间(GSS)、分组查询注意力(GQA)和前馈网络(FFN)作为独立的并行分支运行,并通过可学习混合机制融合。PHA不强制SSM近似注意力或将两种范式串行化,而是让每个分支专门化:GSS捕获全局上下文,注意力执行选择性检索,FFN提供补充处理。在WikiText-103上,PHA在125M参数下达到16.51 PPL,优于Hedgehog(16.70)和H3-125M(23.70)。扩展到180M参数得到16.42 PPL,与纯注意力基线结果相当,同时在长上下文下吞吐量提高24%,内存使用降低40%。在OpenWebText上,我们的125M模型达到19.72 PPL,优于标准Transformer(20.60)和GSS混合基线(19.80)。这些结果表明,将序列建模范式分离为并行专家,能够在长上下文语言建模中实现Transformer级困惑度,同时显著提升效率。
英文摘要:
Modeling long-range dependencies remains a central challenge in natural language processing. Transformer architectures achieve strong performance via self-attention but scale quadratically ($O(N^2)$) with sequence length, while State Space Models (SSMs) scale linearly ($O(N)$) but suffer from a selective recall bottleneck, struggling to retrieve precise information from compressed states. This creates a fundamental tradeoff between efficiency and perplexity. To tackle these challenges, we propose the \textit{Parallel Hybrid Architecture (PHA)}, which runs Gated State Spaces (GSS), Grouped Query Attention (GQA), and Feed-Forward Networks (FFNs) as independent parallel branches fused by a learnable mixing mechanism. Instead of forcing SSMs to approximate attention or serializing the two paradigms, PHA allows each branch to specialize: GSS captures global context, while attention performs selective retrieval, with FFN providing complementary processing. On WikiText-103, PHA achieves 16.51 PPL at 125M parameters, outperforming Hedgehog (16.70) and H3-125M (23.70). Scaling to 180M parameters yields 16.42 PPL, which gives comparable results with the pure attention baseline while delivering 24\% higher throughput and up to 40\% lower memory usage at long contexts. On OpenWebText, our 125M model achieves 19.72 PPL, outperforming standard Transformers (20.60) and GSS hybrid baselines (19.80). These results demonstrate that separating sequence modeling paradigms into parallel specialists enables Transformer-level perplexity with substantially improved efficiency for long-context language modeling.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。