[论文解读] Playing with Words at the National Library of Sweden -- Making a Swedish BERT
本文提出 KB-BERT,这是一个在瑞典国家图书馆多样化瑞典语语料库上训练的瑞典语 BERT 模型,并展示其在 NER 和 POS 任务上优于多语言模型和现有瑞典语模型。
This paper introduces the Swedish BERT ("KB-BERT") developed by the KBLab for data-driven research at the National Library of Sweden (KB). Building on recent efforts to create transformer-based BERT models for languages other than English, we explain how we used KB's collections to create and train a new language-specific BERT model for Swedish. We also present the results of our model in comparison with existing models - chiefly that produced by the Swedish Public Employment Service, Arbetsf\\"ormedlingen, and Google's multilingual M-BERT - where we demonstrate that KB-BERT outperforms these in a range of NLP tasks from named entity recognition (NER) to part-of-speech tagging (POS). Our discussion highlights the difficulties that continue to exist given the lack of training data and testbeds for smaller languages like Swedish. We release our model for further exploration and research here: https://github.com/Kungbib/swedish-bert-models .
研究动机与目标
- 描述 KB 的馆藏如何用于构建瑞典语 BERT 模型(KB-BERT)。
- 在下游 NLP 任务(NER、POS)上评估 KB-BERT 相对于现有瑞典语和多语言模型的表现。
- 突出影响低资源语言表现的数据、预处理和训练选择。
提出的方法
- 从报纸 OCR、政府报告(SOU)、法律电子存证、社交媒体以及瑞典语维基百科(1940s–2019)组装瑞典语预训练语料。
- 使用 OCR 错误修正和自定义的句子/段落分割管线清理并统一数据;在分句时应用 spaCy,并考虑瑞典语特性。
- 应用 SentencePiece 创建约 50k 的子词词汇表,并使用 Google 的 BERT 框架在多阶段训练中从头训练 BERT。
- 在云 TPU 上进行训练,混合内部资源和 TFRC 支持资源;进行多阶段预训练,步数约到 2M 步,最大序列长度和批量大小变化。
- 使用已建立的瑞典语语料库在下游 NER 和 POS 任务上进行评估;将 KB-BERT 与 Google 的 M-BERT 和 Arbetsförmedlingen 模型进行比较。
实验结果
研究问题
- RQ1在多样且以民主方式获取语料的瑞典特定 BERT 模型是否能够在 NER 和 POS 任务上优于多语言模型和现有的瑞典语模型?
- RQ2数据类型、预处理和训练时长如何影响瑞典语 BERT 的性能与鲁棒性?
- RQ3由于数据/测试平台稀缺,创建和评估瑞典语语言模型面临的实际挑战与局限性有哪些?
主要发现
- KB-BERT 在 NER 的多个实体类型上优于 M-BERT 和 Arbetsförmedlingen 的瑞典语模型。
- POS 标注改进方面,KB-BERT 相对于 M-BERT 的提升较小,表明某些任务更快达到饱和;总体 POS 结果仍然较高。
- 在预训练期间的评估显示 NER 增益在初始改善后趋于稳定,超过约 150k–1M 步的增益很小,视检查点而定。
- 在更困难的 NER 任务中,表现可能变化,可能需要更多微调数据或训练步骤;在 1–2M 步以上也并非一定稳定。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。