{'fraction_non_alphanumeric': 0.054020709407358446, 'fraction_numerical': 0.01647940074906367, 'mean_word_length': 4.39919115023195, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Probabilistically Robust Learning: Balancing Average- and Worst-case Performance

Many of the successes of machine learning are based on minimizing an averaged loss function. However, it is well-known that this paradigm suffers from robustness issues that hinder its applicability in safety-critical domains. These issues are often addressed by training against worst-case perturbations of data, a technique known as adversarial training. Although empirically effective, adversarial training can be overly conservative, leading to unfavorable trade-offs between nominal performance and robustness. To this end, in this paper we propose a framework called probabilistic robustness that bridges the gap between the accurate, yet brittle average case and the robust, yet conservative worst case by enforcing robustness to most rather than to all perturbations. From a theoretical point of view, this framework overcomes the trade-offs between the performance and the sample-complexity of worst-case and average-case learning. From a practical point of view, we propose a novel algorithm based on risk-aware optimization that effectively balances average- and worst-case performance at a considerably lower computational cost relative to adversarial training. Our results on MNIST, CIFAR-10, and SVHN illustrate the advantages of this framework on the spectrum from average- to worst-case robustness.


Introduction
Underlying many of the modern successes of learning is the statistical paradigm of empirical risk minimization (ERM), in which the goal is to minimize a loss function averaged over data (Vapnik, 1999). Although ubiquitous in practice, it is now well-known that prediction rules learned by ERM suffer from a severe lack of robustness, which in turn greatly limits their applicability in safety-critical domains (Biggio et al., 2013;Shen et al., 2021). Indeed, this vulnerability has led to a pronounced interest in improving the robustness of modern learning tools (Goodfellow et al., 2014;Madry et al., 2017;Zhang et al., 2019).
To this end, a growing body of work has motivated a learning paradigm known as adversarial training, wherein rather than training on the raw data, predictors are trained against worst-case perturbations of data (Goodfellow et al., 2014;Madry et al., 2017). Yet, despite ample empirical evidence showing that adversarial training improves the robustness of learned predictors (Su et al., 2018;Croce et al., 2020;Tang et al., 2021), this framework is not without drawbacks. Indeed, adversarial training is known to be overly conservative (Tsipras et al., 2018;Raghunathan et al., 2019), a property often exhibited by other worst-case approaches ranging from complexity theory (Spielman & Teng, 2004) to robust control (Zhou & Doyle, 1998). Furthermore, there are broad classes of problems for which the sample complexity of learning a robust predictor is arbitrarily large (Cullina et al., 2018;Montasser et al., 2019). Finally, the problem of computing worst-case perturbations of data is nonconvex and underparameterized for most modern learning models including deep neural networks (DNNs).
The fundamental drawbacks of these learning paradigms motivate the need for a new robust learning framework that (i) avoids the conservatism of adversarial robustness without incurring the brittleness of ERM, (ii) provides an interpretable way to balance nominal performance and robustness, and (iii) admits an efficient and effective algorithm. To this end, in this paper we propose a framework called probabilistic robustness that bridges the gap between the accurate, yet brittle average-case approach of ERM and the robust, yet conservative worst-case approach of adversarial training. By enforcing robustness to most rather than to all perturbations, we show theoretically and empirically that probabilistic robustness meets the desiderata in (i)-(iii). Indeed, our approach parallels a litany of past work in a variety of fields, including smoothed analysis (Spielman & Teng, 2004) and control theory (Campi & Garatti, 2008), wherein Figure 1. The spectrum of robustness. Illustration of the different decision boundaries engendered by robustness paradigms. Left: the two classes (yellow and blue dots) can be separated by a simple decision boundary, though it may not be robust to data perturbations. Right: the decision boundary must account for the neighborhood of each data point (yellow and blue boxes), leading to a degraded nominal performance. Middle: probabilistic robustness bridges these extremes by allowing a small proportion of perturbations (shown in red) to be misclassified, mitigating the trade-offs between robustness and accuracy both in theory and in practice. robustness is enforced with high probability rather than in the worst case. In particular, our contributions include: • Novel robustness framework. We introduce probabilistically robust learning, a new formulation wherein the goal is to learn predictors that are robust to most rather than to all perturbations (see Fig. 1). • (Lack of) Fundamental trade-offs. We show that in high dimensional settings, the nominal performance of probabilistically robust classifiers is the same as the Bayes optimal classifier, which contrasts with analogous results for adversarially robust classifiers. • Sample complexity. We also show that while the sample complexity of adversarial learning can be arbitrarily high, the sample complexity of our probabilistically robust learning is the same as ERM. • Tractable algorithm. Inspired by risk-aware optimization, we propose a tractable algorithm for probabilistically robust training that spans the full spectrum of robustness ( Fig. 1) at a considerably lower computational cost than adversarial training. • Thorough experiments. We provide thorough experiments on MNIST, CIFAR-10, and SVHN. In particular, when we evaluate the ability of algorithms to be robust to 99% of points in ∞ -balls on CIFAR-10, our algorithm outperforms all baselines by six percentage points.

Adversarially Robust Learning
In this paper, we consider the standard supervised learning setting in which data is distributed according to an unknown joint distribution D over instance-label pairs (x, y), with instances x drawn from X ⊆ R d and labels y drawn from Y ⊆ R; in particular, for classification problems we let Y = {1, . . . , K}. Our goal is to obtain a hypothesis h : X → Y belonging to a given hypothesis class H that correctly predicts the corresponding label y for each instance x. One common approach to this problem is to minimize a suitablychosen loss function : Y × Y → R + (e.g., the 0-1, crossentropy, or squared loss) on average over D. Explicitly, Here SR(h) denotes the standard risk or nominal performance of h. 1 The hypothesis class H is often comprised of models f θ parameterized by a vector θ drawn from a compact set Θ ⊂ R p , e.g., linear classifiers or deep neural networks with bounded parameters.
Because the distribution D is unknown, the objective in (P-NOM) cannot be evaluated in practice. The core idea behind ERM is to use samples (x j , y j ) drawn i.i.d. from D to estimate the expectation: One of the fundamental problems in learning theory is to establish the number N of i.i.d. samples needed for (P-ERM) to approximate the value of (P-NOM) with high probability. Problems for which N is finite are called probably approximately correct (PAC) learnable (Vapnik, 1999).
Pitfalls of ERM. While solving (P-ERM) often yields classifiers that are near-optimal for (P-NOM), there is now overwhelming evidence that these hypotheses are sensitive to 1 We assume that and h satisfy the integrability conditions needed for the expectation in (P-NOM) to be well-defined. imperceptible perturbations of their input (Biggio et al., 2013;Szegedy et al., 2013). Explicitly, given an instance x and a solution h for (P-ERM), one can often find a small perturbations δ such that h(x + δ) = h(x) = y. 2 This issue has been observed in hypotheses ranging from linear models to complex nonlinear models (e.g., DNNs) and has motivated a considerable body of recent work on robust learning (Goodfellow et al., 2014;Madry et al., 2017;Jalal et al., 2017;Zhang et al., 2019;Kamalaruban et al., 2020;Rebuffi et al., 2021).

Adversarial robustness
Among the approaches that have been proposed to mitigate the sensitivity of hypotheses to input perturbations, there is considerable empirical evidence suggesting that adversarial training is an effective way to obtain adversarially robust classifiers (Su et al., 2018;Athalye et al., 2018;Croce et al., 2020). In this paradigm, hypotheses are trained against worst-case perturbations of data rather than on the raw data itself, giving rise to a robust counterpart of (P-NOM): where ∆ ⊂ R d is the set of allowable perturbations and we omit the distribution D for simplicity. In (P-ROB), AR(h) denotes the adversarial risk of h. Observe that in contrast to (P-NOM), the objective of (P-ROB) explicitly penalizes hypotheses that are sensitive to perturbations in ∆, thus yielding more robust hypotheses. Numerous principled adversarial training algorithms have been proposed for solving (P-ROB) (Goodfellow et al., 2014;Madry et al., 2017;Kannan et al., 2018) and closely-related variants (Moosavi-Dezfooli et al., 2016;Wong & Kolter, 2018;Wang et al., 2019;Zhang et al., 2019).
Pitfalls of adversarial training. Despite the empirical success of adversarial training at defending against worst-case attacks, this paradigm has several limitations. In particular, it is well-known that the improved adversarial robustness offered by (P-ROB) comes at the cost of degraded nominal performance (Tsipras et al., 2018;Dobriban et al., 2020;Javanmard et al., 2020;Yang et al., 2020). Additionally, evaluating the supremum in (P-ROB) can be challenging in practice, since the resulting optimization problem is nonconcave and underparameterized for modern hypothesis classes, e.g., DNNs (Soltanolkotabi et al., 2018). Finally, from a learning theoretic perspective, there exist hypothesis classes for which (P-NOM) is PAC learnable while (P-ROB) is not, i.e., for which (P-NOM) can be approximated using samples whereas (P-ROB) cannot (Cullina et al., 2018;Montasser et al., 2019;Diochnos et al., 2019).

Between the average and worst case
Aside from the now prevalent framework of adversarial training, many works have proposed alternative methods to mitigate the aforementioned vulnerabilities of learning. A standard technique that dates back to (Holmstrom & Koistinen, 1992) is to use a form of data augmentation (P-NOM): (P-AVG) Here, the inner expectation is taken against a known distribution r. While many algorithms have been proposed for specific r (Krizhevsky et al., 2012;Hendrycks et al., 2019;Laidlaw & Feizi, 2019;Chen et al., 2020), they fail to yield classifiers sufficiently robust to small perturbations.
Toward obtaining robust alternatives to (P-AVG), two recent works propose relaxations of (P-ROB) that engender notions of robustness between (P-NOM) and (P-ROB). The first relies on the hierarchy of Lebesgue spaces, i.e., where ||·|| L q denotes the Lebesgue q-norm taken over ∆ with respect to the measure r (Rice et al., 2021). The second relaxes the supremum using the soft maximum or LogSum-Exp function (Li et al., 2020;: While both (PI) and (PII) are strong alternatives to (P-ROB), both suffer from significant practical issues related to optimizing their objectives. More specifically, the objective in (PI) cannot be efficiently computed during training due to the difficulty of evaluating the L q norm (Rice et al., 2021). And in the case of (PII), the gradient of the objective becomes unstable for large values of t when training DNNs. Furthermore, looking beyond these practical limitations, there is also no clear relationship between the values of q and t and robustness properties of the solutions for (PI) and (PII), making these parameters difficult to choose or interpret. These limitations motivate the need for an alternative formulation of robust learning.
Remark 2.1. Formally, the limiting cases of (PI) and (PII) are not (P-NOM) and (P-ROB). Indeed, for q = 1 and t → 0, the objectives of both problems approach the objective of (P-AVG). For q = ∞ and t → ∞, the objectives of (PI) and (PII) can be written in terms of the essential supremum min hr∈H E (x,y) ess sup where ess sup δ∼r f (δ) denotes an almost everywhere upper bound of f , i.e., an upper bound except perhaps on a set of r-measure zero. Note that the essential supremum is a weaker adversary (ess sup ≤ sup), although for rich enough hypothesis classes, the value of (P-ROB) and (PIII) can be the same (Bungert et al., 2021, Lemma 3.8).

Probabilistically robust learning
The discussion in the previous section identifies three desiderata for a new robust learning framework: (i) Interpolation. The framework should strike a balance between nominal and adversarial performance. (ii) Interpretability. This interpolation should be precisely controlled by an interpretable parameter. (iii) Tractability. The framework should admit a computationally tractable training algorithm.
While (PI) and (PII) do achieve (i), neither meets the criteria in (ii) or (iii). On the other hand, the probabilistic robustness framework introduced in this section satisfies all of these desiderata. Moreover, as we show in Section 4, it benefits from numerous theoretical properties.

A probabilistic perspective on robustness
The core idea behind probabilistic robustness is to replace the worst-case view of robustness with a probabilistic perspective. This idea has a long history in numerous fields, including chance-constrained optimization in operations research (Charnes et al., 1958;Miller & Wagner, 1965) and control theory (Campi & Garatti, 2008;Ben-Tal et al., 2009;Ramponi, 2018;Schildbach et al., 2014) and smoothed analysis in algorithmic complexity theory (Spielman & Teng, 2004). In each of these domains, probabilistic approaches are founded on the premise that a few rare events are disproportionately responsible for the performance degradation and increased complexity of adversarial solutions. In the context of robust learning, this argument is supported by recent theoretical and empirical observations suggesting that low-dimensional regions of small volume in the data space are responsible for the prevalence of adversarial examples (Gilmer et al., 2018;Khoury & Hadfield-Menell, 2018;Shamir et al., 2021). This suggests that because the adversarial training formulation (P-ROB) does not differentiate between perturbations, it is prone to yielding conservative solutions that overcompensate for rare events.
To begin our exposition of probabilistic robustness, first consider the case of the 0-1 loss. Here, adversarial training has shifted focus from the nominal 0-1 loss I[h(x) = y] to the adversarially robust 0-1 loss Concretely, this robust loss takes value one if there exists any perturbation δ in a neighborhood ∆ of a fixed instance x that causes misclassification, and value zero otherwise. Motivated by our discussion in the previous paragraph, we seek a relaxed variant of the robust loss which will allow us Figure 2. The ρ-ess sup ρ-ess sup ρ-ess sup operator. In this cartoon, we fix (x, y) ∈ Ω to show the perturbation set ∆ on the x-axis and the value of (h(x + δ), y) on the y-axis. The solid line shows the value of sup δ∈∆ (h(x + δ), y), the least upper bound for (h(x + δ), y). The dashed line shows, for a fixed ρ > 0, the value of ρ-ess sup δ∼r (h(x + δ), y), the smallest number u such that (h(x + δ), y) takes on values larger than u (shown in red) on a subset (shown in yellow) with volume not exceeding ρ.
to quantify the robust performance of a candidate hypothesis while ignoring regions of insignificant volume in ∆. To do so, we first introduce a probability distribution r (e.g., the uniform distribution) over ∆ to assess the local probability of error P δ∼r [h(x + δ) = y] around each instance x. Then, for a fixed tolerance level ρ ∈ [0, 1), the goal of probabilistic robustness is to minimize the probability that the event P δ∼r [h(x + δ) = y] < 1 − ρ will occur; that is, the goal is to ensure that most perturbations do not cause an instance x to be misclassified. As such, the smaller the value of ρ, the more stringent the requirement on robustness. In this way, under the 0-1 loss, our probabilistically robust learning task can then formulated as follows: It is then straightforward to see that under the 0-1 loss, probabilistically robust learning is an instance of (P-NOM) in the sense that we are minimizing the expectation of a particular loss I[P δ∼r [h(x + δ) = y] > ρ].

Generalizing to general loss functions
With this intuition in mind, we now generalize (PIV) to arbitrary loss functions. To do so, let (Ω, B) define a measurable space, where Ω = X × Y and B denotes the Borel σalgebra of Ω. Observe that for fixed (x, y) ∈ Ω, the supremum t := sup δ∈∆ (h(x + δ), y) from (P-ROB) can be written in epigraph form as This formulation makes explicit the fact that the supremum is the least upper bound of (h(x + δ), y) (see Fig. 2).
As in the development of (PIV), however, we do not need t to upper bound (h(x + δ), y) for all δ ∈ ∆, but only for a proportion 1 − ρ of the volume of ∆. We therefore consider the following relaxation of (3.1): In contrast to (3.1), the upper bound in (3.2) can ignore perturbations for which (h(x + δ), y) is large (red regions in Fig. 2) as long as these perturbations occupy a subset of ∆ that has probability less than ρ (yellow regions in Fig. 2). Thus, note that for ρ ≥ ρ , it holds that and that u (0) is the essential supremum from measure theory. In view of this connection, we call u (ρ) in (3.2) the ρ-essential supremum (ρ-ess sup) (dashed line in Fig. 2) and formalize its definition below.
Definition 3.1. Let (Ω, B, p) be a measure space and let f : Ω → R be a measurable function. Define the set Then, the ρ-ess sup is defined as 3 where supp(p) denotes the support of p.
For a given tolerance level ρ ∈ [0, 1), probabilistically robust learning can now be formalized in full generality as In this problem, r is defined on the measurable space (∆, B ∆ ), where B ∆ is the restriction of the σalgebra B to ∆. For consistency, we define the probabilistic robustness problem (P-PRL) for ρ = 1 as (P-AVG).
By construction, it is clear that (P-PRL) satisfies desideratum (i): For ρ = 0, we recover (PIII) and for all ρ ∈ (0, 1), we obtain a strict relaxation of the robustness criteria in (P-ROB). Furthermore, if r is symmetric-meaning that the mean and median coincide, as is the case for the uniform and Gaussian distributions-then we recover (P-AVG) for ρ = 1 /2. However, we note that for general distribution r the objective of (P-PRL) does not approach that of (P-AVG). In practice, this is inconsequential because we are primarily interested in values of ρ close to zero in order to guarantee robustness in large neighborhoods of the data. Additionally, as we show in Section 5, the algorithm we put forward to solve (P-PRL) yields solutions that exactly recover the average case. Moreover, we show in Sections 5 and 6 that this algorithm fulfills desideratum (iii).
As for the interpretability of ρ in desideratum (ii), notice that the relaxation in (P-PRL) explicitly minimizes the loss over a neighborhood of r-measure at least 1 − ρ of each data point. Thus, in contrast to (PI) or (PII), this relaxation has a practical interpretation. This interpretability is clearest in the 0-1 loss case (PIV), which effectively minimizes P (x,y) P δ∼r [h p (x + δ) = y] > ρ . In this way, probabilistic robustness measures the probability of making an error in a neighborhood of each point and only declares failure if that probability is too large, i.e., larger than ρ. This is in contrast to directly measuring the probability of error as in (P-NOM) or requiring that the probability of failure vanishes as in (PIII).

Statistical properties of probabilistic robustness
In this section, we characterize the behavior of probabilistic robustness in different settings to show that, in addition to meeting the practical desiderata enumerated in Section 3, this framework also enjoys significant statistical advantages over its worst-case counterpart. In particular, in line with a myriad of past work (Su et al., 2018;Bhagoji et al., 2019;Dobriban et al., 2020;Javanmard et al., 2020;Cullina et al., 2018;Montasser et al., 2020), we first observe that the security guarantee of adversarial robustness comes at the cost of degraded nominal performance as well as an arbitrarily large sample complexity. However, in stark contrast to these results, we show that even for arbitrarily small ρ, there exists classes of problems for which probabilistic robustness can be achieved with the same sample complexity as classical learning and at a vanishingly small cost in nominal performance relative to the Bayes optimal classifier. In the sequel, we first analyze probabilistically robust learning in the two fundamental settings of binary classification and linear regression (Section 4.1), followed by a learning theoretic characterization of its sample complexity (Section 4.2).

Nominal performance vs. robustness trade-offs
In this section, we consider perturbation sets of the form for a fixed > 0 and we let r be the uniform distribution over ∆. We consider binary classification problems with data distributed as where π ∈ [0, 1] is the proportion of the y = +1 class, I d is the d-dimensional identity matrix, and σ > 0 is the within-class standard deviation. We assume without loss of generality that the class means ±µ are centered about the origin and, by scaling, that σ = 1. In this setting, it is well-known that the Bayes optimal classifier is where q = ln[(1 − π)/π] (Anderson, 2003). Moreover, (Dobriban et al., 2020) recently showed that the optimal adversarially robust classifier is where [z] + = max(0, z). In the following proposition, we obtain a closed-form expression for the optimal probabilistically robust linear classifier.
Proposition 4.1. Suppose the data is distributed according to (4.2) and let < ||µ|| 2 . Then, for ρ is the optimal linear solution for (PIV), where v ρ is the Euclidean distance from the origin to a spherical cap of ∆ with measure ρ. Moreover, it holds that (4.6) Concretely, Prop. 4.1 conveys three messages.
Firstly, (4.5) shows that the optimal probabilistically robust linear classifier corresponds to the Bayes classifier with an effective mean µ → µ(1 − v ρ / ||µ|| 2 ) + . Secondly, h p depends on the tolerance level ρ through the measure of a spherical cap of ∆. Indeed, it is straightforward to check that v 1/2 = 0 and v 0 = , and thus (4.5) recovers h Bayes and h r respectively. Thus, in this setting, not only does (P-PRL) interpolate between (P-ROB) and (P-NOM) as ρ varies from 0 to 1 /2, but so too do its optimal solutions.
Finally, (4.6) shows that the best achievable probabilistic robustness is essentially the same as the best achievable nominal performance in high dimensions, regardless of the value of ρ provided that it remains strictly positive. However, in the adversarially robust setting of ρ = 0, the gap between robustness and accuracy does not vanish, which lays bare the conservatism engendered by forcing classifiers to account for a small set of rare events. In this way, a phase transition occurs at ρ = 0 in the sense that for any ρ > 0, the gap between nominal performance and probabilistic robustness vanishes in high dimensions, despite the fact that we protect against an arbitrary proportion 1 − ρ of perturbations.
In Appendix A.2, we study the distinct yet related problem of linear regression with Gaussian features. In this setting, we observe exactly the same phenomenon, wherein the trade-off between nominal performance and probabilistic robustness vanishes in high dimensions.

Sample complexity of probabilistic robustness
From a learning theoretic perspective, the behavior of adversarial learning is considerably different from that of classical learning. Indeed, the sample complexity of adversarial learning, i.e., the number of samples needed for the empirical counterpart of (P-ROB) to approximate its solution with high probability, can often be arbitrarily large relative to (P-NOM) (Cullina et al., 2018;Yin et al., 2019;Montasser et al., 2019). The following proposition shows that unlike in the case of adversarial robustness, the sample complexity of probabilistically robust learning can match that of classical learning even for arbitrarily small ρ > 0.
Proposition 4.2. Let be the 0-1 loss and let r be fully supported on ∆ and absolutely continuous with respect to the Lebesgue measure. For any constant ρ o ∈ (0, 1 /2), there exists a hypothesis class H o such that the sample complexity of probabilistically robust learning at level ρ is In particular, Θ(1) is the sample complexity of (P-NOM).
A formal statement of this result and the requisite preliminaries are provided in Appendix B. Concretely, Proposition 4.2 shows that there exist learning problems for which the sample complexity of ERM and PRL are the same, and for which the sample complexity of adversarial training is much larger 4 than PRL and ERM. However, the result also highlights the fact that when protecting against an overwhelmingly large proportion 1 − ρ o of perturbations, PRL can transition from having the sample complexity of classical learning to that of adversarial learning depending on the value of ρ. Note that the hypothesis class H o of the problem depends on ρ, meaning that although the sample complexity can depend on ρ, there are still problems for which the sample complexity of PRL is exponentially smaller than adversarial training. This implies that the conservatism of adversarial learning can manifest itself not only in the form of nominal performance degradation (Tsipras et al., 2018), but also in terms of learning complexity.

A tractable, risk-aware algorithm
So far, we have established that probabilistically robust learning has numerous desirable practical and theoretical properties. However, the stochastic, non-convex, nonsmooth nature of the ρ-ess sup means that in practice solving (P-PRL) presents a significant challenge. Nevertheless, in this section we show that the ρ-ess sup admits a tight convex upper bound that can be efficiently optimized using stochastic gradient methods. Given this insight, we propose a novel algorithm for probabilistically robust learning which is guaranteed to interpolate between (P-AVG) and (P-ROB).

A convex upper bound for the ρ-ess sup
ρ-ess sup ρ-ess sup Toward obtaining a practical algorithm for training probabilistically robust predictors, we first consider the relationship between probabilistic robustness and risk mitigation in portfolio optimization (Krokhmal et al., 2002). To this end, notice that the ρ-ess sup is closely related to the inverse cumulative distribution function (CDF): If F z is the CDF of a random variable z with distribution p, then ρ-ess sup z∼p z = F −1 z (ρ). For an appropriatelychosen distribution p, F −1 z (ρ) is known as the value-atrisk (VaR) in the portfolio optimization literature. However, VaR is seldom used in practice due to its computational and theoretical limitations. Indeed, VaR is often replaced with a tractable, convex upper bound known as the condition value-at-risk (CVaR) (Rockafellar et al., 2000;Rockafellar & Uryasev, 2002). Concretely, given a function f and a continuous distribution p, CVaR can be interpreted as the expected value of f on the tail of the distribution, i.e., It is straightforward to show that CVaR 0 (f ; p) = E z∼p [f (z)] and CVaR 1 (f ; p) = ess sup z∼p f (z). In view of this property, it is not surprising that CVaR is an upper bound on ρ-ess sup, a result we summarize below: Proposition 5.1 ( (Nemirovski & Shapiro, 2007)). CVaR is the tightest convex upper bound of ρ-ess sup, i.e., with equality when ρ = 0 or ρ = 1.

Minimizing the conditional value at risk
The main computational advantage of CVaR is that it admits the following convex, variational characterization: Given this form, CVaR can be computed efficiently by using stochastic gradient-based techniques on (5.3). This is the basis of the probabilistically robust training method detailed in Algorithm 1, which tackles the statistical problem min hp∈H E (x,y) CVaR 1−ρ ( (h p (x + δ), y); r) (P-CVaR) for parameterized, differentiable hypothesis classes H = {f θ : θ ∈ Θ}. Notice that like (P-ROB), (P-CVaR) is a composite optimization problem involving an inner minimization over α to compute CVaR and an outer minimization over θ to train the predictor. However, unlike (P-ROB), the inner problem in (P-CVaR) is convex regardless of H, and moreover the gradient of the objective in (5.3) can be computed in closed form. To this end, in lines 5-6 of Algorithm 1, we compute CVaR via stochastic gradient descent (SGD) by sampling perturbations δ k ∼ r (Thomas & Learned-Miller, 2019). Then, in lines 9-10, we run SGD on the outer problem using an empirical approximation of the expectation based on a finite set of i.i.d. samples {(x j , y j )} ∼ D as in (P-ERM).

Experiments
We conclude our work by thoroughly evaluating the performance of the algorithm proposed in the previous section on three standard benchmarks: MNIST, CIFAR-10, and SVHN. Throughout, we consider the perturbation set ∆ = {δ ∈ R d : ||δ|| ∞ ≤ } under the uniform distribution r; for MNIST, we use = 0.3 and for CIFAR-10 and SVHN, we use = 8/255. Further details concerning hyperparameter selection are deferred to the appendix.
Baseline algorithms. We consider a range of baselines, including three variants of ERM: standard ERM (Vapnik, 1999), tilted ERM (denoted TERM) (Li et al., 2020;, and ERM with data augmentation (denoted ERM+DA) wherein we run ERM on randomly perturbed instances. . CVaR as a metric for test-time robustness. We plot the conditional value at risk CVaR0.95( (h(x + δ), y); r) averaged over the test data points in CIFAR-10, SVHN, and MNIST respectively. Observe that PRL is more effectively able to minimize the objective in (P-CVaR) than any of the baselines. Furthermore, we compare to the L q norm-based Hamiltonian Monte Carlo (N-HMC) method of (Rice et al., 2021). We also run various state-of-the-art adversarial training algorithms, including FGSM (Goodfellow et al., 2014), PGD (Madry et al., 2017), TRADES (Zhang et al., 2019), MART (Wang et al., 2019), and DALE (Robey et al., 2021a).
Evaluation metrics. To evaluate the algorithms we consider, for each dataset we record the clean accuracy and the adversarial accuracy against a PGD adversary. We also record the accuracy of each algorithm on perturbed samples in two ways. Firstly, for each data point we randomly draw 100 samples from r and then record the average accuracy across perturbed samples x + δ; we denote these accuracies by "Aug." in the relevant tables. And secondly, to explicitly measure probabilistic robustness, we propose the following quantile accuracy metric, the form of which follows directly from the probabilistically robust 0-1 loss defined in (PIV): In words, this metric describes the proportion of instances which are probabilistically robust with tolerance level ρ, and therefore this will be our primary metric for evaluating probabilistic robustness for a given tolerance level ρ.
Clean, robust, and quantile accuracies. In Tables 1-3, we record the clean, robust, and probabilistic error metrics described above for PRL and a range of baselines. Throughout, the value of ρ was chosen by cross-validation; see Appendix C for details. Given these results, several remarks are in order. Firstly, across each of these tables, it is clear that the PRL algorithm does not incur the same degradation in nominal performance as does adversarial training; indeed, on CIFAR-10 and MNIST, the clean accuracy of PRL is within one percentage point of ERM, and for SVHN, the clean accuracy of PRL surpasses that of ERM. A second observation is that across these datasets, PRL offers significant improvements in the ProbAcc(ρ) metric. This improvement manifests most clearly on CIFAR-10, wherein PRL improves by more than six percentage points over all baseline algorithms for ρ = 0.01. Moreover, the gap between the ProbAcc of PRL and that of the baselines increases as ρ decreases, indicating that PRL is particularly effective for more stringent robustness requirements. By sweeping over ρ, we show that our approach bridges the average and worst case by trading-off clean and adversarial accuracy. Thus, as ρ decreases, trained classifiers improve robustness to adversarial perturbations at the cost of decreasing clean performance.
We also highlight the fact that PRL consistently outperforms both TERM and (Rice et al., 2021) on the clean, augmented, and quantile accuracy metrics. 5 This demonstrates that PRL facilitates a strong empirical trade-off between robustness and accuracy relative to other methods that seek to interpolate between the average and worst case.
CVaR as a metric for test-time robustness. As we showed in Section 5, CVaR 1−ρ is an upper bound for the ρ-ess sup. In this way, CVaR can be used as a surrogate for assessing the test-time robustness of trained classifiers. To this end, in Figure 3 we plot CVaR 0.95 ( (h(x+δ), y); r) averaged over the test data on CIFAR-10, SVHN, and MNIST. This plot shows that PRL displays significantly lower values of CVaR 0.95 among all of the algorithms we considered, which reinforces the message from Tables 1-3 that PRL is most successful at imposing probabilistic robustness.
Ablation study: the role of ρ in Algorithm 1. In Section 5, we claimed that our algorithm interpolates between the average-and worst-case problems in (P-AVG) and (P-ROB) respectively. To verify this claim, we study the trade-off between nominal accuracy and adversarial accuracy for varying values of ρ. In Figure 4, we show that as ρ decreases, our algorithm improves adversarial accuracy at the cost of degrading nominal performance.

Conclusion
In this paper, motivated by the brittleness of ERM and the conservatism of adversarial training, we proposed a new framework called probabilistically robust learning in which robustness is enforced with high probability over pertur-bations rather than in the worst case. Our analysis of this framework showed that PRL provably mitigates the wellknown trade-off between robustness and accuracy and can have a sample complexity that is exponentially lower than that of adversarial training. We also proposed an algorithm motivated by risk-aware optimization which shows strong performance on a variety of metrics designed to evaluate intermediate robustness between the average and worst case.
There are numerous directions for future work. One fruitful direction is to further explore the use of risk-aware optimization in other areas of learning. Although these techniques have been applied to problems in reinforcement learning (Chow et al., 2015) and active learning (Curi et al., 2019), there is ample opportunity to use these methods to improve performance in fields like domain generalization, domain adaptation, and fair learning. Another exciting direction is to devise tighter and/or more efficient schemes to optimize the ρ-ess sup in (P-PRL). Furthermore, although we focused on additive, norm-bounded perturbations in this paper, there is ample opportunity to extend this framework to deal with more general distribution shifts, such as those studied in 2021b;Wong & Kolter, 2020;Gowal et al., 2020;Zhou et al., 2022).
A final direction of interest is to study the connections between alternative definitions of robustness, including both (Li et al., 2020; and (Rice et al., 2021) as well as existing notions of astuteness (Wang et al., 2018) and of neighborhood-preserving Bayes optimal classifiers (Bhattacharjee & Chaudhuri, 2021) for non-parametric methods. Indeed, a unification of these robustness frameworks may represent a significant advance in our understanding of the robustness of machine learning models.
Soltanolkotabi, M., Javanmard, A., and Lee, J. D. Theoretical insights into the optimization landscape of overparameterized shallow neural networks. IEEE Transactions on Information Theory, 65 (2) Tang, S., Gong, R., Wang, Y., Liu, A., Wang, J., Chen, X., Yu, F., Liu, X., Song, D., Yuille, A., et al.  In this subsection, we provide proofs for the results for binary classification in Section 4.1. In general, our proof of the closed form expression for h p in Proposition 4.1 follows along the same lines as the proof of Theorem 4.2 in (Dobriban et al., 2020). In particular, our contribution is to generalize the proof techniques to the setting of probabilistic robustness, thereby subsuming the results in (Dobriban et al., 2020) as a special case when ρ = 0.
is optimal for (P-PRL), where v ρ is the distance from the center of ∆ to a spherical cap of volume ρ.
Proof. To begin, observe that the the probabilistically robust risk PR(h p ; ρ) can be written in the following way: Note that it is enough to solve this problem in one dimension, as the problem in d-dimensions can be easily reduced to a one-dimensional problem. Thus, our goal is to find the value of a threshold c that minimizes the probabilistically robust risk. In this one-dimensional case, the probabilistically robust risk can be written as Recall that as x|y ∼ N (yµ, σ 2 I). Therefore, This is exactly the same as the problem of non-robust classification between tow Gaussians with means µ = µ − ρ and −µ (by assumption, we have that µ ≥ 0). As is well known (see, e.g., (Anderson, 2003)), the optimal classifier for this setting is where q = ln[(1 − π)/π]. And indeed, when moving from the one-dimensional case, one need only recognize that a linear classifier which ignores a set of volume ρ in ∆ will create a spherical cap of volume ρ in ∆. This is illustrated by the red region in Figure 5. The form of h p (x) given in (4.5) follows from (A.9) as a direct analog for the d-dimensional case.
To prove the second part of Proposition 4.1, we seek to characterize the distance v ρ from the center of ∆ to a spherical cap of volume ρ. To this end, we have the following result.
Lemma A.2. Let B(0, γ) = {δ ∈ ∆ : ||δ|| 2 ≤ γ} for any number γ > 0. Define v ρ to be the distance from the origin such that the fraction of the volume of the corresponding spherical cap is ρ (see Figure 5). Then we have that Proof. By inspection, the result is clear for ρ = 0. Thus, we consider the case when ρ ∈ [0, 1/2]. Note that for any number γ < , we have that P δ∼r (B(0, )) − P δ∼r (B(0, − γ)) P δ∼r (B(0, )) As a result, by taking γ = · (ln(d)/d) we obtain (A.14) In this way, we have shown that the uniform distribution over any ball centered at the origin can be approximated up to o d (1) by the uniform distribution on the sphere. Now let (X 1 , · · · , X n ) be the random vector generated by uniformly sampling a point on the sphere of radius . We note that, up to o d (1) terms, the distribution of each of the coordinates, e.g.
where Z is the normal random variable. Again, up to o d (1) terms, i.e. when the dimension grows large, the volume of the spherical cap at distance v ρ can be approximated by where Φ denotes the Gaussian CDF. As a result, for the RHS of the above relation to be equal to ρ, we must have This concludes the proof.
From the above lemma, we can conclude the following phase-transition behavior. When ρ = 0, there is a constant gap between the adversarially robust risk AR(h r ) and the best attainable clean risk SR(h Bayes ). Indeed, this gap does not vanish as the dimension d grows, resulting in a non-trivial trade-off between adversarial robustness and accuracy. However, for ρ > 0, the gap between the probabilistically robust accuracy PR(h p ; ρ) and the clean risk is of the form and as a result, as the dimension d grows, the trade-off between robustness and accuracy vanishes (a blessing of high dimensions).

A.2. Linear regression with Gaussian features
We next consider the setting of linear regression, wherein it is assumed that there exists an underlying parameter vector θ 0 ∈ Θ ⊂ R d , and that the data is subsequently generated according to the following model: where σ > 0 is a fixed noise level. Furthermore, we consider hypotheses of the form f θ (x) = θ x for θ ∈ Θ, and we use the squared loss (f θ (x), y) = (f θ (x) − y) 2 = (θ x − y) 2 . In this setting, it is straightforward to calculate that at optimality SR(f θ ) = σ 2 , which is achieved for θ = θ 0 . Moreover, in the more general probabilistic robustness setting, we have the following complementary result: Suppose that the data is distributed according to (A.17). Let θ ∈ Θ denote the optimal solution obtained by solving (P-PRL) over Θ. Then for any ρ > 0, In this way, as in the previous subsection, it holds that for any ρ > 0, the gap between probabilistic robustness and nominal performance vanishes in high dimensions. On the other hand, as was recently shown in (Javanmard et al., 2020), there exists a non-trivial gap between adversarial robustness and clean accuracy that does not vanish to zero by increasing the dimension in this setting.
To prove this result, we consider the following variational form of the problem in (P-PRL): where L 1 denotes the space of Lebesgue integral functions. We can then characterize t(x, y) as follows: Lemma A.4. We have the following characterization for t(x, y): Almost surely for any (x, y).
Proof. Let's first consider the case in which ρ > 0. Since δ ∼ P δ∼r is the uniform distribution over the Euclidean ball of radius , we know that for any θ ∈ R d we have where the convergence is in distribution. This is because the uniform distribution over the Euclidean ball of radius converges to the Gaussian distribution N (0, 2 d I d ). As a result, up to o d (1) terms, we have θ T δ ∼ ||θ||2 √ d Z, where Z is the normal random variable.
where Q is the quantile function for Z, i.e. the inverse of the normal CDF. As a result, equating the above with 1 − ρ we obtain t(x, y) = (θ T x − y) 2 + 2 ||θ|| 2 (θ T x − y) For the case β = 0, this is a simple optimization problem where the closed form solution provided in the lemma is its solution.
From the above lemma, it is easy to see that for θ = θ 0 , the value of the objective in (??) becomes σ 2 + O(1/ √ d) for any value of ρ > 0. This means that the gap between the probabilistically roust risk and the clean risk is of the form PR(h p ; ρ) − SR(h r ) = O(1/ √ d), and as a result, as the dimension d grows, the trade-off between probabilistic robustness and accuracy vanishes. We further remark that for ρ = 0, i.e. the adversarial setting, there exists a non-trivial gap between the robust and clean accuracies that does not vanish to zero by increasing dimension. This is indeed clear from the above lemma, and it has also been shown in (Javanmard et al., 2020).

B. Learning theory proofs
We restate Proposition 4.2 formally to detail what we mean by sample complexity. Note that this is exactly the number of sample required for PAC learning.
Proposition B.1. Consider the probabilistically robust learning problem (P-PRL) with the 0-1 loss function and a robust measure r fully supported on ∆ and absolutely continuous with respect to the Lebesgue measure (i.e., non-atomic). Let P r be its optimal value and consider its empirical version P r = min hp∈H 1 N N n=1 ρ-ess sup δ∼r h p (x n + δ), y n , based on i.i.d. samples (x n , y n ) ∼ D. For any threshold ρ o ∈ (0, 0.5), there exists a hypothesis class H o such that the sample complexity of probabilistically robust learning, i.e., the number of samples N needed for P r −P r ≤ with high probability, is In particular, Θ(1/ 2 ) is the sample complexity of (P-NOM).
Proof. Let us begin by reducing the task of determining the sample complexity of these problems to that of determining the VC dimension of their objectives: where S {(x n , y n )} = u ∈ {0, 1} m | ∃h ∈ H such that u n = h(x n ), y n .
We now proceed by defining H o using a modified version of the construction in (Montasser et al., 2019, Lemma 2). Let m = log 2 (1/ρ o ) + 1 and pick {c 1 , . . . , c m } ∈ X m such that, for ∆ i = c i + ∆, it holds that ∆ i ∩ ∆ j = ∅ for i = j. Within each ∆ i , define 2 m−1 disjoint sets A b i of measure r(A b i ) ≤ ρ o /m labeled by the binary digits b ∈ {0, 1} m whose i-th digit is one. In other words, ∆ 1 contains sets with signature 1b 2 . . . b m and ∆ 3 contains sets with signature b 1 b 2 1 . . . b m . Observe that there are indeed 2 m−1 sets A b i within each ∆ i , that their signatures span all possible m-digits binary numbers, and there are at most m sets with the same signature (explicitly, for b = 11 . . . 1). Additionally, note that it is indeed possible to fit the A b i inside each ∆ i given that 2 m−1 · ρ o m < 2 log 2 (1/ρo)+1 ρ o log 2 (1/ρ o ) + 1 ≤ 2 log 2 (1/ρ o ) + 1 ≤ 1 for ρ o < 0.5, where we used the fact that log 2 (1/ρ o ) ≤ log 2 (1/ρ o ) < log 2 (1/ρ o ) + 1.
We can now construct the hypothesis class In none of these cases H is able to shatter two points, meaning that d VC ≤ 1. Since |H| > 1, it holds that d VC = 1 which is indeed the same value as when ρ ≥ ρ o .