vix.ing · top · new · best · stats

SmoothLLM: Defending Large Language Models Against Jailbreaking Attacks

2023/10/05 by Alexander Robey, Robey, Alexander, Eric Wong +5 · 2 voices · 136 citations
Computer Science · Mathematics · #Adversarial Robustness in Machine Learning #Adversarial system #Adversary #Artificial intelligence #Attack surface #Code (set theory) #Computer science #Computer security #Conservatism #Law #Mathematics #Natural Language Processing Techniques #Point (geometry) #Political science #Programming language #Topic Modeling #Vulnerability (computing)

paper · pdf · doi:10.48550/arxiv.2310.03684

published in arXiv (Cornell University) (Cornell University)

openalex publication_date 2023/10/05 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

Despite efforts to align large language models (LLMs) with human intentions, widely-used LLMs such as GPT, Llama, and Claude are susceptible to jailbreaking attacks, wherein an adversary fools a targeted LLM into generating objectionable content. To address this vulnerability, we propose SmoothLLM, the first algorithm designed to mitigate jailbreaking attacks. Based on our finding that adversarially-generated prompts are brittle to character-level changes, our defense randomly perturbs multiple copies of a given input prompt, and then aggregates the corresponding predictions to detect adversarial inputs. Across a range of popular LLMs, SmoothLLM sets the state-of-the-art for robustness against the GCG, PAIR, RandomSearch, and AmpleGCG jailbreaks. SmoothLLM is also resistant against adaptive GCG attacks, exhibits a small, though non-negligible trade-off between robustness and nominal performance, and is compatible with any LLM. Our code is publicly available at \urlhttps://github.com/arobey1/smooth-llm.

Cited by

Discussions

Related