mlsanityData to 7 Oct 2026

Fine-tuned Large Language Models (LLMs): Improved Prompt Injection Attacks Detection

arXiv 2410.21337 ↗First posted 28 Oct 2024cs.CL cs.AIcited by 4

On the map: LLM safety and security → Prompt injection and agent security

Abstract (arXiv)

Large language models (LLMs) are becoming a popular tool as they have significantly advanced in their capability to tackle a wide range of language-based tasks. However, LLMs applications are highly vulnerable to prompt injection attacks, which poses a critical problem. These attacks target LLMs applications through using carefully designed input prompts to divert the model from adhering to original instruction, thereby it could execute unintended actions. These manipulations pose serious security threats which potentially results in data leaks, biased outputs, or harmful responses. This project explores the security vulnerabilities in relation to prompt injection attacks. To detect whether a prompt is vulnerable or not, we follows two approaches: 1) a pre-trained LLM, and 2) a fine-tuned LLM. Then, we conduct a thorough analysis and comparison of the classification performance. Firstly, we use pre-trained XLM-RoBERTa model to detect prompt injections using test dataset without any fine-tuning and evaluate it by zero-shot classification. Then, this proposed work will apply supervised fine-tuning to this pre-trained LLM using a task-specific labeled dataset from deepset in huggingface, and this fine-tuned model achieves impressive results with 99.13% accuracy, 100% precision, 98.33% recall and 99.15% F1-score thorough rigorous experimentation and evaluation. We observe that our approach is highly efficient in detecting prompt injection attacks.

Key facts. Cited by 4 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 17 of its 39 references that are in the map. First posted on arXiv 28 Oct 2024.

Builds on

17 of 39 references.

Closest ancestors · 3

Same direction, newest first

  1. 2024Applying Pre-trained Multilingual BERT in Embeddings for Improved Malicious Prompt Injection Attacks Detection20 Sep
  2. 2023Prompt Injection attack against LLM-integrated Applications8 Jun
  3. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection23 Feb

Other references · 14

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023GPT-4 Technical Reportcited by 18,132
  3. 2022Training language models to follow instructions with human feedbackcited by 15,712
  4. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
  5. 2023PaLM 2 Technical Reportcited by 1,154
  6. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
  7. 2023Whose Opinions Do Language Models Reflect?cited by 759
  8. 2023GPTEval: A Survey on Assessments of ChatGPT and GPT-4cited by 73
  9. 2018A Survey on Natural Language Processing for Fake News Detectioncited by 67
  10. 2022Exploring the Universal Vulnerability of Prompt-based Learning Paradigmcited by 56
  11. 2019Learning Hierarchical Discourse-level Structure for Fake News Detectioncited by 28
  12. 2023Embedding Democratic Values into Social Media AIs via Societal Objective Functionscited by 25
2 more
  1. 2024A Transformer-Based Framework for Payload Malware Detection and Classificationcited by 4
  2. 2024Towards Novel Malicious Packet Recognition: A Few-Shot Learning Approachcited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 3; 2026: 1.

4 papers.