Robust Encodings:对抗性错别字的框架
Robust Encodings: A Framework for Combating Adversarial Typos
摘要:
尽管在许多任务上表现出色,但NLP系统很容易被输入的小对抗性扰动所欺骗。现有的程序,以防止这种扰动是(i)启发式的性质,并容易受到更强的攻击,或(ii)提供保证的鲁棒性,最坏的情况下的攻击,但与国家的最先进的模型,如BERT不兼容。在这项工作中,我们引入了鲁棒编码(RobEn):一个简单的框架,赋予保证的鲁棒性,而不对模型架构作出妥协。RobEn的核心组件是一个编码函数,它将句子映射到一个更小的离散编码空间。使用这些编码作为瓶颈的系统可以通过标准训练保证鲁棒性,并且可以在多个任务中使用相同的编码。我们确定了两个必要的构建强大的编码功能:一个句子的扰动应该映射到一个小的编码集(稳定性),使用编码的模型应该仍然表现良好(保真度)。我们实例化RobEn来防御一大群对抗性错别字。在来自GLUE的六个任务中,我们的RobEn实例与BERT配对,对所考虑的家族中的所有对抗性打字错误实现了71.3%的平均鲁棒准确率,而之前使用打字校正器的工作对简单的贪婪攻击仅实现了35.3%的准确率。
英文摘要:
Despite excellent performance on many tasks, NLP systems are easily fooled by small adversarial perturbations of inputs. Existing procedures to defend against such perturbations are either (i) heuristic in nature and susceptible to stronger attacks or (ii) provide guaranteed robustness to worst-case attacks, but are incompatible with state-of-the-art models like BERT. In this work, we introduce robust encodings (RobEn): a simple framework that confers guaranteed robustness, without making compromises on model architecture. The core component of RobEn is an encoding function, which maps sentences to a smaller, discrete space of encodings. Systems using these encodings as a bottleneck confer guaranteed robustness with standard training, and the same encodings can be used across multiple tasks. We identify two desiderata to construct robust encoding functions: perturbations of a sentence should map to a small set of encodings (stability), and models using encodings should still perform well (fidelity). We instantiate RobEn to defend against a large family of adversarial typos. Across six tasks from GLUE, our instantiation of RobEn paired with BERT achieves an average robust accuracy of 71.3% against all adversarial typos in the family considered, while previous work using a typo-corrector achieves only 35.3% accuracy against a simple greedy attack.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。