Tutorials › Statistical Learning (Graduate) › Regularized Empirical Objectives for Kernel Classifiers

Kernel Classification Guarantees · Tutorial 768 of 989

Regularized Empirical Objectives for Kernel Classifiers

Learn to write regularized empirical objectives precisely and determine what their normalization and penalty imply for the fitted RKHS score.

Advanced 10 min read

What You'll Learn

  • Write hinge- and logistic-loss empirical objectives for binary labels.
  • Translate between average-loss and summed-loss penalty conventions.
  • Explain why changing the normalization without adjusting the penalty changes the fit.
  • Prove that a minimizer lies in the span of the observed kernel sections.
  • Derive an RKHS norm bound from comparison with the zero score.
  • Convert a norm bound into a pointwise score bound when the kernel diagonal is bounded.

Why the Objective Must Be Specified Precisely

A kernel classifier is not determined just by saying that it uses a hinge loss or a logistic loss. Its fitted score also depends on how the empirical loss is normalized and how the RKHS norm is penalized. In particular, the same numerical penalty parameter can describe different optimization problems when one objective uses a sum and another uses an average.

This distinction matters for both computation and interpretation. The regularization term can imply a bound on the fitted function’s RKHS norm, and that bound changes with the objective’s scaling. If the kernel is bounded on the diagonal, the norm bound also controls the score at each input. We make these dependencies explicit below.

Empirical Objectives for Binary Kernel Classifiers

Let \((x_1,y_1),\ldots,(x_n,y_n)\) be observed data, where \(x_i\) belongs to an input space \(\mathcal X\) and \(y_i\in\{-1,+1\}\). Let \(K\) be a positive semidefinite kernel with reproducing kernel Hilbert space (RKHS) \(\mathcal H\) and norm \(\|\cdot\|_{\mathcal H}\). A function \(f\in\mathcal H\) assigns the score \(f(x)\) to input \(x\); the predicted class is determined by the sign of that score, with a chosen convention for ties at zero.

Both losses below depend on the signed margin \(y f(x)\). A positive margin means the score points toward the observed label; a negative margin means it points the other way.

Definition: The hinge loss is \(\ell_{\mathrm h}(y,t)=(1-yt)_+\), where \(a_+=\max(a,0)\). The logistic loss is \(\ell_{\mathrm{log}}(y,t)=\log(1+\exp(-yt))\). Their empirical risks are \(n^{-1}\sum_{i=1}^n\ell(y_i,f(x_i))\). A regularized empirical objective adds a positive multiple of \(\|f\|_{\mathcal H}^2\) to this empirical risk.

A common average-loss convention, used here as the reference convention, is

$$ J_{n,\lambda}(f) = \frac{1}{n}\sum_{i=1}^n \ell(y_i,f(x_i)) +\frac{\lambda}{2}\|f\|_{\mathcal H}^2, \qquad \lambda>0. $$

One can take \(\ell=\ell_{\mathrm h}\) or \(\ell=\ell_{\mathrm{log}}\). Both are nonnegative and convex as functions of the score. The factor \(1/2\) is a convention that simplifies derivatives of the squared norm; it does not change the substance of regularization, but it does affect the numerical value assigned to the penalty parameter.

Normalization and Penalty Conventions

Another standard form uses the sum of losses rather than their average:

$$ \widetilde J_{n,\rho}(f) = \sum_{i=1}^n \ell(y_i,f(x_i)) +\frac{\rho}{2}\|f\|_{\mathcal H}^2. $$

Dividing this objective by \(n\) leaves its minimizers unchanged and gives

$$ \frac{1}{n}\widetilde J_{n,\rho}(f) = \frac{1}{n}\sum_{i=1}^n \ell(y_i,f(x_i)) +\frac{\rho}{2n}\|f\|_{\mathcal H}^2 = J_{n,\rho/n}(f). $$

Thus the summed-loss objective with penalty parameter \(\rho\) has the same minimizer as the average-loss objective with parameter \(\lambda=\rho/n\). Keeping the same numerical parameter in both formulas generally does not give the same fit. More generally, multiplying an entire objective by a positive constant leaves its minimizer unchanged, but multiplying only its loss term or only its penalty term changes their relative weight.

Objective conventionEquivalent average-loss parameterPenalty in the written objective
Average loss plus squared norm\(\lambda\)\(\lambda/2\)
Summed loss plus squared norm\(\rho/n\)\(\rho/2\)
Average loss plus \(\gamma\|f\|_{\mathcal H}^2\)\(2\gamma\)\(\gamma\)

Worked Example: Translating a Summed-Loss Penalty

Suppose \(n=5\) and the objective is the summed hinge loss plus \(\rho\|f\|_{\mathcal H}^2/2\), with \(\rho=2\). Its average-loss equivalent is

$$ \frac{1}{5}\sum_{i=1}^{5}(1-y_i f(x_i))_+ +\frac{2}{2\cdot 5}\|f\|_{\mathcal H}^2 = \frac{1}{5}\sum_{i=1}^{5}(1-y_i f(x_i))_+ +\frac{0.4}{2}\|f\|_{\mathcal H}^2. $$

Therefore the equivalent parameter in the reference convention is \(\lambda=2/5=0.4\). Using \(\lambda=2\) in the average-loss convention would instead impose five times as much relative penalty as this summed-loss objective.

Worked Example: One Observation and the Hinge-Loss Solution

Consider a one-dimensional RKHS on a single input \(x\), with \(K(x,x)=1\). Every score is described by a scalar \(a=f(x)\), and its RKHS norm is \(|a|\). For one positive label, the average-loss objective is

$$ J(a)=(1-a)_++\frac{\lambda}{2}a^2,\qquad \lambda>0. $$

For \(a<1\), this is \(1-a+\lambda a^2/2\), whose derivative is \(-1+\lambda a\). For \(a\geq 1\), it is \(\lambda a^2/2\), which is increasing for \(a\geq1\). If \(0<\lambda\leq1\), the derivative on \(a<1\) is nonpositive for \(a\leq1\), so the objective decreases up to \(a=1\), then increases; the minimizer is \(a=1\). If \(\lambda>1\), the derivative on \(a<1\) vanishes at \(a=1/\lambda<1\), and the quadratic is minimized there. Hence

$$ \hat a = \begin{cases} 1, & 0<\lambda\leq 1,\\ 1/\lambda, & \lambda>1. \end{cases} $$

The calculation shows directly that the penalty parameter controls the fitted score, even with the data and loss fixed.

Worked Example: A Logistic-Loss Solution at a Chosen Parameter

Use the same one-input RKHS and a single positive label, but now minimize \(\log(1+\exp(-a))+\lambda a^2/2\). Its derivative is \(-1/(1+\exp(a))+\lambda a\), and its second derivative is \(\exp(a)/(1+\exp(a))^2+\lambda>0\). The objective is therefore strictly convex.

Choose \(a=\log 3\) and \(\lambda=1/(4\log 3)\). At this point, \(1/(1+\exp(a))=1/4\), while \(\lambda a=1/4\), so the derivative is zero. Strict convexity makes this the unique minimizer. Its objective value is

$$ \log(1+1/3)+\frac{1}{8\log 3}(\log 3)^2 = \log(4/3)+\frac{\log 3}{8}. $$

The calculation verifies the optimizer by checking its first-order condition and the strict positivity of the second derivative.

Representer Form and Existence of a Minimizer

For finite data, minimizing either objective can be reduced to a finite-dimensional optimization. This is not an assumption that the RKHS itself is finite-dimensional; it follows because the data enter the loss only through the \(n\) evaluations \(f(x_i)\).

Theorem: Suppose \(K\) is a positive semidefinite kernel, \(\mathcal H\) its RKHS, and \(\lambda>0\). For either hinge or logistic loss, the average-loss objective \(J_{n,\lambda}\) has a unique minimizer in \(\mathcal H\). That minimizer belongs to \(\operatorname{span}\{K(x_i,\cdot):1\leq i\leq n\}\), so it has a representation \(f=\sum_{i=1}^n\alpha_i K(x_i,\cdot)\).

Proof. Let \(S=\operatorname{span}\{K(x_i,\cdot):1\leq i\leq n\}\), and let \(P_S f\) be the orthogonal projection of \(f\) onto \(S\). The reproducing property gives \(f(x_i)=\langle f,K(x_i,\cdot)\rangle_{\mathcal H}\). Since \(K(x_i,\cdot)\in S\), orthogonal projection preserves each observed evaluation:

$$ (P_S f)(x_i) = \langle P_S f,K(x_i,\cdot)\rangle_{\mathcal H} = \langle f,K(x_i,\cdot)\rangle_{\mathcal H} = f(x_i). $$

Also, \(\|P_S f\|_{\mathcal H}\leq\|f\|_{\mathcal H}\). Thus projection leaves the empirical loss unchanged and cannot increase the penalty. It suffices to minimize over the finite-dimensional space \(S\).

On \(S\), the objective is continuous. It is coercive because the loss is nonnegative and \(\lambda\|f\|_{\mathcal H}^2/2\) tends to infinity as \(\|f\|_{\mathcal H}\) tends to infinity. A continuous coercive function on a finite-dimensional space attains its minimum. The empirical loss is convex in \(f\), and the squared Hilbert-space norm is strictly convex, so their sum is strictly convex and the minimizer is unique. The projection argument ensures that a minimizer can be taken in \(S\); uniqueness then implies the minimizer lies there. \(\square\)

If \(K_n\) is the \(n\)-by-\(n\) Gram matrix with entries \(K(x_i,x_j)\), the representation yields \(f(x_i)=(K_n\alpha)_i\) and \(\|f\|_{\mathcal H}^2=\alpha^\mathsf{T}K_n\alpha\). The coefficient vector need not be unique if the Gram matrix is singular, even though the minimizing function \(f\) is unique.

What the Penalty Implies About the Score

The zero function is a feasible competitor. Its hinge loss is \(1\) per observation, and its logistic loss is \(\log 2\) per observation. Comparing a minimizer with this competitor gives a direct norm bound.

Theorem: Let \(\hat f\) minimize the average-loss objective \(J_{n,\lambda}\). For hinge loss, \(\|\hat f\|_{\mathcal H}^2\leq 2/\lambda\). For logistic loss, \(\|\hat f\|_{\mathcal H}^2\leq 2\log(2)/\lambda\). If, in addition, \(K(x,x)\leq \kappa^2\) at an input \(x\), then \(|\hat f(x)|\leq\kappa\|\hat f\|_{\mathcal H}\).

Proof. For hinge loss, \(J_{n,\lambda}(0)=1\). Since \(\hat f\) minimizes the objective and empirical loss is nonnegative,

$$ \frac{\lambda}{2}\|\hat f\|_{\mathcal H}^2 \leq J_{n,\lambda}(\hat f) \leq J_{n,\lambda}(0)=1, \qquad \|\hat f\|_{\mathcal H}^2\leq\frac{2}{\lambda}. $$

For logistic loss, \(J_{n,\lambda}(0)=\log 2\), and the same inequalities give \(\|\hat f\|_{\mathcal H}^2\leq2\log(2)/\lambda\). Finally, by the reproducing property and Cauchy–Schwarz,

$$ |\hat f(x)| = |\langle\hat f,K(x,\cdot)\rangle_{\mathcal H}| \leq \|\hat f\|_{\mathcal H}\|K(x,\cdot)\|_{\mathcal H} = \|\hat f\|_{\mathcal H}\sqrt{K(x,x)} \leq \kappa\|\hat f\|_{\mathcal H}. $$

This proves both claims. \(\square\)

Worked Example: Translating a Norm Bound Into a Score Bound

Suppose the average hinge-loss objective has \(\lambda=0.5\). The theorem gives

$$ \|\hat f\|_{\mathcal H}^2\leq\frac{2}{0.5}=4, \qquad \|\hat f\|_{\mathcal H}\leq2. $$

If \(K(x,x)\leq9\) for a particular input, then \(\kappa=3\), and therefore \(|\hat f(x)|\leq3\cdot2=6\). This is a bound on the score, not a claim that every fitted score attains its largest possible value.

For comparison, if the same penalty parameter \(\rho=2\) is used with a summed hinge loss and \(n=5\), the equivalent average-loss parameter is \(0.4\), so the corresponding norm bound is \(\|\hat f\|_{\mathcal H}\leq\sqrt{2/0.4}=\sqrt{5}\), not \(2\).

Common Pitfalls and Practical Implications

The norm bound is a consequence of the stated objective, not a free-standing property of kernel classifiers. It depends on the loss at zero and on the coefficient multiplying the squared norm. For the summed-loss convention, comparison with zero instead gives \(\|\hat f\|_{\mathcal H}^2\leq2n/\rho\) for hinge loss and \(\|\hat f\|_{\mathcal H}^2\leq2n\log(2)/\rho\) for logistic loss.

  • Wrong reasoning: “The average and summed objectives differ only by a constant, so the same penalty parameter gives the same classifier.” The correction is that dividing the whole summed objective by \(n\) also divides its penalty coefficient by \(n\). The minimizers match only after adjusting the parameter accordingly.
  • Wrong reasoning: “A norm bound automatically gives the same score bound everywhere.” The correction is that the pointwise bound also uses \(K(x,x)\); a uniform score bound requires a uniform diagonal bound on the kernel over the inputs of interest.
  • Wrong reasoning: “An unpenalized intercept is included in the RKHS norm bound.” The correction is that the proof bounds only the quantity actually penalized. If an intercept is added without a penalty, comparison with the zero function does not by itself bound that intercept or the full score.

In applied work, report the loss normalization, the exact penalty term, and whether an intercept is penalized. These details make the fitted objective interpretable and allow penalty values and bounds to be compared without ambiguity.

Check Your Understanding

Use the formulas and conventions stated above to answer these questions.

  1. For \(n=12\), what average-loss penalty parameter is equivalent to a summed-loss objective with \(\rho=3\)?
  2. Why does orthogonal projection onto the span of the observed kernel sections preserve the empirical loss?
  3. For average logistic loss with \(\lambda=2\), what upper bound does comparison with the zero function give for \(\|\hat f\|_{\mathcal H}^2\)?
  4. If \(K(x,x)=16\) and \(\|\hat f\|_{\mathcal H}\leq 1.5\), what pointwise bound follows for \(|\hat f(x)|\)?
  5. Why can the coefficient vector in a kernel expansion fail to be unique even when the minimizing function is unique?
Clinical Biostats