Why Penalties Need Calibration
Penalized empirical risk compares candidate models by adding a complexity cost to each model’s observed error. The penalty should do more than rank models according to a convenient notion of size: it should also reflect how much uncertainty is introduced by comparing several candidates. If each candidate has a risk bound that holds with high probability on its own, those separate guarantees do not automatically hold for the collection all at once.
Finite-collection calibration turns individual risk bounds into penalties that account for this multiple-model search. The key ingredients are a total failure probability, an allocation of that probability across models, and the form of each model’s individual bound. This tutorial develops the calibration step; it does not require all candidate models to have the same complexity or the same risk-bound formula.
From an Individual Bound to a Collection Penalty
Let \(\mathcal M_1,\ldots,\mathcal M_K\) be a finite collection of candidate model classes. Model \(j\) produces a fitted predictor \(\hat f_j\), with empirical risk \(\hat R_j\) and true risk \(R_j\). Here \(R_j\) is the risk of the fitted predictor on a fresh observation, conditional on the training data; both \(R_j\) and \(\hat R_j\) can therefore be random through the training data.
Suppose that for each model \(j\), a valid individual risk bound is available: for every \(t\geq 0\),
where \(\psi_j(t)\) is a nondecreasing function of \(t\). The function may depend on the sample size, the model’s complexity, and assumptions on the loss and data. This assumption is not a universal concentration formula: it must be justified for the particular setting. For example, if a class contains many predictors and fitting uses the same data on which empirical risk is computed, the bound must account for that fitting and search within the class.
The weight \(w_j\) determines how much of the total failure-probability budget is assigned to model \(j\). A larger weight gives that model a smaller confidence threshold and, because \(\psi_j\) is nondecreasing, a smaller penalty. A smaller weight gives a larger penalty. Equal weights \(w_j=1/K\) yield the familiar threshold \(\log(K/\delta)\), but unequal weights can reflect differing model complexities.
Proof. For each \(j\), substitute \(t_j=\log(1/(\delta w_j))\) into the individual bound. This value is nonnegative because \(\delta w_j\leq 1\), and \(e^{-t_j}=\delta w_j\). Therefore
The probability that at least one of these inequalities fails is no greater than the sum of their failure probabilities. Thus
Taking the complementary event proves the stated simultaneous guarantee. \(\square\)
This result calibrates the penalties; by itself, it does not claim that a particular selection rule is optimal. In penalized empirical risk selection, one commonly chooses a model minimizing \(\hat R_j+\operatorname{pen}_j\). Calibration ensures that the penalty levels have a collection-wide risk interpretation, rather than merely being separate model-by-model adjustments.
Choosing the Allocation
Equal allocation is natural when the models have comparable individual bounds. If the models differ substantially, weights can give more of the confidence budget to models for which a smaller penalty is especially valuable. Weights should be specified without using the observed outcomes in a way that invalidates the individual guarantees. A data-dependent allocation needs its own justification; it is not automatically covered by the theorem.
There is a precise reason equal allocation is a sensible default when all models have the same bound.
Derivation. For any valid allocation, at least one weight is at most \(1/K\). Otherwise all \(K\) weights would exceed \(1/K\), and their sum would exceed one. For an index \(j\) with \(w_j\leq1/K\),
Monotonicity gives \(\operatorname{pen}_j\geq\psi(\log(K/\delta))\), so the largest penalty cannot be smaller than this value. Equal weights make every penalty exactly \(\psi(\log(K/\delta))\), attaining that lower bound. \(\square\)
When the individual bounds differ, the result above no longer identifies an optimal allocation. The allocation is then a design choice: weights can be tilted toward simpler models, or toward models whose penalties most affect the intended selection. Whatever the choice, the weights must sum to at most one, and the resulting penalty for each model must still use its own valid function \(\psi_j\).
Worked Penalty Calibrations
Worked Example: Equal-Weight Calibration for Bounded Losses
Suppose \(K=8\) fixed candidate predictors are evaluated on \(n=400\) independent observations with losses in \([0,1]\). For each fixed predictor, Hoeffding’s inequality gives an individual bound of the form
This example concerns fixed candidates, so the individual bound applies directly to each predictor’s empirical average loss. Set the desired collection-wide failure probability to \(\delta=0.05\), and use equal weights \(w_j=1/8\). The threshold is
The common penalty is therefore
If two candidates have empirical risks \(0.18\) and \(0.16\), their penalized values are \(0.18+0.07965=0.25965\) and \(0.16+0.07965=0.23965\). The second candidate remains preferred. The common penalty does not change their ranking here, but it quantifies the upward risk allowance needed to cover all eight candidates simultaneously under the stated bound.
Worked Example: Complexity-Dependent Bounds and Unequal Weights
Consider four model classes with complexity indices \(d_j=1,4,9,16\), sample size \(n=500\), and individual bounds assumed to have the form
Treat this as a supplied valid bound for the setting. Choose \(\delta=0.05\) and weights \(w=(0.50,0.25,0.15,0.10)\), which sum to one. The thresholds are \(\log(40)\approx3.689\), \(\log(80)\approx4.382\), \(\log(133.33)\approx4.893\), and \(\log(200)\approx5.298\). Substitution gives the penalties:
Suppose the empirical risks are \(0.22,0.17,0.13,0.11\). The penalized values are approximately \(0.3168,0.2995,0.2967,0.3164\), respectively. The third model is selected by this criterion. Its empirical risk is not the smallest, but its combined empirical risk and calibrated penalty is. The calculation also shows that complexity and confidence allocation both contribute to the penalty.
For comparison, equal weights would give \(t=\log(80)\approx4.382\) for every class. The corresponding penalties are approximately \(0.1038,0.1295,0.1636,0.2019\). The second penalty is unchanged because its weight was already \(1/4\); the first is larger with equal weights, while the third and fourth are smaller. Allocation changes individual penalties, but the simultaneous guarantee continues to hold because both allocations use a total weight of one.
Worked Example: Why a Skewed Allocation Raises the Worst Penalty
Suppose four models have identical bounds \(\psi(t)=\sqrt{2t/n}\), with \(n=200\), and the desired failure probability is \(\delta=0.10\). Under equal weights, each threshold is \(\log(40)\approx3.689\), giving a penalty
Now use weights \(0.70,0.10,0.10,0.10\). The first threshold is \(\log(1/0.07)\approx2.659\), so its penalty is \(\sqrt{5.318/200}\approx0.1631\). Each remaining threshold is \(\log(100)\approx4.605\), with penalty \(\sqrt{9.210/200}\approx0.2146\). The first model receives a smaller penalty, but the largest penalty rises from \(0.1921\) to \(0.2146\). This illustrates the equal-allocation result: with identical bounds, concentrating the confidence budget cannot improve the worst penalty.
Common Mistake and Practical Interpretation
A common mistake is to use the desired failure probability \(\delta\) separately for every model. That gives \(t=\log(1/\delta)\) for each penalty. The resulting individual guarantees are valid, but their failure probabilities can add across models; with \(K\) models, the resulting collection-wide failure probability is bounded only by \(K\delta\), not by \(\delta\). The correction is to allocate the total budget, for example by using \(\delta/K\) per model or, more generally, \(\delta w_j\).
Calibration also clarifies what a penalty does and does not say. It is not a universal surcharge determined by the number of parameters alone. It is built from an individual risk bound, a confidence target, and a specified allocation. If the individual bound is loose, the calibrated penalty will be loose; if the assumed bound does not account for fitting within a class, the penalty cannot repair that omission. Conversely, a well-calibrated penalty gives a principled way to compare candidate empirical risks while accounting for the finite search.
Check Your Understanding
Use the definitions and calculations above to answer these questions.
- If there are \(K\) models and equal weights are used, what threshold \(t\) corresponds to collection-wide failure probability \(\delta\)?
- Why must the weights sum to at most one for the stated simultaneous guarantee?
- For four models with \(\delta=0.1\) and weights \(0.4,0.3,0.2,0.1\), write the four thresholds in terms of logarithms.
- What goes wrong if each of \(K\) models is assigned failure probability \(\delta\), rather than allocating a total budget of \(\delta\)?
- Why does the individual risk bound need to account for fitting within a model class when the same data are used to fit and evaluate the predictor?