[论文解读] On Adversarial Examples for Biomedical NLP Tasks
本文提出了一种基于 BERT 的生物医学 NLP 任务对抗性评估框架,引入了三种攻击类型——拼写错误、键盘错别字和同义词替换,展示了在命名实体识别(NER)和语义文本相似度(STS)任务中性能显著下降。此外,研究还表明,通过这些对抗性样本进行对抗性训练可提高模型鲁棒性,同时不损害原始任务的准确率。
The success of pre-trained word embeddings has motivated its use in tasks in the biomedical domain. The BERT language model has shown remarkable results on standard performance metrics in tasks such as Named Entity Recognition (NER) and Semantic Textual Similarity (STS), which has brought significant progress in the field of NLP. However, it is unclear whether these systems work seemingly well in critical domains, such as legal or medical. For that reason, in this work, we propose an adversarial evaluation scheme on two well-known datasets for medical NER and STS. We propose two types of attacks inspired by natural spelling errors and typos made by humans. We also propose another type of attack that uses synonyms of medical terms. Under these adversarial settings, the accuracy of the models drops significantly, and we quantify the extent of this performance loss. We also show that we can significantly improve the robustness of the models by training them with adversarial examples. We hope our work will motivate the use of adversarial examples to evaluate and develop models with increased robustness for medical tasks.
研究动机与目标
- 评估预训练 BERT 模型在关键生物医学 NLP 任务(如命名实体识别(NER)和语义文本相似度(STS))中的鲁棒性。
- 识别 BERT 模型在面对真实、类人扰动(如医学文本中的拼写错误和错别字)时的脆弱性。
- 研究同义词替换攻击是否能改变 STS 任务中的模型预测,从而可能提高相似度得分。
- 评估使用生成的对抗性样本进行对抗性训练是否能提高模型对这些扰动的鲁棒性。
- 推动在医学 NLP 中更广泛地采用对抗性评估与训练,以确保患者安全和模型可靠性。
提出的方法
- 提出三种对抗性攻击类型:(1) 交换噪声(例如,'herat vavle'),(2) 键盘错别字噪声(例如,'hea5t valce'),以及 (3) 同义词替换(例如,'potassium warfarin' 替代 'warfarin')。
- 将这些攻击应用于两个基准数据集:用于 NER 的 BC5CDR 和用于 STS 的 BioSSES,生成对抗性测试集。
- 在原始训练数据中加入对抗性样本,对 BERT 模型进行微调,以实现对抗性训练。
- 使用标准指标衡量模型性能:NER 使用 F1 分数,STS 使用皮尔逊相关系数和斯皮尔曼等级相关系数,分别在原始和对抗性测试集上进行评估。
- 比较不同预训练数据设置(仅 PubMed 与 PubMed + MIMIC-III)下模型的表现,以评估词汇量对鲁棒性的影响。
- 采用受控的评估协议,以隔离每种攻击类型对模型泛化能力和预测稳定性的影响。
实验结果
研究问题
- RQ1BERT 模型在生物医学文本中面对拼写错误和错别字等对抗性扰动时有多脆弱?
- RQ2医学术语中的同义词替换在多大程度上影响 STS 任务中的语义相似度预测?
- RQ3使用类人扰动进行对抗性训练是否能在不降低标准基准性能的前提下提高模型鲁棒性?
- RQ4预训练数据的选择(如 PubMed 与 PubMed + MIMIC-III)是否会影响模型对对抗性攻击的抗性?
- RQ5为何同义词对抗性样本有时会导致 STS 相关系数高于原始测试集?
主要发现
- BERT 模型在对抗性攻击下表现出显著的性能下降:在 BC5CDR-Chemical NER 上,F1 分数降至 63.8%,在 STS 任务中,交换噪声下降至 52.8%。
- 在 STS 任务中,基于同义词的攻击产生的皮尔逊相关系数(0.869)高于原始测试集(0.829),表明在某些情况下,对抗性样本反而能提高相似度得分。
- 通过同义词和错别字攻击进行对抗性训练可提升鲁棒性:在对抗性微调后,BC5CDR-Disease NER 在交换噪声下,F1 分数从 63.8% 提升至 65.6%。
- 仅在 PubMed 上预训练的模型比在 PubMed + MIMIC-III 上预训练的模型展现出更强的对抗性鲁棒性,这与词汇量扩展可能提升泛化的预期相反。
- 对抗性训练在原始测试集上保持了高性能——例如,在 BC5CDR-Chemical NER 上,F1 分数仍高于 0.88,表明与标准性能之间无显著权衡。
- STS 任务在同义词攻击下表现出不一致的行为,部分模型在对抗性测试集上的相关系数高于原始测试集,表明对抗性样本可能存在潜在的分布偏移。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。