arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.13331cs.CLcs.CR
收藏

应用预训练多语言BERT嵌入改进恶意提示注入攻击检测

Applying Pre-trained Multilingual BERT in Embeddings for Improved Malicious Prompt Injection Attacks Detection

University of West Florida(西佛罗里达大学);Tuskegee University(塔斯基吉大学);University of Calabria(卡拉布里亚大学)

Md Abdur Rahman, Hossain Shahriar, Fan Wu, Alfredo Cuzzocrea

AI总结:

本研究应用预训练多语言BERT嵌入改进恶意提示注入攻击检测,通过对比多种机器学习分类器,逻辑回归达到96.55%准确率,超越现有方法。

摘要:

大型语言模型(LLMs)以其卓越的能力而闻名,并被广泛应用于各种应用中。然而,这种广泛使用也带来了显著的安全漏洞。此外,人们普遍观察到,在大型语言模型中,针对恶意提示注入攻击的有效检测和缓解策略的需求与现有方法之间存在巨大差距,因为当前的方法可能无法充分应对这些漏洞在现实应用中的复杂性和不断演变的性质。因此,本工作聚焦于恶意提示注入攻击的影响,这是真实LLM应用中最危险的漏洞之一。本研究探讨了应用各种BERT(来自Transformer的双向编码器表示)类模型,如多语言BERT和DistilBert,来区分恶意提示与合法提示。同时,我们观察了如何使用多语言BERT对提示文本进行分词并生成嵌入,以提升各种机器学习方法(高斯朴素贝叶斯、随机森林、支持向量机和逻辑回归)的性能。通过严格分析各模型在不同参数下的性能,以改进二元分类,从而发现恶意提示。采用多语言BERT方法嵌入提示显著提升了性能,超越了现有工作,并通过逻辑回归达到了96.55%的出色准确率。此外,我们调查了模型的错误预测,以深入了解其局限性。研究结果可以指导研究人员调整各种BERT模型,以找到最适合应对不同LLM漏洞的模型。

英文摘要:

Large language models (LLMs) are renowned for their exceptional capabilities, and applying to a wide range of applications. However, this widespread use brings significant vulnerabilities. Also, it is well observed that there are huge gap which lies in the need for effective detection and mitigation strategies against malicious prompt injection attacks in large language models, as current approaches may not adequately address the complexity and evolving nature of these vulnerabilities in real-world applications. Therefore, this work focuses the impact of malicious prompt injection attacks which is one of most dangerous vulnerability on real LLMs applications. It examines to apply various BERT (Bidirectional Encoder Representations from Transformers) like multilingual BERT, DistilBert for classifying malicious prompts from legitimate prompts. Also, we observed how tokenizing the prompt texts and generating embeddings using multilingual BERT contributes to improve the performance of various machine learning methods: Gaussian Naive Bayes, Random Forest, Support Vector Machine, and Logistic Regression. The performance of each model is rigorously analyzed with various parameters to improve the binary classification to discover malicious prompts. Multilingual BERT approach to embed the prompts significantly improved and outperformed the existing works and achieves an outstanding accuracy of 96.55% by Logistic regression. Additionally, we investigated the incorrect predictions of the model to gain insights into its limitations. The findings can guide researchers in tuning various BERT for finding the most suitable model for diverse LLMs vulnerabilities.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑