攻击大模型只需250份毒化数据,与模型大小无关。
Poisoning Attacks on LLMs Require a Near-constant Number of Poison Samples
- 发现攻击无需随模型变大增加毒化样本数
- 250个毒化文档即可破坏600M至13B参数模型
- 适用于预训练和微调阶段,警示防御短板
数据投毒攻击可通过向训练数据中注入恶意文档,威胁大语言模型的安全性。现有研究多假设攻击者控制训练语料的一定比例,但对大模型而言,即使极小比例也对应海量数据,难以实现。本文首次证明,投毒攻击实际仅需近似恒定数量的毒化文档,与数据集规模无关。我们在迄今最大规模的预训练投毒实验中,使用chinchilla-optimal数据集(6B至260B tokens)对600M到13B参数模型进行训练,发现无论模型或数据规模如何,仅需250个毒化文档即可成功破坏所有模型,即便最大模型训练数据超过20倍于最小模型。我们还通过小规模实验分析了毒化比例及分布的影响。此外,该现象同样存在于微调阶段。结果表明,通过数据投毒植入后门可能比此前认知更易实现,因所需毒化样本数不随模型增大而上升,亟需加强防御研究。
原文摘要 · Abstract (English)
Poisoning attacks can compromise the safety of large language models (LLMs) by injecting malicious documents into their training data. Existing work has studied pretraining poisoning assuming adversaries control a percentage of the training corpus. However, for large models, even small percentages translate to impractically large amounts of data. This work demonstrates for the first time that poisoning attacks instead require a near-constant number of documents regardless of dataset size. We conduct the largest pretraining poisoning experiments to date, pretraining models from 600M to 13B parameters on chinchilla-optimal datasets (6B to 260B tokens). We find that 250 poisoned documents similarly compromise models across all model and dataset sizes, despite the largest models training on more than 20 times more clean data. We also run smaller-scale experiments to ablate factors that could influence attack success, including broader ratios of poisoned to clean data and non-random distributions of poisoned samples. Finally, we demonstrate the same dynamics for poisoning during fine-tuning. Altogether, our results suggest that injecting backdoors through data poisoning may be easier for large models than previously believed as the number of poisons required does not scale up with model size, highlighting the need for more research on defences to mitigate this risk in future models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。