分词中的随机性提升了鲁棒性
Stochasticity in Tokenisation Improves Robustness
AI总结:
本文研究了随机分词对对抗攻击和随机扰动鲁棒性的影响,发现预训练和微调时使用均匀采样随机分词可提升模型鲁棒性,且不增加推理成本。
摘要:
大规模语言模型(LLMs)的广泛应用加剧了对其鲁棒性的担忧。输入分词的扰动漏洞表明,使用确定性标准分词训练的模型对对抗攻击易受攻击。最近研究表明,随机分词可以产生对扰动不敏感的内部表示。本文分析了随机分词如何影响对抗攻击和随机扰动的鲁棒性。我们系统地研究了不同学习阶段(预训练、监督微调和上下文学习)、数据集和模型架构下的情况。我们发现,使用均匀采样的随机分词进行预训练和微调可以提高对随机和对抗性扰动的鲁棒性。在均匀采样的非标准分词上评估时,一个标准训练的Llama-1b模型的准确率下降了29.8%。我们发现,使用随机分词训练可以保持准确性而不增加推理成本。
英文摘要:
The widespread adoption of large language models (LLMs) has increased concerns about their robustness. Vulnerabilities in perturbations of tokenisation of the input indicate that models trained with a deterministic canonical tokenisation can be brittle to adversarial attacks. Recent studies suggest that stochastic tokenisation can deliver internal representations that are less sensitive to perturbations. In this paper, we analyse how stochastic tokenisations affect robustness to adversarial attacks and random perturbations. We systematically study this over a range of learning regimes (pre-training, supervised fine-tuning, and in-context learning), data sets, and model architectures. We show that pre-training and fine-tuning with uniformly sampled stochastic tokenisations improve robustness to random and adversarial perturbations. Evaluating on uniformly sampled non-canonical tokenisations reduces the accuracy of a canonically trained Llama-1b model by 29.8%. We find that training with stochastic tokenisation preserves accuracy without increasing inference cost.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。