[论文解读] Using BERT Encoding to Tackle the Mad-lib Attack in SMS Spam Detection.
本文研究了 BERT 在对抗性同义词替换攻击(即通过同义词替换混淆垃圾短信以逃避检测的“填空式攻击”)下的鲁棒性。基于包含 5,572 条短信垃圾信息的数据集,研究发现,即使每条消息平均有 1.82 个词被替换,BERT 仍能保持 96% 的平衡准确率,而传统模型(BoW 和 TFIDF)的性能则退化至随机水平,表明 BERT 在同义词替换类规避攻击中具有更优的语义鲁棒性。
One of the stratagems used to deceive spam filters is to substitute vocables with synonyms or similar words that turn the message unrecognisable by the detection algorithms. In this paper we investigate whether the recent development of language models sensitive to the semantics and context of words, such as Google's BERT, may be useful to overcome this adversarial attack (called as per the word substitution game). Using a dataset of 5572 SMS spam messages, we first established a baseline of detection performance using widely known document representation models (BoW and TFIDF) and the novel BERT model, coupled with a variety of classification algorithms (Decision Tree, kNN, SVM, Logistic Regression, Naive Bayes, Multilayer Perceptron). Then, we built a thesaurus of the vocabulary contained in these messages, and set up a Mad-lib attack experiment in which we modified each message of a held out subset of data (not used in the baseline experiment) with different rates of substitution of original words with synonyms from the thesaurus. Lastly, we evaluated the detection performance of the three representation models (BoW, TFIDF and BERT) coupled with the best classifier from the baseline experiment (SVM). We found that the classic models achieved a 94% Balanced Accuracy (BA) in the original dataset, whereas the BERT model obtained 96%. On the other hand, the Mad-lib attack experiment showed that BERT encodings manage to maintain a similar BA performance of 96% with an average substitution rate of 1.82 words per message, and 95% with 3.34 words substituted per message. In contrast, the BA performance of the BoW and TFIDF encoders dropped to chance. These results hint at the potential advantage of BERT models to combat these type of ingenious attacks, offsetting to some extent for the inappropriate use of semantic relationships in language.
研究动机与目标
- 评估 BERT 嵌入在对抗性同义词替换攻击下检测短信垃圾信息的有效性。
- 比较 BERT 在此类攻击下与传统文本表示模型(BoW 和 TFIDF)的性能表现。
- 评估上下文语言模型(如 BERT)在通过同义词替换对消息进行语义修改后,是否仍能保持高检测准确率。
- 识别 BERT 在处理垃圾信息检测中的对抗性扰动时的鲁棒性极限。
提出的方法
- 从短信垃圾信息数据集的词汇中构建同义词词典,以实现受控的同义词替换。
- 在 BoW、TFIDF 和 BERT 嵌入上训练并评估多种分类器(如 SVM、逻辑回归等),以建立基线性能。
- 生成一个独立的测试集,其中每条消息均以不同比例的同义词替换进行修改,以模拟填空式攻击。
- 通过平衡准确率(BA)衡量所有模型和攻击等级下的检测性能。
- 从基线实验中选择表现最佳的 SVM 分类器,用于后续攻击评估阶段。
- 评估每种表示模型(BoW、TFIDF、BERT)在填空式攻击中替换率逐步增加时的鲁棒性。
实验结果
研究问题
- RQ1当消息通过同义词替换(填空式攻击)被修改后,BERT 嵌入是否仍能保持高垃圾短信检测准确率?
- RQ2与 BERT 相比,BoW 和 TFIDF 等传统模型在同义词替换类对抗攻击下的性能退化程度如何?
- RQ3当平均替换率到达多少时,BERT 的检测性能开始出现显著下降?
- RQ4在何种语义扰动阈值以上,BERT 仍能优于经典模型在垃圾短信检测中的表现?
主要发现
- 在原始数据集上,BERT 的平衡准确率为 96%,优于 BoW 和 TFIDF 的 94%。
- 在平均每个消息有 1.82 个词被替换的填空式攻击下,BERT 仍保持 96% 的平衡准确率。
- 当平均每个消息有 3.34 个词被替换时,BERT 的平衡准确率仍维持在 95%,表明其具有极强的鲁棒性。
- 相比之下,在相同攻击条件下,BoW 和 TFIDF 模型的平衡准确率下降至随机水平。
- 结果表明,BERT 的上下文理解能力使其能够识别出尽管经过同义词替换但本质仍为垃圾信息的短信。
- 本研究证明,与传统的词袋模型和 TFIDF 表示相比,BERT 模型对同义词替换类对抗攻击更具鲁棒性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。