paper-with-me

홈 › Papers

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

2023-11-20 · Zhengmian Hu, Gang Wu, Saayan Mitra, Ruiyi Zhang, Tong Sun, Heng Huang, Viswanathan Swaminathan

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 that mislead LLMs into generating incorrect or undesired outputs. Previous work has revealed that with relatively simple yet effective attacks based on discrete optimization, it is possible to generate adversarial prompts that bypass moderation and alignment of the models. This vulnerability to adversarial prompts underscores a significant concern regarding the robustness and reliability of LLMs. Our work aims to address this concern by introducing a novel approach to detecting adversarial prompts at a token level, leveraging the LLM's capability to predict the next token's probability. We measure the degree of the model's perplexity, where tokens predicted with high probability are considered normal, and those exhibiting high perplexity are flagged as adversarial. Additionaly, our method also integrates context understanding by incorporating neighboring token information to encourage the detection of contiguous adversarial prompt sequences. To this end, we design two algorithms for adversarial prompt detection: one based on optimization techniques and another on Probabilistic Graphical Models (PGM). Both methods are equipped with efficient solving methods, ensuring efficient adversarial prompt detection. Our token-level detection result can be visualized as heatmap overlays on the text sequence, allowing for a clearer and more intuitive representation of which part of the text may contain adversarial prompts.

📄 PDF Abstract BibTeX arXiv:2311.11509

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

Heatmap 설명 없음

Similar Papers 제목 키워드 기반

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…

AutoPrompt: Automated Red-Teaming of Text-to-Image Models via LLM-Driven Adversarial Prompts

2025-10-28 · Yufan Liu, Wanqian Zhang, Huashan Chen, Lin Wang 외 arxiv

Despite rapid advancements in text-to-image (T2I) models, their safety mechanisms are vulnerable to adversarial prompts, which maliciously generate unsafe images. Current red-teaming methods for proactively assessing suc…

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 …

Language ModelingLanguage Modellingmodel

FLRT: Fluent Student-Teacher Redteaming

2024-07-24 · T. Ben Thompson, Michael Sklar

Many publicly available language models have been safety tuned to reduce the likelihood of toxic or liability-inducing text. To redteam or jailbreak these models for compliance with toxic requests, users and security ana…

RePPL: Recalibrating Perplexity by Uncertainty in Semantic Propagation and Language Generation for Explainable QA Hallucination Detection

2025-05-21 · Yiming Huang, Junyan Zhang, ZiHao Wang, Biquan Bie 외

Large Language Models (LLMs) have become powerful, but hallucinations remain a vital obstacle to their trustworthy use. While previous works improved the capability of hallucination detection by measuring uncertainty, th…

HallucinationText Generation