微型中文BERT预训练:MLM、WWM与MacBERT策略的受控对比研究 Tiny-Scale Chinese BERT Pretraining: A Controlled Comparison of MLM, WWM, and MacBERT Strategies 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-10-06
👁️ 预览文献
💡 AI 中文简介
本研究在微型中文BERT模型(4层、256维、870万参数)上,用相同架构、语料(129万句中文维基百科)和超参数,从头训练并对比了掩码语言建模(MLM)、全词掩码(WWM)和MacBERT式替换三种预训练策略,从困惑度、命中率、语义区分、语法判断和上下文敏感五个维度评估。结果发现:小规模下MLM综合表现最好,WWM在困惑度和命中率上领先,而MacBERT因同义词词典覆盖不足导致困惑度暴涨22倍,整体排序与大规模模型结论相反。研究还揭示训练损失低不代表困惑度低,提醒不能只看训练损失。
领域自然语言处理/预训练语言模型
适合谁读需要一定专业背景(了解BERT和预训练基础)
核心贡献首次在微型规模(8.7M参数)上系统对比MLM、WWM和MacBERT三种中文预训练策略,发现小规模下最优策略排序与大规模结论相反;揭示MacBERT在词典覆盖不足时训练损失与困惑度严重背离的评估陷阱。
关键数据模型规模8.7M参数(4层、256维);语料129万句;WWM困惑度1.27 vs MLM 2.10(提升39.5%);WWM命中率22% vs MLM 16%;MacBERT困惑度47.23(是MLM的22倍),训练损失最低2.17;同义词词典仅222条、覆盖率3.3%。
推荐理由如果你以为小模型只是大模型的缩小版,这篇用硬数据告诉你:策略排序会反转,训练损失还会骗人,值得一读。
关键词["中文BERT", "预训练策略", "掩码语言建模", "全词掩码", "MacBERT", "微型模型"]

原文摘要

查看英文原文摘要

Pretraining strategies significantly impact the quality of language models, yet existing comparisons of Masked Language Modeling (MLM), Whole Word Masking (WWM), and MacBERT-style replacement have focused primarily on base-scale models (>=110M parameters). This paper presents a controlled comparison of these three strategies on a tiny-scale Chinese BERT model (4 layers, 256 hidden dimensions, 8.7M parameters). Under identical architecture, corpus (1.29M sentences from Chinese Wikipedia), and hyperparameters, we train three models from scratch and evaluate them across five intrinsic dimensions: perplexity, MLM hit rate, semantic discrimination, grammatical judgment, and contextual sensitivity. At tiny scale, MLM achieves the best overall intrinsic performance (winning 3 of 5 dimensions), while WWM excels in both perplexity (1.27 vs. 2.10, a 39.5% improvement) and MLM hit rate (22% vs. 16%). Notably, MacBERT under a severely limited synonym dictionary (222 entries, 3.3% coverage) exhibits severe perplexity degradation (47.23, 22x higher than MLM), yielding a ranking (MLM > WWM >> MacBERT) that differs markedly from the established base-scale conclusion (MacBERT > WWM > MLM). We further identify a critical evaluation pitfall: MacBERT achieves the lowest training loss (2.17) yet the highest perplexity (47.23), revealing that training loss alone is unreliable under mixed replacement strategies. All models and corpus are publicly available at https://huggingface.co/eebyp.