基于多扰动策略的中文对抗样本生成方法
2025-08-03王春东竹文颖林浩
Chinese adversarial example generation method based on multi-disturbance strategy
Wang Chundong1,²,Zhu Wenying1,²,Lin Hao1,2(1.Scholofueeamp;inUesitna;NlEforComputer VirusPreventionamp;Control Technology,Tianjin 3Oo384,China)
Abstract:Toaddress thevulnerabilityofdeepneuralnetworkstoadversarialsamplesandthelackofhigh-qualityadversarial samples inthe Chinese context,the method introduced a new Chinese adversarial sample generation method named CMDS.In thekeywordselectionstage,theScore functionusedidentifiespositions whereperturbationscouldbeadded efectively,nsuring theadversarialsamples werebothreadableanddificulttodetect.Duringtheadversarialsamplegeneration phase,themethod fullexploited characteristicsunique to Chinese,consideringaspectssuchas character shape,meaning,andregion-specific homophones.Variousperturbationstrategies,includingsimilarcharacters,syonyms,homophones,andwordoderdisuption were employedalongwitha multi-priorityperturbation strategy to generateadversarial samples.Finally,aperturbationrate thresholdcontroledteoutput,eliminatingsamplesthatdiferedtoogreatlyfromteriginaltext.Folowingthis,asrsofexperimentscompared CMDS with baselinemethods to exploretheimpact of perturbation threshold sizes,involved humanevaluations,andconductedreal-worldattack tests.These experimentsconfimtheefectivenessandtransferabilityofCMDSinenhancing model securityResultsshowthat CMDS surpassesbaseline methods in terms of attck successratebyupto36.9 percentagepointsandimproves modelsecuritybymore than3Opercentagepoints.The generatedadversarialsamplesareofhighquality and demonstrate strong generalizability.
Key words:deep neural network;natural language procesing(NLP);Chineseadversarial example;multi-disturbance
0引言
近些年来,人工智能技术快速发展使其在计算机视觉[1]自然语言处理[2]、数据挖掘[3]、机器翻译[4]等领域有着重要的研究和应用,但深度神经网络的可解释性相对较差[5],难以解释其最终的输出结果。对抗样本是指通过对测试数据添加一些人类难以识别的扰动且能使模型置信度或分类结果发生显著变化的样本。目前,模型的安全问题在很多应用起着极其重要的作用。例如,在文本分类应用领域,安全性高的系统可以增强文本分类模型对于伪造情感的识别;对于目前火热的ChatGPT领域,可以确保模型处理用户的输入多样性和潜在的恶性输入;在垃圾邮件检测应用当中,攻击者往往修改部分内容或加入噪声来让模型识别为正常邮件;还有在错别字校正系统和文本提取系统的应用中,可以提高系统的识别性能。而解决模型安全问题的主要途径是进行对抗性训练,这也就需要大量种类多且质量高的对抗样本,因此对抗样本应用广泛,对于模型安全以及相关应用具有极其重要的意义。
最近提出文本攻击方法中有些利用梯度,还有从字、词和句子级别来制作高质量的对抗样本。几乎所有的攻击都是针对英文的,这些工作均基于互换、删除、语义替换等简单扰动,而很少设计基于其他语言特征的扰动。与此相对,汉语使用人数最多的语言,中文也被应用于各个领域。由于缺乏对抗样本的相关研究,中文自然语言处理等领域仍面临着来自安全方面的威胁。……
