arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2507.07955cs.LG
收藏

用于端到端分层序列建模的动态分块

Dynamic Chunking for End-to-End Hierarchical Sequence Modeling

Carnegie Mellon University(卡内基梅隆大学);Cartesia AI

Sukjun Hwang, Brandon Wang, Albert Gu

AI总结:

提出动态分块机制与显式分层网络(H-Net),以单一端到端模型取代传统分词流水线,在字节级建模中超越基于BPE的Transformer,并在多语言、代码及DNA等弱分词场景下显著提升性能与数据效率。

摘要:

近年来语言模型(LMs)的重大进展,主要源于从针对特定任务设计的专用模型,转向基于强大架构(如 Transformer)的通用模型,这些模型从原始数据中学习一切。尽管有这一趋势,但诸如分词等预处理步骤仍是实现真正端到端基础模型的障碍。我们引入了一系列新技术,实现了动态分块机制,该机制能够自动学习与内容和上下文相关的分割策略,并与模型的其余部分联合学习。将其纳入显式分层网络(H-Net)中,可以用一个完全端到端学习的单一模型取代(隐式分层的)分词-LM-去分词流水线。在计算和数据匹配的情况下,在字节级运行且具有单层分层结构的 H-Net,其性能优于在 BPE tokens 上运行的强大 Transformer 语言模型。将分层迭代至多个阶段,通过建模多个抽象级别进一步提升其性能,展现出明显更优的数据扩展性,并匹配了其两倍大小的基于 token 的 Transformer。在英文上预训练的 H-Net 展现出显著增强的字符级鲁棒性,并且在没有任何启发式方法或显式监督的情况下,定性地学习到了有意义的、依赖数据的分块策略。最后,在分词启发式方法较弱的语言和模态(如中文和代码,或 DNA 序列)中,H-Net 相较于分词流水线的改进进一步扩大(在数据效率上比基线提高了近 4 倍),展示了真正的端到端模型从未处理数据中更好地学习与扩展的潜力。

英文摘要:

Major progress on language models (LMs) in recent years has largely resulted from moving away from specialized models designed for specific tasks, to general models based on powerful architectures (e.g. the Transformer) that learn everything from raw data. Despite this trend, pre-processing steps such as tokenization remain a barrier to true end-to-end foundation models. We introduce a collection of new techniques that enable a dynamic chunking mechanism which automatically learns content- and context- dependent segmentation strategies learned jointly with the rest of the model. Incorporating this into an explicit hierarchical network (H-Net) allows replacing the (implicitly hierarchical) tokenization-LM-detokenization pipeline with a single model learned fully end-to-end. When compute- and data- matched, an H-Net with one stage of hierarchy operating at the byte level outperforms a strong Transformer language model operating over BPE tokens. Iterating the hierarchy to multiple stages further increases its performance by modeling multiple levels of abstraction, demonstrating significantly better scaling with data and matching the token-based Transformer of twice its size. H-Nets pretrained on English show significantly increased character-level robustness, and qualitatively learn meaningful data-dependent chunking strategies without any heuristics or explicit supervision. Finally, the H-Net's improvement over tokenized pipelines is further increased in languages and modalities with weaker tokenization heuristics, such as Chinese and code, or DNA sequences (nearly 4x improvement in data efficiency over baselines), showing the potential of true end-to-end models that learn and scale better from unprocessed data.

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

↑