We use a few cookies

Essential cookies keep the library working. With your permission, we'd also like to use analytics to see what's useful and improve the experience. Read our Privacy Policy or Cookie Policy.

Skip to main content
Home/e-Resources/Mathematics/SmoothLLM: Defending Large Language Models Against Jailbreaking Attacks
PeriodicalsMathematics

SmoothLLM: Defending Large Language Models Against Jailbreaking Attacks

Checking your access to this record.

Abstract & Overview

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 \url{https://github.com/arobey1/smooth-llm}.

Cite this record

Alexander Robey, Eric Wong, Hamed Hassani, George J. Pappas (2025). SmoothLLM: Defending Large Language Models Against Jailbreaking Attacks. Transactions on machine learning research. https://doi.org/10.48550/arxiv.2310.03684

Copy in another style

Robey, A., Wong, E., Hassani, H., & Pappas, G. J. (2025). SmoothLLM: Defending Large Language Models Against Jailbreaking Attacks. Transactions on machine learning research. https://doi.org/10.48550/arxiv.2310.03684
Author names are used as deposited, so check their order before you submit.

Metadata is harvested from open-access indexes and can be incomplete. Check a citation against the published version before relying on it — see our open access & attribution policy.