在低资源场景下,预训练时使用子词随机化可提升模型性能。
Pretraining Language Models with Subword Regularization: An Empirical Study of BPE Dropout in Low-Resource NLP
- 在预训练阶段引入BPE丢弃,增强模型对子词分段的鲁棒性。
- 小数据情况下,预训练+微调均用随机分词效果最佳,比仅微调用更优。
- 对罕见词的组合表示改进是主要优势,适合低资源语言任务。
子词正则化方法如BPE丢弃通常仅在微调阶段应用,而预训练多采用确定性分词,导致预训练与微调间分词不一致。本文研究在低资源NLP中,预训练阶段是否应引入BPE丢弃以提升下游性能。我们在英语、德语、法语、西班牙语、斯瓦希里语和祖鲁语的降采样子集上训练单语和双语BERT模型,并在XNLI、PAWS-X、PAN-X和MasakhaNER 2.0上评估。结果表明,当随机分词同时应用于预训练和微调时表现最优;仅在微调阶段使用会降低小数据下的性能,该劣势随微调数据增加而减小。预训练阶段的BPE丢弃在任一阶段数据稀缺时收益最大。尽管常归因于对罕见词的更好组合表示,但实际测得的形态边界对齐改善有限,说明预训练阶段的随机分词能更持续暴露模型于良好分段,而仅靠微调难以实现。此外,有选择地在微调中引入形态对齐分段,仅对未在预训练中使用BPE丢弃的模型有效。这些发现表明,对良好分段的充分暴露是预训练阶段应用BPE丢弃带来优势的关键。
原文摘要 · Abstract (English)
Subword regularization methods such as BPE dropout are typically applied only during fine-tuning, while pretraining is usually done with deterministic tokenization. This creates a potential segmentation mismatch between pretraining and fine-tuning. We investigate whether applying BPE dropout during pretraining improves downstream performance in low-resource NLP. We train monolingual and bilingual BERT models on downsampled subsets of English, German, French, Spanish, Kiswahili, and isiXhosa, and evaluate them on XNLI, PAWS-X, PAN-X, and MasakhaNER 2.0. Across tasks, the best results are typically obtained when stochastic tokenization is applied during both pretraining and fine-tuning, whereas applying BPE dropout only during fine-tuning can underperform deterministic tokenization in smaller-data settings. This disadvantage diminishes as fine-tuning data increases, while the benefits of pretraining-time BPE dropout are largest when either pretraining or fine-tuning data is scarce. The benefits of BPE dropout are often attributed to better compositional representations, especially for rare words. To examine this, we measure morphological boundary alignment under BPE dropout and find only modest improvements in expected alignment, while better-aligned segmentations remain rare. This suggests that fine-tuning alone may provide limited exposure to such segmentations, whereas stochastic tokenization during pretraining exposes the model to them more consistently. We further show that selectively introducing morphologically aligned segmentations during fine-tuning improves performance mainly for models pretrained without BPE dropout. Overall, these findings suggest that exposure to better-aligned segmentations may contribute to the downstream benefits of applying BPE dropout during pretraining.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。