Applying Pre-trained Multilingual BERT in Embeddings for Improved Malicious Prompt Injection Attacks Detection
On the map: LLM safety and security → Prompt injection and agent security
Abstract (arXiv)
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.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Placed in Prompt injection and agent security, one of 12 directions in LLM safety and security. Builds on 14 of its 29 references that are in the map. First posted on arXiv 20 Sep 2024.
Builds on
14 of 29 references.
Closest ancestors · 6
Same direction, newest first
- 2024A Novel Evaluation Framework for Assessing Resilience Against Prompt Injection Attacks in Large Language Models2 Jan
- 2023Jatmo: Prompt Injection Defense by Task-Specific Finetuning29 Dec
- 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Models21 Dec
- 2023Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game2 Nov
- 2023Prompt Injection attack against LLM-integrated Applications8 Jun
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb
Other references · 8
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
- 2023Challenges and Applications of Large Language Modelscited by 251
- 2018A Survey on Natural Language Processing for Fake News Detectioncited by 67
- 2022Evaluating the Susceptibility of Pre-Trained Language Models via Handcrafted Adversarial Examplescited by 65
- 2019Learning Hierarchical Discourse-level Structure for Fake News Detectioncited by 28
Built on by
Citing papers per year: 2024: 3; 2025: 3; 2026: 1.
7 papers.
- 2025AgentArmor: Enforcing Program Analysis on Agent Runtime Trace to Defend Against Prompt Injectioncited by 39
- 2026VIGIL: Defending LLM Agents Against Tool Stream Injection via Verify-Before-Commitcited by 13
- 2024Fine-tuned Large Language Models (LLMs): Improved Prompt Injection Attacks Detectioncited by 4
- 2025Detection Method for Prompt Injection by Integrating Pre-trained Model and Heuristic Feature Engineeringcited by 4
- 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defensescited by 4
- 2024Palisade -- Prompt Injection Detection Frameworkcited by 3
- 2024Embedding with Large Language Models for Classification of HIPAA Safeguard Compliance Rulescited by 0
- 2026VIGIL: Defending LLM Agents Against Tool Stream Injection via Verify-Before-Commit9 Jan 2026
- 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defenses17 Oct 2025
- 2025AgentArmor: Enforcing Program Analysis on Agent Runtime Trace to Defend Against Prompt Injection2 Aug 2025
- 2025Detection Method for Prompt Injection by Integrating Pre-trained Model and Heuristic Feature Engineering5 Jun 2025
- 2024Fine-tuned Large Language Models (LLMs): Improved Prompt Injection Attacks Detection28 Oct 2024
- 2024Palisade -- Prompt Injection Detection Framework28 Oct 2024
- 2024Embedding with Large Language Models for Classification of HIPAA Safeguard Compliance Rules28 Oct 2024