Manuscript Offprint
arXiv:2611.07474Adversarial Robustness of Kernel Machines: A Comprehensive Analysis
Abstract
Kernel machines are an important class of models in machine learning. However, the question of how robust modern kernel machines are to adversarial examples has not been studied comprehensively. In this paper, we provide a thorough empirical investigation of the adversarial robustness of kernel-based models for both binary and multiclass classification tasks, via white-box and black-box evasion attacks. We evaluate the native robustness of kernel machines, random feature classifiers, and the relatively newer Recursive Feature Machines. In addition, we provide an algorithm for approximate adversarial training of kernel machines. Our experiments on classification tasks on image and tabular datasets strongly indicate that kernel machines are natively more robust than neural networks, i.e., their performance degrades more gracefully against adversarial perturbations.
Contents
| 1 Introduction | 2 |
|---|---|
| 1.1 Main findings | 4 |
| 1.2 Prior work on robustness of KMs | 4 |
| 2 Preliminaries | 5 |
| 2.1 Adversarial examples | 6 |
| 2.2 Kernel-based models | 6 |
| 3 Main Experimental Results | 7 |
| 3.1 Setup Summary | 7 |
| 3.2 KMs are more robust than neural nets | 8 |
| 3.3 RFMs are nearly as robust as base KMs | 9 |
| 3.4 Robustness of RFCs increases with number of random features | 9 |
| 3.5 Robustness of KMs is comparable with adversarially trained neural networks | 9 |
| 4 Adversarial training of kernel classifiers | 10 |
| 4.1 Convex approximation for binary classification | 10 |
| 4.2 Nonconvex approximation for multiclass | 11 |
| 4.3 Evaluation of adversarially trained KMs | 12 |
| 5 Discussion | 12 |
| 5.1 Summary of Ablations | 12 |
| 5.2 Are KMs more robust point-wise? | 13 |
| 5.3 Limitations | 13 |
| 5.4 Future Work | 13 |
| A Further Technical Details and Setup | 17 |
| A.1 Gradient-free (black-box) attacks using SPSA | 17 |
*Correspondence to pandit@iitb.ac.in and arjunp@iitb.ac.in
A.2 Attacks on Tabular datasets using CaFA ..... 18 A.3 Kernels preliminaries ..... 18 A.4 Adversarial training of NNs ..... 19 A.5 Adversarial training of Kernel Machines ..... 19
B Detailed Experimental Setup 19 B.1 Kernel Machines training details ..... 19 B.2 Neural Networks training details ..... 20 B.3 Attacks ..... 20 B.4 Adversarial training of neural networks ..... 20 B.5 Adversarial training of KLR ..... 21 B.6 vs. robustness of Matérn Kernels ..... 22 B.7 Computational efficiency details ..... 22
C Detailed Experimental Results 23 C.1 Adversarial Robustness under and Perturbations ..... 23 C.2 Linf summary for KMNIST/QMNIST vs FCNN and LeNet ..... 23 C.3 Comparison of KMs with FCNN and LeNet ..... 29 C.4 Laplacian Results for FMNIST, KMNIST, QMNIST ..... 30 C.5 Gaussian Results for FMNIST, KMNIST, QMNIST ..... 56 C.6 Kernels on SVHN and CIFAR-10 ..... 83 C.7 WideResNet vs LeNet ..... 88 C.8 KMs and adversarially trained KMs vs adversarially trained nets ..... 89
D Further Ablations 93 D.1 Results for gradient-free (black-box) attacks ..... 93 D.2 Robustness on Tabular datasets ..... 102 D.3 Results for Matérn Kernel versus robust accuracy ..... 103 D.4 Robust Accuracy variation with iteration in RFMs ..... 104 D.5 Robust Accuracy variation with length scale () ..... 105 D.6 Robust Accuracy variation with ridge () ..... 107 D.7 Number of features in RFC versus robust accuracy ..... 108 D.7.1 FMNIST Results for Gaussian RFC ..... 108 D.7.2 KMNIST Results for Gaussian RFC ..... 110 D.7.3 QMNIST Results for Gaussian RFC ..... 112 D.7.4 FMNIST Results for Laplace RFC ..... 114 D.7.5 KMNIST Results for Laplace RFC ..... 116 D.7.6 QMNIST Results for Laplace RFC ..... 118
In that light, we revisit the question of whether there exists a class of models that is inherently more robust than neural networks. Kernel Machines (KMs) (§2.2) are a popular class of ML models which are seeing a renewed interest, following results showing that in certain regimes, NNs are approximated by KMs [19]. In this paper, we empirically compare neural networks and kernel machines, seeking an answer to:
Is there a hierarchy of adversarial robustness (possibly dataset dependent) between function classes?
Table 1: Overview of datasets, models, and attacks compared in this paper.
| Choices | Image data | Tabular data |
|---|---|---|
| Datasets | FashionMNIST, KMNIST, QMNIST, SVHN, CIFAR-10 | Adult, Phishing, BankMarketing |
| Models | CNN, FCNN, FCNN-Adv, KRR, KLR, KSVM, RFC, RFM, Adv-KLR | FCNN, KRR, RFM |
| Attack | , -balls with white-box (autoattack), black-box (spsa) | -ball with cafa |
In other words, are some classes of models fundamentally harder to attack for a test-time adversary?
Three popular versions of kernel machines exist with different qualities: (i) the standard KMs trained using kernel ridge regression (KRR), Kernel Support Vector Machines (KSVM) or Kernel Logistic Regression (KLR), (ii) Random feature classifiers (RFCs) which approximate KMs in a scalable manner [33], and (iii) Recursive Feature Machines (RFMs) which enhance performance via feature learning [32]. Apart from performance in terms of accuracy, other important properties of KMs such as adversarial robustness have received little attention [40].

Figure 1: Test for robustness as a pointwise property. We plot the empirical CDF of the ratio (KLR/other models) of the smallest perturbations needed to successfully attack 388 random samples which were classified correctly by all the models from the test set of FashionMNIST. Note the x-axis is in log-scale. See §5.2 for more details.
For most samples, KRR is harder to attack than the FCNN. For the median datum, KLR is more robust than Adv-FCNN and Adv-LeNet. The adversarially trained FCNN, LeNet and KLR were trained with an (matched) adversary with a budget of . Adversarially trained KM remains most robust. In the case of FMNIST, KRR and RFM overlap. We have used Gaussian KLR, Laplacian KRR, and Laplacian RFM.
We present a thorough empirical comparison of the robustness of different kernel-based classifiers (See Table 1A in the Appendix for abbreviations.)¹: KMs, RFCs, and RFMs against fully connected neural networks (FCNNs) and convolutional neural networks (CNNs), namely LeNet-5 [24] and WideResNet-28-10 (WRN-28-10) [50], as well as their robustly trained variants across 8 datasets and several different attacks (Table 1). We provide a fine-grained analysis at 3 levels: (i) robust accuracy, which is the aggregate behaviour across the test dataset across all classes, (ii) one-v-one robust accuracy, which breaks down the robust accuracy across binary classification tasks, and (iii) pointwise robustness, which estimates the distance of an individual datum from the decision boundary.
While the adversarial training of KMs is a challenging non-convex problem, we derive an approximate
¹Code at https://github.com/irohs-lab/robust-kms/tree/main.
formulation for the case of Lipschitz loss functions (§4). For binary classification this is a convex formulation, however for multiclass problems this yields a minimization problem of a convex function over rank-1 matrices, which is a non-convex domain. We provide an iterative algorithm for training these models along with an empirical analysis.
1.1 Main findings
Kernel machines are more robust than neural networks (§3.2): The robustness of KMs degrades more gracefully than NNs as the attack budget increases. KMs are consistently more robust than NNs trained in the standard fashion, i.e. without adversarial training. In some cases, the difference is up to 40 percentage points in multiclass classification tasks and 70 percentage points in binary classification tasks, with KMs providing near equivalent performance on clean data (Fig. 2).
Recursive Feature Machines retain the robustness of the initial KMs (§3.3): RFMs are a variant of KMs equipped with feature learning. Our experiments show that RFMs retain nearly all of the robustness of their native KMs, but their robustness can degrade with additional iterations of feature learning.
Random Feature classifiers can be robust at a sufficiently high number of features (§3.4): RFCs are a scalable approximation to KMs which can match their performance in terms of zeroth order metrics such as generalisation error and accuracy. We observe that increasing the number of random features consistently makes these models more robust, except in the case of Laplacian RFCs trained using square loss. This behaviour is stable for Gaussian RFCs whereas it exhibits a large variability for Laplacian RFCs, in part due to the heavy tailed nature of the weight matrices appearing in the Random Fourier map for the Laplacian kernel.
Kernel Machines can be nearly as robust as adversarially trained NNs (§3.5): On certain datasets, KMs, even without adversarial training, have a robustness profile similar to adversarially trained NNs. While this does not hold across all datasets and training budgets, it is a surprising finding even with these caveats. Their robustness can be further improved using our approximate adversarial training method, providing high robust accuracy even under powerful attacks.
Higher robustness of KMs is likely a point-wise property (§5.2): It is instructive to understand, on a per-sample basis, how far a particular data point is from the classification boundary. For a median datum, we find that KLR is more robust than adversarially trained FCNN on FashionMNIST. We use bisection coupled with AutoAttack [11] to find the boundary distance empirically.
In Appendix D, we carry out extensive ablations. We first (i) check for the presence of gradient masking, and (ii) evaluate our models on tabular datasets. We also ablate over kernel classifier parameters such as the (a) smoothness parameter in the Matérn kernel, (b) RFM iterations, (c) length scale (), (d) ridge penalty (), and (e) number of features used in RFC. Overall, this paper motivates further rigorous analyses of the robustness of KMs. It is interesting that interpolation or near-interpolation on training data, which is the behaviour of KRR, may not be at odds with adversarial robustness with respect to test data. In future work, a satisfactory theoretical result would provide a pointwise gap between the margins of KMs and NNs, which could perhaps be due to a flatter loss landscape for the adversary to climb out of.
1.2 Prior work on robustness of KMs
The problem of the robustness of kernel-based classifiers has received some limited attention. However, a comprehensive comparative analysis of the adversarial robustness of this class of models across the 3 variants- KMs, RFC, and RFM, listed above has not been carried out before.
Robustness to contamination: KMs with outlier-resilient loss functions have been studied. These include the Cauchy loss [43], Huber loss [41], loss [39], among others [13]. For example, Li et al. [26] show robustness to label noise for KMs with the Neural Tangent Kernel [19] trained using early stopping.

Figure 2: Summary of results for the multiclass FashionMNIST dataset. We compare robust accuracy of 13 models (3 adversarially trained, 10 benign) on FashionMNIST (10 classes). Columns with yellow borders correspond to adversarially trained models with training adversary's attack level highlighted by the red row. Black boxes mark the best robust accuracy across each row. Note the best models for high are kernel machines with logistic loss.
Test-time perturbations against kernel machines: Xu et al. [47] showed that KSVMs are robust to point-wise uncertainty at test time, by using an upper bound to the hinge loss with a regularized variant. However, they do not provide any empirical evidence of robustness, and only operate with perturbations in feature space. Hassani and Javanmard [17] carried out a theoretical analysis of the robustness of random feature maps in the overparametrized setting, and show that overparametrization hurts robust generalization in a proportional asymptotic regime where . However, this analysis is more attuned to understanding the RF approximation of KSVMs. Wu et al. [44] provide a method to adversarially train KMs in feature space via doubly stochastic gradients over a convex upper bound of the adversarial loss on the RFC approximation. In the work closest to ours, Wang [40] analyses the empirical robustness of kernel SVMs trained with the linear and Gaussian kernels, and finds they are not robust. Han and Rubinstein [16] study gradient-descent evasion attacks on Gaussian SVMs and find that carefully reduced kernel smoothness substantially increases robustness. We find that KLR, KRR and KSVM with the Laplacian kernel, and the Gaussian kernel, with proper tuning, are robust.
2 Preliminaries
We focus on the setting of multiclass classification with classes. For , let be a model associated with a classifier for . Note are the logits for a test sample , and , the logit, for . The loss function is represented as .
2.1 Adversarial examples
At a point , we say is an adversarial perturbation within a -budget of if, and .
We also call an adversarial example. A popular class of methods for finding adversarial perturbations [8, 14, 28] is to solve the following non-convex optimisation
for some loss function L, using a local search method.
The typical choice for is the cross-entropy loss. Note that even though may be convex for all , the is not convex in general, unless of course is linear in its input . In this paper we focus on models that are nonlinear in the input such as NNs and KMs. Note KMs, Eq. (2), are linear in the parameters , not in the input .
Tools for finding adversarial perturbations (also called attacks) are classified based on whether they provide the adversary input-output access , called black-box [6, 27] attacks, or access to the implementation of , called whitebox attacks. Most white-box attacks, typically solve Eq. (1) approximately via an iterative first order method starting from . In this paper we use a popular tool for white-box attacks: AutoPGD [11] which adaptively selects the step size for the non-convex optimisation in Eq. (1). Athalye et al.[2] recommend also evaluating with black-box attacks to ensure there is no inadvertent gradient masking. We use SPSA [36, 38] (details in §A.1). On tabular data, we use the Cost-aware Feasible Attack (CaFA) [5] which ensures input validity.
2.2 Kernel-based models
For a compact domain , let be a kernel, i.e., a bivariate positive definite map. For a collection of vectors , we denote the kernel matrix with .
Kernel machines (KM): A kernel machine is a model with parameter , and takes the form
where . This class of models are of interest in machine learning because the representer theorem [34] tells us that any solution to a non-parametric statistical estimation problem,
with , must have the form in Eq. (2). Here the search space is the reproducing kernel hilbert space (RKHS) corresponding to . Note here that is an arbitrary loss function, and is any increasing regularization function. We refer the reader to [18, 35, 37] for a review of kernel machines. We note that the case of , calls for the use of so-called vector valued RKHSs corresponding to vector valued kernels , such that is a matrix and is a symmetric positive definite matrix with blocks. However, in what follows, we have considered . We train KMs using the square loss (Kernel Ridge Regression), hinge loss (Kernel Support Vector Machine) and logistic loss (Kernel Logistic Regression) (§A.3).
Derivatives: We define . Similarly , and . Observe that , and . We use these for adversarial training of kernel machines later in §4.
Recursive feature machines (RFM): A new family of kernel machines was proposed by [32] where the kernel function was parameterized by a positive semidefinite matrix as , where is the unique symmetric square root matrix of a positive semidefinite matrix , and is some base kernel. The RFM is the model Eq. (2) with replaced by , and the trainable parameter in RFMs is updated recursively using the average gradient outer product (AGOP) of the model, using the training data
where denotes the model in Eq. (2) with kernel , and obtained by solving Eq. (14) with , and is the Jacobian. RFMs provide the model a property formally studied as feature learning, which is natively absent in KMs. RFMs are state of the art for certain tasks, such as prediction on tabular datasets [3].
Random feature classifiers (RFCs): Kernel machines for a large class of kernels can be learned via the so-called random features approximation [33, 20, 49]. This approximation makes inference independent of the size of the dataset , unlike Eq. (2), which may become prohibitive for tasks with large datasets. If has a special form
then Eq. (2) can be approximated as , where , the vector , and the rows of are i.i.d. samples from , where depend on . Several classes of kernel functions such as the Gaussian and Laplacian kernel, can be approximated in this manner.
3 Main Experimental Results
Our goal is to test whether kernel-based classifiers, in any of the 3 variants described above, are more robust than neural networks, whether fully connected or convolutional. A summary of the settings considered is in Table 1. Our key findings are i) KMs are more robust than both FCNNs and CNNs (LeNet) on average (§3.2) and point-wise (§5.2); ii) RFMs are nearly as robust as KMs (§3.3); and iii) RFCs become robust with an increase in the number of features (§3.4). These results are captured succinctly in Figs. 1A, 2, 4A and 5A for the case of and attacks on the FashionMNIST, KMNIST and QMNIST dataset.
3.1 Setup Summary
We briefly summarise our experimental setup here. All experiments were run on a cluster with 8 NVIDIA RTX 6000 GPUs. All further details on hyperparameter searches and attack budgets used are in §B.
Datasets: Our experiments for image data are with FashionMNIST [46], KMNIST [9], QMNIST [48], SVHN [31] and CIFAR-10 [22]. For tabular data, we use the Adult [4], Bank Marketing [30] and Phishing [29] binary classification datasets.
Choice of best model to attack: We define the best model to be the one with the highest benign accuracy on the validation set, across all tunable hyperparameters.
Measurements and comparisons: We measure the robust accuracy of a model given via
using a plug-in estimator for and commonly used search criteria for finding . We report robust accuracies for both settings - multiclass classification and binary classification. For a class classification problem we have binary classification problems, which allow us to provide a fine-grained analysis.
Kernel machines: We consider kernel machines trained using kernels from the Matérn family (§A.3), of which both the Laplacian and Gaussian kernels are a part. KMs considered in this section were trained using kernel logistic regression (KLR), kernel ridge regression (KRR) and kernel SVM (KSVM), with . KLR uses the cross-entropy loss, KRR uses the square loss and KSVM uses the hinge loss. For KRR and KSVM, we tuned the length scale and the regularisation strength by grid search. For KLR, we searched over length scale and learning rate. Detailed results for the Laplacian () and Gaussian () kernels are in Appendix C.
RFCs and RFMs: The RFCs were trained using the square loss as well as the cross-entropy loss, each with ridge regularisation. For RFMs, the matrix is set adaptively rather than fixed to (§2.2), and the models were trained with the square loss. The RFMs were tuned for up to 5 iterations, with search over length scale and regularisation strength being the same as in KRR.
Neural networks. We train both fully connected neural networks (FCNNs) and Convolutional neural networks (CNNs). For the latter, the modified LeNet5 (using ReLU activation and max-pooling layers) [24], and WideResNet-28-10 [50] architectures were used. Runtime comparisons are in Table 3A.
Attacks: For a rigorous evaluation of robustness, and so as not to fall into common pitfalls [7], we use two different white-box attacks, as well as a black box attack. In all cases, we use the cross-entropy loss. In the white-box case, we consider both i) a fixed iteration projected gradient descent (PGD) attack [28] and ii) AutoAttack, using apgd-ce [11, 12] (the standard in benchmarks such as RobustBench [10]), and report the lower of the two robust accuracy numbers.
3.2 KMs are more robust than neural nets
For multi-class classification problems, we see that the robustness of both Laplacian and Gaussian KRR degrades more gracefully than that of both FCNNs and LeNets (Figs. 1A, 2, 4A and 5A), particularly in the case of FMNIST. A comprehensive evaluation for all the 1v1 sub-problems for FashionMNIST, KMNIST and QMNIST is presented in Figs. 11A and 36A, which clearly establishing that, as the attack budget increases for both and attacks, kernel machines are more robust in a majority of cases. These demonstrate that while the Laplace kernel seems to be better choice for robustness, the Gaussian kernel also offers robustness benefits. Perhaps surprisingly, fine-grained class-wise analysis reveals that the robustness of Laplacian KRR is even higher than of the LeNet as the perturbation budget increases (Figs. 12A and 57A). In terms of the benign accuracy (), we find that the LeNet is marginally better on these datasets, but KRR can outperform the FCNN. For example, in the case of 5v9 binary classification problem on FMNIST, KRR has 0.8 percentage points better benign accuracy. We further compare LeNet with the substantially larger WRN-28-10 (§C.7). Despite its higher clean accuracy, WRN-28-10 loses robust accuracy faster than LeNet as the perturbation budget increases (Table 5A). Taken together, these results suggest that the robustness advantage of KRR over LeNet is not due to the model size used for comparison.
KSVMs: Kernel SVMs (both Laplacian and Gaussian) also outperform FCNNs and LeNets in terms of robust accuracies for both multiclass (Figs. 1A, 2, 4A and 5A) and binary classification problems (Figs. 15A and 16A). At the same time they can be better than their corresponding KRR. For example, in Fig. 2, Laplacian SVM performs better than the Laplacian KRR for FMNIST, while for QMNIST (Fig. 5A), Gaussian SVM is better than the Gaussian KRR. KSVMs also remain competitive in terms of benign accuracy. For instance, in FMNIST, the Laplacian SVM is 0.6 percentage points better than FCNN on the same task.
KLR: Like KRR and KSVM, the robust accuracy of KLR degrades quite gracefully as compared to FCNNs and LeNets. They are also quite robust in comparison to KRRs and KSVMs as seen in Figs. 2, 4A and 5A. For example, on KMNIST at , Gaussian KLR retains 73.4% accuracy, whereas adversarially trained LeNet, adversarially trained FCNNs, Gaussian KRR, and Gaussian SVM retain 28.0%, 20.1%, 12.5%, and 16.2% respectively. Laplacian KLRs also show the similar behaviour, but are less robust in comparison to Gaussian KLR. In terms of benign accuracy, however, KLR lags behind almost all the other models. For example, in the case of FashionMNIST, adversarially trained Gaussian KLR has the lowest benign accuracy followed by Gaussian KLR, Gaussian KRR, adversarially trained FCNN and Laplacian KLR. Similar observations can be seen in the case of KMNIST and QMNIST. The 1v1 results show both Laplacian and Gaussian KLR being more robust than all the other benign trained models at larger perturbation radii. In addition, for the 0v8 problem on FashionMNIST, Gaussian KLR is having 70.3 percentage points more accuracy than FCNN at the . The 1v1 benign accuracies are competitive with FCNN and LeNet in most cases as seen in Figs. 9A, 10A, 35A and 56A. Overall, we find that the Gaussian KLR is more robust than the Laplacian KLR. Similar observations hold across the other datasets.
3.3 RFMs are nearly as robust as base KMs
RFMs allow for feature learning in kernel machines. As observed in previous work [32], we find this can lead to improved accuracy on the base benign task. However, the improved feature learning does not always translate to improved robustness (Fig. 20A for Laplacian and Fig. 42A for Gaussian). In particular, we find that KRR (with in Eq. (4)) is often more robust when the RFM has improved benign accuracy, i.e. some feature learning has taken place. In the case of multi-class classification (Figs. 1A, 2, 4A and 5A), there is a clear separation, with KRR being more robust for the KMNIST and QMNIST datasets across budgets and attack types. For FMNIST, the RFM has competitive robust accuracy.
RFMs vs NNs: Fine-grained class-wise analysis (Figs. 13A and 37A) shows that RFMs are almost always more robust compared to the FCNNs. Additionally, unlike in the case of KRR, RFMs can have higher benign accuracy than the FCNNs, and are competitive with the LeNet. Thus, RFMs are a good choice of model, at least for simpler datasets, offering attractive best-of-both worlds performance.
3.4 Robustness of RFCs increases with number of random features
We observe that random feature classifiers (RFCs) suffer in terms of benign and robust accuracies compared to the base KMs when the number of features is inadequate. To compare RFCs with other models, we use 5000 and 20000 features for binary classification problems using square loss (Fig. 45A), while in the multiclass case we carry out an extensive ablation over the number of features (§D.7) to study its effect on robust accuracy. In multiclass case, RFCs are trained using both cross-entropy and square loss.
For Gaussian RFCs, trained with either the cross-entropy or the square loss, robustness is low when the number of features is small, but increases steadily as the number of features grows, in both the 1v1 and multiclass settings. The same trend holds under both SPSA and PGD, and the robust accuracy under SPSA is consistently higher hence, we can say for Gaussian RFCs, no gradient masking is happening. With enough features, Gaussian RFCs become more robust than FCNNs and LeNet in many cases.
However, we find that Laplacian RFCs trained with either loss exhibit significant gradient masking. SPSA attacks reduce their robust accuracy substantially compared to white-box attacks (§D.1). Robust accuracy under first-order gradient-based attacks therefore overestimates their true robustness and should not be taken at face value. This includes the high robust accuracy of the cross-entropy-trained Laplacian RFC in Fig. 89A, which holds up under white-box attacks even at very large budgets. For the cross-entropy loss, the robustness still increases with the number of features (when attacked against SPSA and PGD). For the square loss the robust accuracy of Laplacian RFCs varies erratically with the number of features, and more features do not yield more robustness, unlike for Gaussian RFCs. These observations warrant further theoretical investigation.
Overall, these results call into question the practical validity of the results from Hassani and Javanmard [17], which indicates that overparametrisation hurts robustness for RFCs. A plausible explanation is that their feature isotropy assumption yields pessimistic results. Thus, the implications of overparametrisation for robustness must be revisited.
3.5 Robustness of KMs is comparable with adversarially trained neural networks
The dominant approach to training robust NNs has been adversarial training [28] and its variants [51, 42]. While adversarial training is significantly more computationally expensive than benign training, it is instructive to compare whether NNs, particularly FCNNs, match the intrinsic robustness of KMs post adversarial training. Experimental details for adversarial training are in §A.4. In the multiclass setting for in Figs. 2, 4A and 5A, we see that for the FMNIST, KMNIST and QMNIST datasets that Gaussian KLR outperforms adversarially trained neural networks. In the case of attacks, as in Fig. 1A, we can see that Laplacian KRR performs at par with adversarially trained FCNN and LeNet (both of which are trained at perturbation radius of 1). Fine-grained class-wise analysis for the Laplacian kernel compared to training at and training at (Fig. 70A) reveal that depending on the threat model, and the specific class pair, KRR can be more robust than adversarially trained neural networks.
4 Adversarial training of kernel classifiers
A particularly important problem which remains open is that of adversarially training kernel machines. Prior approaches [40, 44] considered the problem in the feature space, and hence do not perform adversarial training in the input space. Both these methods use the Xu et al. [47] upper bound to create an Euclidean boundary in feature space which is often over-conservative. In what follows, we provide a method for adversarially training KMs by approximation, via an upper bound on the robust loss.
Consider adversarial training over the RKHS, for ,
. We look at binary classification and multiclass classification separately below.
4.1 Convex approximation for binary classification
The objective function in Eq. (5) no longer has the form of Eq. (3) whereby there is no guarantee of a finitely represented solution like Eq. (2). However one could consider an approximation by minimizing a linearization for small . By Hölders inequality, for a twice differentiable loss function and predictor function, this yields
where , and and . The following proposition provides a way to represent the solution to problem (6). The proof is a direct consequence of [52, Thm. 2] with .
Proposition 1. Consider Eq. (5), where and the loss function . Then, any solution to Eq. (6), satisfies
for some coefficients and . Furthermore, for such an , we have that equals
The assumption implies that is twice differentiable. Along with bounded, this allows the 2nd-order remainder term in the Taylor series expansion to be bounded and can vanish for small .
A key point to note however, is that solving (6) with parameterization in Eq. (7) may lead to a non-convex optimization problem, since the second term in the objective function is non-convex in . With an additional assumption: , which holds for Lipschitz losses, one may obtain the convex approximation below which can be solved efficiently.
We take a closer look at the case of below.
perturbations: Consider a bounded adversary, and the logistic loss for , for which ,
The dual formulation of this is derived as follows. Define and . Using , and , we obtain the saddle point problem
Starting from zero, all primal iterates have the form . Consequently, we update coefficients as follows. Sample a uniform subset of size . Let retain the sampled rows and set the others to zero.
. §A.5 provides details on how this in fact tracks a SGD in the RKHS. We have a matrix-free implementation of the above updates which evaluates and only on the minibatch which can be implemented in memory.
We use a diminishing step size and optionally return the weighted average . Convergence is only guaranteed for . For along with early-stopping may be implemented, but needs a separate analysis. We also note that recovers the kernel logistic regression which has the form of a usual kernel machine since .
4.2 Nonconvex approximation for multiclass
The same procedure along with [52, Thm. 2] applied to (6) for vector-valued RKHSs, where , which consists of multioutput functions from an RKHS would have representation of the form, where , is the Jacobian, and . Note the resulting function has unknown coefficients that need to be trained.
However for , i.e., isotropic and separable kernels, Eq. (6) yields simpler solutions with coefficients. Suppose is a twice differentiable loss function, and is twice differentiable, consider the problem of learning via Eq. (6) where is the Jacobian of , and is the gradient of the loss function. Finally, define, where is the kernel matrix, is the gradient tensor , and is the second-derivative tensor . We also use einsum – Einstein notation for expressing summation over tensors. We now state our result.
Proposition 2. There exists an optimal solution f to problem (6) of the form
where and . Furthermore, if is positive definite, then every optimal solution must have the above form. For such a solution, equals .
Observe that the solution above only has coefficients, far fewer than the general case . Since the objective function in problem (6) is not convex in , we consider a convex upper bound under the assumption of Lipschitz losses whereby .
adversary: For the crossentropy loss we have , which satisfies , whereby we can approximate where is the induced -norm. Thus is the maximum absolute row sum of . We propose solving
Observe that although the above problem has a convex objective function, the constraint set is non-convex. Our iterative algorithm, derived below, to solve the above problem is based on delayed projections similar to [1]. We propose Algorithm 1 to solve this problem. It involves a projection step every few epochs, which requires solving a non-convex problem solved approximately using Algorithm 2. More details on this methodology are provided in §A.5
4.3 Evaluation of adversarially trained KMs
We use the stochastic primal-dual procedure described above to train the adversarially regularized kernel classifier, which we denote by MARK. Starting from zero primal and dual variables, at each iteration we sample a minibatch of training examples and update the predictor coefficients according to Eqs. (10). The dual variables are updated using the input gradients of the current classifier and are subsequently projected element-wise onto the admissible perturbation set . We use the matrix-free implementation described above, which requires evaluating the predictor and its input gradients only on the current minibatch. The results in this section apply only to twice differentiable losses and kernels like Gaussian KLR. Figs. 1, 2 and 4A to 7A show that adversarial training of KM boosts their robustness as expected. We also have a direct comparison between KLR and the adversarially trained KLR in Figs. 67A to 69A.
5 Discussion
Through our experiments we established that KMs are more robust than both FCNN and CNNs over most vision datasets we consider.
5.1 Summary of Ablations
We also carried out a limited number of experiments on the SVHN and CIFAR-10 datasets (§C.6). We find that KMs are consistently more robust than FCNN and CNN over CIFAR-10. We show that in 4 out of 5 randomly chosen 1v1 classifications from CIFAR-10, KMs out-perform FCNNs by upto 4% (Figs. 63A to 66A). LeNets however, show comparable performance on CIFAR-10 for and improved robustness on attacks. We also find that the Gaussian RFM outperforms all the models on SVHN (Fig. 62A), as it improves accuracy of the already robust base kernel by 20 percentage points (Table 4A).
To measure robustness accurately, we check for gradient masking, as sometimes robustness measured under white-box attacks can be overestimated when a model produces uninformative or misleading gradients, causing gradient-based attacks to fail. To validate our PGD results, we perform black-box SPSA attacks (§D.1), finding no evidence for gradient masking overall, except in the case of Laplacian RFCs, where SPSA yields lower robust accuracy than white-box attacks. We attribute this to the heavy-tailed spectral distribution of the Laplace kernel. Laplace RFCs sample frequencies from a heavy-tailed (Cauchy) distribution. Gaussian RFCs also sample some large frequencies, but PGD can recover from uninformative gradients over multiple steps. For Laplace RFCs this recovery is much weaker, and we expect the same for RFCs drawn from other heavy-tailed distributions. The gradient estimation done by SPSA avoids this issue. We also investigate the effect of variation in kernel parameters like the in Matérn Kernels (§D.3), length scale () (§D.5), ridge regularisation () (§D.6). For RFMs we additionally study the effect of feature learning by varying number of iterations (§D.4). We also show variation in robustness with number of features in RFC models (§D.7).
For changes in kernel parameters we see that increase in smoothness () reduces robustness (Fig. 77A) while a lower length scale increases robustness (Figs. 79A and 80A). The ridge parameter () is not particularly consequential for robustness except at much larger values, where it aids robustness at the cost of benign accuracy (Fig. 81A), though the exact values are dataset dependent. In the case of RFMs more feature learning at a higher number of iterations adversely affects robustness as demonstrated for the Laplacian RFM (Fig. 78A).
5.2 Are KMs more robust point-wise?
Ideally, we would like a certificate that some types of KMs are provably more robust than NNs. However, this certification is known to be hard for NNs [21, 25], and made challenging for KMs by the non-convex nature of the boundary they induce. We take a direct, but approximate, approach. Let us define the minimal perturbation needed for a successful attack,
The quantity above is calculated approximately by using a bisection method on top of Eq. (1). For a fixed and , and , the ratio is a random variable. We plot the CDF of this random variable in Figs. 1, 6A and 7A for different pairs , where is the KLR for 3 datasets. We see that adversarially trained KMs are most pointwise robust of all the models we consider.
5.3 Limitations
We identify 5 key limitations of our exploration in this paper. First, since the main attacks considered have been tuned to effectively attack NNs, they may over-estimate the robustness of KMs. However we believe this is unlikely, as KMs should have smooth loss surfaces for the adversary, and first-order attacks would work well. Second, we only consider adversaries for vision data, and it would be instructive to consider others like StAdv [45] and ReColor [23]. Third, we only consider less complex datasets where KMs are competitive with NNs. This is, however, a limitation that is out of the scope of this paper, and we believe there the tasks we consider are those where lightweight KMs are a good alternative. Additionally, we do not provide any theoretical guarantees that KMs are more robust than NNs. Finally, we do not fully characterise the phenomena of gradient masking in Laplacian RFCs, and the impact of training loss on robustness with respect to the number of features in RFCs.
5.4 Future Work
In addition to directly addressing the limitations discussed above, we believe there are several fruitful directions for future work. From a theoretical perspective, obtaining a version of the Representer Theorem for exact robust training and finding KM-specific bounds on robustness are particularly important.
On tabular data, it would be interesting to compare KMs against tree-based methods such as gradient-boosted trees, which outperform neural networks [15]. Finally, analysing the adversary's loss landscape, and the confidence of KMs on adversarial examples, and out-of-distribution examples in general, can provide further evidence of their enhanced robustness.
Acknowledgements
All authors acknowledge funding from the SBI Foundation Hub at IIT Bombay. PP acknowledges funding for compute from DST INSPIRE faculty fellowship, Schmidt Sciences, Amazon, and the Nilekani Research Fund. AB acknowledges funding from the ANRF ARG MATRICS program.
AI Use Statement
In this work, we used generative AI tools for coding an implementation of Algorithm 1 and Algorithm 2. A very preliminary draft of §4 was generated using a generative AI tool, which was then completely rewritten. Apart from this, we have not used generative AI tools for writing, and the rest of the required disclosure tasks are not applicable to this work. We did not use generative AI tools for any tasks with recommended disclosure. We have reviewed all AI-assisted work. LLM-generated code was verified and tested for correctness by two authors. We take responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of generative AI.
References
[1] A. Abedsoltan, S. Ma, P. Pandit, and M. Belkin. Fast training of large kernel models with delayed projections. arXiv preprint arXiv:2411.16658, 2024.
[2] A. Athalye, N. Carlini, and D. Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In International conference on machine learning, pages 274–283. PMLR, 2018.
[3] D. Beaglehole, D. Holzmüller, A. Radhakrishnan, and M. Belkin. xrfm: Accurate, scalable, and interpretable feature learning models for tabular data. arXiv preprint arXiv:2508.10053, 2025.
[4] B. Becker and R. Kohavi. Adult. UCI Machine Learning Repository, 1996. DOI: https://doi.org/10.24432/C5XW20.
[5] M. Ben-Tov, D. Deutch, N. Frost, and M. Sharif. CaFA: Cost-aware, feasible attacks with database constraints against neural tabular classifiers. In 2024 IEEE Symposium on Security and Privacy (SP), pages 1345–1364. IEEE, 2024.
[6] A. N. Bhagoji, W. He, B. Li, and D. Song. Practical black-box attacks on deep neural networks using efficient query mechanisms. In Proceedings of the European conference on computer vision (ECCV), pages 154–169, 2018.
[7] N. Carlini, A. Athalye, N. Papernot, W. Brendel, J. Rauber, D. Tsipras, I. Goodfellow, A. Madry, and A. Kurakin. On evaluating adversarial robustness. arXiv preprint arXiv:1902.06705, 2019.
[8] N. Carlini and D. Wagner. Towards evaluating the robustness of neural networks. In IEEE Symposium on Security and Privacy, pages 39–57, 2017.
[9] T. Clanuwat, M. Bober-Irizar, A. Kitamoto, A. Lamb, K. Yamamoto, and D. Ha. Deep learning for classical japanese literature, 2018.
[10] F. Croce, M. Andriushchenko, V. Sehwag, E. Debenedetti, N. Flammarion, M. Chiang, P. Mittal, and M. Hein. Robustbench: a standardized adversarial robustness benchmark. Advances in Neural Information Processing Systems, 2020.
[11] F. Croce and M. Hein. Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks. In ICML, 2020.
[12] F. Croce and M. Hein. Mind the box: -apgd for sparse adversarial attacks on image classifiers. In ICML, 2021.
[13] Y. Feng, X. Huang, L. Shi, Y. Yang, and J. A. Suykens. Learning with the maximum correntropy criterion induced losses for regression. Journal of Machine Learning Research, 16(30):993–1034, 2015.
[14] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. International Conference on Learning Representations, 2015.
[15] L. Grinsztajn, E. Oyallon, and G. Varoquaux. Why do tree-based models still outperform deep learning on typical tabular data? Advances in neural information processing systems, 35:507–520, 2022.
[16] Y. Han and B. I. P. Rubinstein. Adequacy of the gradient-descent method for classifier evasion attacks. arXiv preprint arXiv:1704.01704, 2017.
[17] H. Hassani and A. Javanmard. The curse of overparametrization in adversarial training: Precise analysis of robust generalization for random features regression. The Annals of Statistics, 52(2):441–465, 2024.
[18] T. Hofmann, B. Schölkopf, and A. J. Smola. Kernel methods in machine learning. The Annals of Statistics, 36(3):1171–1220, 2008.
[19] A. Jacot, F. Gabriel, and C. Hongler. Neural tangent kernel: Convergence and generalization in neural networks. Advances in neural information processing systems, 31, 2018.
[20] P. Kar and H. Karnick. Random feature maps for dot product kernels. In Artificial intelligence and statistics, pages 583–591. PMLR, 2012.
[21] G. Katz, C. Barrett, D. L. Dill, K. Julian, and M. J. Kochenderfer. Reluplex: An efficient smt solver for verifying deep neural networks. In International conference on computer aided verification, pages 97–117. Springer, 2017.
[22] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
[23] C. Laidlaw and S. Feizi. Functional adversarial attacks, 2019.
[24] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
[25] L. Li, T. Xie, and B. Li. Sok: Certified robustness for deep neural networks. In IEEE Symposium on Security and Privacy, pages 1289–1310, 2023.
[26] M. Li, M. Soltanolkotabi, and S. Oymak. Gradient descent with early stopping is provably robust to label noise for overparameterized neural networks. In International conference on artificial intelligence and statistics, pages 4313–4324. PMLR, 2020.
[27] Y. Liu, X. Chen, C. Liu, and D. Song. Delving into transferable adversarial examples and black-box attacks. International Conference on Learning Representations, 2017.
[28] A. Madry, A. Makelov, L. Schmidt, D. Tsipras, and A. Vladu. Towards deep learning models resistant to adversarial attacks. International Conference on Learning Representations, 2018.
[29] R. Mohammad and L. McCluskey. Phishing Websites. UCI Machine Learning Repository, 2012. DOI: https://doi.org/10.24432/C51W2X.
[30] S. Moro, P. Rita, and P. Cortez. Bank Marketing. UCI Machine Learning Repository, 2014. DOI: https://doi.org/10.24432/C5K306.
[31] Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning 2011, 2011.
[32] A. Radhakrishnan, D. Beaglehole, P. Pandit, and M. Belkin. Mechanism for feature learning in neural networks and backpropagation-free machine learning models. Science, 383(6690):1461–1467, 2024.
[33] A. Rahimi and B. Recht. Random features for large-scale kernel machines. Advances in neural information processing systems, 20, 2007.
[34] B. Schölkopf, R. Herbrich, and A. J. Smola. A generalized representer theorem. In International conference on computational learning theory, pages 416–426. Springer, 2001.
[35] B. Schölkopf and A. J. Smola. Learning with kernels: support vector machines, regularization, optimization, and beyond. MIT press, 2002.
[36] J. C. Spall. Multivariate stochastic approximation using a simultaneous perturbation gradient approximation. IEEE Transactions on Automatic Control, 37(3):332–341, 1992.
[37] I. Steinwart and A. Christmann. Support Vector Machines. Springer Publishing Company, Incorporated, 1st edition, 2008.
[38] J. Uesato, B. O'Donoghue, P. Kohli, and A. van den Oord. Adversarial risk and the dangers of evaluating against weak attacks. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 5025–5034. PMLR, 2018.
[39] K. Wang, J. Zhang, Y. Chen, and P. Zhong. Least absolute deviation support vector regression. Mathematical Problems in Engineering, 2014(1):169575, 2014.
[40] T. T. Wang. Adversarial examples in simpler settings. M.eng. thesis, Massachusetts Institute of Technology, 2021.
[41] Y. Wang, B. Wang, C. Peng, X. Li, and H. Yin. Huber regression analysis with a semi-supervised method. Mathematics, 10(20):3734, 2022.
[42] Y. Wang, D. Zou, J. Yi, J. Bailey, X. Ma, and Q. Gu. Improving adversarial robustness requires revisiting misclassified examples. In International conference on learning representations, 2019.
[43] H. Wen, A. Betken, and W. Koolen. On the robustness of kernel ridge regression using the cauchy loss function. arXiv preprint arXiv:2503.20120, 2025.
[44] H. Wu, Z. Hu, and B. Gu. Fast and scalable adversarial training of kernel svm via doubly stochastic gradients. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pages 10329–10337, 2021.
[45] C. Xiao, J.-Y. Zhu, B. Li, W. He, M. Liu, and D. Song. Spatially transformed adversarial examples. arXiv preprint arXiv:1801.02612, 2018.
[46] H. Xiao, K. Rasul, and R. Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017.
[47] H. Xu, C. Caramanis, and S. Mannor. Robustness and regularization of support vector machines. Journal of machine learning research, 10(7), 2009.
[48] C. Yadav and L. Bottou. Cold case: The lost mnist digits. In Advances in Neural Information Processing Systems 32. Curran Associates, Inc., 2019.
[49] F. X. X. Yu, A. T. Suresh, K. M. Choromanski, D. N. Holtmann-Rice, and S. Kumar. Orthogonal random features. Advances in neural information processing systems, 29, 2016.
[50] S. Zagoruyko and N. Komodakis. Wide residual networks. In Proceedings of the British Machine Vision Conference (BMVC), pages 87.1–87.12. BMVA Press, 2016.
[51] H. Zhang, Y. Yu, J. Jiao, E. Xing, L. El Ghaoui, and M. Jordan. Theoretically principled trade-off between robustness and accuracy. In International conference on machine learning, pages 7472–7482. PMLR, 2019.
[52] D.-X. Zhou. Derivative reproducing properties for kernel methods in learning theory. Journal of computational and Applied Mathematics, 220(1-2):456–463, 2008.
Appendix
Table 1A: Abbreviations (sorted in alphabetical order)
| advKLR | adversarially trained KLR | |
|---|---|---|
| CAFA | Cost-aware Feasible Attack | [5] |
| CNN | convolutional neural network | |
| FCN | fully connected neural network (a.k.a. MLP) | |
| KM | kernel machine | |
| KRR | kernel ridge regression | |
| KSVM | kernel support vector machines | |
| KLR | kernel logistic regression | |
| MLP | multi-layer perceptron (a.k.a. FCN) | |
| NN | neural network | |
| PGD | projected gradient descent | |
| RFM | recursive feature machine | |
| RFC | random feature classifier | |
| SPSA | Simultaneous Perturbation Stochastic Approximation | [36] |
| WRN | Wide Residual Network |
A Further Technical Details and Setup
A.1 Gradient-free (black-box) attacks using SPSA
Let denote the loss at input with label . At a given iterate, SPSA samples a random perturbation vector . Using a two-sided finite-difference approximation, the SPSA gradient estimator for the -th coordinate is
where is a small perturbation magnitude. Since , this can equivalently be written as
In vector form, the estimator is
In practice, we use a vectorised, variance-reduced estimate of the gradient over independent perturbation vectors :
Table 2A: Overview of figures showing results regarding and attacks on Laplacian and Gaussian kernel machines compared with neural networks and different variants of kernel machines for FashionMNIST, KMNIST, and QMNIST. Each link is clickable and takes you to the relevant figure.
| Laplacian Kernel | Gaussian Kernel | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| KLR | KRR | RFM | KSVM | RFC | FCNN | LeNet | KLR | KRR | RFM | KSVM | RFC | FCNN | LeNet | |
| KLR | ⋅ | 17A | 18A | 19A | 25A, 26A | 9A | 10A | ⋅ | 39A | 40A | 41A | 48A, 49A | 35A | 56A |
| KRR | ⋅ | 20A | 21A | 27A, 28A | 11A | 12A | ⋅ | 42A | 43A | 50A, 51A | 36A | 57A | ||
| RFM | ⋅ | 22A | 29A, 30A | 13A | 14A | ⋅ | 44A | 52A, 53A | 37A | 58A | ||||
| KSVM | ⋅ | 31A, 32A | 15A | 16A | ⋅ | 54A, 55A | 38A | 59A | ||||||
| RFC | ⋅ | 23A, 24A | 33A, 34A | ⋅ | 46A, 47A | 60A, 61A | ||||||||
A.2 Attacks on Tabular datasets using CaFA
The objective in the CaFA attacks is as follows:
Note here the additional constraint denoted by , which indicates that the generated adversarial example must satisfy feature space constraints. Unlike in the case of images, where simple boundary clipping is sufficient, tabular data is more complex as it has a combination of continuous, integer, and categorical features. In addition, the range of each feature can be different. CaFA proceeds in the following 3 steps:
-
Mining constraints: There are two main types of constraints to be considered. The first are structural constraints, which are available via feature engineering. The second type are relation constraints, which in CaFA are set to be denial constraints. These prevent pairs of samples from having a set of predicates that hold simultaneously. These are difficult to specify and are mined from the data.
-
Perturbing samples: The samples are first perturbed using a method known as TabPGD, which works by first creating temporary adversarial examples. These are then modified feature by feature depending on the type of the feature.
-
Constraint projection: The generated adversarial examples are checked for compliance with the set of mined constraints T using a SAT solver. If the constraints are not satisfied, the samples are then projected by relaxing constraints on certain features. The final obtained adversarial example should now satisfy both structural and relational constraints.
In our experiments we sweep over in .
A.3 Kernels preliminaries
Matérn Kernels are a class of kernels parameterized by a smoothness parameter and length scale . The general Matérn kernel is defined as
where is the Gamma function and denotes the modified Bessel function of the second kind. Here is the length scale, while defines the smoothness of functions associated with the kernel, with larger corresponding to smoother functions. The Laplacian kernel (), denoted , and the Gaussian kernel (), denoted , are also members of the Matérn family. In addition, Matérn Kernels with for have known closed form expressions. For example, and are given below:
Kernel Ridge Regression (KRR), Kernel SVM (KSVM) and Kernel Logistic Regression (KLR): While the Representer Theorem allows for arbitrary loss functions, in practice most KMs are trained for the square loss , due to the simplicity in implementation. KRR is the solution to the linear equation
where is the matrix of targets in the training data. We also trained KSVM to minimize hinge loss, or soft-margin SVM, , using one-vs-one for multiclass classification problems.
A.4 Adversarial training of NNs
To train neural networks adversarially, we use the standard min-max optimisation approach from [28]:
In practice, an alternating minimisation approach is used to obtain . First, is set to 0, and the standard empirical risk is minimised. The function thus obtained is fixed, and the inner supremum computed with respect to it, typically using Projected Gradient Descent. The empirical risk with respect to the resulting per sample is then computed, and a new is obtained. This procedure continues until the training loss plateaus or a sufficiently high robust accuracy is obtained.
A.5 Adversarial training of Kernel Machines
Minibatch stochastic updates for binary classification: The derivatives of the loss function are
We use the following procedure for training. At iteration , sample a uniform subset of size . Let retain the sampled rows and set the others to zero. Since , unbiased stochastic primal and dual directions give
Thus only the sampled rows of change. Clipping acts component-wise. Both updates use the old iterates.
Approximate RKHS projection: Let be the subspace of functions of the form where , and let be the cone of functions of the form (11).
Proposition 3. Suppose with coefficients , then solving
is equivalent to solving
where .
We provide Algorithm 2 to solve problem (15) approximately.
B Detailed Experimental Setup
B.1 Kernel Machines training details
Base KM: For KRR and RFM, we searched for and . For KSVM, the search over is the same as for KRR, while was searched over the set . For KLR, we searched for length scale over the set , while the learning rate is searched over .
RFCs: For binary classification problems, we use 5000 and 20000 random features. The 1v1 results for RFCs are accuracies averaged over the seeds in . For multiclass classification, we searched over the number of features in , using the same seeds as in the 1v1 problem, to study the dependence between the number of features and robust accuracy in RFCs. We searched the length scale over and the ridge parameter such that .
Algorithm 1 MARK: Multiclass Adversarially Robust Kernel machines
Require: Data , kernel functions , budget , Epochs , learning rate , projection interval
1: Initialize , (if not provided) 2: Initialize 3: 4: 5: 6: 7: for do 8: for minibatch w/o replacement do 9: Fetch minibatch inputs 10: 11: 12: 13: 14: 15: 16: 17: end for 18: if then 19: 20: reset , and for 21: end if 22: end for 23: return
▷ rank-1 dual maximizer
▷ solve (15)
B.2 Neural Networks training details
The FCNNs were trained using stochastic gradient descent (SGD) with momentum to minimise the cross-entropy loss. We perform an exhaustive search over the network's widths in , depths in , learning rates in , and weight decay rates in , with momentum fixed at 0.9. We did the above search for both robust training (using Projected Gradient Descent) and benign training. Convolutional neural networks (CNNs) with the modified LeNet5 architecture (using ReLU activation and max-pooling layers) [24], and WideResNet-28-10 [50] were trained with standard training hyperparameters. We additionally evaluated the sensitivity of the FCNN baselines to random initialization across multiple training seeds. We observed only minor variations in clean and adversarial accuracy, with the overall robustness trends remaining consistent across runs. Therefore, we present the results for FCNNs trained using seed 42.
B.3 Attacks
For the constrained attacks, we use perturbation budgets with for 1v1 comparison, while for multiclass we used these perturbation budgets, with for multiclass classification. For constrained attacks, we use for 1v1, and . The fixed iteration attack uses 100 iterations, with step size . For details on other attacks used, see black-box attacks (§D.1) and attacks on tabular data (§D.2).
B.4 Adversarial training of neural networks
We have trained our models for multiclass with perturbation for FashionMNIST with , for KMNIST it is , for QMNIST it is . For training, we have used perturbation budget . For binary classification we have used perturbation budget for FashionMNIST, for KMNIST, budget for QMNIST for 200 epochs while doing robust training. Depth is searched over
Algorithm 2 Approximate rank-1 projection in RKHS
Require: Coefficients , , refinement steps
1:
2: for do
3:
4: \quad EigenPro
5:
6:
7: \quad Armijo rule
8:
9: end for
10:
11: \quad EigenPro
12: return
{2,4} for pairwise classification, width is searched over {128,256}, learning rate is in {0.03,0.1}, and weight decay in {0.0001,0.001}, momentum was fixed as 0.9, dropout was fixed at 0. While for multiclass adversarial training, we searched over depth ∈ {3,5}, width over {128,256}, and searched for learning rate in {0.03,0.1}, and weight decay in {0.0001,0.001}, with momentum kept at 0.9, and with 0 dropout. For adversarial LeNets we searched over the learning rate in 0.03, 0.1, and weight decay in {0.0001,0.001}, with momentum kept at 0.9, and dropout being 0. LeNets were trained for 50 epochs, while WRNs were trained for 20 epochs.
B.5 Adversarial training of KLR
Adversarial training of kernel machines. For binary adversarial KLR, we used Gaussian kernels with length scales explored over across class pairs and swept the RKHS regularization coefficient over , selecting by clean validation accuracy. Training used 500 stochastic primal-dual updates, a minibatch size of 128, an initial learning rate of 0.1, a learning-rate decay exponent of 0.75, weighted iterate averaging, and random seed 0. The gradient-penalty coefficient was set to 12/255, 20/255, and 24/255 for Fashion-MNIST, KMNIST, and QMNIST, respectively.
For multiclass adversarial KLR, we compared Gaussian length scales and selected 2 based on improved clean accuracy and adversarial robustness. Training used 10 epochs, a minibatch size of 128, an initial learning rate of 0.01, a learning-rate decay exponent of 0.75, RKHS regularization , and random seed 42. The radius parameter was set to 8/255, 16/255, and 24/255 for Fashion-MNIST, KMNIST, and QMNIST, respectively, with a penalty multiplier of 2. Projection intervals of one and two epochs yielded comparable performance; the reported checkpoints used one epoch for Fashion-MNIST and two epochs for KMNIST and QMNIST. Projection used at most 100 refinement steps and a tolerance of . The EigenPro solver used relative and absolute tolerances of and , respectively, at most 100 solver epochs, a subsample size of 1024, rank 100, a minibatch size of 128, and matrix-free
Table 3A: Computational complexity of training on a single NVIDIA RTX PRO 6000 Blackwell Max-Q Workstation GPU. ( time in seconds(s) to train a single model on Fashion MNIST. Note that KRR and RFM have fewer hyperparameters to tune, hence the total time is smaller.)
| model | hyperparameters | time (1v1) | time (multi-class) |
|---|---|---|---|
| FCNN | width, depth, lr, weight decay | ||
| FCNN-adv | |||
| LeNet | N.A. | ||
| adv-LeNet | N.A. | ||
| KRR | |||
| RFM | |||
| RFC | |||
| Kernel SVM | |||
| KLR | learning rate, | ||
| adv-KLR | learning rate, , |
storage. Query and center tile sizes were 64 and 1024, respectively.
B.6 vs. robustness of Matérn Kernels
In our experiments, we fine-tuned over ridge and length scale , for each value of . We chose models corresponding to each such that their and are the same with benign accuracy being close to the best benign accuracy found in the grid search, so as to isolate the effect of on robustness. Square loss is used for the training.
B.7 Computational efficiency details
Model training runtimes: Kernel Machines take around 5 seconds for each dataset to train for one 1v1 problem, while these take around 30 seconds for multiclass classification problem. RFMs take around 25 seconds to train for one 1v1 classification problem, while for multiclass classification they take around 2 minutes of time. Training for RFC is instant no matter the type of problem. Kernel SVM takes around 45 seconds to train using scikit-learn. Benign training of FCNNs for one 1v1 classification problems without hyperparameter training took approximately 40 seconds for FashionMNIST, 25 seconds for KMNIST, and 50 seconds for QMNIST. While for the multiclass classification over FashionMNIST, KMNIST and QMNIST, FCNN took around 5 minutes to train for 200 epochs. The robust training took around 15 to 30 minutes for all the datasets, no matter the training budget. LeNets benign training for one 1v1 classification problem takes around 40 seconds, while the robust training for 1v1 takes around 2 minutes for 50 epochs. Training of adv-LeNet for multiclass takes around 12 minutes, and for 1v1 it is around 2 minutes. WRN benign training took around 40 minutes to get trained for 20 epochs. Training for robust adversarial KLR for multiclass classification took around 24 hours for 10 epochs, for projection at every step. Robust binary KLR took around 15 minutes for training at 500 iterations.
Attack runtimes: For multiclass FCNNs and CNNs the attack takes around 15 – 30 minutes, for RFC the attack takes around 5 – 10 minutes, for Kernel machines and RFMs the attack takes around 15 – 20 minutes. For one 1v1 attack for any model the time is less than 2 minutes. These timings are irrespective of the norm being used, and these are the time to attack a particular model on all the perturbation budgets.
C Detailed Experimental Results
Table 2A provides references to all comparisons for the Laplacian and Gaussian KMs.
C.1 Adversarial Robustness under and Perturbations
Here we provide result for the multiclass problem on FMNIST, KMNIST, QMNIST, and 1v1 for the FMNIST dataset. In the attack, the error bars for different seeded attacks have been provided, albeit they are too small to be relevant. Similar small error bars for attacks were observed for attacks, but due to them being quite small only values corresponding to seed 42 have been plotted.
Figure 1A: Comparison of the robust accuracy against perturbations ( is better) for 10 models across 3 datasets. Results were obtained using autoattack, using apgd-ce.
| Laplacian KRR | Gaussian KRR | Laplacian SVM | FCNN | LeNet |
|---|---|---|---|---|
| Laplacian RFM | Gaussian RFM | Gaussian SVM | FCNN-Adv | LeNet-Adv |

C.2 Linf summary for KMNIST/QMNIST vs FCNN and LeNet
attack multiclass results are in Figs. 4A and 5A.
Figure 2A: Gap in robust accuracy (ra) for perturbation on 45 1v1 binary classification tasks from FashionMNIST comparing 2 neural networks (columns) and 3 kernel machines (rows) with the Laplacian kernel. Perturbation size increases as we go down each heatmap, and values correspond to ra(row model) - ra(col model). The teal colour indicates that the kernel machine is more robust, whereas the orange color indicates that the neural network is more robust. Each of the 6 heatmaps compares 45 pairs of models, each finetuned for best accuracy on clean data. For each heatmap, class pairs for binary classification are sorted according to values in the bottom row. PGD attack is used to attack the models.
robust accuracy (row - col) for adversarial perturbations on FashionMNIST

Figure 3A: Gap in robust accuracy (ra) for perturbation on 45 1v1 binary classification tasks from FashionMNIST comparing 2 neural networks (columns) and 2 RFCs with different number of features (rows) with the Laplacian kernel. Perturbation size increases as we go down each heatmap, and values correspond to ra(row model) - ra(col model). The teal colour indicates that the RFC is more robust, whereas the orange color indicates that the neural network is more robust. Each of the 4 heatmaps compares 45 pairs of models. For each heatmap, class pairs for binary classification are sorted according to values in the bottom row. (Top) RFC with 5000 random features (Bottom) RFC with 20000 random features. PGD attack is used to attack the models.
robust accuracy (row - column) for adversarial perturbations on FashionMNIST


Figure 4A: Summary of results for the multiclass KMNIST dataset. We compare robust accuracy of 13 models (3 adversarially trained, 10 benign) on KMNIST (10 classes) attacked via PGD using perturbations. Columns with yellow borders correspond to adversarially trained models with training adversary's attack level highlighted by the red row. Black boxes mark the best robust accuracy across each row. Note the best models for high are kernel machines with logistic loss.

Figure 5A: Summary of results for the multiclass QMNIST dataset. We compare robust accuracy of 13 models (3 adversarially trained, 10 benign) on QMNIST (10 classes), attacked via PGD using perturbations.. Columns with yellow borders correspond to adversarially trained models with training adversary's attack level highlighted by the red row. Black boxes mark the best robust accuracy across each row. Note the best models for high are kernel machines with logistic loss.

Figure 6A: Test for robustness as a pointwise property. We plot the empirical CDF of the ratio (KLR/other models) of the smallest perturbations needed to successfully attack 423 random samples from the test set of KMNIST. Note the x-axis is in log-scale. See §5.2 for more details. KRR is more robust than both FCNN and LeNet. For the median datum, KLR is nearly 2x more robust than Adv-FCNN and Adv-LeNet. The adversarially trained FCNN, LeNet and KLR were trained with an (matched) adversary with a budget of . Adversarially trained KM remains most robust.

Figure 7A: Test for robustness as a pointwise property. We plot the empirical CDF of the ratio (KLR/other models) of the smallest perturbations needed to successfully attack 479 random samples from the test set of QMNIST. Note the x-axis is in log-scale. See §5.2 for more details.
For most samples, KRR is harder to attack than the FCNN. For the median datum, KLR is more robust than Adv-FCNN and Adv-LeNet. The adversarially trained FCNN, LeNet and KLR were trained with an (matched) adversary with a budget of . Adversarially trained KM remains most robust.
C.3 Comparison of KMs with FCNN and LeNet
Figure 8A: Gap in robust accuracy (ra) for perturbation on 45 1v1 binary classification tasks from FashionMNIST comparing 2 neural networks (columns) and 3 kernel machines (rows) with the Laplacian kernel. Perturbation size increases as we go down each heatmap, and values correspond to ra(row model) - ra(col model). The teal colour indicates that the kernel machine is more robust, whereas the orange color indicates that the neural network is more robust. Each of the 6 heatmaps compares 45 pairs of models. For each heatmap, class pairs for binary classification are sorted according to values in the bottom row. (Top) Kernel machines are more robust than fully connected neural networks and convolutional networks. (Middle) Recursive Feature Machines retain much of the robustness of the base kernel machine (). (Bottom) Laplacian SVM are more robust to both FCNN and LeNet. PGD attack is used to attack the models.
robust accuracy (row - col) for adversarial perturbations on FashionMNIST

C.4 Laplacian Results for FMNIST, KMNIST, QMNIST
Here we provide results comparing laplacian kernels in any type of model over the datasets FMNIST, KMNIST, QMNIST.
Figure 9A: Laplacian KLR versus FCNN: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian KLR - FCNN)



Figure 10A: Laplacian KLR versus LeNet: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian KLR - LeNet)



Figure 11A: Laplacian KRR versus FCNN: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian KRR - FCNN)


Figure 12A: Laplacian KRR versus LeNet: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian KRR - LeNet)


class pair
class pair

Figure 13A: Laplacian RFM versus FCNN: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian RFM - FCNN)


Figure 14A: Laplacian RFM versus LeNet: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian RFM - LeNet)


Figure 15A: Laplacian SVM versus FCNN: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian SVM - FCNN)


Figure 16A: Laplacian SVM versus LeNet: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian SVM - LeNet)


class pair
class pair
Figure 17A: Laplacian KLR vs Laplacian KRR: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian KLR - Laplacian KRR)


Figure 18A: Laplacian KLR vs Laplacian RFM: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian KLR - Laplacian RFM)


Figure 19A: Laplacian KLR vs Laplacian SVM: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian KLR - Laplacian SVM)


class pair
class pair

Figure 20A: Laplacian KRR vs Laplacian RFM: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian KRR - Laplacian RFM)


Figure 21A: Laplacian KRR vs Laplacian SVM: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models. robust accuracy (Laplacian KRR - Laplacian SVM)


Figure 22A: Laplacian RFM vs Laplacian SVM: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian RFM - Laplacian SVM)



Figure 23A: Laplacian RFC (5k features) versus FCNN: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. Laplace RFC is trained using square loss. PGD attack is used to attack the models.
robust accuracy (Laplacian RFC (5k features) - FCNN)


Figure 24A: Laplacian RFC (20k features) versus FCNN: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. Laplace RFC is trained using square loss. PGD attack is used to attack the models.
robust accuracy (Laplacian RFC (20k features) - FCNN)


class pair
class pair

Figure 25A: Laplacian KLR vs Laplacian RFC (5k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models. robust accuracy (Laplacian KLR - Laplacian RFC (5k features))

Figure 26A: Laplacian KLR vs Laplacian RFC (20k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian KLR - Laplacian RFC (20k features))


Figure 27A: Laplacian KRR vs Laplacian RFC (5k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models. robust accuracy (Laplacian KRR - Laplacian RFC (5k features))


class pair
class pair

Figure 28A: Laplacian KRR vs Laplacian RFC (20k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian KRR - Laplacian RFC (20k features))



Figure 29A: Laplacian RFM vs Laplacian RFC (5k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models. robust accuracy (Laplacian RFM - Laplacian RFC (5k features))


Figure 30A: Laplacian RFM vs Laplacian RFC (20k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian RFM - Laplacian RFC (20k features))


class pair
class pair

Figure 31A: Laplacian SVM vs Laplacian RFC (5k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models. robust accuracy (Laplacian SVM - Laplacian RFC (5k features))

Figure 32A: Laplacian SVM vs Laplacian RFC (20k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian SVM - Laplacian RFC (20k features))


class pair
class pair

Figure 33A: Laplacian RFC (5k features) versus LeNet: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian RFC (5k features) - LeNet)


class pair
class pair

Figure 34A: Laplacian RFC (20k features) versus LeNet: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Laplacian RFC (20k features) - LeNet)


class pair
class pair

C.5 Gaussian Results for FMNIST, KMNIST, QMNIST
Here we provide results comparing gaussian kernels in any type of model over the datasets FMNIST, KMNIST, QMNIST.
Figure 35A: Gaussian KLR versus FCNN: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian KLR - FCNN)


Figure 36A: Gaussian KRR versus FCNN: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian KRR - FCNN)


class pair
class pair

Figure 37A: Gaussian RFM versus FCNN: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian RFM - FCNN)



Figure 38A: Gaussian SVM versus FCNN: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian SVM - FCNN)


class pair
class pair

Figure 39A: Gaussian KLR versus Gaussian KRR: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian KLR - Gaussian KRR)



Figure 40A: Gaussian KLR versus Gaussian RFM: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian KLR - Gaussian RFM)


Figure 41A: Gaussian KLR versus Gaussian SVM: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian KLR - Gaussian SVM)


Figure 42A: Gaussian KRR versus Gaussian RFM: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian KRR - Gaussian RFM)


class pair
class pair

Figure 43A: Gaussian KRR versus Gaussian SVM: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models. robust accuracy (Gaussian KRR - Gaussian SVM)


Figure 44A: Gaussian RFM versus Gaussian SVM: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian RFM - Gaussian SVM)


Figure 45A: Gap in robust accuracy (ra) for perturbation on 45 1v1 binary classification tasks from FashionMNIST comparing 2 neural networks (columns) and 2 RFCs with different number of features (rows) with the Laplacian kernel. Perturbation size increases as we go down each heatmap, and values correspond to ra(row model) - ra(col model). The teal colour indicates that the RFC is more robust, whereas the orange color indicates that the neural network is more robust. Each of the 4 heatmaps compares 45 pairs of models. For each heatmap, class pairs for binary classification are sorted according to values in the bottom row. (Top) RFC with 5000 random features are a bit less robust compared to fully connected neural networks and convolutional neural networks. (Bottom) RFC with 20000 random features are competing in robustness with fully connected neural networks and convolutional neural networks. Although, these results shouldn't be taken at face value as we see in §D.7 that Laplace RFCs exhibit gradient masking. PGD attack is used to attack the models.
robust accuracy (row - column) for adversarial perturbations on FashionMNIST
FCNN

LeNet

Laplacian RFC (20k)
-10
-1
Figure 46A: Gaussian RFC (5k features) versus FCNN: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian RFC (5k features) - FCNN)


Figure 47A: Gaussian RFC (20k features) versus FCNN: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian RFC (20k features) - FCNN)


Figure 48A: Gaussian KLR versus Gaussian RFC (5k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian KLR - Gaussian RFC (5k features))


class pair
class pair

Figure 49A: Gaussian KLR versus Gaussian RFC (20k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models. robust accuracy (Gaussian KLR - Gaussian RFC (20k features))

Figure 50A: Gaussian KRR versus Gaussian RFC (5k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models. robust accuracy (Gaussian KRR - Gaussian RFC (5k features))

Figure 51A: Gaussian KRR versus Gaussian RFC (20k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian KRR - Gaussian RFC (20k features))


Figure 52A: Gaussian RFM versus Gaussian RFC (5k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian RFM - Gaussian RFC (5k features))


class pair
class pair

Figure 53A: Gaussian RFM versus Gaussian RFC (20k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models. robust accuracy (Gaussian RFM - Gaussian RFC (20k features))


class pair
class pair

Figure 54A: Gaussian SVM versus Gaussian RFC (5k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models. robust accuracy (Gaussian SVM - Gaussian RFC (5k features))


class pair
class pair

Figure 55A: Gaussian SVM versus Gaussian RFC (20k features): and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian SVM - Gaussian RFC (20k features))

Figure 56A: Gaussian KLR versus LeNet: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian KLR - LeNet)


Figure 57A: Gaussian KRR versus LeNet: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian KRR - LeNet)


class pair
class pair

Figure 58A: Gaussian RFM versus LeNet: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian RFM - LeNet)



Figure 59A: Gaussian SVM versus LeNet: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian SVM - LeNet)


class pair
class pair

Figure 60A: Gaussian RFC (5k features) versus LeNet: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian RFC (5k features) - LeNet)


class pair
class pair

Figure 61A: Gaussian RFC (20k features) versus LeNet: and perturbation for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD attack is used to attack the models.
robust accuracy (Gaussian RFC (20k features) - LeNet)


class pair
class pair

C.6 Kernels on SVHN and CIFAR-10
We trained Gaussian KRR, Gaussian RFM, Laplacian KRR, Laplacian RFM, FCNN, and LeNet on 10 class SVHN and different binary problems of CIFAR-10 (namely Aeroplane vs frog (0v6), Aeroplane vs Horse (0v7), Automobile vs Cat (1v3), Deer vs Truck (4v9) and Dog vs Ship (5v8)). Hyperparameter tuning of models used same grid search as for the other three datasets namely FMNIST, KMNIST, QMNIST. As in Fig. 62A, Laplacian KRR and FCNN match in robustness with Gaussian RFM beating them all. The reason behind Gaussian RFM being the best model can be inferred from the fact that its base kernel despite being poor in benign accuracy is quite robust (Table 4A). Hence, even though further iterations in RFM generally lose the robustness (as we will see in §D.4), the loss in robustness is not much to make it brittle. Here, the base KM for Gaussian RFM is having different hyperparameters than the Gaussian KRR in Fig. 62A. Results for CIFAR-10 are in Fig. 63A, Fig. 64A, Fig. 65A, Fig. 66A.
Figure 62A: and attacks on SVHN. (Left) corresponds to and (Right) corresponds to autoattacks.

Table 4A: Robust accuracies for the Gaussian kernel and Gaussian RFM with bandwidth 0.05 on SVHN
| ( ) | Gaussian Kernel (%) | Gaussian RFM (%) |
|---|---|---|
| 0 | 62.56 | 82.46 |
| 0.1/255 | 62.11 | 81.48 |
| 1/255 | 58.22 | 71.10 |
| 2/255 | 53.86 | 56.59 |
| 4/255 | 46.01 | 36.08 |
| 6/255 | 39.48 | 26.30 |
| 8/255 | 34.44 | 21.29 |
| 12/255 | 27.60 | 16.26 |
| 20/255 | 21.27 | 9.77 |
| 32/255 | 17.25 | 3.91 |
| 40/255 | 15.81 | 2.25 |
| 55/255 | 13.58 | 1.40 |
Figure 63A: Gap in robust accuracy (ra) for perturbation on 5 1v1 binary classification tasks from CIFAR-10. (Top) row has Laplace Kernel, and (Bottom) row has Laplace RFM. (First) Column is FCNN, and (Second) column is LeNet. PGD is used to attack the models.
robust accuracy (row - col) for adversarial perturbations on CIFAR-10

Figure 64A: Gap in robust accuracy (ra) for perturbation on 5 1v1 binary classification tasks from CIFAR-10. (Top) row has Laplace Kernel, and (Bottom) row has Laplace RFM. (First) column is FCNN, and (Second) column is LeNet. PGD is used to attack the models.
robust accuracy (row - col) for adversarial perturbations on CIFAR-10

Figure 65A: Gap in robust accuracy (ra) for perturbation on 5 1v1 binary classification tasks from CIFAR-10. (Top) row has Gaussian Kernel, and (Bottom) row has Gaussian RFM. (First) column is FCNN, and (Second) column is LeNet. PGD is used to attack the models.
robust accuracy (row - col) for adversarial perturbations on CIFAR-10

Figure 66A: Gap in robust accuracy (ra) for perturbation on 5 1v1 binary classification tasks from CIFAR-10. (Top) row has Gaussian Kernel, and (Bottom) row has Gaussian RFM. (First) column is FCNN, and (Second) column is LeNet. PGD is used to attack the models.
robust accuracy (row - col) for adversarial perturbations on CIFAR-10

C.7 WideResNet vs LeNet
We compare the PGD robust accuracy of WideResNet-28-10 (WRN) and LeNet-5 on multiclass FMNIST, KMNIST, and QMNIST datasets. Table 5A reports the accuracy (%) for perturbation budgets . Across all datasets, WRN attains higher clean accuracy than LeNet-5 (93.57% vs. 90.54% on FMNIST, 98.61% vs. 95.49% on KMNIST, and 99.46% vs. 98.91% on QMNIST). However, this advantage does not persist as grows. Hence, our comparison of KMs against LeNets is transferable to larger CNN models like WideResNets as well.
Table 5A: PGD robust accuracy (%) of WRN-28-10 and LeNet-5 on FMNIST, KMNIST, and QMNIST. Bold marks the better model per dataset.
| FMNIST | KMNIST | QMNIST | ||||
|---|---|---|---|---|---|---|
| WRN | LeNet | WRN | LeNet | WRN | LeNet | |
| 0 | 93.57 | 90.54 | 98.61 | 95.49 | 99.46 | 98.91 |
| 0.1/255 | 92.64 | 90.03 | 98.58 | 95.42 | 99.46 | 98.90 |
| 1/255 | 77.60 | 84.04 | 98.45 | 94.92 | 99.37 | 98.75 |
| 2/255 | 55.64 | 74.82 | 98.19 | 94.20 | 99.27 | 98.54 |
| 4/255 | 13.54 | 55.67 | 97.60 | 92.40 | 99.03 | 98.00 |
| 6/255 | 0.80 | 39.68 | 96.61 | 90.35 | 98.70 | 97.39 |
| 8/255 | 0.02 | 26.88 | 94.99 | 87.34 | 98.31 | 96.42 |
| 12/255 | 0.00 | 8.95 | 84.18 | 80.23 | 96.72 | 93.43 |
| 20/255 | 0.00 | 0.18 | 30.65 | 57.57 | 75.85 | 79.66 |
| 32/255 | 0.00 | 0.00 | 1.01 | 17.58 | 1.68 | 35.52 |
| 40/255 | 0.00 | 0.00 | 0.05 | 4.06 | 0.07 | 11.61 |
| 55/255 | 0.00 | 0.00 | 0.00 | 0.07 | 0.00 | 0.32 |
C.8 KMs and adversarially trained KMs vs adversarially trained nets
Figs. 67A to 70A contains the fine-grained 1v1 results. The multiclass results are in Figs. 1A, 2, 4A and 5A.
Figure 67A: Adv-KLR versus KLR for FashionMNIST and KMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (bottom) row corresponds to the KMNIST dataset. PGD is used to attack the models.
Adversarial KLR – Benign KLR for attacks on FashionMNIST

Class pair

Adversarial KLR – Benign KLR for attacks on KMNIST
Class pair

robust accuracy (Adv KLR – Benign KLR, percentage points)
Figure 68A: Adv-KLR versus FCNN for FashionMNIST and KMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (bottom) row corresponds to the KMNIST dataset. PGD is used to attack the models. 0v2 5v7 0v3 7v9 0v8 0v4 3v4 4v6 0v6 6v8 5v9 4v8 2v3 1v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= 12 255 : for FashionMNIST and KMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Bottom) row corresponds to the KMNIST dataset. PGD is used to attack the models. 6v8 2v8 1v2 1v4 6v9 0v1 2v3 1v5 5v7 6v7 0v5 0v7 4v7 0v8 1v3 4v9 3v5 3v8 3v4 4v8 4v5 0v4 1v9 5v9 7v9 5v6 0v2 3v9 2v7 0v9 7v8 3v7 5v8 2v5 1v7 3v6 0v3 4v6 0v6 2v4 2v6 0 0.1 255 1 255 2 255 4 255 6 255 8 255 12 255 16 255 20 255 24 255 32 255 40 255 55 255 L-inf -1.5 -0.9 -0.6 -0.6 -0.0 -0.6 -0.4 -0.0 -2.9 -0.0 -0.2 0.0 0.0 -0.2 -0.2 0.0 -0.2 -0.2 -1.0 -1.8 -0.2 -1.0 0.0 -3.2 -1.1 -0.2 -1.1 0.0 0.0 0.1 -0.5 0.0 -0.5 -0.1 -0.0 -2.8 -3.0 -0.7 4.6 -0.1 -1.1 -1.4 -0.9 -0.6 -0.7 -0.0 -0.5 -0.4 -0.0 -2.9 -0.0 -0.2 0.0 0.0 -0.2 -0.2 0.0 -0.2 -0.2 -1.0 -1.8 -0.2 -1.1 0.0 -3.1 -1.1 -0.2 -1.1 0.0 0.0 0.1 -0.5 0.0 -0.5 -0.1 -0.0 -2.8 -3.0 -0.8 4.6 -0.1 -1.2 -1.5 -0.8 -0.7 -0.7 -0.0 -0.6 -0.5 0.0 -2.8 -0.0 -0.3 0.0 0.0 -0.2 0.0 0.0 -0.2 -0.3 -1.2 -1.8 -0.2 -1.2 0.0 -3.5 -1.3 -0.2 -1.3 0.0 0.0 0.1 -0.5 -0.0 -0.6 -0.1 -0.0 -3.0 -3.2 -0.9 3.7 0.0 -1.7 -1.7 -0.9 -0.8 -0.7 -0.0 -0.4 -0.6 0.0 -2.8 -0.0 -0.3 0.0 0.0 -0.1 -0.1 0.0 -0.2 -0.4 -1.4 -1.8 -0.2 -1.3 0.0 -3.7 -1.4 -0.2 -1.4 0.0 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4.4 -1.5 -1.5 -4.5 -3.5 -0.3 -2.4 -3.7 -0.5 -4.6 -3.9 -9.7 -4.1 -9.4 -10.0 -9.5 -6.3 -2.4 2.0 4.0 -2.5 1.0 0.8 0.2 -4.1 2.3 -3.2 1.3 -2.2 -3.3 -2.7 -4.1 -2.5 -1.7 -1.0 1.2 0.8 1.2 -7.4 -1.5 0.2 -1.7 -1.0 -0.2 -3.0 -2.5 -0.2 -0.6 -2.7 0.2 -5.0 -3.3 -8.4 -3.6 -8.6 -9.2 -8.6 -3.8 -1.2 8.7 13.4 5.1 7.2 8.7 9.2 5.3 9.7 6.8 7.6 8.6 4.7 2.3 4.0 6.5 7.5 4.5 6.0 6.3 9.1 -0.1 4.4 7.2 8.6 5.6 7.2 2.0 2.8 5.7 6.9 0.3 6.7 -1.2 2.2 1.5 2.0 -4.2 -4.5 -3.2 0.5 3.0 26.8 27.6 19.7 24.0 21.2 23.1 24.5 24.5 20.8 22.1 26.8 22.4 13.7 16.7 22.6 23.0 17.9 17.6 17.8 22.0 16.2 14.5 20.2 25.4 16.8 19.7 13.0 14.5 16.9 18.1 9.7 18.2 8.3 10.0 13.7 11.2 6.0 6.8 7.5 6.4 7.4 64.1 58.1 57.2 56.5 56.1 55.7 55.6 55.4 54.2 53.0 52.6 50.9 50.6 50.3 50.0 49.7 49.6 49.2 49.0 49.0 48.4 48.2 48.0 46.8 46.5 46.0 42.3 42.2 40.9 39.9 39.1 38.0 36.6 36.0 23.4 20.5 19.0 18.1 11.2 10.5 9.9 KMNIST 10 1 10 0 0 10 0 10 1 robust accuracy (Adv-KLR - Adv-FCNN) 91
Figure 70A: Laplacian KRR versus norm and adversarially trained FCNNs: and norm adversarially trained FCNNs were attacked at their respective norm adversarial perturbations for FashionMNIST, KMNIST and QMNIST. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. PGD is used to attack the models.
robust accuracy (Laplacian kernel - adv-FCNN)



D Further Ablations
D.1 Results for gradient-free (black-box) attacks
Carlini et al. [7] strongly recommend the use of gradient-free attacks to ensure that robustness is not over-estimated due to gradient masking. We use SPSA as recommended by Uesato et. al. [38]. The number of samples used to approximate the gradient is 16. For KLR the number of samples used is 32. For both and attacks, the step size in the finite difference step is chosen as , with lower bound and upper bound being 0.0001, and 0.001 respectively. In the case of attacks and , we set PGD step size to be . Our results in Tables 6A to 11A and Fig. 71A, Fig. 72A, Fig. 73A, Fig. 74A, Fig. 75A, Fig. 76A demonstrate that SPSA is a weaker attack than PGD, indicating no gradient masking, except for the case of Laplace RFC.
We attack the Laplacian KRR, Laplacian RFM, Gaussian KRR, Gaussian RFM, Laplacian KLR, Gaussian KLR, Laplacian SVM, Gaussian SVM, Adversarially trained Gaussian KLR, FCNN and LeNet on FashionMNIST, KMNIST, and QMNIST using SPSA and compare its robust accuracy to that under PGD attacks. We can see the SPSA attack is weaker than the standard PGD, hence confirming there is no gradient masking for the aforementioned models. For the multiclass case, Table 6A summarizes this result for the attack for Laplacian KRR. Table 7A has the SPSA vs. PGD results for attack for Gaussian KLR. Table 8A contains SPSA results for Laplacian KLR. Table 9A contains the SPSA vs. PGD results for Adversarially trained Gaussian KLR. Table 10A contains the SPSA vs. PGD results for Laplacian SVC. Table 11A contains the SPSA vs. PGD results for Gaussian SVC. Tables 12A and 13A contains preliminary results for Gaussian RFC and Laplacian RFC respectively. From Table 13A, we can see that Laplace RFCs exhibit gradient masking. Comprehensive results corresponding to RFCs are given in §D.7.
Table 6A: Comparison of robust accuracies of Laplacian KRR in the multi-class setting for SPSA, PGD, and the difference of the two across datasets for perturbations. The difference is computed as SPSA minus PGD.
| FMNIST | KMNIST | QMNIST | |||||||
|---|---|---|---|---|---|---|---|---|---|
| ra(SPSA) | ra(PGD) | diff | ra(SPSA) | ra(PGD) | diff | ra(SPSA) | ra(PGD) | diff | |
| 0 | 90.26 | 90.26 | 0.00 | 92.62 | 92.62 | 0.00 | 98.23 | 98.23 | 0.00 |
| 89.28 | 88.57 | 0.71 | 92.23 | 91.95 | 0.28 | 98.12 | 98.05 | 0.07 | |
| 88.16 | 86.14 | 2.02 | 91.92 | 91.33 | 0.59 | 98.02 | 97.91 | 0.11 | |
| 85.25 | 81.19 | 4.06 | 91.3 | 89.95 | 1.35 | 97.86 | 97.51 | 0.35 | |
| 82.34 | 74.02 | 8.32 | 90.47 | 88.29 | 2.18 | 97.62 | 97.06 | 0.56 | |
| 78.63 | 66.33 | 12.30 | 89.73 | 86.67 | 3.06 | 97.35 | 96.52 | 0.83 | |
| 69.83 | 51.74 | 18.09 | 87.93 | 82.49 | 5.44 | 96.74 | 95.11 | 1.63 | |
| 51.83 | 30.35 | 21.48 | 83.35 | 69.53 | 13.82 | 95.02 | 89.59 | 5.43 | |
| 31.68 | 11.73 | 19.95 | 72.79 | 35.47 | 37.32 | 89.17 | 61.80 | 27.37 | |
| 22.36 | 3.20 | 19.16 | 61.42 | 13.52 | 47.90 | 79.32 | 30.93 | 48.40 | |
Table 7A: Comparison of robust accuracies of Gaussian KLR in the multi-class setting for SPSA, PGD, and the difference between the two across datasets for perturbations. The difference is computed as SPSA minus PGD.
| FMNIST | QMNIST | |||||
|---|---|---|---|---|---|---|
| ra(SPSA) | ra(PGD) | diff | ra(SPSA) | ra(PGD) | diff | |
| 0 | 86.95 | 86.95 | 0.00 | 97.47 | 97.47 | 0.00 |
| 86.10 | 85.56 | 0.54 | 97.37 | 97.33 | 0.05 | |
| 78.51 | 72.30 | 6.21 | 96.32 | 95.66 | 0.66 | |
| 43.25 | 35.07 | 8.18 | 82.31 | 65.17 | 17.13 | |
Table 8A: Comparison of robust accuracies of Laplacian KLR in the multi-class setting under SPSA and PGD attacks across FMNIST and KMNIST for perturbations. The difference is computed as SPSA minus PGD. All values are reported in percentages.
| FMNIST | KMNIST | |||||
|---|---|---|---|---|---|---|
| ra(SPSA) | ra(PGD) | diff | ra(SPSA) | ra(PGD) | diff | |
| 88.18 | 88.18 | 0.00 | 92.26 | 92.26 | 0.00 | |
| 87.10 | 86.64 | 0.46 | 91.82 | 91.56 | 0.26 | |
| 85.86 | 84.99 | 0.87 | 91.39 | 90.92 | 0.47 | |
| 83.56 | 81.44 | 2.12 | 90.29 | 89.31 | 0.98 | |
| 77.93 | 73.03 | 4.90 | 88.00 | 85.08 | 2.92 | |
| 71.72 | 63.73 | 7.99 | 85.05 | 79.24 | 5.81 | |
| 59.20 | 48.19 | 11.01 | 76.55 | 62.61 | 13.94 | |
| 45.04 | 33.83 | 11.21 | 58.34 | 29.30 | 29.04 | |
| 38.01 | 30.61 | 7.40 | 42.70 | 12.49 | 30.21 | |
| 30.38 | 26.00 | 4.38 | 20.02 | 1.31 | 18.71 | |
Table 9A: Comparison of robust accuracies of adversarially trained Gaussian KLR in the multi-class setting under SPSA and PGD attacks for perturbations on KMNIST. The difference is computed as ra(SPSA) – ra(PGD).
| KMNIST | |||
|---|---|---|---|
| ra(SPSA) | ra(PGD) | diff | |
| 88.40 | 88.40 | 0.00 | |
| 88.35 | 88.24 | 0.11 | |
| 87.26 | 86.27 | 0.99 | |
| 85.24 | 82.40 | 2.84 | |
| 82.78 | 77.63 | 5.15 | |
| 77.17 | 66.61 | 10.56 | |
Table 10A: Comparison of robust accuracies of Laplacian SVM in the multi-class setting for SPSA, PGD, and the difference between the two across datasets for perturbations.
| FMNIST | KMNIST | |||||
|---|---|---|---|---|---|---|
| ra(SPSA) | ra(PGD) | diff | ra(SPSA) | ra(PGD) | diff | |
| 90.01 | 90.01 | 0.00 | 90.54 | 90.54 | 0.00 | |
| 89.90 | 89.87 | 0.03 | 90.53 | 90.47 | 0.06 | |
| 89.17 | 88.39 | 0.78 | 90.27 | 89.87 | 0.40 | |
| 88.38 | 86.63 | 1.75 | 90.03 | 89.02 | 1.01 | |
| 86.76 | 82.18 | 4.58 | 89.43 | 87.34 | 2.09 | |
| 84.86 | 76.01 | 8.85 | 88.85 | 85.41 | 3.44 | |
| 82.87 | 69.11 | 13.76 | 88.32 | 82.89 | 5.43 | |
| 78.20 | 55.21 | 22.99 | 87.02 | 76.84 | 10.18 | |
| 66.61 | 34.76 | 31.85 | 83.66 | 60.43 | 23.23 | |
| 49.28 | 12.67 | 36.61 | 76.26 | 26.91 | 49.35 | |
| 40.51 | 4.50 | 36.01 | 69.24 | 11.37 | 57.87 | |
| 26.59 | 0.27 | 26.32 | 51.21 | 0.91 | 50.30 | |
Table 11A: Comparison of robust accuracies of Gaussian SVM in the multi-class setting under SPSA and PGD attack, along with their differences across FMNIST and KMNIST datasets for perturbations.
| FMNIST | KMNIST | |||||
|---|---|---|---|---|---|---|
| ra(SPSA) | ra(PGD) | diff | ra(SPSA) | ra(PGD) | diff | |
| 0 | 89.62 | 89.62 | 0.00 | 93.14 | 93.14 | 0.00 |
| 89.49 | 89.29 | 0.20 | 93.09 | 93.00 | 0.09 | |
| 88.42 | 86.28 | 2.14 | 92.76 | 92.11 | 0.65 | |
| 86.91 | 82.41 | 4.50 | 92.40 | 91.02 | 1.38 | |
| 84.02 | 73.17 | 10.85 | 91.72 | 88.74 | 2.98 | |
| 80.98 | 61.94 | 19.04 | 90.88 | 86.09 | 4.79 | |
| 77.25 | 50.67 | 26.58 | 90.10 | 82.99 | 7.11 | |
| 68.34 | 32.45 | 35.89 | 88.26 | 74.43 | 13.83 | |
| 50.23 | 8.29 | 41.94 | 83.44 | 49.51 | 33.93 | |
| 28.78 | 0.19 | 28.59 | 71.08 | 13.68 | 57.40 | |
| 18.90 | 0.01 | 18.89 | 58.86 | 3.89 | 54.97 | |
| 7.60 | 0.00 | 7.60 | 35.80 | 0.13 | 35.67 | |
Table 12A: Comparison of PGD and SPSA robust accuracy (%) for Gaussian Random Feature Classifiers (RFC) trained with cross-entropy loss on Fashion-MNIST. The model uses 50,000 random features and random seed 150.
| () | PGD (%) | SPSA (%) |
|---|---|---|
| 0 | 89.66 | 89.66 |
| 0.1/255 | 89.28 | 89.34 |
| 1/255 | 84.63 | 85.69 |
| 2/255 | 78.54 | 81.16 |
| 4/255 | 63.72 | 69.58 |
| 6/255 | 51.09 | 58.07 |
| 8/255 | 42.91 | 49.19 |
| 12/255 | 28.26 | 37.12 |
| 20/255 | 6.85 | 15.96 |
| 32/255 | 0.07 | 1.41 |
| 40/255 | 0.00 | 0.17 |
| 55/255 | 0.00 | 0.07 |
Table 13A: Comparison of PGD and SPSA robust accuracy (%) for Laplacian Random Feature Classifiers (RFC) trained with cross-entropy loss on KMNIST. The model uses 50,000 random features and random seed 150.
| () | PGD (%) | SPSA (%) |
|---|---|---|
| 0 | 89.43 | 89.43 |
| 0.1/255 | 88.46 | 87.57 |
| 1/255 | 87.22 | 77.11 |
| 2/255 | 86.66 | 69.48 |
| 4/255 | 85.84 | 56.25 |
| 6/255 | 85.20 | 42.82 |
| 8/255 | 84.62 | 30.12 |
| 12/255 | 83.59 | 15.28 |
| 20/255 | 81.08 | 8.55 |
| 32/255 | 75.82 | 8.08 |
| 40/255 | 71.15 | 8.07 |
| 55/255 | 59.37 | 8.04 |
Figure 71A: SPSA attacked Laplacian KRR versus PGD attacked Laplacian KRR. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries.
robust accuracy (Laplacian KRR (SPSA - PGD))

Figure 72A: SPSA attacked Laplacian RFM versus PGD attacked Laplacian RFM. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries.
robust accuracy (Laplacian RFM (SPSA - PGD))


Figure 73A: SPSA attacked Gaussian KRR versus PGD attacked Gaussian KRR. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries.
robust accuracy (Gaussian KRR (SPSA - PGD))

Figure 74A: SPSA attacked Gaussian RFM versus PGD attacked Gaussian RFM. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries.
robust accuracy (Gaussian RFM (SPSA - PGD))


class pair
class pair

Figure 75A: SPSA attacked FCNN versus PGD attacked FCNN. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries.
robust accuracy (FCNN (SPSA - PGD))


class pair
class pair
Figure 76A: SPSA attacked LeNet versus PGD attacked LeNet. (Top) row corresponds to the results for FashionMNIST dataset, (Middle) row corresponds to the KMNIST dataset, and (Bottom) row corresponds to the QMNIST dataset. Of these, (First) column corresponds to the robust accuracies for adversaries while (Second) column portrays the robust accuracies for adversaries. robust accuracy (LeNet (SPSA - PGD))


class pair
class pair
-10^{1} -10^{0} 0 10^{0} 10^{1}
D.2 Robustness on Tabular datasets
Recent work [32, 3] has shown that RFMs and their variants are state-of-the-art on tabular data benchmarks. Given this, it is instructive to determine whether kernel-based classifiers are also more robust than neural networks on tabular data. However, since tabular data has dimension-wise semantic constraints, we use the Cost-aware Feasible Attack (CaFA) method from [5] to ensure that all generated adversarial examples remain feasible. Further details about the attack are in §A.2.
Results: When running CaFA, it marks points as infeasible if they do not satisfy the automatically determined integrity constraints. All accuracies in Table 14A are only reported on the portion of the dataset found to be feasible. We find that on the Phishing and Bank datasets, KMs are indeed more robust. However, the FCNN is comfortably more robust on the Adult dataset. This is the only dataset where we find KMs to be less robust, and we plan to investigate the reason for this in future work.
Table 14A: CaFA attacks on FCNN, KRR and RFM on the Phishing, Bank Marketing and Adult datasets. Robust accuracy numbers are reported only on compliant samples after each stage. The accuracy values are rounded to the nearest tenth.
| ε | stage | Phishing | Bank Marketing | Adult | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| FCNN | KRR | RFM | FCNN | KRR | RFM | FCNN | KRR | RFM | ||
| 0.01 | Benign | 94.8 | 92.6 | 95.2 | 87.8 | 89.7 | 89.7 | 84.3 | 72.4 | 80.8 |
| Post CaFA | 53.0 | 52.4 | 70.5 | 90.3 | 89.5 | 78.6 | 73.0 | 61.2 | 43.1 | |
| Post projection | 42.0 | 31.1 | 63.5 | 84.3 | 85.7 | 75.0 | 64.2 | 51.2 | 38.0 | |
| 0.03 | Benign | 94.8 | 92.6 | 95.2 | 87.8 | 89.7 | 89.7 | 84.3 | 72.4 | 80.8 |
| Post CaFA | 46.7 | 44.3 | 60.6 | 89.5 | 90.5 | 79.9 | 69.6 | 55.6 | 39.2 | |
| Post projection | 38.1 | 36.8 | 56.4 | 80.8 | 85.6 | 66.2 | 61.3 | 45.4 | 33.7 | |
| 0.075 | Benign | 94.8 | 92.6 | 95.2 | 87.8 | 89.7 | 89.7 | 84.3 | 72.4 | 80.8 |
| Post CaFA | 42.8 | 42.3 | 49.6 | 78.5 | 91.9 | 76.4 | 68.5 | 49.1 | 36.6 | |
| Post projection | 31.5 | 32.2 | 41.8 | 64.6 | 85.9 | 70.8 | 60.0 | 40.0 | 30.4 | |
D.3 Results for Matérn Kernel versus robust accuracy
We observe that the robust accuracy of Matérn Kernel decreases with increase in the smoothness parameter( ) value in SVHN, KMNIST, QMNIST. In FashionMNIST robust accuracies stay quite close to each other, although not following a clear pattern. Further details about the experiment are in §B.6, with results in Fig. 77A. PGD is used to attack the Kernel.

Figure 77A: Robust Accuracy variation with Matérn Kernel smoothness parameter for SVHN, KMNIST, QMNIST, FMNIST.
D.4 Robust Accuracy variation with iteration in RFMs
RFMs are KM variant that learn features iteratively. This compels us to ask what happens to the robust accuracy as RFM learns features. The results in Fig. 78A show that RFMs' robust accuracy decreases with an increase in the feature learning (or with number of iterations), specifically for Laplacian RFMs. We attacked the models using PGD.

Figure 78A: Robust Accuracy variation with iterations in Laplacian RFM for SVHN, KMNIST, QMNIST, FMNIST.
D.5 Robust Accuracy variation with length scale ()
Fig. 79A shows that, for the Laplacian kernel, adversarial robustness generally favours smaller length scales . Even though smaller can yield lower benign accuracy, it often achieves higher robust accuracy as the attack strength increases, indicating a trade-off between benign performance and robustness. The corresponding Gaussian-kernel results are shown in Fig. 80A, where the dependence on is less monotonic and more dataset dependent. Ridge () was kept the same across different length scales (). Results are given for the KRR. Models are attacked using PGD.

Figure 79A: Robust Accuracy variation with length scale () in Laplacian Kernel for SVHN, KMNIST, QMNIST, FMNIST across different attack .

Figure 80A: Robust Accuracy variation with length scale () in Gaussian Kernel for SVHN, KMNIST, QMNIST, FMNIST across different attack .
D.6 Robust Accuracy variation with ridge ( )
We observe in Fig. 81A that the effect of ridge regularization on KRR is dataset dependent. While small-to-moderate ridge values largely preserve performance, stronger regularization can improve robustness under larger perturbations for FMNIST, KMNIST and QMNIST, but does not provide a consistent benefit for SVHN. This indicates a trade-off between benign accuracy and adversarial robustness. No single ridge value comes out to be optimal across all datasets and attack strengths. Length Scale ( ) was kept the same across different ridge ( ) values. PGD is used to attack KRR .

Figure 81A: Robust Accuracy variation with ridge ( ) in Laplacian KRR for SVHN, KMNIST, QMNIST, FMNIST across different attack .
D.7 Number of features in RFC versus robust accuracy
As is evident from Fig. 82A to Fig. 93A, both the benign accuracy as well as robust accuracy improves with an increase in the number of features, except when we train Laplace RFC with square loss. In Laplace RFCs, trained with square loss, benign accuracy improves with an increase in the number of features, but that is not the case with robust accuracy. We observe gradient masking in the case of Laplace RFC, no matter the training loss, as is seen in Figs. 88A to 93A. 5 different seeds are used for RFCs.
Ablation results for number of features vs. robust accuracy for Gaussian RFC on FMNIST, KMNIST, QMNIST for square and cross-entropy loss is given in Fig. 82A to Fig. 87A. Results for Laplacian Kernel trained using square and cross entropy training loss range from Fig. 88A to Fig. 93A.
D.7.1 FMNIST Results for Gaussian RFC
Gaussian RFC on FMNIST (Square): SPSA vs PGD across seeds


Number of random features ( )
Figure 82A: Robust Accuracy variation with Number of Features in Gaussian RFC (trained using Square Loss) for FMNIST across different seeds per attack. SPSA and PGD denote attacks on the RFC, each line shows the robust accuracy of a model at a given perturbation radius ( ).
Gaussian RFC on FMNIST (Cross-Entropy): SPSA vs PGD across seeds


Number of random features (×1000)
Figure 83A: Robust Accuracy variation with Number of Features in Gaussian RFC (trained using Cross Entropy) for FMNIST across different seeds per attack. SPSA and PGD denote attacks on the RFC, each line shows the robust accuracy of a model at a given perturbation radius ().
D.7.2 KMNIST Results for Gaussian RFC
Gaussian RFC on KMNIST (Square): SPSA vs PGD across seeds

Adversarial accuracy (%)

Number of random features (×1000)
Figure 84A: Robust Accuracy variation with Number of Features in Gaussian RFC (trained using Square Loss) for KMNIST across different seeds per attack. SPSA and PGD denote attacks on the RFC, each line shows the robust accuracy of a model at a given perturbation radius ().
Gaussian RFC on KMNIST (Cross-Entropy): SPSA vs PGD across seeds


Number of random features ( )
Figure 85A: Robust Accuracy variation with Number of Features in Gaussian RFC (trained using Cross Entropy) for KMNIST across different seeds per attack. SPSA and PGD denote attacks on the RFC, each line shows the robust accuracy of a model at a given perturbation radius ( ).
D.7.3 QMNIST Results for Gaussian RFC
Gaussian RFC on QMNIST (Square): SPSA vs PGD across seeds


Number of random features (×1000)
Figure 86A: Robust Accuracy variation with Number of Features in Gaussian RFC (trained using Square Loss) for QMNIST across different seeds per attack. SPSA and PGD denote attacks on the RFC, each line shows the robust accuracy of a model at a given perturbation radius ().
Gaussian RFC on QMNIST (Cross-Entropy): SPSA vs PGD across seeds


Number of random features ( )
Figure 87A: Robust Accuracy variation with Number of Features in Gaussian RFC (trained using Cross Entropy Loss) for QMNIST across different seeds per attack. SPSA and PGD denote attacks on the RFC, each line shows the robust accuracy of a model at a given perturbation radius ( ).
D.7.4 FMNIST Results for Laplace RFC
Laplace RFC on FMNIST (Square): SPSA vs PGD across seeds


Number of random features (×1000)
Figure 88A: Robust Accuracy variation with Number of Features in Laplace RFC (trained using Square Loss) for FMNIST across different seeds per attack. SPSA and PGD denote attacks on the RFC, each line shows the robust accuracy of a model at a given perturbation radius ().
Laplace RFC on FMNIST (Cross-Entropy): SPSA vs PGD across seeds


Number of random features ( )
Figure 89A: Robust Accuracy variation with Number of Features in Laplacian RFC (trained using Cross Entropy) for FMNIST across different seeds per attack. SPSA and PGD denote attacks on the RFC, each line shows the robust accuracy of a model at a given perturbation radius ( ).
D.7.5 KMNIST Results for Laplace RFC
Laplace RFC on KMNIST (Square): SPSA vs PGD across seeds


Number of random features (×1000)
Figure 90A: Robust Accuracy variation with Number of Features in Laplace RFC (trained using Square Loss) for KMNIST across different seeds per attack. SPSA and PGD denote attacks on the RFC, each line shows the robust accuracy of a model at a given perturbation radius ( ).
Laplace RFC on KMNIST (Cross-Entropy): SPSA vs PGD across seeds


Number of random features (×1000)
Figure 91A: Robust Accuracy variation with Number of Features in Laplacian RFC (trained using Cross Entropy) for KMNIST across different seeds per attack. SPSA and PGD denote attacks on the RFC, each line shows the robust accuracy of a model at a given perturbation radius ( ).
D.7.6 QMNIST Results for Laplace RFC
Laplace RFC on QMNIST (Square): SPSA vs PGD across seeds


Number of random features ( )
Figure 92A: Robust Accuracy variation with Number of Features in Laplace RFC (trained using Square Loss) for QMNIST across different seeds per attack. SPSA and PGD denote attacks on the RFC, each line shows the robust accuracy of a model at a given perturbation radius ( ).
Laplace RFC on QMNIST (Cross-Entropy): SPSA vs PGD across seeds


Number of random features ( )
Figure 93A: Robust Accuracy variation with Number of Features in Laplace RFC (trained using Cross Entropy Loss) for QMNIST across different seeds per attack. SPSA and PGD denote attacks on the RFC, each line shows the robust accuracy of a model at a given perturbation radius ( ).