Why Uncertain Density Ratios Matter
Under covariate shift, the distribution of predictors changes between a source population and a target population, while the conditional distribution of the response given the predictors remains the same. A density ratio transfers source expectations to the target. In practice, however, that ratio is estimated from finite data and may be uncertain. Treating one estimated ratio as exact can therefore make a target-risk calculation look more precise than it is.
A direct response is to specify a set of plausible density ratios and maximize the weighted loss over that set. This produces a worst-case risk bound: it is conservative over the ratios admitted by the constraints, rather than only over one point estimate. The choice of constraints matters. Ratio confidence sets express uncertainty about the particular density ratio, whereas divergence-based ambiguity sets define a neighborhood of distributions around a reference distribution.
The risk identity follows from the change-of-measure formula, together with the covariate-shift assumption that the conditional response distribution is unchanged. We focus on a fixed predictor and a measurable conditional loss \(g_f\) with \(0\leq g_f(x)\leq M<\infty\). The same arguments apply to other integrable losses when the relevant expectations exist.
Building a Set of Plausible Ratios
Suppose information from source and target covariate samples, a ratio estimator, or known calibration quantities constrains the unknown ratio. Write \(\mathcal W\) for the resulting set of plausible functions. A common starting point is a simultaneous band:
The normalization constraint is essential: without it, a nonnegative function inside the bands need not define a probability distribution. Additional restrictions can encode calibration information. For example, if target covariate averages of known functions \(h_1,\ldots,h_k\) are available, constraints may take the form \(E_{P_X}[w(X)h_j(X)]=\mu_j\). Uncertain calibration values can instead be given intervals.
The robust target risk is the largest risk over the ratios still regarded as plausible:
When \(\mathcal W\) contains the true ratio, this supremum is at least the true target risk. It can be conservative: broad bands or weak calibration restrictions admit more adverse reweightings. If \(\mathcal W\) is empty, the constraints conflict and cannot support a risk bound until they are reconciled.
Worked Example: Maximizing Risk Under Ratio Bands
Let \(X\) take three values with source probabilities \(P_X=(0.5,0.3,0.2)\). Suppose the conditional losses are \(g_f=(0.1,0.5,1)\), and the ratio is constrained by \(0.5\leq w_1\leq1.5\), \(0.5\leq w_2\leq2\), and \(0.5\leq w_3\leq2.5\), as well as \(E_{P_X}[w(X)]=1\). Find the worst-case risk.
It is convenient to write \(q_i=P_X(X=i)w_i\). These are the target probabilities assigned to the three values. The ratio bounds become \(0.25\leq q_1\leq0.75\), \(0.15\leq q_2\leq0.6\), and \(0.1\leq q_3\leq0.5\), while normalization requires \(q_1+q_2+q_3=1\). The risk is \(0.1q_1+0.5q_2+q_3\).
Begin at the lower limits, which use total mass \(0.25+0.15+0.1=0.5\). The remaining \(0.5\) mass should be assigned first where the loss is largest. The third value can take an additional \(0.5-0.1=0.4\), and the second can take the remaining \(0.1\). Thus \(q=(0.25,0.25,0.5)\), which satisfies all bounds and sums to one. The risk is \(0.1(0.25)+0.5(0.25)+1(0.5)=0.025+0.125+0.5=0.65\). This allocation is optimal because any mass moved from a higher-loss category to a lower-loss category decreases the objective.
What the Worst-Case Bound Guarantees
Proof. Membership \(w_0\in\mathcal W\) means that the true ratio is one of the candidates over which the supremum is taken. Therefore,
The middle equality is the change-of-measure identity. Hence the bound holds. \(\square\)
A confidence interpretation requires a further condition: the set must contain the true ratio with high probability. If a random set \(\widehat{\mathcal W}\) satisfies \(P(w_0\in\widehat{\mathcal W})\geq1-\alpha\), then, for a fixed predictor and loss,
This follows because the risk inequality holds on the event \(w_0\in\widehat{\mathcal W}\). If the predictor or loss is selected using the same data as the ratio set, the coverage statement must still apply to that choice—for example, through an appropriate uniform guarantee or independent evaluation data. Likewise, replacing the population expectation in the supremum by a sample average introduces sampling error that this ratio-coverage argument alone does not cover.
Worked Example: A Simultaneous Ratio Confidence Band
Suppose \(X\) has two source values, each with probability \(0.5\). A ratio procedure supplies simultaneous bands \(0.8\leq w_1\leq1.4\) and \(0.6\leq w_2\leq1.2\). The conditional losses are \(g_f(1)=0.9\) and \(g_f(2)=0.1\). Find the largest risk consistent with the bands and normalization.
Normalization requires \(0.5w_1+0.5w_2=1\), or \(w_1+w_2=2\). Consequently \(w_2=2-w_1\). The second band requires \(0.6\leq2-w_1\leq1.2\), which is equivalent to \(0.8\leq w_1\leq1.4\). This agrees exactly with the first band, so the feasible range for \(w_1\) is \([0.8,1.4]\).
The risk as a function of \(w_1\) is \(0.5(0.9w_1+0.1w_2)=0.5(0.9w_1+0.1(2-w_1))=0.4w_1+0.1\). It increases with \(w_1\), so its maximum is at \(w_1=1.4\), \(w_2=0.6\). The resulting risk is \(0.5(0.9(1.4)+0.1(0.6))=0.5(1.26+0.06)=0.66\).
If the bands cover the true ratios simultaneously with probability at least \(0.95\), this construction gives at least 95% coverage for the population risk bound for this fixed loss. The calculation itself does not establish that coverage; it relies on the ratio procedure’s stated coverage property.
Ratio Confidence Sets and Divergence Sets
A ratio confidence set is built to contain an unknown ratio with a specified statistical coverage probability. Its constraints may be pointwise bands, normalization, or calibration equations. A divergence-based ambiguity set has a different role: it specifies distributions no farther than a chosen divergence radius from a reference distribution. The radius describes the desired robustness neighborhood; it is not automatically a confidence level for an estimated ratio.
For example, a chi-square divergence constraint around the source distribution can be written directly in terms of the ratio as \(E_{P_X}[(w(X)-1)^2]\leq\rho\), together with \(w\geq0\) and \(E_{P_X}[w]=1\). Such a restriction limits an average squared departure from one. Pointwise confidence bands instead restrict the ratio value at each covariate value, and may also incorporate information about particular target moments. Neither form generally implies the other without additional assumptions.
Derivation. Since \(E_{P_X}[w-1]=0\), centering the loss gives
Apply the Cauchy–Schwarz inequality to the final expectation:
This is a valid upper bound over the chi-square neighborhood, but it need not equal the exact supremum: the Cauchy–Schwarz equality condition may not be compatible with nonnegativity or other constraints on \(w\). The inequality illustrates how divergence restrictions control reweighting through an average departure, while ratio bands control it locally.
Worked Example: Comparing a Ratio Set With a Chi-Square Ball
Let the source probabilities be \(P_X=(0.5,0.5)\), and let the losses be \(g_f=(1,0)\). Consider the normalized ratios \(w=(1+t,1-t)\). Nonnegativity requires \(-1\leq t\leq1\), and the risk is \(0.5(1+t)\).
First impose a ratio confidence set \(-0.2\leq t\leq0.4\). The largest risk occurs at \(t=0.4\), giving \(w=(1.4,0.6)\) and risk \(0.5(1.4)=0.7\).
Now instead impose the chi-square divergence constraint \(E_{P_X}[(w-1)^2]\leq0.09\). Its left side is \(0.5t^2+0.5t^2=t^2\), so the constraint is \(|t|\leq0.3\). The largest risk is at \(t=0.3\), giving \(w=(1.3,0.7)\) and risk \(0.5(1.3)=0.65\). These sets produce different bounds because their restrictions differ; the numerical comparison does not make either set a confidence region for the other.
Practical Interpretation and a Common Pitfall
A ratio-based bound is useful when uncertainty information is naturally stated about the density ratio itself—for example, when an estimator supplies simultaneous bands, or when target covariate summaries impose calibration constraints. A divergence neighborhood is useful when the goal is to protect against a broader class of distributions near a reference law. In either case, the result depends on the uncertainty set: a bound is not robust to ratios or distributions that were excluded from that set.
Common mistake: treating pointwise lower and upper ratio estimates as an automatically valid target distribution, or interpreting a divergence radius as a confidence level. The correction is to impose ratio nonnegativity and normalization, include any relevant calibration restrictions, and separately justify the set’s coverage or robustness meaning. A set constructed from uncertain estimates only supports a confidence claim if its coverage has been established; a chosen divergence radius only supports a robustness claim for distributions inside that radius.
Check Your Understanding
Check that you can distinguish the risk identity, the constraints defining a plausible set, and the interpretation of the resulting bound.
- Why must a nonnegative candidate density ratio satisfy \(E_{P_X}[w(X)]=1\)?
- In the three-value example, why is it optimal to allocate the available probability mass first to the third value?
- What extra condition is needed to interpret a random ratio set as giving a confidence bound for target risk?
- For the two-value ratio \(w=(1+t,1-t)\), what is \(E_{P_X}[(w-1)^2]\) when both source probabilities are one half?
- In one sentence, distinguish the purpose of a ratio confidence set from that of a divergence-based ambiguity set.