Tutorials › Statistical Learning (Graduate) › When Adversarial Risk Equals Distributionally Robust Risk

Robustness and Distribution Shift · Tutorial 986 of 989

When Adversarial Risk Equals Distributionally Robust Risk

Learn why a pointwise transport constraint yields adversarial risk, and how average budgets, label-changing couplings, and support restrictions can break that equality.

Advanced 12 min read

What You'll Learn

  • Define pointwise adversarial risk and the corresponding coupling-based ambiguity set.
  • Prove equality under a Wasserstein-infinity, per-observation transport constraint.
  • Distinguish that result from Wasserstein-one robustness with an average transport budget.
  • Identify when couplings must preserve labels and when support restrictions alter the risk.
  • Check the equivalence and its limitations with explicit finite examples.

Why the Constraint on Transport Matters

Pointwise adversarial risk asks how much the loss could increase if each observation were changed within a prescribed perturbation set. Wasserstein distributional robustness instead asks for the largest expected loss over distributions reachable by transporting probability mass from the observed distribution. These formulations are related, but the word “reachable” depends on the transport constraint: a bound on every transported observation is different from a bound on the average transport cost.

The exact equivalence is most direct when the ambiguity set consists of distributions that can be coupled to the source so that every transported point stays within its local perturbation set. Under suitable measurability and compactness conditions, the worst-case distribution can make the same pointwise choices as the adversary. A Wasserstein-one ball generally imposes only an average-cost constraint, so it need not give the same risk.

Two Risk Definitions

Let \(Z\) be a compact metric space with metric \(d\), let \(P\) be a Borel probability distribution on \(Z\), and let \(\ell:Z\to\mathbb{R}\) be a bounded continuous loss. For a radius \(\varepsilon\geq 0\), the pointwise perturbation set at \(z\) is the closed ball \(A_\varepsilon(z)=\{z'\in Z:d(z,z')\leq\varepsilon\}\). The adversarial risk is the expectation of the largest loss available in each such ball.

$$ R_{\mathrm{adv}}(\varepsilon) = \int \sup_{z'\in A_\varepsilon(z)}\ell(z')\,P(dz). $$

A coupling \(\pi\) of \(P\) and a candidate distribution \(Q\) is a joint distribution on \(Z\times Z\) whose first marginal is \(P\) and whose second marginal is \(Q\). The coupling records how source points \(z\) are transported to destination points \(z'\). Define the per-observation transport ambiguity set by requiring that at least one such coupling puts all its mass on pairs no farther apart than \(\varepsilon\).

Definition: The per-observation Wasserstein ambiguity set is \( \mathcal{Q}_{\infty,\varepsilon}(P)=\{Q:\text{ there exists a coupling }\pi\text{ of }P,Q\text{ with }\pi\{(z,z'):d(z,z')\leq\varepsilon\}=1\}\). Its worst-case risk is \(R_{\infty}(\varepsilon)=\sup_{Q\in\mathcal{Q}_{\infty,\varepsilon}(P)}\int\ell(z')\,Q(dz')\). For a metric cost, this set is the closed Wasserstein-infinity ball of radius \(\varepsilon\), using the convention that \(W_\infty(P,Q)\) is the infimum, over couplings, of the essential supremum of \(d(z,z')\).

The first marginal requirement is essential: transported mass originates from \(P\), rather than being chosen independently at each destination. But there is no shared capacity restriction on destinations. Each source point may be coupled to any feasible destination, including through a randomized conditional distribution, as long as the per-observation distance bound holds.

Equality Under a Per-Observation Constraint

Theorem: Suppose \(Z\) is a compact metric space, \(P\) is a Borel probability distribution on \(Z\), \(\ell\) is bounded and continuous, and \(\varepsilon\geq 0\). Then \(R_{\infty}(\varepsilon)=R_{\mathrm{adv}}(\varepsilon)\).

The closed-ball correspondence \(z\mapsto A_\varepsilon(z)\) has nonempty compact values and a closed graph. The measurable maximum theorem therefore ensures that \(g(z)=\max_{z'\in A_\varepsilon(z)}\ell(z')\) is measurable and that a measurable maximizer can be selected. In particular, there is a measurable map \(T\) such that \(T(z)\in A_\varepsilon(z)\) and \(\ell(T(z))=g(z)\). These are the regularity conditions that allow pointwise maximization to define a valid distribution.

1
Bound every feasible coupling from above.
For any \(Q\in\mathcal{Q}_{\infty,\varepsilon}(P)\), take a coupling \(\pi\) that witnesses membership. Almost surely under \(\pi\), \(z'\in A_\varepsilon(z)\), and hence \(\ell(z')\leq g(z)\). Integrating and using the two marginals gives \(\int\ell\,dQ\leq\int g\,dP=R_{\mathrm{adv}}(\varepsilon)\).
2
Construct a feasible worst-case distribution.
Push \(P\) forward through the measurable maximizing map \(T\): let \(Q=T_{\#}P\). The joint distribution of \((z,T(z))\) under \(P\) is a coupling of \(P\) and \(Q\), and \(d(z,T(z))\leq\varepsilon\) for every \(z\). Thus \(Q\in\mathcal{Q}_{\infty,\varepsilon}(P)\), and \(\int\ell\,dQ=\int\ell(T(z))\,P(dz)=\int g\,dP\).

The upper bound in Step 1 holds for every feasible \(Q\); Step 2 attains that bound. Together they prove the equality. The proof also shows the mechanism: a measurable pointwise choice induces a single joint coupling, whose second marginal is the adversarial distribution. \(\square\)

Worked Example: Equality on a Bounded Interval

Let \(Z=[0,3]\), let \(P\) put probability \(1/2\) at \(0\) and \(1/2\) at \(2\), let \(d(x,x')=|x-x'|\), and set \(\ell(x)=x\). Take \(\varepsilon=0.5\).

For source point \(0\), the feasible interval is \([0,0.5]\), so the largest loss is \(0.5\). For source point \(2\), it is \([1.5,2.5]\), so the largest loss is \(2.5\). Therefore \(R_{\mathrm{adv}}(0.5)=\tfrac12(0.5)+\tfrac12(2.5)=1.5\).

Now transport \(0\) to \(0.5\) and \(2\) to \(2.5\), retaining probability \(1/2\) on each transported point. Each move has distance \(0.5\), so this is a feasible coupling and its destination distribution has expected loss \(1.5\). Conversely, any feasible destination from \(0\) is at most \(0.5\), and any feasible destination from \(2\) is at most \(2.5\); the coupling must preserve the source marginal. Thus no feasible distribution has expected loss above \(1.5\), and \(R_{\infty}(0.5)=1.5\).

Why a Wasserstein-One Ball Is Different

For cost \(d\), the Wasserstein-one distance \(W_1(P,Q)\) is the infimum, over couplings \(\pi\) of \(P\) and \(Q\), of the average distance \(\int d(z,z')\,\pi(dz,dz')\). A constraint \(W_1(P,Q)\leq\rho\) limits the total average transport cost. It does not require each source point to move by at most \(\rho\), or even by at most a common pointwise radius. Some mass can move farther if the rest moves less or stays still.

Worked Example: An Average Budget Can Exceed Pointwise Risk

Let \(Z=[0,1]\), \(P=\tfrac12\delta_0+\tfrac12\delta_1\), and \(\ell(x)=x\). Compare pointwise perturbations of radius \(0.5\) with a Wasserstein-one ball of radius \(\rho=0.5\).

The pointwise feasible interval from \(0\) is \([0,0.5]\), and that from \(1\) is \([0.5,1]\). Their maximum losses are \(0.5\) and \(1\), respectively. Hence \(R_{\mathrm{adv}}(0.5)=\tfrac12(0.5)+\tfrac12(1)=0.75\).

For the Wasserstein-one constraint, transport all mass at \(0\) to \(1\) and leave mass at \(1\) in place. The destination is \(Q=\delta_1\); the average transport cost is \(\tfrac12(1)+\tfrac12(0)=0.5\), and the expected loss is \(1\). Since \(\ell(x)\leq1\) on the whole domain, no distribution can have risk greater than \(1\). Thus the Wasserstein-one worst-case risk is exactly \(1\), not \(0.75\).

The transport of the half-unit of mass originally at \(0\) travels distance \(1\), greater than the pointwise radius \(0.5\). The average budget permits this because the other half of the mass incurs zero transport cost. This calculation is a direct counterexample to identifying a Wasserstein-one ball of radius \(\varepsilon\) with pointwise perturbation balls of radius \(\varepsilon\).

Label Preservation and Support Restrictions

In prediction problems, the transported object is often a pair \(z=(x,y)\), where \(x\) is the input and \(y\) is the label. If the intended adversary changes only the input, its feasible set is \(A_\varepsilon((x,y))=\{(x',y):d_X(x,x')\leq\varepsilon\}\). The coupling formulation must enforce the same condition. A cost that measures only input displacement but permits the label to change does not encode this adversary: a zero-cost change of label can change the loss.

Worked Example: A Coupling That Changes Labels

Let the source distribution put probability \(1/2\) on each of \((0,0)\) and \((1,1)\), with binary labels, and take zero input perturbation radius. Use the zero-one loss \(\ell(x,y)=\mathbf{1}\{x\ne y\}\). Under pointwise input perturbation with the label held fixed, neither input can change. The adversarial risk is therefore \(0\).

Now define transport cost using only the inputs: \(c((x,y),(x',y'))=|x-x'|\), with no restriction on \(y'\). The coupling that maps \((0,0)\) to \((0,1)\) and \((1,1)\) to \((1,0)\) has cost zero for every transported observation. Its destination distribution has loss \(1\) everywhere, so its risk is \(1\). The mismatch does not contradict the equality theorem: the cost allowed zero-cost moves outside the label-preserving perturbation sets. To represent input adversarial risk, the coupling must preserve labels, for example by assigning infinite cost to label changes.

A separate issue is whether destination points must remain in a restricted support. If pointwise sets are defined in an ambient space but the distributional ambiguity set additionally requires \(Q\) to be supported on a smaller set, the two feasible sets may differ. For example, take ambient space \([0,1]\), \(P=\delta_0\), loss \(\ell(x)=x\), and radius \(1\). The ambient pointwise adversarial risk is \(1\), since the point \(1\) is reachable from \(0\). If the distributional ambiguity set additionally requires \(Q(\{0\})=1\), its only feasible distribution is \(\delta_0\), and its risk is \(0\). Equality is restored only if the pointwise feasible destinations and the allowed destination support agree.

Common Mistake and Practical Check

A common mistake is to argue, “Both formulations use the same radius, so their worst-case risks are equal.” The radius alone does not identify the constraint. A Wasserstein-one radius bounds average transport cost; a pointwise perturbation radius bounds each observation’s displacement. A second mistake is to use an input-only cost on labelled observations while allowing couplings to alter labels. In both cases the proposed ambiguity set admits moves that the intended pointwise adversary does not.

Before claiming equivalence, check that the coupling has the source distribution as its first marginal, that its allowed moves match the pointwise sets, and that its constraint is imposed per observation rather than only on average. Also check whether labels must be preserved and whether the distributional ambiguity set has extra support restrictions. Under the compactness and continuity conditions stated above, agreement on these details gives the proved equality; changing them requires a new argument.

Key takeaway: Pointwise adversarial risk equals worst-case risk over a Wasserstein-infinity ambiguity set when feasible couplings obey the same per-observation perturbation constraint, with matching labels and support. An average-cost Wasserstein-one ball is a different ambiguity set and can yield a different risk.

Check Your Understanding

Use the definitions and examples above to answer the following questions.

  1. What property of a coupling corresponds to requiring every observation to stay within its pointwise perturbation set?
  2. In the interval example with \(P=\tfrac12\delta_0+\tfrac12\delta_2\), why can the adversarial choices at both source points be realized by one destination distribution?
  3. In the Wasserstein-one example, calculate the average transport cost when all mass at \(0\) is moved to \(1\) and mass at \(1\) is left in place.
  4. Why does an input-only transport cost fail to represent a label-preserving adversary if the coupling may change labels?
  5. Give one way a support restriction can make distributionally robust risk smaller than ambient pointwise adversarial risk.
Clinical Biostats