Skip to main content
QUICK REVIEW

[论文解读] CharacterBERT: Reconciling ELMo and BERT for Word-Level Open-Vocabulary Representations From Characters

Hicham El Boukkouri, Olivier Ferret|arXiv (Cornell University)|Oct 20, 2020
Topic Modeling参考文献 32被引用 28
一句话总结

CharacterBERT 提出了一种 BERT 变体,用字符级卷积神经网络(CNN)替代子词分词,生成词级别的开放词汇表示,从而在不依赖预定义 wordpiece 词汇表的前提下,提升了医学 NLP 任务的性能与鲁棒性。它在专业医学基准测试中优于 BERT,并对拼写错误表现出更强的抗性。

ABSTRACT

Due to the compelling improvements brought by BERT, many recent representation models adopted the Transformer architecture as their main building block, consequently inheriting the wordpiece tokenization system despite it not being intrinsically linked to the notion of Transformers. While this system is thought to achieve a good balance between the flexibility of characters and the efficiency of full words, using predefined wordpiece vocabularies from the general domain is not always suitable, especially when building models for specialized domains (e.g., the medical domain). Moreover, adopting a wordpiece tokenization shifts the focus from the word level to the subword level, making the models conceptually more complex and arguably less convenient in practice. For these reasons, we propose CharacterBERT, a new variant of BERT that drops the wordpiece system altogether and uses a Character-CNN module instead to represent entire words by consulting their characters. We show that this new model improves the performance of BERT on a variety of medical domain tasks while at the same time producing robust, word-level and open-vocabulary representations.

研究动机与目标

  • 为了解决通用领域 wordpiece 词汇表在医学等专业领域中的局限性,这些词汇表可能无法有效捕捉领域特异性术语。
  • 开发一种 BERT 变体,生成无需依赖子词分词的词级别上下文表示,从而简化模型设计与可解释性。
  • 评估基于字符的表示学习是否能提升对拼写错误的鲁棒性,并在专业领域中超越标准 BERT 的表现。
  • 通过发布预训练模型与代码,实现可复现性,供自然语言处理社区使用。

提出的方法

  • 用处理每个标记中单个字符的字符-CNN 模块替代 BERT 的 wordpiece 嵌入层,以生成上下文相关的词表示。
  • 使用与 BERT 相同的 Transformer 编码器架构,保留注意力机制与多层自注意力机制,仅替换输入嵌入组件。
  • 在大规模医学文本语料(MIMIC-III 和 PMC OA)上预训练模型,使用掩码语言建模与下一句预测,与 BERT 类似。
  • 在下游医学 NLP 任务(如临床文本相似度、自然语言蕴含、命名实体识别)上微调模型。
  • 在评估中引入噪声增强,通过引入单字符错误(如替换、插入、删除、交换)来测试鲁棒性。
  • 进行几乎随机顺序(Almost Stochastic Order, ASO)测试,以评估 CharacterBERT 与 BERT 在多次运行中性能差异的统计显著性。

实验结果

研究问题

  • RQ1在生物医学等专业领域中,使用通用领域的 wordpiece 词汇表是否次优?
  • RQ2在领域特定的 NLP 任务中,基于字符的表示系统是否能优于子词分词?
  • RQ3用字符级编码替代 wordpiece 分词是否能提升医学文本中对拼写错误的鲁棒性?
  • RQ4是否可能在简化模型输入表示为词级别的同时,保持 BERT 级别的性能?

主要发现

  • CharacterBERT 在所有评估的医学 NLP 任务中均优于 BERT,包括 ClinicalSTS、MEDNLI 和 NER,ASO 测试确认了统计显著的性能提升。
  • 在 MEDNLI 基准测试中,CharacterBERT medical 的 F1 得分为 86.3,优于 BERT medical(85.8),在 40% 测试集噪声下仍保持 5 分的领先优势。
  • 在 40% 测试集噪声下,CharacterBERT 相较于 BERT 维持了 5 个 F1 分的领先优势,表明其对拼写错误具有更强的鲁棒性。
  • 该模型显著减少了对罕见或领域特异性术语的 wordpiece 拆分——仅 13% 的标记被通用领域词汇表拆分,远低于 BERT 中的较高比例。
  • CharacterBERT 的预训练速度慢于 BERT,但微调与推理速度相当或略快,具备实际部署的可行性。
  • 该模型在 BLUE 基准测试中达到最先进性能,尤其在医学专用变体中表现最佳,验证了其在领域特定场景下的有效性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。