{'fraction_non_alphanumeric': 0.037418706211316724, 'fraction_numerical': 0.01460931854598008, 'mean_word_length': 4.622681505034446, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
CARTL: Cooperative Adversarially-Robust Transfer Learning

Transfer learning eases the burden of training a well-performed model from scratch, especially when training data is scarce and computation power is limited. In deep learning, a typical strategy for transfer learning is to freeze the early layers of a pre-trained model and fine-tune the rest of its layers on the target domain. Previous work focuses on the accuracy of the transferred model but neglects the transfer of adversarial robustness. In this work, we first show that transfer learning improves the accuracy on the target domain but degrades the inherited robustness of the target model. To address such a problem, we propose a novel cooperative adversarially-robust transfer learning (CARTL) by pre-training the model via feature distance minimization and fine-tuning the pre-trained model with non-expansive fine-tuning for target domain tasks. Empirical results show that CARTL improves the inherited robustness by about 28% at most compared with the baseline with the same degree of accuracy. Furthermore, we study the relationship between the batch normalization (BN) layers and the robustness in the context of transfer learning, and we reveal that freezing BN layers can further boost the robustness transfer.


Introduction
The immense progress of deep neural networks (DNNs) leads interactions with machines to a new era. In many fields, DNNs achieve high performance, even better than humans. However, training such a model requires a welldesigned network architecture, massive high-quality training data, and extensive computational resources. Obviously, it is impractical for small-scale scenarios due to limited GPUs or insufficient training datasets.
When further implementing DNNs, we are facing more problems. Numerous research efforts have revealed the brittle robustness of DNNs, which hinders their applications in many security-critical scenarios. Previous work on adversarial examples (Szegedy et al., 2014;Papernot et al., 2016a;Moosavi-Dezfooli et al., 2016;Carlini & Wagner, 2017;Kurakin et al., 2017) demonstrated that DNNs can be deceived when given the input with a carefully-crafted perturbation. To solve this problem, adversarial training (Goodfellow et al., 2015;Madry et al., 2018;Kannan et al., 2018) has been considered as a promising defensive approach for improving the adversarial robustness of DNNs. The key idea of these approaches is to generate adversarial examples during model training and add them to training datasets. An extra computational burden, however, is introduced to the model training process.
Regarding the above prerequisites of model training, prior work (Pan & Yang, 2010;Bengio, 2012;Yosinski et al., 2014) proposed transfer learning to obtain highperformance DNN models with significantly reduced efforts. It can greatly ease the burden in the (adversarially) training process, especially for those with limited capabilities. Thus, it has been considered as a promising machine learning as a service (MLaaS) technique in the industry (Liakhovich & Mbemba, 2017;Li & Li, 2018). The idea of transfer learning is similar to the knowledge transfer in the human world, where the knowledge obtained from the source domain is applied to the target domain for improving model performance. For DNNs, the "knowledge" is included in the weights of models. We call the model trained on the source domain the source model and the one for the target domain the target model (Utrera et al., 2021).
So far, most research efforts have mainly been devoted to improving the accuracy of the target model (Kornblith et al., 2019;Utrera et al., 2021;Salman et al., 2020), but neglecting its robustness. The most recent work from Shafahi et al. (2020)  herit the robustness from an adversarially pre-trained source model. However, it suggested only fine-tuning the last fully-connected layer for inheriting robustness, which fails to cover more general scenarios where the target model requires to fine-tune multiple layers in transfer learning (Wang et al., 2018;Utrera et al., 2021).
In this work, we first provide a complete evaluation for the robustness transfer and demonstrate that the robustness transfer is highly affected by the transfer strategy, namely, the number of fine-tuned layers during transfer learning. Specifically, we transfer a robust source model, which is adversarially trained on the source domain, to the target domain while freezing its first few layers. Our evaluation indicates that as the number of fine-tuned layers increases, the target model's accuracy also improves. However, its robustness only improves at the beginning but soon starts to decrease afterward.
Based on the above observation, we find that training more layers enables the target model to adapt to the target domain, which is good for improving accuracy on the target domain. At the same time, modifying more early layers of the source model, which can be seen as a robust feature extractor, reduces the robustness of the target model. To improve this trade-off, we present a new approach, cooperative adversarially-robust transfer learning (CARTL), as illustrated in Figure 1. In CARTL, we consider training a robust feature extractor of the source model, which outputs similar features when given natural inputs and corresponding adversarial inputs, and we call this feature distance minimization. In addition, to further reduce the negative effects caused by the feature differences between natural and adversarial inputs, we propose non-expansive fine-tuning, which is used to control the Lipschitz constant of the network during fine-tuning. We call our method cooperative because it consists of an adjusted adversarial training on the source model side and a constrained fine-tuning on the target model side. We emphasize that CARTL requires no adversarial examples during fine-tuning, which is far more efficient than adversarial training.
Besides, we conduct a study, for the first time to our best knowledge, on the relationship between the batch normalization (BN) layers and the robustness in the context of transfer learning. Our results reveal that selectively freezing BN layers' parameters helps boost the robustness transfer. We conduct extensive experiments on several transfer learning scenarios and observe that the target model freezing affine parameters of BN layers obtains higher robustness with negligible loss of accuracy. We also show that though BN layers' statistics play a crucial role in the robustness transfer, it will degrade the target model's accuracy.
We summarize our main contributions as follows: • Through experimental analysis, we reveal that there is a trade-off between accuracy and robustness during transfer learning, which has been overlooked by prior work. Specifically, the target model obtains higher accuracy on the target domain as it fine-tunes more layers. However, as the number of fine-tuned layers increases, the target model's robustness is greatly affected and eventually severely degraded.
• We propose a new transfer learning strategy, CARTL, for improving the accuracy-robustness trade-off of the target model. Our experimental evaluations on broadlyused datasets show that our design improves the target model's inherited robustness while gaining competitive accuracy on the target domain.
• We also conduct extensive experiments on several transfer learning scenarios to demonstrate that selectively freezing the BN layers can further boost the robustness transfer.

Related Work
Various techniques focusing on defending adversarial examples have been proposed (Papernot et al., 2016b;Papernot & McDaniel, 2017;Song et al., 2018). However, many defenses were still proven to be vulnerable to stronger attacks (Carlini & Wagner, 2017;Athalye et al., 2018;Tramer et al., 2020). Despite the fails of many defenses, adversarial training (Szegedy et al., 2014;Kurakin et al., 2017;Madry et al., 2018;Kannan et al., 2018) is still widely regarded as a promising defense for protecting trained models from adversarial examples and has been extensively discussed (Tramèr et al., 2018;Schmidt et al., 2018;Tsipras et al., 2019;Tramer & Boneh, 2019;Zhang et al., 2019b). Goodfellow et al. (Goodfellow et al., 2015) (Shafahi et al., 2020) gave an evaluation of adversarial robustness in transfer learning. They found that the target model can efficiently inherit the adversarial robustness from an adversarially pre-trained model. However, they only considered the target model that fine-tunes the last layer of the source model while ignoring fine-tuning more layers of the source model.  (Cisse et al., 2017), which forces the weight matrix of each layer to be orthogonal, providing more freedom for training.
We emphasize that our work is orthogonal to prior work on domain adaptation (Shu et al., 2018). In this work, we focus on transferring the adversarial robustness from the source domain to the target domain, while domain adaptation refers to leveraging the source model's knowledge to improve the accuracy of the target model. Besides, recent work (Utrera et al., 2021;Salman et al., 2020) also reveals that an adversarially pre-trained model tends to improve the target model's accuracy. We leave the studies of the connection between the source domain robustness and the target domain accuracy for our future work.

Preliminary
We consider DNN-based classification tasks and define an L-layer feed-forward DNN model: which is parameterized by θ := {θ 1 , . . . , θ L }. We use f k to represent the kth layer of the model f and use f (k1..k2) to represent layers ranging from k 1 to k 2 , i.e., f (k1..k2) := f k2 • · · · • f k1 . We also denote the first k layers as f (k) for shorthand.
To train the model, given a proper loss function L, e.g., cross-entropy loss, we want to find the optimal parameters θ * that minimizes the risk: where D is the data distribution of image-label pair (x, y).
We define data x ∈ [0, 1] d , where d is the input dimension, and define label y ∈ {0, 1, . . . , C − 1}, where C is the number of class labels.

Adversarial Examples & Adversarial Training
Most adversarial example attacks consider an p -norm constrained optimization problem that can be generalized as: The hyper-parameter guarantees that the perturbation δ is imperceptible. In our work, we consider ∞ -norm-based attacks  and let = 8/255.
We follow  defining the adversarial training as a saddle-point problem that aims to minimize a variant of the training risk: The inner maximization problem can be approximated by an iterative version of Eq.
(3), known as the projected gradient descent (PGD). The method can be summarized as: where α is the step size. For ∞ -based perturbations, the projection Π clips the noise δ to the interval [− , ]. Compared with single-step attacks, PGD achieves higher error rates since it tends to find the global maxima of Eq. (3). In the following sections, we represent the N -step PGD attack as PGD-N .

Lipschitz Constant
The Lipschitz constant defines an upper bound of the function's slope. If we can find such an upper bound, we call the function Lipschitz continuous, and formally, it can be described as where Λ is the Lipschitz constant. Specifically, we call a function non-expansive when Λ ≤ 1. Intuitively, if a function is non-expansive, the deviation of its output is no more than the perturbation on its input. Recall Eq.
(1), a DNN model is stacked in a layer-wise manner. From the Lipschitz continuity perspective, we have where Λ i is the Lipschitz constant of the ith layer. We can observe that the Lipschitz constant of the whole model is a product of each layer's Lipschitz constant. When the layers' Lipschitz constants are more than one, a little change of the input may be amplified during forward propagation and result in misclassification (Lin et al., 2019). The above inequality also implies that we can mitigate the vulnerabil-

Transfer Learning
The main idea of transfer learning is to transfer "knowledge" from a pre-trained source model to a target model for solving target domain tasks. In deep learning, a widely-adopted method for transfer learning is that the target domain tasks copies the whole pre-trained model from the source model, refines the architecture, typically adjusting the last fullyconnected layer, and fine-tunes the last k ∈ {1, . . . , L} layers (Wang et al., 2018;Utrera et al., 2021). Formally, it can be formulated as An illustration of transfer learning is depicted in Figure 2. Intuitively, we can view the output of the first frozen L − k layers as the extracted features of the input x, while the fine-tuned part of the target model is a sub-model that directly takes as input those features. During transfer learning, we reuse the powerful feature extractor of the source model (green solid lines) and adapt the sub-model (blue dashed lines) for the target domain task.

Problem Statement
The previous work of Shafahi et al. (2020) gave an empirical analysis of robustness transfer. However, their exploratory experiments put less attention on the accuracy. Besides, they mainly considered a strategy that all layers but the last fully-connected layer are frozen, which does not cover more general cases. In this work, we study how both the robustness and accuracy transfer while the last k layers are fine-tuned.
To see the effect of fine-tuning on the robustness and accuracy, we adversarially train a Wide-ResNet (WRN) 34-10 (Zagoruyko & Komodakis, 2017) on CIFAR-100 and a WRN 28-4 on CIFAR-10 as source models, then transfer them to CIFAR-10 and SVHN, respectively. The source models are trained with PGD-7, and the perturbation is constrained in an ∞ ball with a radius of = 8/255. During transferring, we break the source models into blocks and fine-tune them in the unit of blocks (e.g., two layers at once for a WRN block). Then we report the adversarial robustness of the target models against the PGD-100 attack. We emphasize that our settings are different from the exploration in (Shafahi et al., 2020), where the last k blocks were instead fine-tuned on the source domain. Figure 3 illustrates how both the accuracy and robustness are affected during transfer learning. As can be seen, only retraining the last fully-connected layer fails to guarantee high accuracy for target domain tasks. Besides, the insufficient accuracy also results in lower robustness. If we further fine-tune the last few layers, the model accuracy is increased together with the increased robustness. We attribute this phenomenon to the increment of the accuracy of natural inputs. The accuracy is continuously increased while we fine-tune more layers, but the robustness quickly drops and ends with negligible. The results demonstrate there is a trade-off between the target model's accuracy on the target domain and its robustness inherited from the source model. Besides, simply fine-tuning the last few layers does help the target model inherit the accuracy and robustness in a low cost.
Furthermore, besides the above observations, it is natural to raise another question: Can the target model obtain high accuracy while inheriting more robustness from the source model?
To answer with this question, we propose a novel strategy for transfer learning, which further improves the accuracyrobustness trade-off during transfer learning.

Our Design: CARTL
In this section, to cope with the question raised in Section 4, we propose a new approach, cooperative adversarially-1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16   robust transfer learning (CARTL), to improve both the robustness and accuracy of the target model. We divide layers of a robust source model into two parts during transfer learning according to whether they will be retrained. We take the frozen part as a feature extractor like (Utrera et al., 2021), and we propose that it outputs similar features if given natural examples and corresponding adversarial examples. As for the trainable part fine-tuned on the target domain, we aim to reduce the classification error caused by the differences between the features extracted from natural and adversarial inputs. Without loss of generality, we assume that the target model fine-tunes the last k layers and freezes the first L − k layers during transfer learning. We introduce our scheme, starting with training the source model.

Feature Distance Minimization
Our intuition is that if a specific layer of a model extracts similar features from two inputs, the subsequent layers tend to classify the inputs into identical classes, even they have different labels (Wang et al., 2018). Hence, we consider making the frozen part of the source model a robust feature extractor that can output similar features given natural examples and the corresponding adversarial examples. To do so, we propose feature distance minimization (FDM) to reduce the dissimilarity of the extracted features. Specifically, for the first L − k layers that take as input x and output intermediate features f (L−k) (x), FDM adds a penalty term to the training loss for two different inputs x andx: Here, λ is the hyper-parameter controlling the strength of the FDM penalty term, and D is a distance metric measuring the dissimilarity between two features. L AT is the loss function used during adversarial training, andx is the adversarial example corresponding to the natural example x.

Non-Expansive Fine-tuning
The source model trained with FDM outputs similar features if both natural and adversarial examples are given. However, considering the previous discussion in Eq. (7), the little dissimilarity between the features may be still amplified during propagation in the rest of the network, leading to misclassification. To improve the target model's robustness, we propose to suppress such the amplification effect via controlling the network's Lipschitz constant.
We start with the basic linear layer that can be expressed as x l+1 = W l x l + b l , where W l ∈ R dout×din and b l ∈ R dout . It is straightforward that the bias b l does not affect the Lipschitz constant. Thus, the Lipschitz constant of the linear layer is determined by W l . Since the Lipschitz constant is upper bounded by the spectrum norm of W l , i.e., its maximum singular value (Szegedy et al., 2014), similar to the spectrum normalization (Miyato et al., 2018), we divide weights W l of last k layers by their spectrum norm σ(W l ) as W l * := β · W l σ(W l ) , (l = L − k + 1, . . . , L). (11) We also emphasize that different from the naive spectrum normalization, we add a hyper-parameter β ∈ (0, 1] for For the convolutional layer, we flatten each filter into a vector with C in ·K ·K dimensions, where C in is the number of input channels, and K is the size of the convolution kernel. We further stack the vectors forming a C out -row matrix, where C out is the number of output channels. Hence, we transform the weight matrix as W ∈ R Cout×(K 2 ·Cin) . As for the aggregation layer in the residual network (He et al., 2016), which adds the predecessor layer's output with the shortcut connection's output, we instead modify it to a convex combination of its inputs (Cisse et al., 2017) and manually set the weights be 1/n, where n is the number of its inputs.

Rethinking Fine-tuning BN Layers
During our evaluation, we find a strong connection between the BN layer and the transferred robustness. Before presenting experimental evaluations of CARTL, we first investigate how the BN layer affects the target models' robustness in this section. Specifically, we find that selectively freezing the BN layers of source models improves the transferred robustness of target models and generally brings little negative impact on their accuracy.
We first simply recap the basis of the BN layer. In current implementations of the BN layer 1 , it usually consists of four parameters, including two running statistics µ and σ, and two affine parameters W and b. Typically, a BN layer can 1 E.g., PyTorch, TensorFlow.
be expressed as During training, both the running statistics µ and σ are updated with a momentum based on batch's statistics (i.e., mean and var), while W and b are updated via the gradient descent. During inference, BN layers normalize the activation with running statistics instead of batch's statistics.
To see the effect of BN layers in transfer learning, we divide all BN layers of a source model into two sets according to whether they are in the frozen feature extractor or the finetunable sub-model (see Section 3.3). In total, we consider four cases regarding the BN layers, including updating or freezing source model's running statistics (i.e., µ and σ) in the frozen feature extractor, and fine-tuning or freezing source model's affine weights (i.e., W and b) in the submodel. For other cases, we note that both W and b in the feature extractor are naturally frozen in transfer learning, and we also find that freezing running statistics µ and σ in the fine-tunable layers makes the target model hard to converge.
We conduct experiments on several transfer learning scenarios where robust models are naively transferred to target domains, and we present the results in  that merely freezing the BN layers' affine parameters does not aggressively decrease the accuracy while improving the robustness. In addition, reusing the running statistics of the BN layers in the frozen feature extractor plays a crucial role in robustness transfer, e.g., transferring from CIFAR-10 to SVHN. However, it tends to bring more negative effects to the accuracy, especially when transferring from CIFAR-10 to GTSRB. We note that our findings corroborate the recent studies Xie et al., 2020), which argue that the BN layers highly relate to robustness.

CARTL Evaluation
In this section, we present the experimental results of CARTL compared with the vanilla method and Shafahi's work (2020). We conduct a detailed experimental analysis for the scenario of transferring from CIFAR-100 to CIFAR-10. Besides, more scenarios are also tested to demonstrate the generality of CARTL. We report the robustness of target models under the PGD-100 attack. For more details about experiment settings, please refer to Appendix C, and our codes are available on GitHub 2 .

Improved Robustness-Accuracy Trade-off
Shafahi et al. (2020) noticed that merely retraining the last layer maintains the robustness of the source model but results in low accuracy on the target domain. To cope with this problem, they proposed an end-to-end fine-tuning method with learning without forgetting (LwF) 3 . In addition to LwF, we also consider the vanilla method, which refers to simply fine-tune the last few layers of a robust source model on the target domain without additional techniques. Source models for both LwF and the vanilla method are adversarially trained with . trade-off achieved by CARTL in comparison with LwF and the vanilla method. It is shown that to obtain high accuracy, LwF significantly degrades the target model's robustness (close to 0%). Moreover, LwF improves the robustness of the target model but aggressively harms its accuracy on the target domain. On the other hand, both the vanilla method and CARTL maintain higher robustness in the case of an equivalent level of accuracy, demonstrating a better robustness-accuracy trade-off. Moreover, our method CARTL further improves the accuracy-robustness trade-off on the target domain during transfer learning. Specifically, it improves the robustness by about 28% compared with LwF when the accuracy is about 90%.
We also notice that a peak point appears in both curves of CARTL and Vanilla. This phenomenon is in line with the observations in Section 4 that the target model's robustness increases when the last few layers are fine-tuned. It implies that there may exist a potential optimal configuration of k for transfer learning, and we leave the corresponding searching strategies for our future work. In this subsection, we evaluate how hyper-parameters of CARTL affect the accuracy and robustness of the target model.
First, we test the effect of increasing the number of retrained layers. We report both the target model's accuracy and robustness when fine-tuning the layers of the last 4, 6, and 8 blocks of WRN 34-10, which are denoted as Case-k, and k = 4, 6, 8. When we increase the number of retrained blocks, the accuracy generally rises from ≈ 86% to ≈ 91%.
As for the robustness, CARTL exhibits similar trends to the vanilla method, achieving higher robustness at Case-6.
We further investigate how the hyper-parameter λ affects both the accuracy and robustness of the target models. We observe that for all cases, a smaller λ helps robustness transfer, especially for the Case-8. On the other hand, we can see that reducing λ cast slight negative impacts to the accuracy of target models.
Finally, we evaluate the best choices for the hyper-parameter β. Recall that in Eq. (11), we divide weights of fine-tuned layers by their largest singular value while multiplying a scalar β for further scaling their Lipschitz constants. For example, if we let β = 0.4, the Lipschitz constants of all fine-tuned layers are reduced to about β 2 = 0.16. We can see that reducing Lipschitz constants significantly improves the target models' robustness from 17.62% to 29.34% but brings a negligible negative impact to the accuracy.

Ablation Studies
To test the effect of each component of CARTL on the accuracy and robustness of the target model, we replace part of the components of CARTL with the vanilla method while training the source models and fine-tuning the target models. In Table 3, the first row presents the results using the vanilla method, which is used as the baseline. Recall that the vanilla method is consisted of simply adversarially training the source model with , denoted as AT, and directly fine-tuning the source model on the target domain, denoted as TL. For the second row, we transfer an adversarially trained model with NEFT, and the last row presents the results achieved by CARTL.
We can see that fine-tuning the target model with NEFT significantly increases its robustness by observing the first and second rows. Besides, FDM further improves the robustness except for the Case-8. We attribute this to the reason that with the increasing number of fine-tuned layers, the effect of constraining the features' distance (i.e., FDM) is reduced. On the other hand, the Lipschitz constraint (i.e., NEFT) plays a more important role when we fine-tune more layers. As can be seen from the last column, the robustness increases from 18.54% to 29.97%. Finally, we find that by using FDM, the target model's accuracy slightly rises in all cases.

Transfer to Smaller Dataset
In this subsection, we do additional experiments to test the effect of data size on the target model's performance. For the target domain, CIFAR-10, we fine-tune target models on subsets with the sizes of 50%, 20%, and 10%. To mitigate bias, the number of training data for each label is equal. We summarize and plot the results in Figure 5. Fine-tuning the last six blocks with CARTL maintains better accuracy in all cases, and CARTL provides outstanding robustness except on the extremely small training set. However, CARTL still slightly outperforms the vanilla method in that case. In comparison, LwF relatively results in the lowest accuracy and robustness in all cases. Generally speaking, CARTL provides a better accuracy-robustness trade-off for small datasets.

Studies on Extra Scenarios
To demonstrate the generality of CARTL, we conduct experiments in scenarios including transferring from CIFAR-100 to SVHN, from CIFAR-100 to GTSRB, from CIFAR-10 to SVHN, and from GTSRB to SVHN. According to Table 4, we can see that the target model fine-tuned with CARTL inherits superior robustness from the source model. Besides, CARTL provides comparable accuracy against the vanilla method. Table 4 demonstrates that CARTL can universally improve the accuracy-robustness trade-off. As for LwF, it leads to lower accuracy on the natural inputs and fails to guarantee the robustness transfer. In all scenarios, LwF obtains the lowest robustness.

Conclusion & Future Work
In this work, we have revealed the trade-off between the robustness and the accuracy of the target model transferred from an adversarially-trained source model. From our observation, we have proposed CARTL, which consists of feature distance minimization and non-expansive fine-tuning, to help the target model inherit more robustness from the source model while maintaining high accuracy. We have also found that freezing all batch normalization layers' affine parameters can further improve the transferred robustness. We hope our work brings insights to enable the following researchers to build a more robust and accurate model in the transfer learning scenario.
As our future work, we would like to solve the limitation that FDM requires pre-training the source model with an explicitly defined k. Other interesting directions include improving the effect of robustness transfer further and considering more security threats against DNNs.

A. Spectrum Normalization
In this section, we briefly recap spectrum normalization (Miyato et al., 2018) for NEFT.
Without loss of generality, we define a linear function f (x) = W x + b, where W ∈ R m×n and b ∈ R m×1 . The Lipschitz constant of f is upper bounded by its largest singular value σ(W ), i.e., the largest eigenvalue of W T W . Because directly calculating σ(W ) is costly, we can use an iterative method to approximate it. To do so, we define two vectors, u ∈ R m and v ∈ R n , and iteratively calculate σ(W ) by To constrain the Lipschitz constant of f to be one, we divide W by σ(W ).
B. Details of LwF (Shafahi et al., 2020) This section introduces LwF (Shafahi et al., 2020), which is considered as one of our baselines. In LwF, Shafahi et al. (Shafahi et al., 2020) fine-tune all layers of the source model while reducing the difference between the penultimate layer outputs of the target model and the source model. The loss of LwF can be expressed as L LwF := L CE (f (x; θ), y) where θ 0 is the original parameters of the source model, and θ is the target models' parameter. The hyper-parameter λ d controls the trade-off between the target domain accuracy and the inherited robustness. In Figure 4, we follow the settings in (Shafahi et al., 2020) where λ d = 0.1, 0.01, 0.005, and 0.001, and we provide detailed results in Table  5. For other results of LwF (i.e., Table 4, Figure 5), we let λ d = 0.1, where it achieves best transferred robustness.

C. Experiment Settings
In this section, we provide the experiment settings for our evaluations.
• We adopt SGD with a momentum of 0.9 as the optimizer for training all models. The learning rate is initialized as 0.1 and decays at epoch 40, 70, and 90 by a rate of 0.2. We train models with a batch size of 128 and set the training epoch as 100. Similar settings are also applied during transfer learning.
• We set the number of iterations for the spectrum normalization to be one to avoid introducing extra computational overhead, and the experimental results demonstrate a perfect approximation.
• In the model evaluation, we report both the accuracy and robustness of the trained model on the entire test set. Specifically, for the robustness evaluation, we adopt the PGD-100 attack implemented by Foolbox 4 , an adversarial attack framework, with the step-size of 2/255 and = 8/255.
• When we transfer robust source models to the target domain with CARTL and the vanilla method, we freeze all BN layers' affine parameters, including the feature extractor and the sub-model.
• The network architectures used in Section 6 are detailed in Table 6.