Tutorials › Statistical Learning (Graduate) › Reject Options and Abstention Costs

Multiclass and Structured Losses · Tutorial 568 of 989

Reject Options and Abstention Costs

Learn when a classifier should predict a class and when its conditional risk is lower if it abstains.

Advanced 9 min read

What You'll Learn

  • Define conditional risk when the action set includes an abstention option.
  • Derive the probability threshold determined by the rejection cost.
  • Distinguish strict optimality from ties at the threshold.
  • Calculate optimal decisions for multiclass posterior probability vectors.
  • Compare conditional decisions with the total expected risk of a rule.

Why Allow a Classifier to Abstain?

A classifier is not always required to name a class. In a medical screening system, for example, an uncertain case might be referred for further review rather than assigned a diagnosis automatically. Abstention can reduce costly classification errors, but it is not free: it may require extra testing, delay a decision, or consume expert time. The decision therefore depends on comparing the cost of abstaining with the conditional cost of the best available class prediction.

We consider a fixed cost for abstaining and the usual zero-one classification loss: a correct class decision costs zero, and an incorrect one costs one. This makes the role of the rejection cost explicit. If the cost of a wrong decision were measured on another scale, the threshold would change accordingly.

Definition: Let \(Y\) take values in the finite class set \(\{1,\ldots,K\}\), and let \(X\) denote the observed features. For each class \(k\), define the posterior probability \(\eta_k(x)=P(Y=k\mid X=x)\), using a measurable version of this conditional probability. An action is either a class \(j\in\{1,\ldots,K\}\) or the abstention action \(\bot\). Under rejection cost \(c\in[0,1]\), the loss is zero for a correct class decision, one for an incorrect class decision, and \(c\) for abstention.

Conditional Risk and the Rejection Threshold

The conditional risk of an action is its expected loss given the observed feature value. If the action is class \(j\), an error occurs exactly when \(Y\ne j\), so its conditional risk is \(1-\eta_j(x)\). The conditional risk of abstaining is \(c\), regardless of the unknown class.

$$ R(j\mid x)=1-\eta_j(x),\qquad R(\bot\mid x)=c. $$

Among class decisions, a class with the largest posterior probability has the smallest conditional risk. Write \(\eta_{\max}(x)=\max_{1\le k\le K}\eta_k(x)\). The best class decision has risk \(1-\eta_{\max}(x)\), so the comparison with abstention is between \(1-\eta_{\max}(x)\) and \(c\).

Theorem: Under zero-one class loss and fixed rejection cost \(c\in[0,1]\), the minimum conditional risk at \(x\) is \(\min\{1-\eta_{\max}(x),c\}\). A class \(j\) minimizing conditional risk must maximize \(\eta_j(x)\). Abstention is strictly better than every class decision when \(\eta_{\max}(x)<1-c\); a maximum-posterior class is strictly better when \(\eta_{\max}(x)>1-c\). At equality, abstention and every maximum-posterior class are tied.

The threshold follows directly from the risk comparison:

$$ 1-\eta_{\max}(x)\ \mathrel{\lessgtr}\ c \quad\Longleftrightarrow\quad \eta_{\max}(x)\ \mathrel{\gtrless}\ 1-c. $$

Thus a common optimal rule is to predict a maximum-posterior class when \(\eta_{\max}(x)\ge 1-c\) and abstain otherwise. The weak inequality assigns threshold ties to classification, but assigning them to abstention is also optimal. If several classes share the maximum posterior probability, each is an equally good class action; a fixed tie-breaking convention, such as choosing the smallest index, makes the rule unambiguous.

Worked Example: A Posterior Vector Below the Threshold

Suppose there are three classes, the posterior probabilities at a particular feature value are \((0.62,0.28,0.10)\), and the rejection cost is \(c=0.30\). Find the minimum-risk action.

The conditional risks of the three class decisions are \(1-0.62=0.38\), \(1-0.28=0.72\), and \(1-0.10=0.90\). The abstention risk is \(0.30\). Therefore abstaining has the lowest risk: \(0.30<0.38\).

The threshold gives the same answer. Here \(1-c=0.70\), while the largest posterior probability is \(0.62\). Since \(0.62<0.70\), abstention is strictly optimal.

Proof of the Conditional Decision Rule

The threshold is not a heuristic based on uncertainty; it is the result of minimizing conditional expected loss. The finite number of classes also ensures that the maximum posterior probability is attained.

1
Calculate each class risk.
For a proposed class \(j\), the loss is one on the event \(Y\ne j\) and zero on \(Y=j\). Consequently, \(R(j\mid x)=P(Y\ne j\mid X=x)=1-\eta_j(x)\).
2
Find the best class action.
Since \(1-\eta_j(x)\) decreases as \(\eta_j(x)\) increases, minimizing over \(j\) gives \(1-\eta_{\max}(x)\), attained by every class maximizing \(\eta_j(x)\).
3
Compare with abstention.
The only remaining action has risk \(c\). The minimum over all actions is therefore \(\min\{1-\eta_{\max}(x),c\}\). Comparing the two quantities gives the stated threshold and equality case.

For completeness, the conditional comparison also yields an optimal rule for the overall expected loss, not merely a good decision at an isolated feature value. Let \(d\) be a measurable rule taking values in \(\{1,\ldots,K,\bot\}\), and let \(L(d(X),Y)\) be its loss.

Theorem: If \(Y\) has \(K<\infty\) possible classes, \(c\in[0,1]\), and the posterior probabilities \(\eta_k(X)\) are measurable, a measurable rule that chooses a minimum-conditional-risk action at each \(X\) minimizes \(E[L(d(X),Y)]\) over all measurable decision rules.

Proof. Define \(r(a,x)=E[L(a,Y)\mid X=x]\) for each action \(a\). A measurable minimizing rule exists: the conditional risks of the finite set of actions are measurable, and ties can be settled by a fixed ordering of the actions. Call such a rule \(d^*\). For any other measurable rule \(d\), pointwise minimization gives \(r(d^*(x),x)\le r(d(x),x)\) for almost every \(x\). By the tower property of conditional expectation and the fact that the loss is bounded,

$$ E[L(d^*(X),Y)] =E[r(d^*(X),X)] \le E[r(d(X),X)] =E[L(d(X),Y)]. $$

Hence \(d^*\) minimizes expected loss. The boundedness needed for these expectations holds because the loss takes values in \([0,1]\). \(\square\)

Worked Decisions, Including a Threshold Tie

The threshold is governed by the largest posterior probability, not by the number of classes. For a fixed cost \(c\), the same threshold \(1-c\) applies for any finite \(K\); adding classes changes the posterior vector, but not the risk comparison.

Worked Example: Equal Risks at the Threshold

Let the posterior vector be \((0.50,0.50)\) and let \(c=0.50\). Compare the risks of all available actions.

Predicting class 1 has risk \(1-0.50=0.50\), and predicting class 2 also has risk \(1-0.50=0.50\). Abstaining has risk \(0.50\). All three actions are optimal, with minimum conditional risk \(0.50\).

This is a threshold tie because \(1-c=0.50=\eta_{\max}\). If the rejection cost were \(0.49\), abstention would be strictly better. If it were \(0.51\), either class prediction would be strictly better than abstaining, while the two class decisions would remain tied.

A second useful calculation evaluates decisions across feature values. The pointwise rule chooses actions separately at each value of \(X\), while the total risk averages their conditional risks, weighted by how often those feature values occur.

Worked Example: Overall Risk Across Two Feature Groups

Suppose \(X\) has two possible values, \(A\) and \(B\), with \(P(X=A)=0.40\) and \(P(X=B)=0.60\). There are three classes. The posterior vectors are \((0.51,0.30,0.19)\) at \(A\) and \((0.82,0.11,0.07)\) at \(B\), and the rejection cost is \(c=0.25\). Find the optimal action at each feature value and the resulting expected loss.

At \(A\), the class risks are \(0.49\), \(0.70\), and \(0.81\); abstention costs \(0.25\). Abstain, with minimum conditional risk \(0.25\).

At \(B\), the class risks are \(0.18\), \(0.89\), and \(0.93\); abstention costs \(0.25\). Predict class 1, with minimum conditional risk \(0.18\).

The overall expected loss of these decisions is \(0.40(0.25)+0.60(0.18)=0.10+0.108=0.208\). For comparison, always predicting the maximum-posterior class would give conditional risks \(0.49\) at \(A\) and \(0.18\) at \(B\), hence expected loss \(0.40(0.49)+0.60(0.18)=0.196+0.108=0.304\). The reduction is \(0.304-0.208=0.096\), exactly the contribution \(0.40(0.49-0.25)\) from abstaining at \(A\).

Interpreting the Cost and Avoiding Common Errors

The cost \(c\) sets how much conditional classification error is worth avoiding by abstaining. A smaller \(c\) lowers the threshold \(1-c\), so abstention is chosen only when the best class probability is relatively low. A larger \(c\) raises the threshold, making abstention more attractive. This conclusion depends on the stated loss scale: the cost of an incorrect class prediction is one.

More generally, if every incorrect class prediction costs \(m>0\) and abstention costs \(r\ge0\), the best class risk is \(m(1-\eta_{\max}(x))\). For \(0\le r\le m\), comparing it with \(r\) gives the threshold \(\eta_{\max}(x)=1-r/m\). If \(r>m\), abstention is never better than the best class action, since \(m(1-\eta_{\max}(x))\le m<r\). This rescaling shows why a cost must be interpreted relative to the cost of an error.

With a general multiclass loss matrix, the best class action need not be the class with largest posterior probability. The relevant comparison is then between the minimum conditional risk over class actions and the rejection cost. The maximum-posterior threshold above relies on symmetric zero-one class loss; it should not be carried over unchanged to unequal error costs.

  • Mistake: abstain whenever the largest posterior probability is below one half. That threshold is not universal. The correct threshold under the stated loss is \(1-c\), so it equals one half only when \(c=0.5\).
  • Mistake: compare the rejection cost with the error probability of an arbitrary class. First choose a minimum-risk class, which under zero-one loss is a maximum-posterior class; compare \(c\) with \(1-\eta_{\max}(x)\).
  • Mistake: treat equality as requiring abstention. At \(\eta_{\max}(x)=1-c\), a maximum-posterior class and abstention have equal risk. Either is optimal, and the implementation may choose a tie convention.
  • Mistake: treat the threshold as a property of the number of classes. Under this loss, the threshold depends on \(c\), not directly on \(K\). The class count affects the posterior probabilities, not the algebra of the risk comparison.
Key takeaway: Compute the best class risk first. Under zero-one classification loss it is \(1-\eta_{\max}(x)\); abstain exactly when its cost \(c\) is smaller, and recognize that equality permits either action.

Check Your Understanding

For each question, use conditional risk rather than an informal notion of uncertainty.

  1. With rejection cost \(c=0.20\), what is the threshold for the largest posterior probability? What action is optimal if that probability is \(0.74\)?
  2. For posterior probabilities \((0.45,0.35,0.20)\) and \(c=0.55\), calculate the risk of each class decision and of abstaining. Which actions minimize risk?
  3. Why can either a class decision or abstention be optimal when the largest posterior probability equals \(1-c\)?
  4. If incorrect class decisions cost \(m=4\) and rejection costs \(r=1\), derive the threshold for the largest posterior probability.
  5. Under a general multiclass loss matrix, which quantity should be compared with the rejection cost instead of \(1-\eta_{\max}(x)\)?
Clinical Biostats