arXiv:2410.23118cs.CLcs.AI2024-10

用小规模对抗数据微调模型,提升对细微语义差异的辨别能力。

Teaching a Language Model to Distinguish Between Similar Details using a Small Adversarial Training Set

  • 用人工构造的对抗样本微调语言模型,增强对相似语义的区分力。
  • 对抗测试集准确率提升13%,最相似矛盾对准确率达92.9%。
  • 适合需要高精度语义判断的应用场景,如自动评测与安全检测。

语言模型在自然语言推断(NLI)等任务上表现优异,但在人工构造的对抗性样本上性能下降。本文研究了在斯坦福自然语言推断(SNLI)语料库上训练的语言模型在人工构建的对抗测试集上的表现。通过在少量人工设计的对抗训练集上微调模型,帮助其学习区分数据中相似词汇和短语的细微差别。实验显示,模型在对抗测试集上的准确率提升了13%,同时在原始NLI任务上仍保持良好表现。尤其在SNLI测试集中语义最相似的矛盾对(按余弦相似度判断)上,准确率从91.2%提升至92.9%。

原文摘要 · Abstract (English)

Language models can achieve high accuracy on natural language tasks such as NLI, but performance suffers on manually created adversarial examples. We investigate the performance of a language model trained on the Stanford Natural Language Inference (SNLI) corpus on a manually created adversarial test set. We then improve the model's performance by fine tuning the model on a small, manually created adversarial training set, designed to help the language model to learn to differentiate between similar words and phrases in the data. We show an increase in accuracy on the adversarial test set (+ 13%) while still maintaining good performance on the original NLI task. We also show an increase in accuracy from 91.2% to 92.9% on the most similar contradictions in the SNLI test set (as judged by cosine similarity).

语言模型对抗训练语义区分

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。