paper-with-me

홈 › Papers

Detecting Language Model Attacks with Perplexity

2023-08-27 · Gabriel Alon, Michael Kamfonas

A novel hack involving Large Language Models (LLMs) has emerged, exploiting adversarial suffixes to deceive models into generating perilous responses. Such jailbreaks can trick LLMs into providing intricate instructions to a malicious user for creating explosives, orchestrating a bank heist, or facilitating the creation of offensive content. By evaluating the perplexity of queries with adversarial suffixes using an open-source LLM (GPT-2), we found that they have exceedingly high perplexity values. As we explored a broad range of regular (non-adversarial) prompt varieties, we concluded that false positives are a significant challenge for plain perplexity filtering. A Light-GBM trained on perplexity and token length resolved the false positives and correctly detected most adversarial attacks in the test set.

📄 PDF Abstract BibTeX arXiv:2308.14132

Code (2)

lostoxygen/llm-confidentiality pytorch
neelsjain/baseline-defenses pytorch

Tasks

Language ModelingLanguage Modellingmodel

Similar Papers 제목 키워드 기반

When Context Bites: Detecting RAG Poisoning via Document-Level Attention Collapse

2026-08-07 · Yingtao Ren, Ziyi Zhao, Yiwei Fu, Xiao Luo 외 hf

Retrieval-augmented generation (RAG) is indispensable for enhancing large language models. However, RAGs are increasingly susceptible to poisoning attacks, in which adversarial documents are injected to manipulate genera…

Beyond Natural Language Perplexity: Detecting Dead Code Poisoning in Code Generation Datasets

2025-02-27 · Chichien Tsai, ChiaMu Yu, Yingdar Lin, Yusung Wu 외

The increasing adoption of large language models (LLMs) for code-related tasks has raised concerns about the security of their training datasets. One critical threat is dead code poisoning, where syntactically valid but …

Code GenerationCode Search

Secure Retrieval-Augmented Generation against Poisoning Attacks

2025-10-28 · Zirui Cheng, Jikai Sun, Anjun Gao, Yueyang Quan 외 arxiv

Large language models (LLMs) have transformed natural language processing (NLP), enabling applications from content generation to decision support. Retrieval-Augmented Generation (RAG) improves LLMs by incorporating exte…

Detecting Fluent Optimization-Based Adversarial Prompts via Sequential Entropy Changes

2026-05-19 · Mohammed Alshaalan, Miguel R. D. Rodrigues arxiv

Optimization-based adversarial suffixes can jailbreak aligned large language models (LLMs) while remaining fluent, weakening static and windowed perplexity-based detectors. We cast adversarial suffix detection as an onli…

Token-Level Adversarial Prompt Detection Based on Perplexity Measures and Contextual Information

2023-11-20 · Zhengmian Hu, Gang Wu, Saayan Mitra, Ruiyi Zhang 외

In recent years, Large Language Models (LLM) have emerged as pivotal tools in various applications. However, these models are susceptible to adversarial prompt attacks, where attackers can carefully curate input strings …