Preprint
Large Language Models

A survey on large language model (LLM) security and privacy: The Good, The Bad, and The Ugly

Yifan Yao(Drexel University), Jinhao Duan(Drexel University), Kaidi Xu(Drexel University), Yuanfang Cai(Drexel University), Zhibo Sun(Drexel University), Yue Zhang(Drexel University)
February 29, 2024High-Confidence Computing1,072 citations

1.1k

Citations

0

Influential Citations

High-Confidence Computing

Venue

2024

Year

Abstract

Large Language Models (LLMs), such as ChatGPT and Bard, have revolutionized natural language understanding and generation. They possess deep language comprehension, human-like text generation capabilities, contextual awareness, and robust problem-solving skills, making them invaluable in various domains (e.g., search engines, customer support, translation). In the meantime, LLMs have also gained traction in the security community, revealing security vulnerabilities and showcasing their potential in security-related tasks. This paper explores the intersection of LLMs with security and privacy. Specifically, we investigate how LLMs positively impact security and privacy, potential risks and threats associated with their use, and inherent vulnerabilities within LLMs. Through a comprehensive literature review, the paper categorizes the papers into “The Good” (beneficial LLM applications), “The Bad” (offensive applications), and “The Ugly” (vulnerabilities of LLMs and their defenses). We have some interesting findings. For example, LLMs have proven to enhance code security (code vulnerability detection) and data privacy (data confidentiality protection), outperforming traditional methods. However, they can also be harnessed for various attacks (particularly user-level attacks) due to their human-like reasoning abilities. We have identified areas that require further research efforts. For example, Research on model and parameter extraction attacks is limited and often theoretical, hindered by LLM parameter scale and confidentiality. Safe instruction tuning, a recent development, requires more exploration. We hope that our work can shed light on the LLMs’ potential to both bolster and jeopardize cybersecurity.

Analysis

Why This Paper Matters

Large Language Models (LLMs) like ChatGPT and Bard have rapidly become integral to many domains, but their security and privacy implications are complex and multifaceted. This survey by Yao et al. provides a timely and comprehensive overview of the intersection between LLMs and security/privacy, categorizing the literature into three intuitive themes: 'The Good' (beneficial applications), 'The Bad' (offensive applications), and 'The Ugly' (inherent vulnerabilities and defenses). With over 1,000 citations, it has become a key reference for researchers and practitioners navigating this critical area.

The paper's significance lies in its holistic perspective. Rather than focusing solely on attacks or defenses, it examines both the positive and negative potentials of LLMs, acknowledging their dual-use nature. By systematically reviewing existing work, the authors highlight where LLMs excel—such as code vulnerability detection and data confidentiality protection—and where they pose risks, particularly through user-level attacks enabled by their human-like reasoning. This balanced view is essential for developing responsible AI systems.

Moreover, the survey identifies critical gaps in the literature, such as the limited and often theoretical research on model and parameter extraction attacks, and the need for more exploration of safe instruction tuning. These insights help steer future research efforts toward under-explored areas, making the paper valuable for both newcomers and seasoned researchers in AI security.

Technical Contributions

  • Taxonomy of LLM Security and Privacy Research: The paper introduces a clear categorization framework ('Good', 'Bad', 'Ugly') that organizes a vast array of studies, making it easier to understand the landscape.
  • Identification of LLM Strengths in Security: It documents evidence that LLMs outperform traditional methods in code vulnerability detection and data privacy protection, showcasing their potential as security tools.
  • Analysis of Offensive Capabilities: The survey details how LLMs can be misused for attacks, especially user-level attacks, due to their advanced reasoning and language generation abilities.
  • Highlighting Under-Explored Areas: It points out that model and parameter extraction attacks are under-studied due to the scale and confidentiality of LLM parameters, and that safe instruction tuning requires more attention.
  • Comprehensive Literature Review: By synthesizing a large body of work, the paper provides a foundation for future research and practical guidance for securing LLM deployments.

Results

As a survey, the paper does not present new experimental results but synthesizes findings from existing literature. Key reported outcomes include that LLMs enhance code security (e.g., vulnerability detection) and data privacy (e.g., confidentiality protection), outperforming traditional methods. Conversely, LLMs can be harnessed for various attacks, particularly user-level attacks, due to their human-like reasoning. The authors also note that research on model and parameter extraction attacks is limited and often theoretical, hindered by the scale and confidentiality of LLM parameters, and that safe instruction tuning is a recent development requiring more exploration.

Significance

The survey's significance extends beyond academia. By mapping the security and privacy landscape of LLMs, it informs practitioners about both the benefits and risks of deploying LLMs, and guides policymakers and researchers toward critical areas needing attention. The dual-use nature of LLMs means that advancements in their capabilities also expand the attack surface, making surveys like this essential for proactive risk mitigation. Furthermore, by identifying gaps such as the need for robust defenses against model extraction and the development of safe instruction tuning, the paper sets a research agenda that could shape the next generation of secure and trustworthy LLMs. Overall, it underscores the importance of interdisciplinary efforts to ensure that LLMs are developed and used responsibly, maximizing their benefits while minimizing harms.