Tutorials › Statistical Learning (Graduate) › A Gaussian-Kernel Rate Calculation Under a Margin Condition

Kernel Classification Guarantees · Tutorial 789 of 989

A Gaussian-Kernel Rate Calculation Under a Margin Condition

See how boundary approximation, statistical complexity, and a margin condition combine to determine a Gaussian-kernel classifier’s excess-risk rate.

Advanced 11 min read

What You'll Learn

  • State the assumptions needed for a Gaussian-kernel score-error bound.
  • Derive the excess-risk conversion under a Tsybakov margin condition.
  • Optimize the penalty at a fixed bandwidth.
  • Balance approximation and estimation terms to obtain a bandwidth schedule.
  • Interpret the resulting rate and identify when the calculation does not apply.

From Boundary Approximation to Excess Risk

A rate calculation for a kernel classifier connects three different quantities: how well the Bayes decision boundary can be approximated, how costly it is to estimate a score from data, and how much probability lies near the boundary. A margin condition controls the last quantity. When there is little probability near the boundary, a score estimate need not be extremely accurate everywhere to give a good classification rule.

The calculation below is deliberately conditional on stated bounds. Gaussian kernels alone do not imply one universal rate: the rate depends on the approximation and complexity properties available for the data distribution, the score, and the chosen bandwidth. We make those inputs explicit, derive the margin conversion, and then optimize the penalty and bandwidth.

Definition: Let \(X\) be a feature vector and \(Y\in\{-1,1\}\) a label. Write \(\eta(x)=P(Y=1\mid X=x)\) and \(g^*(x)=2\eta(x)-1\). The Bayes classifier is \(d^*(x)=1\) when \(g^*(x)\geq 0\), and \(d^*(x)=-1\) otherwise. For a score \(f\), let \(d_f(x)=1\) when \(f(x)\geq 0\), and \(d_f(x)=-1\) otherwise. Its excess classification risk is \(R(d_f)-R(d^*)\), where \(R(d)=P(d(X)\ne Y)\).

The score \(g^*\) is the conditional mean of \(Y\). Its sign determines the Bayes decision, while its magnitude \(|g^*(x)|\) measures how far the conditional label probability is from one half. For a measurable score \(f\), the excess risk has the identity

$$ R(d_f)-R(d^*)=E\!\left[|g^*(X)|\,\mathbf{1}\{d_f(X)\ne d^*(X)\}\right]. $$

Indeed, conditionally on \(X=x\), predicting the less likely label costs \(|2\eta(x)-1|\) more than predicting the more likely label. The identity follows by averaging this conditional difference. Points with \(g^*(x)=0\) contribute zero excess risk regardless of the tie convention.

The Assumptions for the Rate Calculation

Use a Gaussian kernel with bandwidth \(h\), denoted \(K_h(x,x')=\exp(-\|x-x'\|^2/(2h^2))\), and let \(\mathcal H_h\) be its reproducing-kernel Hilbert space. Consider a score estimator \(\hat f_{h,\lambda}\) using penalty \(\lambda>0\), classified by its sign. The rate calculation uses the following inputs; they should be checked for the setting at hand rather than inferred just from the word “Gaussian.”

  • Boundary approximation: for each sufficiently small \(h>0\), there is a score \(f_h\in\mathcal H_h\) such that \(E[(f_h(X)-g^*(X))^2]\leq A h^{2s}\) and \(\|f_h\|_{\mathcal H_h}^2\leq C h^{-2r}\), for constants \(A,C>0\), \(s>0\), and \(r\geq0\).
  • Complexity and penalty bound: for constants \(B,D>0\), the estimator satisfies \(E[(\hat f_{h,\lambda}(X)-g^*(X))^2]\leq A h^{2s}+B\lambda h^{-2r}+D h^{-d}/(n\lambda)\), where \(d>0\) and the expectation includes the training sample and a new feature vector.
  • Margin condition: for some \(q\geq0\) and \(M>0\), \(P(|g^*(X)|\leq t)\leq M t^q\) for \(0<t\leq1\). When \(q=0\), this is simply a bounded-probability condition and gives no additional decay near the boundary.

The second condition is an assumed oracle-style score-error bound combining the approximation, penalty, and estimation contributions. Its particular complexity term is part of the premise of this calculation; other valid bounds can lead to different penalty choices and rates. The result below also assumes that the displayed bound applies over the bandwidth and penalty choices being considered.

Worked Example: Reading the Three Score-Error Terms

Suppose \(s=1\), \(r=1\), and \(d=2\). The assumed bound becomes

$$ E[(\hat f_{h,\lambda}(X)-g^*(X))^2] \leq A h^2+B\lambda h^{-2}+\frac{D h^{-2}}{n\lambda}. $$

The first term decreases as the bandwidth shrinks: it represents the assumed boundary-approximation error. The second term penalizes the norm required to represent a more finely resolved boundary at small \(h\). The third term is the assumed estimation cost, which increases when \(h\) is small or when \(\lambda\) is too small. Thus neither “take \(h\) as small as possible” nor “take \(\lambda\) as small as possible” follows from the bound.

Margin Condition Converts Score Error to Classification Risk

The key conversion does not require the estimator to have the correct sign everywhere. Instead, it bounds the risk from sign mistakes by separating points close to the Bayes boundary from points farther away. The margin condition makes the first group small, and a small squared score error limits the second group.

Theorem: Suppose \(g^*(X)\in[-1,1]\) and \(P(|g^*(X)|\leq t)\leq M t^q\) for \(0<t\leq1\), with \(q\geq0\). For any measurable score \(f\) with \(\Delta=E[(f(X)-g^*(X))^2]\), there is a constant \(C_q\), depending only on \(M\) and \(q\), such that \(R(d_f)-R(d^*)\leq C_q\Delta^{(q+1)/(q+2)}\).

To prove the claim, take \(0<t\leq1\). On the event \(\{|g^*(X)|\leq t\}\), the excess-risk integrand is at most \(t\). On a disagreement event with \(|g^*(X)|>t\), the scores \(f(X)\) and \(g^*(X)\) have opposite decisions, so \(|f(X)-g^*(X)|\geq|g^*(X)|\). Therefore \(|g^*(X)|\leq(f(X)-g^*(X))^2/t\) on that event. Combining the two parts gives

$$ R(d_f)-R(d^*)\leq tP(|g^*(X)|\leq t)+\frac{\Delta}{t} \leq M t^{q+1}+\frac{\Delta}{t}. $$

If \(0<\Delta\leq1\), choose \(t=\Delta^{1/(q+2)}\), which lies in \((0,1]\). Both terms on the right are then bounded by a constant times \(\Delta^{(q+1)/(q+2)}\). If \(\Delta=0\), \(f=g^*\) almost surely and the excess risk is zero. If \(\Delta>1\), excess risk is at most one, which is also at most \(\Delta^{(q+1)/(q+2)}\). Enlarging the constant if needed proves the result in all cases. \(\square\)

For a random estimator, apply this inequality conditionally on the fitted score and then average over the training sample. Since \(\kappa=(q+1)/(q+2)\) lies in \((0,1)\), Jensen’s inequality for the concave function \(u^\kappa\) yields

$$ E[R(d_{\hat f})-R(d^*)] \leq C_q\left(E[(\hat f(X)-g^*(X))^2]\right)^\kappa. $$

Worked Example: Applying a Margin Exponent

Suppose a fitted score has expected squared error at most \(0.04\), and the margin condition holds with \(q=1\). Then \(\kappa=(1+1)/(1+2)=2/3\). The theorem gives

$$ E[R(d_{\hat f})-R(d^*)]\leq C_1(0.04)^{2/3} =C_1(0.04^{1/3})^2 \approx 0.1170C_1. $$

This is a bound, not an estimate of the actual excess risk. Its numerical value depends on the margin constant through \(C_1\); setting that constant to one would only be justified if the assumptions establish it.

Optimize the Penalty at a Fixed Bandwidth

For fixed \(h\), the two terms involving \(\lambda\) move in opposite directions. The penalty contribution grows with \(\lambda\), while the assumed complexity contribution shrinks with \(\lambda\). Balance them by setting their values equal:

$$ B\lambda h^{-2r}=\frac{D h^{-d}}{n\lambda}. $$

Solving this positive equation gives the penalty choice

$$ \lambda_*(h)=\sqrt{\frac{D}{B}}\,n^{-1/2}h^{r-d/2}. $$

This is the minimizer of the sum of those two terms: for positive \(u,v\), \(u\lambda+v/\lambda\) is at least \(2\sqrt{uv}\), with equality at \(\lambda=\sqrt{v/u}\). Here \(u=Bh^{-2r}\) and \(v=Dh^{-d}/n\). Substitution gives the optimized score-error bound

$$ E[(\hat f_{h,\lambda_*}(X)-g^*(X))^2] \leq A h^{2s}+2\sqrt{BD}\,n^{-1/2}h^{-(r+d/2)}. $$

The optimal penalty can increase or decrease with \(h\), depending on \(r-d/2\). It is therefore not generally correct to treat the penalty as a constant when selecting the bandwidth.

Worked Example: Penalty Balance for a Two-Dimensional Feature

Let \(s=1\), \(r=1\), \(d=2\), and \(B=D=1\). At fixed \(h\), the penalty and complexity terms are \(\lambda h^{-2}\) and \(h^{-2}/(n\lambda)\). Equating them gives

$$ \lambda h^{-2}=\frac{h^{-2}}{n\lambda} \quad\Longrightarrow\quad \lambda^2=\frac{1}{n} \quad\Longrightarrow\quad \lambda_*=n^{-1/2}. $$

For \(n=10^6\), this is \(\lambda_*=0.001\), independent of \(h\) in this particular parameter setting. At \(h=0.1\), the two terms are each \(0.001(0.1)^{-2}=0.1\), and the approximation term is \(A(0.1)^2=0.01A\). The calculation checks the balance directly; it does not claim that these are small unless the constants and sample size make them so.

Optimize the Bandwidth and Obtain the Rate

Write \(u=r+d/2\), which is positive under the stated \(d>0\), \(r\geq0\) assumptions. After optimizing \(\lambda\), the bandwidth-dependent score-error bound has the form \(A h^{2s}+K n^{-1/2}h^{-u}\), where \(K=2\sqrt{BD}\). The first term increases with \(h\), while the second decreases with it. Balance their orders:

$$ h^{2s}\asymp n^{-1/2}h^{-u} \quad\Longrightarrow\quad h^{2s+u}\asymp n^{-1/2} \quad\Longrightarrow\quad h_n\asymp n^{-1/(4s+2u)}. $$

At this bandwidth, both score-error terms have order \(n^{-2s/(4s+2u)}\). Applying the margin conversion gives the excess-risk rate

$$ E[R(d_{\hat f})-R(d^*)] \lesssim n^{-\frac{2s}{4s+2r+d}\frac{q+1}{q+2}}. $$

Here \(\lesssim\) hides constants independent of \(n\). The display is an asymptotic rate under the three stated inputs, not a universal guarantee for every Gaussian-kernel classifier. In particular, the margin condition changes the exponent through \((q+1)/(q+2)\), while approximation smoothness and complexity affect the exponent through \(s,r,d\).

Worked Example: A Complete Rate Calculation

Take \(s=1\), \(r=1\), \(d=2\), and margin exponent \(q=1\). Then \(u=r+d/2=2\), so

$$ h_n\asymp n^{-1/(4+4)}=n^{-1/8}, \qquad \lambda_*(h_n)\asymp n^{-1/2}h_n^{1-1}=n^{-1/2}. $$

The two balanced score-error terms each have order \(h_n^2=n^{-1/4}\), so the total score-error bound has that order. The margin exponent is \(\kappa=2/3\). Thus

$$ E[R(d_{\hat f})-R(d^*)]\lesssim (n^{-1/4})^{2/3}=n^{-1/6}. $$

The calculation uses the margin condition only after obtaining the score-error rate. Replacing the score-error exponent \(1/4\) directly by a classification-risk exponent would miss this final margin conversion.

Common Pitfall and Practical Interpretation

A common mistake is to claim that a strong margin condition automatically makes the estimator’s score error decay faster. The margin condition does not change the assumed approximation or complexity bound. It changes how that score error translates into classification risk. In this calculation, the score-error rate is first derived from the two balanced terms; only then is it raised to the power \((q+1)/(q+2)\).

A second mistake is to optimize only the bandwidth, treating \(\lambda\) as fixed, or to optimize only the penalty while ignoring how the complexity term depends on \(h\). The valid sequence here is to balance the two \(\lambda\)-dependent terms at each bandwidth, substitute the resulting \(\lambda_*(h)\), and then balance the remaining approximation and estimation terms. The steps rely on the stated bounds and on admissible choices: if \(\lambda_*(h)\) falls outside the range where the bound holds, the calculation must be modified.

The practical value of this calculation is diagnostic as well as predictive. It shows exactly which assumptions support a proposed rate and where a slower rate may arise: weak boundary approximation, an expensive complexity term, or substantial probability near the Bayes boundary. Different approximation or complexity bounds should be inserted into the same margin argument and optimized on their own terms.

Check Your Understanding

Use the assumptions and derivations above to answer these questions.

  1. Why does a disagreement at a point with \(|g^*(X)|>t\) imply \(|\hat f(X)-g^*(X)|\geq |g^*(X)|\)?
  2. For fixed \(h\), derive the penalty choice that balances \(B\lambda h^{-2r}\) and \(Dh^{-d}/(n\lambda)\).
  3. If \(q=0\), what exponent does the margin conversion give, and what does this indicate about the margin condition?
  4. With \(s=2\), \(r=0\), and \(d=2\), find the bandwidth order after optimizing the penalty.
  5. Why is the final rate conditional on the score-error and boundary-approximation bounds rather than guaranteed by the Gaussian kernel alone?
Clinical Biostats