From Chosen to Learned Kernels
Summary
"From Chosen to Learned Kernels," Chapter 3 of "The Learned Kernel," challenges the practice of manually selecting kernel bandwidths, arguing they are critical parameters, not mere hyperparameters. The article demonstrates that a single bandwidth choice can drastically impact model performance, showing a \$55k RMSE difference on California housing data (e.g., \$118k vs. \$63k). It introduces the Automatic Relevance Determination (ARD) kernel, k_θ(x, x') = exp(−½ Σⱼ₌₁ᵈ (x_j − x'_j)² / ℓ_j²), which learns a unique length scale ℓ_j for each feature, achieving a test RMSE of 0.592 compared to 0.639 for an optimally chosen isotropic bandwidth. The analysis identifies two key hazards in learning kernels: the non-identifiability of the kernel's overall scale when combined with ridge regularization (λ), resolved by constraining the kernel's diagonal to one (k_θ(x, x) ≡ 1), and overfitting the geometry itself, which requires fitting the kernel on one data split and evaluating it on another to prevent data leakage.
Key takeaway
For Machine Learning Engineers optimizing kernel-based models, stop manually tuning kernel bandwidths; instead, treat them as learnable parameters. You should implement ARD kernels, constraining the diagonal to one (k_θ(x, x) ≡ 1) to ensure scale identifiability. Always fit your kernel's geometry on one data split and evaluate it on another to prevent overfitting the geometry itself, ensuring your model learns true data structure.
Key insights
Kernel geometry, critical for model performance, must be learned from data, not manually chosen, while addressing identifiability and leakage.
Principles
- Parameters significantly affecting performance must be learned.
- Constrain kernel diagonal to one (k_θ(x, x) ≡ 1) for scale identifiability.
- Overfitting the geometry requires separate data splits for fitting and evaluation.
Method
Employ an ARD kernel, k_θ(x, x') = exp(−½ Σⱼ₌₁ᵈ (x_j − x'_j)² / ℓ_j²), to learn per-feature length scales ℓ_j by minimizing error on a held-out fold.
In practice
- ARD kernels can reduce test RMSE (e.g., 0.592 vs. 0.639).
- Feature relevance (1/ℓ_j) indicates local sensitivity, not overall importance.
Topics
- Kernel Methods
- Automatic Relevance Determination
- Hyperparameter Learning
- Model Overfitting
- Data Leakage
- Ridge Regularization
Code references
Best for: Machine Learning Engineer, AI Scientist, Data Scientist
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Agus’s Substack.