Tutorials › Statistical Learning (Graduate) › Moment-Constrained Distributional Robustness

Robustness and Distribution Shift · Tutorial 982 of 989

Moment-Constrained Distributional Robustness

Learn to translate moment assumptions into a worst-case risk problem, certify dual bounds, and recognize what moment information cannot guarantee about tails.

Advanced 12 min read

What You'll Learn

  • Define ambiguity sets using equality and inequality constraints on distributional moments
  • Derive a valid dual upper bound by integrating a pointwise moment majorant
  • Solve finite-support worst-case risk problems with matching primal and dual calculations
  • Optimize linear risk when the mean lies in an ellipsoid
  • Distinguish what mean and variance information says about risk from what it says about tail behavior
  • Identify when a tail-sensitive loss can be unbounded despite fixed first and second moments

Why Moment Information Can Be Both Useful and Incomplete

A distribution may be only partly known: perhaps its mean is estimated, its variance is bounded, or a few population moments are specified by scientific knowledge. Moment-constrained distributional robustness asks how large expected loss can be among all distributions consistent with that information. The answer depends not just on the moments, but also on the set of possible outcomes and on how the loss varies across that set.

There is an important distinction to keep in view. Expected loss is a linear function of the distribution: mixing two distributions mixes their expected losses. But a loss that is linear in the outcome, such as \(g(x)=a x+b\), has an expectation determined entirely by the mean. A variance restriction cannot change that expectation when the mean is fixed. Moment constraints become especially useful when the mean is uncertain, or when the loss is not linear in the outcome.

Moment-Constrained Ambiguity Sets

Definition: Let \(S\) be a set of possible outcomes, let \(Q\) be a probability distribution on \(S\), and let \(\phi_1,\ldots,\phi_k\) be measurable moment functions. A moment-constrained ambiguity set is a collection of distributions satisfying specified conditions on \(E_Q[\phi_j(X)]\), such as equalities \(E_Q[\phi_j(X)]=m_j\) or upper bounds \(E_Q[\phi_j(X)]\leq u_j\). For a measurable loss \(g\), the worst-case risk is \(\sup_{Q} E_Q[g(X)]\), where the supremum is over that collection.

Here \(E_Q\) means expectation when \(X\) has distribution \(Q\). For example, choosing \(\phi_1(x)=x\) and \(\phi_2(x)=x^2\) specifies information about the mean and second raw moment. If the mean is \(m\) and the variance is \(v\), then \(E_Q[X^2]=v+m^2\). The support \(S\) is part of the assumptions: a bound valid for \(x\in[0,1]\) need not hold for unrestricted real \(x\).

A Dual Bound From a Moment Majorant

A simple way to bound worst-case risk is to find a function built from the known moments that lies above the loss at every possible outcome. Integrating this pointwise inequality turns moment information into a risk bound.

Theorem (moment-majorant bound): Suppose \(Q\) is any feasible distribution, \(g\) and \(\phi_j\) are integrable under \(Q\), and constants \(\lambda_0,\lambda_1,\ldots,\lambda_k\) satisfy \(g(x)\leq \lambda_0+\sum_{j=1}^k\lambda_j\phi_j(x)\) for every \(x\in S\). If the constraints are \(E_Q[\phi_j(X)]=m_j\), then \(E_Q[g(X)]\leq \lambda_0+\sum_{j=1}^k\lambda_jm_j\).

To prove the bound, integrate the assumed pointwise inequality with respect to \(Q\). Since expectation preserves inequalities for integrable random variables, \(E_Q[g(X)]\leq\lambda_0+\sum_j\lambda_j E_Q[\phi_j(X)]\). Substituting each equality constraint gives \(E_Q[g(X)]\leq\lambda_0+\sum_j\lambda_jm_j\). This holds for every feasible \(Q\), so it also bounds the supremum of their risks. \(\square\)

For upper-bound constraints \(E_Q[\phi_j(X)]\leq u_j\), the same argument gives a valid bound when \(\lambda_j\geq0\): then \(\lambda_j E_Q[\phi_j(X)]\leq\lambda_j u_j\). The search for the tightest such bound is a dual optimization problem: minimize the resulting bound over coefficients that keep the majorant above \(g\) on \(S\). The pointwise inequality is essential; merely matching the moments of the loss does not certify an upper bound.

Worked Example: A Sharp Variance-Based Bound on a Finite Support

Let \(X\) take values in \(S=\{0,1,2\}\), with \(E_Q[X]=1\) and \(E_Q[X^2]\leq1.5\). Find the largest possible risk for the loss \(g(x)=\mathbf{1}\{x=2\}\), the indicator that the outcome is 2.

Write \(q_i=Q(X=i)\). The probability and mean constraints give \(q_0+q_1+q_2=1\) and \(q_1+2q_2=1\). Thus \(q_1=1-2q_2\) and \(q_0=q_2\). The second moment is \(E_Q[X^2]=q_1+4q_2=1+2q_2\), so its upper bound implies \(q_2\leq0.25\). The probabilities are nonnegative when \(0\leq q_2\leq0.5\), so the maximum is \(0.25\), attained at \((q_0,q_1,q_2)=(0.25,0.5,0.25)\).

A dual certificate verifies that no feasible distribution can do better. On the three support points, \(g(x)\leq (x^2-x)/2\): both sides are 0 at \(x=0,1\), and both are 1 at \(x=2\). Therefore \(E_Q[g(X)]\leq \{E_Q[X^2]-E_Q[X]\}/2\leq(1.5-1)/2=0.25\). The feasible distribution just constructed attains this bound, so it is sharp.

Linear Losses and Uncertain Means

When the loss is linear in a vector outcome \(Z\), say \(g(Z)=a^\mathsf{T}Z\), its expected value is \(a^\mathsf{T}E_Q[Z]\). Thus, if the mean is known exactly, the expected loss is already known; variance information does not change it. If the mean is only known to lie in a set, worst-case linear risk is the maximum of \(a^\mathsf{T}\mu\) over the allowed means \(\mu\). This is a tractable optimization over the mean set.

Worked Example: Linear Risk Over an Ellipsoidal Mean Set

Suppose \(Z=(X,Y)^\mathsf{T}\) has an unknown mean \(\mu\) satisfying \(\mu^\mathsf{T}\Sigma^{-1}\mu\leq\rho^2\), where \(\Sigma=\begin{pmatrix}4&0\\0&1\end{pmatrix}\) and \(\rho=0.5\). The loss is \(g(Z)=X+2Y\). Find its worst-case expected value.

The expected loss is \(\mu_X+2\mu_Y=a^\mathsf{T}\mu\), with \(a=(1,2)^\mathsf{T}\). Write \(w=\Sigma^{-1/2}\mu\), so that \(\|w\|_2\leq\rho\) and \(a^\mathsf{T}\mu=(\Sigma^{1/2}a)^\mathsf{T}w\). By Cauchy–Schwarz, \(a^\mathsf{T}\mu\leq\|\Sigma^{1/2}a\|_2\|w\|_2\leq\rho\sqrt{a^\mathsf{T}\Sigma a}\). Here \(a^\mathsf{T}\Sigma a=4+4=8\), so the bound is \(0.5\sqrt{8}=\sqrt{2}\).

It is attained at \(\mu=\rho\Sigma a/\sqrt{a^\mathsf{T}\Sigma a}=(1/\sqrt{2},1/(2\sqrt{2}))^\mathsf{T}\). Indeed, \(\mu^\mathsf{T}\Sigma^{-1}\mu=(1/2)/4+1/8=1/4=\rho^2\), and \(\mu_X+2\mu_Y=1/\sqrt{2}+1/\sqrt{2}=\sqrt{2}\). Thus the worst-case expected loss is exactly \(\sqrt{2}\). No variance constraint on \(Z\) is needed for this calculation: for a linear loss, only the mean enters its expectation.

When Moment Information Does Not Control Tail Risk

A variance bound does control some tail probabilities. For example, if \(E[X]=0\) and \(E[X^2]=1\), then for any \(t>0\), \(\mathbf{1}\{|X|\geq t\}\leq X^2/t^2\). Taking expectations proves \(P(|X|\geq t)\leq1/t^2\). This is a probability bound, not a general guarantee that losses concentrated in the tail have bounded expectation. In particular, a fixed second moment does not bound expectations of sufficiently rapidly growing losses.

Worked Example: Fixed Mean and Variance, Unbounded Exponential Risk

For each \(M\geq1\), define a distribution by \(P(X=M)=P(X=-M)=1/(2M^2)\) and \(P(X=0)=1-1/M^2\). The probabilities are nonnegative and sum to 1. Symmetry gives \(E[X]=0\), and \(E[X^2]=M^2/(2M^2)+M^2/(2M^2)=1\). Thus every distribution in this family has the same mean and variance.

For the loss \(g(x)=e^x\), however, \(E[e^X]=1-1/M^2+(e^M+e^{-M})/(2M^2)\). As \(M\) increases, this expectation tends to infinity because \(e^M/M^2\) tends to infinity. Therefore, knowing the mean and variance alone cannot give a finite uniform upper bound on this tail-sensitive risk.

The failure is not that the moments are incorrect; they are exactly the same for every \(M\). The rare outcomes become more extreme as their probabilities shrink, preserving the second moment while making the exponential loss increasingly large. A support bound, stronger tail assumption, or additional moment information would be needed to rule out this behavior.

Common Pitfall and Practical Interpretation

Wrong reasoning: “The mean and variance are known, so the risk must be controlled.” This conclusion does not follow. For a linear loss \(a^\mathsf{T}Z+b\), a known mean does determine expected risk. For a nonlinear or tail-sensitive loss, the same moments may permit very different risks, as the exponential example shows.

Correction: Check the exact loss and the support before drawing conclusions. Use a moment-majorant inequality to certify an upper bound, and verify that its inequality holds throughout the support, not just at a few typical values. A dual bound is valid even if it is conservative; a matching feasible distribution establishes that it is sharp. Moment assumptions should be interpreted as restrictions on the distributions they actually exclude, not as general substitutes for tail assumptions.

Key takeaway: Moment constraints yield useful worst-case risk bounds when the loss can be dominated by a tractable combination of the constrained moments. Fixed means determine expected linear losses, but mean and variance alone need not control nonlinear tail risk.

Check Your Understanding

Use the definitions and calculations above to answer these questions.

  1. Why does fixing \(E_Q[X]\) also fix the expectation of every affine loss \(aX+b\), regardless of the variance?
  2. In the finite-support example, which inequality provides the dual certificate, and why does the feasible distribution prove sharpness?
  3. For constraints \(E_Q[\phi(X)]\leq u\), why must the corresponding multiplier be nonnegative in the stated upper-bound argument?
  4. What does the variance-one construction show about exponential risk, and what does it not show about tail probabilities?
  5. Give one additional type of assumption that could prevent the exponential-risk example from having arbitrarily large expected loss.
Clinical Biostats