[论文解读] SAFER: A Structure-free Approach for Certified Robustness to Adversarial Word Substitutions
SAFER 提出了一种无需模型结构信息、针对自然语言处理模型在对抗性词替换攻击下实现黑盒认证鲁棒性的方法,通过使用随机同义词替换的随机平滑技术。该方法在 IMDB 数据集上对 BERT 模型实现了最先进的认证准确率(87.35%),且无需访问模型架构,优于先前基于 IBP 的方法在 IMDB 和 Amazon 数据集上的表现。
State-of-the-art NLP models can often be fooled by human-unaware transformations such as synonymous word substitution. For security reasons, it is of critical importance to develop models with certified robustness that can provably guarantee that the prediction is can not be altered by any possible synonymous word substitution. In this work, we propose a certified robust method based on a new randomized smoothing technique, which constructs a stochastic ensemble by applying random word substitutions on the input sentences, and leverage the statistical properties of the ensemble to provably certify the robustness. Our method is simple and structure-free in that it only requires the black-box queries of the model outputs, and hence can be applied to any pre-trained models (such as BERT) and any types of models (world-level or subword-level). Our method significantly outperforms recent state-of-the-art methods for certified robustness on both IMDB and Amazon text classification tasks. To the best of our knowledge, we are the first work to achieve certified robustness on large systems such as BERT with practically meaningful certified accuracy.
研究动机与目标
- 解决自然语言处理模型在人类难以察觉的对抗性词替换攻击下对认证鲁棒性的迫切需求。
- 克服现有认证防御方法依赖模型结构信息或仅限于连续输入的局限性。
- 通过一种黑盒、无结构的方法,为任意预训练模型(如 BERT)和模型类型(词级别或子词级别)实现认证鲁棒性。
- 在 BERT 等大规模模型上实现实用的认证准确率,而此前的认证方法在这些模型上不可行。
提出的方法
- 通过预定义的同义词集合,对输入句子应用随机同义词替换,构建一个随机集成模型。
- 利用该集成模型的统计特性,推导出对任意在汉明距离 R 以内的词替换攻击的可证明认证边界。
- 在离散、有结构的输入空间(句子)中应用随机平滑技术,将该方法扩展至图像等连续输入之外的场景。
- 使用 5,000 次蒙特卡洛采样来估计每个输入的鲁棒性半径 Δ_X,确保认证结果的统计置信度。
- 定义一个平滑分类器 f*,其预测结果为扰动输入中多数预测的类别,认证基于保持预测不变的扰动比例。
- 证明:若预测类别 y 的扰动比例超过阈值(p_A ≥ q),则模型在半径 R 内被认证为鲁棒。
实验结果
研究问题
- RQ1是否可以在不访问模型架构或梯度信息的情况下,为自然语言处理模型实现对词替换攻击的认证鲁棒性?
- RQ2随机平滑能否有效扩展至自然语言处理中如句子这类离散、有结构的输入?
- RQ3该方法是否能在 BERT 等大规模预训练模型上实现高认证准确率,而此前的认证方法在这些模型上失效?
- RQ4与基于 IBP 的认证防御方法相比,该无结构方法在标准自然语言处理基准上的性能如何?
- RQ5在 IMDB 和 Amazon 等真实世界数据集上,该黑盒方法可实现的实用认证准确率是多少?
主要发现
- 当应用于 BERT 模型时,SAFER 在 IMDB 数据集上实现了 87.35% 的认证准确率,这是先前认证方法无法达到的结果。
- 该方法在 IMDB 和 Amazon 文本分类任务上显著优于基于 IBP 的方法,展现出更高的鲁棒性与准确率。
- 首次在 BERT 等大规模模型上实现了具有实际意义的认证准确率,使实际部署成为可能。
- 该方法为无结构且黑盒,仅需模型查询访问权限,适用于任何自然语言处理模型,包括词级别和子词级别模型。
- 在 Amazon 数据集上,尽管数据集规模巨大且标签多样性高,SAFER 仍保持了较高的认证准确率。
- 该方法在不同模型类型(如文本 CNN、Char-CNN 和 BERT)上均表现出良好的泛化能力,证明了其广泛适用性与鲁棒性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。