arXiv:2507.07955cs.LG2025-07被引 74

提出动态分块机制,让模型自动学习文本分割,实现真正端到端的序列建模。

Dynamic Chunking for End-to-End Hierarchical Sequence Modeling

  • 动态分块与模型联合训练,无需预定义分词规则。
  • 字节级分层网络在数据匹配下超越基线模型,多级分层提升性能。
  • 对中文、代码等弱分词语言效果显著,数据效率提升近4倍。

近年来语言模型的进步主要源于从任务专用模型转向基于强大架构(如Transformer)的通用模型,这些模型从原始数据中学习全部知识。然而,分词等预处理步骤仍是实现真正端到端基础模型的障碍。本文提出一系列新方法,实现动态分块机制,使模型能自动学习依赖内容与上下文的分割策略,并与模型其他部分联合优化。将该机制融入显式层次网络(H-Net),可替代传统的分词-语言模型-反分词流水线,构建完全端到端的单一模型。在计算与数据匹配条件下,单层级字节级H-Net的表现优于基于BPE分词的强效Transformer语言模型。通过多级迭代层次结构,进一步提升性能,展现出更强的数据扩展性,其表现相当于双倍规模的基于分词的Transformer。在英语上预训练的H-Net表现出显著的字符级鲁棒性,且无需启发式或显式监督即可学习有意义的数据相关分块策略。此外,在中文、代码或DNA序列等分词规则较弱的语言与模态上,该模型的优势更加明显,数据效率相比基线提升近4倍,展示了从原始数据中学习并更好扩展的真正端到端模型潜力。

原文摘要 · Abstract (English)

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.

序列建模端到端动态分块层次网络

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。