Attack and defense techniques in large language models: A survey and new perspectives
Preprint
Abstract
Large Language Models (LLMs) have become central to numerous natural language processing tasks, but their vulnerabilities present significant security and ethical challenges. This systematic survey explores the evolving landscape of attack and defense techniques in LLMs. We classify attacks into adversarial prompt attack, optimized attacks, model theft, as well as attacks on application of LLMs, detailing their mechanisms and implications. Consequently, we analyze defense strategies, including prevention-based and detection-based defense methods. Although advances have been made, challenges remain to adapt to the dynamic threat landscape, balance usability with robustness, and address resource constraints in defense implementation. We highlight open problems, including the need for adaptive scalable defenses, explainable security techniques, and standardized evaluation frameworks. This survey provides actionable insights and directions for developing secure and resilient LLMs, emphasizing the importance of interdisciplinary collaboration and ethical considerations to mitigate risks in real-world applications.Keywords
All Related Versions
This publication has 28 references indexed in Scilit:
- Jailbreaking Black Box Large Language Models in Twenty Queries2025
- Large Language Models for Telecom: Forthcoming Impact on the IndustryIEEE Communications Magazine, 2024
- The ethics of ChatGPT in medicine and healthcare: a systematic review on Large Language Models (LLMs)npj Digital Medicine, 2024
- Signed-prompt: A new approach to prevent prompt injection attacks against LLM-Integrated applications2024
- Defending ChatGPT against jailbreak attack via self-remindersNature Machine Intelligence, 2023
- Summary of ChatGPT-Related research and perspective towards the future of large language modelsMeta-Radiology, 2023
- Generate adversarial examples by adaptive moment iterative fast gradient sign methodApplied Intelligence, 2022
- Meta-learning approaches for learning-to-learn in deep learning: A surveyNeurocomputing, 2022
- Feature selection and dimensionality reduction: An extensive comparison in hand gesture classification by sEMG in eight channels armband approachBiomedical Signal Processing and Control, 2020
- Recent advances in robust optimization: An overviewEuropean Journal of Operational Research, 2014