UltraBERT:超越BERT预训练的极限

·

研究论文 · 2026/10/14

近期双向编码器虽借鉴了因果大语言模型的创新,但其预训练方案仍沿用从小规模模型继承的惯例,导致编码器优化不足,且没有单一模型能在分类和检索任务上同时具备竞争力。本研究通过重新审视训练中的核心设计选择,探究编码器性能的提升空间,揭示了三个关键发现:(1)编码器在下游任务上超过数万亿token后趋于饱和,表明此后的额外计算无益;(2)在不同模型规模下,较低的掩码率有利于分类,较高的掩码率有利于检索,这与先前认为更大模型应使用更大掩码率的工作相矛盾;(3)结合剪枝的蒸馏在低掩码率下提升分类,但在高掩码率下损害检索。基于这些发现,我们提出了UltraBERT,这是一个单一编码器,在批次内为低和高掩码率分配独立的语言模型头,并将蒸馏目标限制在低掩码率上。据我们所知,UltraBERT是首个在分类和检索任务上均达到最先进水平的编码器,在GLUE上达到91.0,在BEIR上达到47.7。这些结果共同展示了编码器性能的提升空间,并为双向模型中的计算分配、掩码率设计和知识迁移提供了原则性基础。

本文挑战了编码器预训练的常规认知,通过实证研究揭示了计算饱和、掩码率与任务关联等关键规律,并提出了首个在分类和检索上均达SOTA的单一编码器UltraBERT,为双向模型的训练设计提供了重要指导。

Recent bidirectional encoders have been modernized with innovations from causal large language models (LLMs). However, the pretraining recipe itself remains inherited from small-scale conventions, leaving encoders underoptimized, with no single model performing competitively across both classification and retrieval tasks. In this work, we investigate how far encoder performance can be pushed by revisiting core design choices in training, revealing three key findings: (1) Encoders saturate on downstream tasks beyond a few trillion tokens, indicating that additional compute past this point does not help. (2) Across model sizes, lower masking ratios benefit classification while higher ones benefit retrieval, contradicting prior work suggesting larger ratios for larger models. (3) Distillation with pruning improves classification at low masking ratios but degrades retrieval at high ones. Guided by these findings, we present UltraBERT, a single encoder that assigns separate LM heads to low and high masking ratios within a batch and restricts the distillation objective to the low ratio. To our knowledge, UltraBERT is the first encoder to achieve state of the art on both classification and retrieval tasks, reaching 91.0 on GLUE and 47.7 on BEIR. Together, these results show how far encoder performance can be pushed and provide a principled basis for compute allocation, masking ratio design, and knowledge transfer in bidirectional models.

阅读原文

参与讨论