Certified PEFTSmoothing: Parameter-Efficient Fine-Tuning with Randomized Smoothing

## Abstract

Abstract Randomized smoothing is the primary certified robustness method for accessing the robustness of deep learning models to adversarial perturbations in the l 2 subscript 𝑙 2 l_{2} italic_l start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT -norm, by adding isotropic Gaussian noise to the input image and returning the majority votes over the base classifier. Theoretically, it provides a certified norm bound, ensuring predictions of adversarial examples are stable within this bound. A notable constraint limiting widespread adoption is the necessity to retrain base models entirely from scratch to attain a robust version. This is because the base model fails to learn the noise-augmented data distribution to give an accurate vote. One intuitive way to overcome this challenge is to involve a custom-trained denoiser to eliminate the noise. However, this approach is inefficient and sub-optimal. Inspired by recent large model training procedures, we explore an alternative way named PEFTSmoothing to adapt the base model to learn the Gaussian noise-augmented data with Parameter-Efficient Fine-Tuning (PEFT) methods in both white-box and black-box settings. Extensive results demonstrate the effectiveness and efficiency of PEFTSmoothing , which allow us to certify over 98% accuracy for ViT on CIFAR-10, 20% higher than SoTA denoised smoothing, and over 61% accuracy on ImageNet which is 30% higher than CNN-based denoiser and comparable to the Diffusion-based denoiser.

## 1 Introduction

Figure: Figure 1: Illustration of PEFTSmoothing procedures. We incorporate four PEFT methods to transform a base classifier PEFTSmoothed Classifier. The final output is the majority votes of The noised-augmented inputs, which is stable within a certain norm bound.
Refer to caption: x1.png

Certified robustness is the primary method to evaluate the robustness of deep learning systems to adversarial perturbations within specific bound [; ; ]. This approach offers a reliable and provable robustness guarantee that the predictions remain stable to adversarial examples within specific norm bounds. In the field of image classification, which is the fundamental task of computer vision, the SoTA certified robustness to adversarial perturbations under $l_{2}$-norm is randomized smoothing []. The basic idea of randomized smoothing is to convert a deterministic base classifier into a probabilistic classifier by adding isotropic Gaussian noise to the input image and returning the majority votes over the prediction of the base classifier.

Although certified robustness holds notable theoretical strength, a significant limitation restricts its broad application: the deep learning models are required to be retrained from scratch to optimize the empirical performance as well as its robustness criterion []. The underlying reason behind this is that the base model, initially trained on the original data distribution, fails to capture the noise-augmented data distribution. Consequently, it fails to predict the true label of the original input when subjected to the corresponding Gaussian-noised counterpart. To address this, training the base model from scratch with randomized smoothing becomes essential for better learning the noise-augmented data distribution and optimizing the certified robustness criterion. However, this requirement poses a considerable challenge, especially considering the prevalent practice of large-scale models. Not only is it impractical to train such models entirely from scratch, but it also prompts a thoughtful consideration of the trade-off between the time and computational cost involved in obtaining a robust version of a large base model.

To overcome this challenge, the most intuitive way is to incorporate a custom-trained denoiser before applying randomized smoothing [], named denoised smoothing. This denoiser processes the Gaussian-noised inputs to eliminate the noise before they reach the base classifier. The denoised inputs are expected to align with the original data distribution, enabling the model to predict the ground-truth label accurately. This process also ensures the preservation of the robustness guarantee even in the presence of Gaussian noise. Although applying a denoiser is intuitive, this approach introduces its own set of issues. First, the additional training process adds complexity to the whole architecture, demanding extra computational resources and time for training. Besides the training time, the inference time is also extremely longer than usual, especially when applying the SoTA diffusion-based denoiser architecture []. Second, from the previous studies, the certified accuracy of denoised smoothing is always sub-optimal, as the certified performance largely relies on the performance in the denoising procedure.

These limitations highlight the need for a more efficient and effective approach to guide large-scale models in learning noise-augmented data distributions. In this work, we explore an alternative approach—leveraging Parameter-Efficient Fine-Tuning (PEFT) [] in conjunction with randomized smoothing. Parameter Efficient Fine-Tuning (PEFT) is an effective solution to adapting a pre-trained model to downstream tasks or datasets, by reducing the number of fine-tuning parameters and memory usage while achieving comparable performance with training from scratch []. Inspired by involving PEFT in recent large model training procedures, we introduced PEFTSmoothing to acquire the model’s ability to learn the underlying noise-augmented data distribution with PEFT, changing from a reactive approach (denoised smoothing) to a proactive approach (PEFTSmoothing). The intuition behind this is that the learning capacity of the SoTA vision model such as Vision Transformer (ViT) [] is extremely strong, it is, therefore, unnecessary to adopt an auxiliary denoiser to eliminate the noise. The intuitive nature of PEFT aligns with the inherent ability of large models to understand and adapt to noised data patterns, which is not only efficient (fewer parameters need to be tuned) but also effective (higher accuracy).

We further proposed black-boxed PEFTSmoothing to adapt to instances where the base model is not open-sourced, for example, from a private-classification API, that white-box PEFTSmoothing is not applicable to acquire the robust version of the base model because fine-tuning cannot be performed in this case. In addition, considering the prevailing practice in image classification, where models are commonly fine-tuned from pre-trained ones to adapt to specific downstream datasets, we further integrate the fine-tuning of PEFTSmoothing with PEFT intended for downstream datasets adaptation. PEFTSmoothing allows us to obtain a model that is both certifiably robust and tailored to downstream datasets, achieved through a single fine-tuning process.

In this study, we introduce PEFTSmoothing, incorporating three prominent PEFT methods—Prompt-tuning [], LoRA [], Adapter [], to guide the base model to learn the distribution of noise-augmented data. We take denoised smoothing and full(partial) fine-tuning as the baselines. Figure 1 illustrates the PEFTSmoothing procedures, including the Gaussian noise augmentation and PEFTSmoothing to transform a base classifier to a PEFTSmoothed one and the majority vote in the inference stage, offering both theoretical robustness guarantees and empirical utility against adversarial examples.

Our contributions can be summarized as follows:
1) We reveal the insight that PEFT successfully guides large-scale models to capture the noise-augmented data distribution with modest computational and time costs. This insight explains the success of PEFTSmoothing in converting a base model into a certifiably robust classifier (see Section 3).
2) We present PEFTSmoothing, a certifiable method to convert large base models, such as ViT on ImageNet and CIFAR-10, into certifiably robust classifiers (see Section 4).
3) We further propose black-box PEFTSmoothing to address scenarios where the base model cannot undergo white-box fine-tuning.
4) Our experimental results demonstrate the effectiveness and efficiency of PEFTSmoothing. In terms of accuracy, it enhances certified accuracy by over 20% compared to denoised smoothing on CIFAR-10. On ImageNet, PEFTSmoothing achieves comparable performance with a diffusion-based denoiser (see Section 5). In terms of efficiency, PEFTSmoothing reduces the training parameters by 1000 times compared to diffusion-based denoisers and 10 times compared to CNN-based denoisers. This significant reduction in training parameters indicates substantial savings in computational and time costs for obtaining a certifiably robust classifier.

## 2 Preliminaries

Certified robustness is the major way to evaluate the robustness of deep learning models to adversarial examples. The state-of-the-art certifiable method for adversarial images in $l_{2}$-norm is Randomized smoothing. In this section, we first briefly review the certified guarantee of randomized smoothing. Then, we explain denoised smoothing, the practical approach to overcome the limitation of randomized smoothing which needs to train the model from scratch.

### 2.1 Randomized Smoothing

Randomized smoothing [] converts the base classifier $\mathcal{F}$ into a smoothed classifier $\mathcal{G}$ by generating the aggregated prediction over the Gaussian noise-augmented data via majority voting. Specifically, for input *x*, $\mathcal{G}$ returns the class that is most likely to be returned by the base classifier $\mathcal{F}$ under Gaussian perturbations of $x$, which can be stated as:

$$ $\mathcal{G}(x)=\underset{c\in\mathcal{Y}}{\arg\max}\mathbb{P}[\mathcal{F}(x+ \delta)=c],\vspace{-1em}$ (1) $$

where $\delta\sim\mathcal{N}\left(0,\sigma^{2}I\right)$. Under different noise scales, randomized smoothing provides a tight *$l_{2}$* certification bound $\mathcal{R}$. Formally, the theorem can be stated as:

###### Theorem 2.1 .

Given a deterministic classifier $\mathcal{F}$ and its probabilistic counterpart $\mathcal{G}$ defined in Equation 1, let $\delta\sim\mathcal{N}(0,\sigma^{2}I)$, suppose $c_{A}$ is the most probable class, and $\>\underline{p_{A}},\overline{p_{B}}\in[0,1]\>$ satisfy:

$$ $\mathbb{P}(\mathcal{F}(x+\varepsilon)=c_{A})\geq\underline{p_{A}}\geq\overline {p_{B}}\geq\max_{c\neq c_{A}}\mathbb{P}(\mathcal{F}(x+\varepsilon)=c)\vspace{- .5em}$ (2) $$

Then $\mathcal{G}(x+\delta)=c_{A}$ for all $\>\|\delta\|_{2}<$R$,\>$ where

$$ $\mathcal{R}=\frac{\sigma}{2}(\Phi^{-1}(\underline{p_{A}})-\Phi^{-1}(\overline{ p_{B}}))$ $$

$\underline{p_{A}}$ and $\overline{p_{B}}$ are the lower bound and upper bound of the top two possible classifications, and $\Phi^{-1}$ denotes the inverse of the standard Gaussian CDF. The intuition is to search for the radius that the lower bound of the highest class is still higher than the upper bound of the second highest class under certain Gaussian perturbation. Any adversarial examples within the *$l_{2}$* ball with clean input $x$ as the center and $\mathcal{R}$ as the radius, are statistically proved to hold the same prediction results as $x$.

###### Theorem 2.1 .

### 2.2 Denoised Smoothing

One limitation of randomized smoothing is that the base model needs to be trained from scratch to learn the distribution of noised input. To overcome the computation bottleneck of retraining the large-scale models, denoised-smoothing [] proposed denoised smoothing to remove the noise by presenting a custom-trained denoiser $\mathcal{D}_{\theta}$ to any image classifier $\mathcal{F}$. The smoothed classifier $\mathcal{G}$ can be formulated as:

$$ $\mathcal{G}(x)=\underset{c\in\mathcal{Y}}{\arg\max}\mathbb{P}\left[\mathcal{F} \left(\mathcal{D}_{\theta}(x+\delta)\right)=c\right],\vspace{-1em}$ (3) $$

where $\delta\sim\mathcal{N}\left(0,\sigma^{2}I\right)$. Denoised smoothing ensures *$l_{p}$*-robustness against adversarial examples without altering the pre-trained classifier. However, its implementation involves the training of multiple denoisers for various noise types and scales. To further improve the denoising performance and achieve higher certifiable accuracy, researchers later involved different denoiser architectures including the SoTA diffusion-based denoiser. [; ].

Figure: Figure 2: Comparing the noise-augmented data learning capacity of Prompt-tuning and denoiser
Refer to caption: x2.png

## 3 Intuition: PEFT Guides Large Vision Models to Learn Noise-Augmented Data Distribution

In this section, we discuss the intuition behind PEFTSmoothing, using Parameter-Efficient Fine-Tuning to achieve a certifiably robust classifier. First, we will explain why randomized smoothing empirically fails without training from scratch. Second, we will briefly review the state-of-the-art PEFT methods. Third, we will demonstrate that PEFT methods can more successfully guide large vision models to learn noise-augmented data distribution compared to eliminating the noise with denoisers.

Theoretically, Theorem 2.1 of randomized smoothing holds regardless of how the base classifier is trained. However, the accuracy largely relies on the majority votes on how the model classifies the Gaussian noise-augmented data. Therefore, how to improve the model’s prediction ability on noise-augmented data is the key component.

Denoised smoothing involves an auxiliary custom-trained denoiser to reactively remove the noise, allowing the model to predict the denoised input, which is close to the original data distribution. However, we assume that large-scale models such as Vision Transformer (ViT), acquire such potential to capture complex patterns and information, making them well-suited for learning intricate data distributions, including noise-augmented data.

Parameter-Efficient Fine-Tuning, originally developed in the natural language processing (NLP) domain, aims to improve the performance of pre-trained language models on specific downstream tasks. Typical PEFT methods such as prompt-tuning leverage the existing architecture of large models, fixing its parameters and only training a small subset of parameters (soft prompt) to adapt to the downstream task or datasets.
The intuitive nature of PEFT aligns with the inherent ability of large models to understand and adapt to diverse data patterns. Inspired by this, we propose PEFTSmoothing, utilizing PEFT methods to guide the model to adjust its parameters more efficiently and effectively to the noise-augmented data distribution compared to the potentially sub-optimal process of training an additional denoising module.

To substantiate our hypothesis that PEFT can more effectively guide large-scale models such as ViT to learn the noise-augmented data distribution, we compare the prediction accuracy of prompt-tuning against a DnCNN-based denoiser on noise-augmented inputs with varying Gaussian noise scales. As shown in Figure 2, for both ViT-Large and ViT-Base, prompt-tuning with noise-augmented data (yellow and green lines) consistently outperforms ViT with an auxiliary denoiser (grey line) across different noise scales. These results indicate that for large-scale models, PEFT can better guide the model to learn the noise-augmented data distribution. Furthermore, upon comparing the accuracy trends of prompt-tuned ResNet (represented by the red line) with those of ViT (indicated by the yellow and green lines), it becomes evident that as model complexity increases, prompt-tuning excels in guiding the model to effectively learn the noise-augmented data distribution, resulting in higher accuracy.

## 4 PEFTSmoothing

Inspired by the above-mentioned idea that PEFT can guide the large vision models to learn noise-augmented data distribution, we propose PEFTSmoothing, converting a base model to a robust version by fine-tuning it with Gaussian noise-augmented data and still holds the certifiable guarantee of randomized smoothing mentioned in 2.1.

In this section, we first describe the white-box PEFTSmoothing including fine-tuning on the noise-augmented data with Prompt-tuning [], LoRA [] and Adapter [; ]. In the end, we also propose the black-box PEFTSmoothing, considering the more general cases where the user wants to have a robust version of a larger model without access to the private classification APIs.

Given a base-classifier $\mathcal{F}$, a dataset with image $x$ and its corresponding correct label *y*, we follow the standard fine-tuning method to optimize the prediction of the Gaussian perturbed input $x+\delta$ over ground-truth label *y*, where $\delta\sim\mathcal{N}\left(0,\sigma^{2}I\right)$. The optimization process can be stated as follows:

$$ $\underset{\theta}{\mathrm{argmin}}\quad\mathcal{C}\mathcal{E}Loss(y,\mathcal{F }_{\theta}(x+\delta))$ (4) $$

where $\mathcal{C}\mathcal{E}Loss$ refers to the standard cross entropy loss and $\mathcal{F}_{\theta}(\cdot)$ returns the probability vectors over the labels.

We develop PEFTSmoothing with three state-of-the-art PEFT methods including Prompt-tuning, LoRA and Adapter, as well as the full fine-tuning, which is illustrated in Figure 1. For all four fine-tuning methods, the blue blocks indicated the frozen layers which will not be optimized or updated during training while the light red blocks refer to the part that will be updated.

Prompt-tuning.
Prompt-tuning is a popular PEFT method that adds a trainable prefix before the embedded inputs. Similarly, in PEFTSmoothing, soft prompts are inserted into every transformer layer’s input space. Specifically, the input of the $i$th transformer layer can be stated as $[[CLS],\mathbf{P}_{i-1},\mathbf{E}_{i-1}]$, where $\mathbf{P}_{i-1}$ refers to the trainable soft prompt of $i_{th}$ layer and $\mathbf{E}_{i-1}$ indicates the embedded input image of $i_{th}$ layer.

LoRA.
LoRA is another typical PEFT method that freezes the pre-trained model weights and injects trainable rank decomposition matrices into each layer of the Transformer’s self-attention layer, greatly reducing the number of trainable parameters for downstream tasks. In PEFTSmoothing, LoRA weights are added to each query and value projection matrices of a ViT’s self-attention layer. During fine-tuning, we freeze all the parameters of the original model and constrain the update of the layer by representing them with a low-rank decomposition. A forward path $h=\mathcal{W}_{0}x$ can be modified in this way as:

$$ $h=\mathcal{W}_{0}x+\triangle\mathcal{W}x=\mathcal{W}_{0}x+\mathcal{B}\mathcal{ A}x\vspace{-0.5em}$ (5) $$

where $x$ and $h$ denote the input and output features of each layer, $\mathcal{W}_{0}\in\mathbb{R}^{d\times k}$ indicates the original weights of base model $\mathcal{F}$ while $\triangle W$ denotes the weight change which is composed of the inserted low-rank matrices $\mathcal{B}\in\mathbb{R}^{d\times r}$ and $\mathcal{A}\in\mathbb{R}^{r\times k}$.

Adapter.
The series adapter is applied directly after the attention and feed feedforward layer of each sub-layer. In PEFTSmoothing, we add small adapters into each transformer layer. The architecture of an adapter includes a down-projection with $\mathcal{W}_{Down}$ to project the input to a lower-dimensional space specified by bottleneck dimension $r$, followed by a nonlinear activation function $f(\cdot)$, and an up-projection with $\mathcal{W}_{Up}$, which can be stated as:

$$ ${h=\mathcal{W}_{0}x+f(\mathcal{W}_{0}x\mathcal{W}_{\mathrm{down}}}){\mathcal{W }_{\mathrm{up}}}$ $$

where similarly, $x$ and $h$ denote the input and output features of each layer, $\mathcal{W}_{0}$ indicates the original weights of base model.

Black-box PEFTSmoothing.
To adapt PEFTSmoothing to more general cases where the base model is a black-box one that common white-box PEFT methods are not applicable, we also propose black-box PEFTSmoothing utilizing black-box prompt-tuning [; ]. The advantage of adapting prompt-tuning to the black-box version is that black-box prompt-tuning is independent of the base model parameters and does not involve the modification of the main model architecture. The basic idea of black-box prompt-tuning is to generate custom pixel-style prompts by a learnable autoencoder [] via approximating the high-dimensional gradients with Simultaneous Perturbation Stochastic Approximation (SPSA) [; ] instead of directly calculating the gradients in the white-box setting. More specifically, we first build an autoencoder-based Coordinator, consisting of a frozen encoder $f(\cdot)$ and a lightweight learnable decoder $g_{\phi_{d}}(\cdot)$ with parameter $\phi_{d}$. The pixel-style prompts are generated by the Coordinator and added to the image $x$. To have a prompt-injected data with the Gaussian noise, we have:

$$ $\tilde{x}=clip(x+\epsilon h_{\boldsymbol{\phi}}(x))+\delta,\quad h_{\phi}(x)=g _{\phi_{d}}(z_{x},\phi_{t}),$ $$

where $\delta\sim\mathcal{N}\left(0,\sigma^{2}I\right)$ and $\phi_{t}$ is a task-specific prompt trigger vector that is jointly optimized with decoder parameter $\phi_{d}$. Here $z_{x}=f(x)$ is the output of the encoder and $\epsilon\in[0,1]$ is the hyperparameter to control the power of the prompt.

## 5 Experiments

In this section, we first elaborate on the experiment configurations. Second, we evaluate PEFTSmoothing on the Vision Transformer (ViT) for CIFAR-10 and ImageNet in terms of certified accuracy and computation costs, compared with baseline methods including basic randomized smoothing and denoised smoothing. Third, we conduct ablation studies on Prompt-tuning and LoRA to demonstrate how the selection of hyper-parameters influences the certified results. Then, we further evaluate the black-box PEFTSmoothing from the perspective of certified accuracy. Last, we present the possibility of integrating the fine-tuning of PEFTSmoothing with PEFT intended for downstream dataset adaptation.

Figure: (a) CIFAR-10 $\sigma=0.25$
Refer to caption: x3.png

**Table 1: CIFAR-10 certified top-1 accuracy for prior defenses of randomized smoothing, denoised smoothing, and PEFTSmoothing. Each entry lists the certified accuracy, with the clean accuracy for that model in parentheses, using numbers taken from respective papers.**
|  |  | CIFAR-10 | ImageNet |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Category | Method | $\sigma=0.25$ | $\sigma=0.50$ | $\sigma=0.75$ | $\sigma=1.00$ | $\sigma=0.50$ | $\sigma=1.00$ |
| RS | PixelDP [] | $22.0^{(71.0)}$ | $2.0^{(44.0)}$ | - | - | $16.0^{(33.0)}$ | - |
| RS [] | $61.0^{(75.0)}$ | $43.0^{(75.0)}$ | $32.0^{(65.0)}$ | $22.0^{(66.0)}$ | $49.0^{(67.0)}$ | $37.0^{(57.0)}$ |  |
| SmoothAdv [] | $67.4^{(75.6)}$ | $57.6^{(75.6)}$ | $47.8^{(74.7)}$ | $38.3^{(57.4)}$ | $56.0^{(65.0)}$ | $43.0^{(54.0)}$ |  |
| SmoothAdv [] | $74.9^{(74.3)}$ | $63.4^{(80.1)}$ | $51.9^{80.1)}$ | $39.6^{(62.2)}$ | - | - |  |
| Consistency [] | $68.8^{(77.8)}$ | $58.1^{(75.8)}$ | $48.5^{72.9)}$ | $37.8^{(52.3)}$ | $50.0^{(55.0)}$ | $44.0^{(55.0)}$ |  |
| MACER [] | $71.0^{(81.0)}$ | $59.0^{(81.0)}$ | $46.0^{66.0)}$ | $38.0^{(66.0)}$ | $57.0^{(68.0)}$ | $43.0^{(64.0)}$ |  |
| Boosting [] | $70.6^{(83.4)}$ | $60.4^{(76.8)}$ | $52.4^{71.6)}$ | $38.8^{(52.4)}$ | $57.0^{(65.6)}$ | $44.6^{(57.0)}$ |  |
| DRT [] | $70.4^{(81.5)}$ | $60.2^{(72.6)}$ | $50.5^{71.9)}$ | $39.8^{(56.1)}$ | $46.8^{(52.2)}$ | $44.4^{(55.2)}$ |  |
| SmoothMix [] | $67.9^{(77.1)}$ | $60.4^{(76.8)}$ | $52.4^{71.6)}$ | $38.8^{(52.4)}$ | $50.0^{(55.0)}$ | $43.0^{(55.0)}$ |  |
| ACES [] | $69.0^{(79.0)}$ | $57.2^{(74.2)}$ | $47.0^{74.2)}$ | $37.8^{(58.6)}$ | $54.0^{(63.8)}$ | $42.2^{(57.2)}$ |  |
| DS | Denoised [] | $56.0^{(72.0)}$ | $41.0^{(62.0)}$ | $28.0^{(62.0)}$ | $19.0^{(44.0)}$ | $33.0^{(60.0)}$ | $14.0^{(38.0)}$ |
| Lee [] | 60.0 | 42.0 | 28.0 | 19.0 | 41.0 | 24.0 |  |
| Diffusion [] | $76.7^{(88.1)}$ | $63.0^{(88.1)}$ | $45.3^{(88.1)}$ | $32.1^{(77.0)}$ | $\textbf{71.1}^{(82.8)}$ | $\textbf{54.3}^{(77.1)}$ |  |
| PEFT | LoRA(Ours) | $\textbf{98.2}^{(97.0)}$ | $\textbf{97.4}^{(95.4)}$ | $\textbf{95.0}^{(94.4)}$ | $\textbf{94.6}^{(91.4)}$ | $61.08^{(3.9)}$ | $39.0^{(1.00)}$ |
| Prompt-tune(Ours) | $96.6^{(\textbf{97.2})}$ | $93.4^{(\textbf{97.2})}$ | $93.2^{(\textbf{95.8})}$ | $87.4^{(\textbf{94.0})}$ | $38.72^{(53.9)}$ | $16.0^{(42.2)}$ |  |
| Full fine-tune(Ours) | $94.0^{(94.0)}$ | $88.8^{(89.0)}$ | $86.6^{(84.8)}$ | $83.6^{(82.8)}$ | $62.36^{(44.1)}$ | $34.7^{(18.3)}$ |  |
| Adapter(Ours) | $93.6^{(91.2)}$ | $92.6^{(89.8)}$ | $87.8^{(90.2)}$ | $82.8^{(87.4)}$ | $24.12^{(23.9)}$ | $11.4^{(0.080)}$ |  |

**Table 2: Comparison of the computational cost from the perspective of trained parameters. Base classifier is ViT-base.**
| Method | Denoised Smoothing | PEFTSmoothing |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| SUNet | Diffusion | DnCNN | Full Fine-Tune | Adaptor | Lora | Prompt-Tune |  |
| Parameters | 99.7M | 52.5M | 0.558M | 86.6M | 3.39M | 0.081M | 0.929M |

### 5.1 Configuration

We evaluate PEFTSmoothing results on two standard datasets, CIFAR-10 [] and ImageNet2012. Form the experimental results, PEFTSmoothing surpasses all baseline methods on the low-resolution image dataset and surpasses some of the baseline methods on high resolution one. On both datasets, We draw noisy samples to certify the robustness of base classifiers following []. All experiments of ImageNet are conducted on an A100 GPU and CIFAR-10 on an A40 GPU.

Model configuration. The base classifier we used to test performance of PEFTSmoothing on CIFAR-10 is a 86.6M-parameter ViT-B/16 model [] pre-trained on ImageNet-21k [] and fine-tuned to CIFAR-10. For ImageNet, we also used the same pre-trained ViT-B/16 model and but fine-tuned on ImageNet2012 by Google [].

Baselines.
For baseline comparison, we mainly compared the performance and the computation costs of PEFTSmoothing with the SoTA denoised smoothing, namely DnCNN-based [] and diffusion-based denoiser []. Besides, we also use a state of art SUNet-structured (swin transformer + UNet) denoiser [] which is used in medical image denoising as a new baseline denoiser.

PEFTSmoothing configuration. For Prompt-tuning, we add soft prompts as prefixes before the input embedding of an image with a length of 100. For LoRA, we add trainable rank decomposition matrices into each layer of the Transformer architecture with the rank of 2. For the Adapter, we insert new MLP modules with residual connections inside Transformer layers. The hyper-parameter selection and ablation study will be discussed in the sections below. For the black-box PEFTSmoothing, we adopt a CLIP ViT-B/16 [] as the pre-trained model and an ImageNet pre-trained vit-mae-base as the frozen encoder of Coordinator which is introduced above in Section 4.

Evaluation metrics.
Certified accuracy is the standard metric to evaluate the robustness of the defense methods. Certified accuracy denotes the fraction of the clean testing set on which the predictions are both correct and satisfy the certification criteria (see Theorem 2.1).

### 5.2 Certified Accuracy of PEFTSmoothing

Figure 3 shows the comparison of certified accuracy between PEFTSmoothing and denoised smoothing. The upper two figures and the lower two figures represent the certified results on CIFAR-10 and ImageNet respectively under different Gaussian noise scales $\sigma$. Note that for denoiser, we only demonstrate the best denoised smoothing results, DnCNN-based and SUNet-based on CIFAR-10 and Diffusion-based denoiser on ImageNet.

As shown in Figure 2(a) and 2(b), PEFTSmoothing outperforms all the SoTA denoised smoothing approaches on CIFAR-10. PEFTSmoothing has not only the highest certified accuracy when *$l_{2}$* radius = 0, but also decreases the most gradually when *$l_{2}$* radius increases. Surprisingly, LoRA and Prompt-tune even outperform full fine-tuning on both settings, while training significantly fewer total model parameters (LoRA: 0.081M, Prompt-tune: 0.929M, Adapter: 3.387M *vs* Full: 86.6M). Thus even though storage is not a concern, PEFTSmoothing is a promising approach for processing a base classifier for randomized-smoothing.

Nevertheless, the experiments on ImageNet (Figure 2(c) and Figure 2(d)) experience a different trend where the denoised smoothing with Diffusion-based denoiser has a slightly higher certified accuracy than PEFTSmoothing with LoRA. This is mainly because of the powerful denoising ability inherent in the intricate diffusion architecture, especially for high resolution images. However, it’s noteworthy that while this complex architecture enhances the denoising process, it simultaneously results in significantly prolonged inference times for individual examples, given that all noise-augmented data must traverse the Diffusion-based denoiser.

To conduct a more thorough comparison with basic randomized smoothing methods as well as the denoised smoothing, in Table 1, we report the top-1 certified accuracy achieved by PEFTSmoothing and other baseline methods for different noise magnitudes on two datasets. On CIFAR-10, PEFTSmoothing outperforms all randomized smoothing and denoised smoothing methods at all noise magnitudes greatly. All four PEFTSmoothing methods can achieve over 80% top-1 certified accuracy at high $\sigma$ distortions ($\sigma>=0.5$) and can achieve over 90% at low $\sigma$ distortions while the state of art denoised smoothing and randomized smoothing methods can achieve at most around 75% at $\sigma=0.25$. Furthermore, among all four PEFTSmoothing methods, LoRA performs the best top-1 accuracy which can maintain over 94% over all $\sigma$ and prompt-tune performs the best accuracy on clean dataset but top-1 certified accuracy slightly worse than LoRA. The results on ImageNet reveals the same trend as Figure 2(c) and Figure 2(d), that denoised smoothing with Diffusion-based model has the best certified accuracy, around 10% higher than the best PEFTSmoothing with LoRA, due to the same reason that Diffusion-based denoiser has high denoising ability on high-resolution inputs.

Figure: Figure 4: Test Accuracy vs. Size of Trained Parameters
Refer to caption: x7.png

In terms of efficiency, we demonstrate the size of training parameters in Table2. PEFTSmoothing with LoRA, Adapter, and Prompt-tuning reduces the training parameters by 1000 times compared to Diffusion-based denoisers and 10 times compared to DnCNN-based denoisers. This significant reduction in training parameters indicates substantial savings in computational and time costs for obtaining a certifiably robust classifier. We also demonstrate the size of trained parameters vs. achieved certified accuracy in Figure 4, comparing PEFTSmoothing with the denoised smoothing under different ablation settings. Ideally, we want to achieve high certified accuracy with low size of trained parameters (upper left part of the graph), which is dominated by PEFTSmoothing with LoRA and Prompt-tuning.

Figure: Figure 5: Certified Accuracy of Prompt-tuning in PEFTSmoothing with Different Prompt Lengths. $\sigma=0.5$
Refer to caption: x8.png

### 5.3 CIFAR-10 Ablation Studies

In this section, we present the results on the ablation studies of PEFTSmoothing with prompt-tuning and LoRA in terms of Prompt Lengths and LoRA Ranks respectively, with the same setup in figure 3. Figure 5 shows the certified accuracy of PEFTSmoothing with Prompt-tuning with different prompt lengths and Figure 6 shows part of the certified accuracy of PEFTSmoothing with LoRA with different LoRA ranks. The certified accuracy doesn’t change much among different prompt lengths and different ranks. Notably, even with as few as only 10 prompts or $rank=1$, PEFTSmoothing still achieves high certified accuracy and remains competitive or even better compared to full fine-tuning and other certified defense methods, indicating the ability to guide the model to learn the noised inputs.

Figure: Figure 6: Certified Accuracy of LoRA in PEFTSmoothing with Different Ranks. $\sigma=0.5$
Refer to caption: x9.png

### 5.4 Black-box PEFTSmoothing

To demonstrate the effectiveness of black-box PEFTSmoothing, we compare the certified accuracy under Gaussian noise scale $\sigma$ equals 0.25 on CIFAR-10 with DnCNN-based denoiser [] and Diffusion-based denoiser [] in Figure 7, which are both certified defenses under black-box settings. As illustrated in the figure, black-box PEFTSmoothing greatly outperforms DnCNN-based denoised smoothing [] with top-1 certified accuracy of 0.83 against 0.6. Meanwhile, black-box PEFTSmoothing can achieve similar performance to diffusion-based denoised smoothing [] since our method has better-certified accuracy at large radius ($\ell_{2}radius>0.4$) and nearly match it at small radius.

Figure: Figure 7: Certified Accuracy of Black-box PEFTSmoothing
Refer to caption: x10.png

### 5.5 Two Birds One Stone

In this section, we present the possibility of integrating the fine-tuning of PEFTSmoothing with PEFT intended for downstream dataset adaptation. As shown in Figure 8, one round of PEFT to achieve both PEFTSmoothing and downstream dataset (blue and red lines) can achieve comparable performance with fine-tuning to the datasets and PEFTSmoothing sequentially (yellow and green lines). Considering the prevailing practice in image classification, where models are commonly fine-tuned from pre-trained ones to adapt to the specific downstream datasets, these results indicate the promising direction of achieving a certifiable robust version of deep learning systems together with downstream adaptations for free.

Figure: Figure 8: Integrating the fine-tuning of PEFTSmoothing with PEFT intended for downstream dataset adaptation
Refer to caption: x11.png

## 6 Related Work

Adversarial attack. goodfellow [] first brought attention to adversarial attacks by introducing the concept of adversarial examples and demonstrating their ability to deceive machine learning models. Later [] found stronger attack methods by introducing optimization-based methods for crafting adversarial examples.

Empirical defense. The most successful empirical defense is adversarial training [; ]. During the training phase, the model is exposed to adversarial examples. Researchers later investigated the effectiveness of adversarial training across different models and proposed ensemble adversarial training []. However, many heuristic defenses were later easily broken by some stronger adversarial attack methods [; ; ; ].

Certified robustness. Certified defense refers to providing provable guarantees on the robustness and reliability of models against adversarial attacks. PixelDP [] can scales to large networks and datasets which is based on a novel connection between robustness against adversarial examples and differential privacy. Randomized smoothing [] is then developed to create a robustness guarantee by modeling the inherent uncertainty in the decision boundaries of the model through incorporating random noise into the input data. Researchers later found different ways to improve the existing randomized smoothing algorithm. [] introduced adversarial training into the training stage. [] tried to regularize the prediction consistency over noise. [; ] studied better robustness of ensemble models over single model. A simple training scheme called SmoothMix [] is then proposed to control the robustness of smoothed classifiers via self-mixup. horvath2022robust [] studied the balance between robustness and accuracy by proposing a compositional architecture. Researchers also considered adding a denoiser before the base classifier to reduce the influence of Gaussian noise on final prediction [; ; ].

Fine-tune. Fine-tuning is a widely employed technique in machine learning, involving taking a pre-trained model and further training it on a specific task or dataset to enhance its performance. However, for nowadays large-scale models, researchers found it time consuming and computational-consuming to tune the whole model [] as they propose Parameter-efficient fine-tuning to emphasize the optimization of model parameters with a focus on resource efficiency, including Prompt-tuning [], LoRA [], Adapter [].

## 7 Conclusion

In this paper, we present PEFTSmoothing to proactively adapt the base model to learn the Gaussian noise-augmented data distribution with Parameter-Efficient Fine-Tuning methods. PEFTSmoothed model can achieve high certified accuracy when applying randomized smoothing procedures. We experimented PEFTSmoothing with different PEFT strategies and compared them with basic randomized smoothing and denoised smoothing. Experimental results indicate that PEFTSmoothing greatly outperforms the existing certified defense methods on CIFAR-10 and ImageNet while significantly decreasing the computational cost of the defense. We further explored the black-box PEFTSmoothing and the possibility of achieving a PEFTSmoothed model along with fine-tuning to adapt to downstream datasets. Extensive experiments demonstrate the effectiveness and efficiency of PEFTSmoothing.

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 6
presentation: 2
questions: Please refer to the weaknesses section.
soundness: 3
strengths: The proposed method combines the advantages of retraining and denoising-based randomized smoothing methods to provide a best-of-both-worlds solution. The black-box approach also makes PEFTSmooting easy to use with multiple different architectures without requiring further customization. 

The experimental results of CIFAR10 beat the current SOTA methods by an impressively large margin. 

The ablation studies, as well as the GradCAM experiments, are quite helpful for understanding the relative advantages of the proposed approach.
summary: In this paper, the authors propose a PEFT-inspired method for adapting pre-trained base models to produce robust classification performance under noise-augmented data. The authors propose a white-box method that augments a trainable layer to a given base model (of various architectures) and tunes its parameters with respect to a Cross-Entropy Loss under noise-augmented labeled data samples. They also provide a black-box approach that uses an AutoEncoder style Coordinator with a frozen encoder and a trainable decoder to denoise/augment the noisy data samples before feeding them to the base model. The black-box coordinator is trained using SPSA with Cross Entropy Loss under noise-augmented labeled data. Finally, the authors also propose a joint fine-tuning and robustifying training that retrains a large model to adapt it to a downstream task while also adapting it to the randomized smoothing noise injection. 

The authors also provide extensive experiments for CIFAR-10 and Imagenet datasets, comparing the proposed methods to other SOTA denoised smoothing methods.
weaknesses: The presentation in the paper needs to improve. The paper assumes a lot of background on PEFT on the reader. Given that most of the results in the paper are based on LoRA, it might be useful to provide a detailed explanation of the setup and training of the LoRA model. Similarly, I would urge the authors to provide a more detailed overview of the four different PEFT approaches considered in the paper. Figure 1 does not adequately explain the PEFT setting. 

The Imagenet results in the appendix are quite a lot worse compared to the Diffusion denoiser. While the authors suggest that this can be attributed mostly to the fact that the diffusion-based denoiser is more powerful for higher-resolution images, is there a smoother trade-off that can be established between the two models? A small discussion on this could be quite helpful.

---

confidence: 3
contribution: 2
initial_rating: 3
presentation: 2
questions: See 'Weaknesses' section for questions.
soundness: 2
strengths: - The fundamental idea of using fine-tuning techniques to improve models' capacities for adversarial robustness is an interesting one.
- The experimental validation is reasonably thorough (though there are issues in the setup).
summary: This work proposes a new approach to the random smoothing approach for making neural networks robust to adversarial perturbation. Rather than retraining models from scratch, this work proposes using parameter efficient fine-tuning (PEFT), typically used to fine-tune language models, to enable models to learn adversarially perturbed data-distributions.

The key contributions are as follows:
- White-box PEFT smoothing, in which a vision model is fine-tuned after perturbing the dataset with gaussian noise.
- Black-box PEFT tuning, in which zeroth-order optimization (specifically SPSA) is used to create a prompt-tuning based method for fine-tuning the model with perturbed data.
- A thorough experimental validation shows that PEFT can be used to efficiently make ViT models more robust.
weaknesses: This work currently has several weaknesses.

- There are several instances when the writing is imprecise. For instance
  - The claim made on lines 144-146 "Theoreticaly, Theorem 2.1 ... with Gaussian noised inputs" is a strong one, and requires either a citation or some kind of rigorous or empirical justification in the paper.
  - Lines 150-156 are also unclear. For instance, the authors should clarify "large-scale vision model ... acquire such potential ...". What does the phrase "acquire such potential" refer to?
  - lines 346-347: "this is mainly due ... especially for high resolution images" is another strong claim that either requires a citation or empirical justification
- It is unclear what the authors mean by "certified." Is it that the PEFT can be used to guarantee the conditions of Theorem 2.1? If so, can the authors provide a formal proof for this? In order to make a claim that a method is 'Certified', a rigorous guarantee must be provided.
- Equation (6) is written poorly and appears to be key to the entire experimental slate (and thus, this paper). Specifically:
  - The expression should be written in terms of indicator functions
  - The use of the '&' is unclear - do you mean the product?
  - The authors state that "certifiedCheck returns 1 if Theorem 2.1 is satisfied". However, the conditions in Theorem 2.1 are all probabilistic in nature. How are the probabilities computed? Specifically, how is $\mathrm{Pr}[F(x+\varepsilon) = c_A]$ computed?

---

confidence: 3
contribution: 1
initial_rating: 3
presentation: 2
questions: See weaknesses.
soundness: 2
strengths: The authors present PEFTSmoothing, a certifiable method to convert large base models into robust versions. They also explore how it can be extended to achieve certified robustness and downstream task adaption with fine-tuning. Black-box extensions are considered. Experiments are shown on large vision models and results show the effectiveness of the approach.
summary: The paper proposes PEFTsmoothing, an approach for teaching the base model to learn the Gaussian noise augmented data for white box and black box certified robustness. Certification results are shown on benchmark datasets.
weaknesses: 1. Lack of novelty. The training objective (4) is not novel, see baselines below. The overall premise of the paper does not seem novel enough for ICLR standards. Combining two well known methods, smoothing and PEFT, does not cross the novelty threshold. There is also a very large literature on certified robustness that the authors do not compare against, see https://sokcertifiedrobustness.github.io/

2. Limited baselines. Compare against and cite the following relevant works:
- S. Srinivas et al., Which Models have Perceptually-Aligned Gradients? An Explanation via Off-Manifold Robustness, NeurIPS 2023
- R. Shao et al., On the Adversarial Robustness of Vision Transformers, TMLR 2022, https://arxiv.org/pdf/2103.15670
- T. Tsiligkaridis et al, Diverse Gaussian Noise Consistency Regularization for Robustness and Uncertainty Calibration, IJCNN 2023, https://arxiv.org/pdf/2104.01231

The datasets are also quite limited and simple so I suggest a more thorough experimental study involving more domain-specific datasets, e.g. WILDS.

3. How far is empirical robustness from certified robustness in your setting? A comparison is needed. Approaches for gradient masking mitigation have been studied. What are the tradeoffs? What about computational complexity?

4. How does the geometry of the loss landscape depend upon the robustness properties of the large vision models you study? These are intimately related based the adversarial robustness literature.

---

confidence: 4
contribution: 1
initial_rating: 3
presentation: 3
questions: see the weakness.
soundness: 2
strengths: 1. This paper is well-written and structured. The method is intuitive and easy for readers to understand.

2. Comprehensive experiments are conducted to demonstrate its effectiveness.
summary: This work proposes a parameter-efficient fine-tuning (PEFT) method to explore the large-scale model's potential to learn the Gaussian noised data pattern, thus enhancing its performance on randomized smoothing. The white-box PEFT and black-box PEFT smoothing methods are proposed for different scenarios. Extensive and comprehensive experiments are conducted to demonstrate the effectiveness of the proposed PEFT method.
weaknesses: 1. My major concern is related to the novelty and significance of this work:

**Novelty**: The white-box and black-box tuning methods in this paper are all existing work. This paper just utilizes the existing PEFT on a large-scale classification model and tests its performance under randomized smoothing. This raises concerns regarding the paper’s technical contribution.

**Significance**: The primary challenge in randomized smoothing (RS) is not training noise-robust classifiers but reducing the extensive inference time required for certification, often involving a majority vote over 10,000 samples. While the paper aims to reduce model training time through PEFT, this does not address the more critical issue of RS's substantial inference delay. This raises concerns about the practical impact of the proposed work.

2. Some experimental settings are unfair:

In Figure 2, it's unfair to compare the PEFT methods with those training-free denoising methods.

In Table 1, clarification is needed regarding the base models used for RS and DS methods. Based on the reported performance, it appears these methods are evaluated using ResNet architectures, while PEFTsmoothing employs ViT-L and ViT-B models.

3. An interesting result is that the LORA-based tuning method outperforms the full fine-tuning-based method. Typically, the performance of parameter-efficient methods could be close to but not surpass the full fine-tuning method. A more detailed analysis of this would be valuable.