Support Vector Machines (SVM): Margin Duality, KKT Conditions & Kernel Trick
Geometric margin 2/||w|| derivation, Soft-Margin slack variables & hinge loss, Lagrangian dual formulation, KKT complementary slackness, and Mercer RBF/Polynomial kernels.
1. Geometric Margin & Hard-Margin Primal Optimization
Given linearly separable binary data with , fix the scale of so the closest points lie on the canonical margin boundaries . The perpendicular distance between parallel hyperplanes and is:
Maximizing yields the strictly convex quadratic program (QP):
2. Soft-Margin SVM, Slack Variables & Hinge Loss
For noisy or non-separable data, introduce non-negative slack variables :
Eliminating reveals Hinge Loss + Regularization:
| Dual Multiplier | Slack | Geometric Location of Point |
|---|---|---|
| Strictly outside margin () β Non-Support Vector | ||
| Exact Margin Boundary () β used to solve for | ||
| Inside margin but correctly classified | ||
| Misclassified () β Bounded Support Vector |
Moving Non-Support Vectors: Perturbing or deleting any training point with (so long as it remains strictly outside the margin ) causes ZERO change to the optimal hyperplane !
3. Mercerβs Theorem & Common Kernel Functions
A symmetric function is a valid kernel iff the Gram Matrix is Positive Semi-Definite (PSD) () for every finite sample:
- Polynomial Kernel (degree ): (). For , inhomogeneous spans monomial features in dot-product time!
- Gaussian RBF Kernel: . As (tiny bandwidth ), , causing severe overfitting (island decision boundaries around each training sample).
Practice Questions on This Chapter (2)
A hard-margin linear SVM in learns the decision hyperplane with canonical margin boundaries . What is the total geometric margin between the two class support hyperplanes?
In a trained Soft-Margin SVM, suppose a training point has dual Lagrange multiplier . If is removed from the training set and the SVM is retrained, what happens to the optimal decision boundary?