Tutorials › Statistical Learning (Graduate) › Abstention Decisions With a Reject Cost

Bayes Rules and Conditional Risk · Tutorial 68 of 989

Abstention Decisions With a Reject Cost

Learn when the most probable class has lower conditional cost than abstaining, and how the reject cost determines the posterior threshold.

Beginner 9 min read

What You'll Learn

  • Define the loss for correct classification, misclassification, and rejection
  • Derive the conditional risk of each class action and of abstaining
  • Express the Bayes decision as a threshold on the largest posterior probability
  • Identify ties between class predictions and rejection
  • Calculate decisions and expected risk for explicit posterior distributions

Why Allow a Decision to Abstain?

A classifier is often required to name a class even when the available evidence is weak. In some applications, however, an uncertain prediction is more costly than declining to decide: a laboratory test may be sent for review, or a case may be referred to a specialist. The statistical question is when abstention is preferable to making the best available class prediction.

The answer depends on the relative costs. Under zero-one classification loss, a class prediction has conditional risk equal to its posterior probability of being wrong. Abstention has a fixed risk, the reject cost. Comparing these risks gives an exact rule: predict the class with the largest posterior probability only when its risk of error is no greater than the cost of rejecting.

Actions, Loss, and Conditional Risk

Let the response \(Y\) take one of \(K\) class labels, \(1,\ldots,K\), where \(K\) is finite, and let \(X\) denote the observed features. An action is either a class prediction \(j\in\{1,\ldots,K\}\) or a reject action, denoted by \(R\). Fix a reject cost \(c\) with \(0\leq c\leq 1\), on the same scale as the unit cost of misclassification.

Definition: The classification-with-rejection loss is \[ \ell(a,y)= \begin{cases} 0, & a\in\{1,\ldots,K\}\text{ and }a=y,\\ 1, & a\in\{1,\ldots,K\}\text{ and }a\ne y,\\ c, & a=R. \end{cases} \] For each class \(k\), write \(\eta_k(x)=P(Y=k\mid X=x)\) for a measurable version of the posterior probability. The conditional risk of action \(a\) at \(x\) is \(r(a\mid x)=E[\ell(a,Y)\mid X=x]\).

Since the loss of predicting class \(j\) is one exactly when \(Y\ne j\), and the loss of rejection is always \(c\), the conditional risks are

$$ r(j\mid x)=1-\eta_j(x),\qquad j=1,\ldots,K, \qquad\text{and}\qquad r(R\mid x)=c. $$

The best class action is therefore any class with the largest posterior probability. Define \(\eta_{\max}(x)=\max_{1\leq k\leq K}\eta_k(x)\). The smallest conditional risk among class predictions is \(1-\eta_{\max}(x)\). Rejection is preferable precisely when its cost is smaller than this quantity.

Worked Example: Comparing the Best Class With Rejection

At a particular feature value, suppose the three posterior probabilities are \((0.58,0.27,0.15)\), and the reject cost is \(c=0.35\). The class risks are

$$ r(1\mid x)=1-0.58=0.42,\qquad r(2\mid x)=1-0.27=0.73,\qquad r(3\mid x)=1-0.15=0.85. $$

The reject risk is \(0.35\), which is less than even the smallest class risk, \(0.42\). The Bayes action is therefore to reject. If the reject cost were instead \(c=0.45\), class 1 would have risk \(0.42<0.45\), so predicting class 1 would be preferable. The posterior probabilities have not changed; changing the relative cost changes the decision.

The Bayes Rule and Its Threshold

Theorem: Suppose \(Y\) takes finitely many classes and the loss is the classification-with-rejection loss above, with \(0\leq c\leq1\). At a feature value \(x\), a Bayes action is:
  • any class \(j\) satisfying \(\eta_j(x)=\eta_{\max}(x)\), if \(1-\eta_{\max}(x)<c\);
  • the reject action \(R\), if \(c<1-\eta_{\max}(x)\);
  • either a maximizing class or \(R\), if \(c=1-\eta_{\max}(x)\).
Equivalently, the best class prediction is at least as good as rejection exactly when \(\eta_{\max}(x)\geq 1-c\). At equality, both actions attain the same conditional risk.

The comparison in the theorem follows directly from the conditional risks, but the rule also minimizes the overall expected loss, not just a pointwise quantity considered in isolation. The proof below makes that connection explicit.

1
Minimize over class actions.
For each class \(j\), the conditional risk is \(1-\eta_j(x)\). It is minimized by maximizing \(\eta_j(x)\), giving minimum class risk \(1-\eta_{\max}(x)\).
2
Compare with rejection.
The reject risk is \(c\). Choose the lower of \(1-\eta_{\max}(x)\) and \(c\), retaining both actions when the two values are equal.
3
Relate pointwise risk to overall risk.
The expected loss of any measurable decision rule is the expectation of its conditional risk. A measurable rule that selects a minimizing action at every \(x\) therefore minimizes expected loss.

Here is the full justification of the last step and of the threshold characterization. Let \(g\) be any measurable decision rule taking values in \(\{1,\ldots,K,R\}\). Because the action set is finite and the losses are bounded, conditional expectation gives

$$ E[\ell(g(X),Y)]=E[r(g(X)\mid X)]. $$

For every \(x\), \(r(g(x)\mid x)\) is at least the smallest conditional risk among all actions. Select a rule \(g^*\) that attains this minimum: among the finitely many actions, choose one with smallest conditional risk, breaking ties by a fixed ordering. The posterior probabilities are measurable, so the risks of all actions are measurable; a fixed tie-breaking rule consequently makes \(g^*\) measurable. Taking expectations yields

$$ E[\ell(g(X),Y)] =E[r(g(X)\mid X)] \geq E[r(g^*(X)\mid X)] =E[\ell(g^*(X),Y)]. $$

Thus \(g^*\) is a Bayes rule. To identify which action minimizes risk, the smallest class risk is \(1-\eta_{\max}(x)\), while the reject risk is \(c\). The class action is better exactly when \(1-\eta_{\max}(x)<c\), which is equivalent to \(\eta_{\max}(x)>1-c\). Rejection is better exactly when the inequality is reversed, and equality gives a tie. This proves the result. \(\square\)

Worked Example: A Posterior Exactly on the Threshold

Suppose the posterior probabilities are \((0.60,0.25,0.15)\) and the reject cost is \(c=0.40\). The largest posterior probability is \(0.60\), and the threshold is \(1-c=0.60\). Directly comparing risks gives

$$ r(1\mid x)=1-0.60=0.40=r(R\mid x). $$

Class 2 has risk \(0.75\), and class 3 has risk \(0.85\), so neither is minimizing. Both predicting class 1 and rejecting are Bayes actions. A rule that always rejects at equality and a rule that always predicts a maximizing class at equality have the same conditional risk here. If \(c\) were increased to \(0.41\), class 1 would be strictly better; if \(c\) were reduced to \(0.39\), rejection would be strictly better.

Worked Risk Calculation Across Feature Values

Worked Example: Decisions and Overall Expected Loss

Suppose \(X\) takes three values, \(A,B,C\), with probabilities \(0.40,0.35,0.25\), respectively. There are two classes and the reject cost is \(c=0.25\). The posterior probabilities are

Feature value\(P(X=x)\)\((\eta_1(x),\eta_2(x))\)Smallest class riskBayes action
A0.40(0.80, 0.20)0.20Predict class 1
B0.35(0.60, 0.40)0.40Reject
C0.25(0.30, 0.70)0.30Reject

At \(A\), the best class risk is \(1-0.80=0.20\), less than \(0.25\). At \(B\), the best class risk is \(1-0.60=0.40\), greater than \(0.25\). At \(C\), it is \(1-0.70=0.30\), also greater than \(0.25\). The expected loss of the resulting rule is the probability-weighted average of its conditional risks:

$$ 0.40(0.20)+0.35(0.25)+0.25(0.25) =0.080+0.0875+0.0625 =0.230. $$

For comparison, a rule that is forced to predict a class uses the most probable class at each value of \(X\). Its expected loss is

$$ 0.40(0.20)+0.35(0.40)+0.25(0.30) =0.080+0.140+0.075 =0.295. $$

A rule that always rejects has expected loss \(0.25\). In this example, allowing rejection and using the posterior threshold lowers expected loss to \(0.23\), below both alternatives.

How the Reject Cost Changes the Rule

The threshold \(1-c\) expresses the trade-off in posterior-probability units. A larger reject cost lowers the threshold, so a class prediction becomes worthwhile even when its posterior probability is less concentrated. A smaller reject cost raises the threshold and makes abstention more attractive. Formally, if \(c_1<c_2\), then \(1-c_1>1-c_2\): every feature value at which the best class strictly beats rejection under \(c_1\) also has the best class beating rejection under \(c_2\), though additional values may qualify under \(c_2\).

The endpoints are consistent with the loss definition. If \(c=0\), rejection has zero risk, and it is optimal unless the most probable class has posterior probability one; at that boundary, predicting that class also has zero risk. If \(c=1\), every class prediction has risk at most one and, because the finite posterior probabilities sum to one, the largest is positive. Thus a maximizing class has risk strictly below one, and rejection is not optimal.

A useful interpretation is that the rule does not reject because a probability is “low” in isolation. It rejects when even the best class prediction has error risk exceeding the specified reject cost. If misclassification were assigned a cost other than one, the threshold would need to be recalculated on that cost scale; the stated threshold uses unit misclassification loss.

Common Mistake: Predicting the Most Probable Class Automatically

A frequent error is to find the largest posterior probability and always predict its class, reasoning that it is the most likely label. That identifies the best class action, but it does not compare that action with abstention. For example, with posterior probabilities \((0.55,0.45)\), the most probable class has conditional error risk \(1-0.55=0.45\). If \(c=0.20\), rejecting costs less, so prediction of the most probable class is not Bayes-optimal. The correction is to calculate both \(1-\eta_{\max}(x)\) and \(c\), then choose the smaller risk; include both actions if the risks are equal.

A second subtlety is that a posterior tie among classes and a tie with rejection are different. If two classes share the largest posterior, they have the same class risk, but rejection is selected only if its risk is lower; if the risks are equal, all tied minimizing actions are Bayes actions. The decision is determined by minimizing conditional risk, not by an arbitrary preference for one type of action.

Key takeaway: With unit cost for a wrong class prediction and fixed reject cost \(c\), the minimum class risk is \(1-\eta_{\max}(x)\). Predict a class attaining the largest posterior when this risk is below \(c\), reject when it is above \(c\), and treat equality as a genuine tie.

Check Your Understanding

For each question, compare conditional risks rather than relying on the most probable class alone.

  1. With posterior probabilities \((0.72,0.28)\) and reject cost \(c=0.30\), what is the Bayes action, and what are the relevant risks?
  2. For a three-class problem with largest posterior probability \(0.65\), what values of \(c\) make rejection strictly preferable, make a maximizing class strictly preferable, or produce a tie?
  3. Why can two classes both be Bayes actions even when rejection is not a Bayes action?
  4. In the three-feature-value example, what is the expected loss of a rule that always rejects? Compare it with the calculated Bayes risk.
  5. Explain why always choosing the most probable class does not generally minimize risk when rejection is available.
Clinical Biostats