Why does an RBF-kernel SVM overfit when the number of features far exceeds the number of samples?

Quick Overview

Asks why a support vector machine with an RBF kernel tends to overfit when features far outnumber samples. Tests linear separability in high dimensions, distance concentration, the effect of gamma on the Gram matrix, tuning with few samples, and practical fixes.

Why does an RBF-kernel SVM overfit when the number of features far exceeds the number of samples?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

Why does an RBF-kernel SVM overfit when the number of features far exceeds the number of samples? ```hint Count the capacity Ask how many points a plain hyperplane can already separate in $p$ dimensions, and what the kernel adds on top of that. ``` ```hint Look inside the kernel The RBF kernel is a function of the squared Euclidean distance. Think about what happens to that sum when most of the features are noise. ``` ### What a Strong Answer Covers - Why data with far more features than samples is usually linearly separable already - How irrelevant features dominate Euclidean distances, and how pairwise distances concentrate in high dimensions - What happens to the Gram matrix and the support vectors when $\gamma$ is too large for the dimension - Why tuning $C$ and $\gamma$ with few samples is itself a source of overfitting - Practical fixes: linear kernel with strong regularization, dimensionality reduction, small $\gamma$ with nested cross-validation ### Follow-up Questions - How does an RBF SVM behave as $\gamma$ goes to 0 and as it grows very large? - Why does feature selection done before cross-validation give optimistic error estimates when features far outnumber samples? - Would a k-nearest-neighbor classifier suffer from the same problem on this data? - How does nested cross-validation work, and why does it matter here?

Overview: Asks why a support vector machine with an RBF kernel tends to overfit when features far outnumber samples. Tests linear separability in high dimensions, distance concentration, the effect of gamma on the Gram matrix, tuning with few samples, and practical fixes.

General logo
General
Nov 24, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

Why does an RBF-kernel SVM overfit when the number of features far exceeds the number of samples?

What a Strong Answer Covers Guidance

  • Why data with far more features than samples is usually linearly separable already
  • How irrelevant features dominate Euclidean distances, and how pairwise distances concentrate in high dimensions
  • What happens to the Gram matrix and the support vectors when γ\gamma is too large for the dimension
  • Why tuning CC and γ\gamma with few samples is itself a source of overfitting
  • Practical fixes: linear kernel with strong regularization, dimensionality reduction, small γ\gamma with nested cross-validation

Follow-up Questions Guidance

  • How does an RBF SVM behave as γ\gamma goes to 0 and as it grows very large?
  • Why does feature selection done before cross-validation give optimistic error estimates when features far outnumber samples?
  • Would a k-nearest-neighbor classifier suffer from the same problem on this data?
  • How does nested cross-validation work, and why does it matter here?