[Paper Review] Advancing the Robustness of Large Language Models through Self-Denoised Smoothing
This paper proposes SelfDenoise, a novel self-denoised smoothing method that enhances the robustness of large language models (LLMs) against adversarial attacks and jailbreaks by leveraging the LLM's own multitasking capability to denoise noisy inputs before prediction. Unlike prior randomized smoothing approaches, it uses the LLM itself to reconstruct masked inputs, significantly improving both empirical and certified robustness without fine-tuning or external denoisers, outperforming existing methods on downstream tasks and alignment defense.
Although large language models (LLMs) have achieved significant success, their vulnerability to adversarial perturbations, including recent jailbreak attacks, has raised considerable concerns. However, the increasing size of these models and their limited access make improving their robustness a challenging task. Among various defense strategies, randomized smoothing has shown great potential for LLMs, as it does not require full access to the model's parameters or fine-tuning via adversarial training. However, randomized smoothing involves adding noise to the input before model prediction, and the final model's robustness largely depends on the model's performance on these noise corrupted data. Its effectiveness is often limited by the model's sub-optimal performance on noisy data. To address this issue, we propose to leverage the multitasking nature of LLMs to first denoise the noisy inputs and then to make predictions based on these denoised versions. We call this procedure self-denoised smoothing. Unlike previous denoised smoothing techniques in computer vision, which require training a separate model to enhance the robustness of LLMs, our method offers significantly better efficiency and flexibility. Our experimental results indicate that our method surpasses existing methods in both empirical and certified robustness in defending against adversarial attacks for both downstream tasks and human alignments (i.e., jailbreak attacks). Our code is publicly available at https://github.com/UCSB-NLP-Chang/SelfDenoise
Motivation & Objective
- To address the vulnerability of large language models (LLMs) to adversarial perturbations, including jailbreak attacks, which compromise safety and reliability.
- To overcome the limitation of vanilla randomized smoothing, where LLMs underperform on noisy inputs, reducing robustness.
- To develop a parameter-efficient, black-box defense that does not require access to model weights or adversarial fine-tuning.
- To leverage the multitasking nature of LLMs to denoise perturbed inputs before classification, improving robustness in both downstream tasks and alignment settings.
- To achieve stronger empirical and certified robustness compared to existing randomized smoothing baselines like SmoothLLM and RanMask.
Proposed method
- The method applies random word masking to the input text to generate multiple perturbed versions.
- Each perturbed input is fed to the LLM, which is prompted to complete or denoise the masked segments using its intrinsic language understanding.
- The denoised outputs are then re-evaluated by the LLM for the original task, such as classification or jailbreak detection.
- Robust predictions are determined via majority voting over multiple denoised and re-predicted samples.
- The approach is fully black-box and requires no model fine-tuning or additional training, relying only on the LLM’s in-context learning and completion abilities.
- The method is applied to both downstream classification tasks and jailbreak defense, with a certified robustness analysis based on Cohen et al. (2019).

Experimental results
Research questions
- RQ1Can self-denoising of perturbed inputs improve the robustness of LLMs in randomized smoothing without requiring model fine-tuning or external denoisers?
- RQ2How does self-denoised smoothing compare to existing randomized smoothing methods like SmoothLLM and RanMask in defending against adversarial attacks on downstream NLP tasks?
- RQ3To what extent does self-denoising reduce model rejection behavior (e.g., 'I can't help with that') under high noise levels, which undermines defense functionality?
- RQ4Can self-denoised smoothing achieve stronger certified robustness bounds compared to baseline methods in jailbreak defense scenarios?
- RQ5Does the use of the LLM’s own completion ability for denoising lead to better generalization and robustness than external denoisers or direct smoothing?
Key findings
- SelfDenoise achieved a 30% defense success rate against the GCG attack at 15% mask rate, significantly outperforming SmoothLLM (10%) and RanMask (15%) under the same conditions.
- At a 15% mask rate, SelfDenoise achieved a 24% success rate against the PAIR attack, compared to 8% for SmoothLLM and 0% for RanMask.
- The rejection rate for SelfDenoise remained below 5% across all settings, while SmoothLLM and RanMask showed rejection rates exceeding 50% at 20% mask rate, indicating better functional stability.
- SelfDenoise demonstrated superior certified robustness in both downstream classification and jailbreak defense, with improved robustness margins over baseline methods.
- The method effectively mitigated semantic destruction caused by high-masking rates, preserving model functionality where other methods failed due to excessive rejection.
- The ablation study confirmed that the self-denoising step is critical, as direct smoothing without denoising led to degraded performance, especially under high noise levels.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.