Support Vector Machine
A Support Vector Machine (SVM) is a supervised statistical learning algorithm that classifies or regresses data by constructing an optimal maximum-margin hyperplane in an input space or a kernel-induced Hilbert space.
A Support Vector Machine (SVM) is a supervised statistical learning model in computation and algorithms used for binary classification, multi-class categorization, and continuous function estimation (support vector regression). Grounded in the Structural Risk Minimization (SRM) framework developed by Soviet mathematicians Vladimir N. Vapnik and Alexey Ya. Chervonenkis beginning in 1963—and extended to nonlinear kernel spaces by Bernhard Boser, Isabelle Guyon, and Vapnik in 1992 and to non-separable soft-margin problems by Corinna Cortes and Vapnik in 1995—an SVM identifies the unique separating hyperplane that maximizes the geometric distance (margin) to the nearest training observations of any class. Because the decision boundary is determined only by the boundary-defining training points known as support vectors, support vector machines resist overfitting in high-dimensional spaces (p ≫ n), such as transcriptomic expression profiles, protein sequence homology classification, and neuroimaging analysis.
Maximum-Margin Geometry and Primal Optimization
Separating Hyperplanes and the Geometric Margin
Consider a binary classification dataset of n labeled training examples {(xi, yi)}i=1n, where each feature vector xi ∈ Rp is paired with a class label yi ∈ {−1, +1}. A linear classifier partitions Rp via an affine hyperplane defined by normal weight vector w ∈ Rp and scalar bias b ∈ R:
f(x) = wTx + b = 0, with predicted label ŷ = sign(wTx + b)
When the training set is linearly separable, the hard-margin SVM selects the hyperplane that maximizes the perpendicular Euclidean distance to the closest training examples. By rescaling w and b so that the canonical functional margin of the closest points satisfies yi(wTxi + b) = 1, the two parallel margin boundaries wTx + b = +1 and wTx + b = −1 are separated by a total geometric margin:
γ = 2 / ‖w‖2
Maximizing γ = 2 / ‖w‖2 is equivalent to minimizing the convex quadratic objective (1/2)‖w‖22 subject to n linear inequality constraints:
minw, b (1/2) ‖w‖22, subject to yi (wTxi + b) ≥ 1 for all i = 1, ..., n
Cortes–Vapnik Soft-Margin Formulation and Hinge Loss
When class distributions overlap due to measurement noise, the hard-margin constraints become infeasible. Cortes and Vapnik (1995) introduced non-negative slack variables ξi ≥ 0 controlled by a regularization penalty C > 0:
minw, b, ξ (1/2) ‖w‖22 + C ∑i=1n ξi, subject to yi(wTxi + b) ≥ 1 − ξi and ξi ≥ 0
Eliminating ξi = max(0, 1 − yi(wTxi + b)) shows that the soft-margin SVM solves an L2-regularized empirical risk minimization problem under the hinge loss:
LSVM(w, b) = (1/2) ‖w‖22 + C ∑i=1n max(0, 1 − yi(wTxi + b))
Large C penalizes slack violations heavily (narrow margin), whereas small C prioritizes a wide margin (small ‖w‖2), contrasting with the smooth binomial log-likelihood penalty of Logistic Regression.
Wolfe Dual Quadratic Program and Support Vectors
Lagrangian Duality and Complementary Slackness
Introducing Lagrange multipliers αi ≥ 0 and μi ≥ 0 and setting the primal derivatives ∂LP/∂w = 0, ∂LP/∂b = 0, and ∂LP/∂ξi = 0 yields the Karush–Kuhn–Tucker (KKT) stationarity conditions w = ∑i=1n αiyixi, ∑i=1n αiyi = 0, and 0 ≤ αi ≤ C. Substituting these into the Lagrangian produces the Wolfe dual quadratic program:
maxα ∑i=1n αi − (1/2) ∑i=1n ∑j=1n αi αj yi yj (xiTxj), subject to 0 ≤ αi ≤ C and ∑i=1n αi yi = 0
John Platt's 1998 Sequential Minimal Optimization (SMO) algorithm solves this dual problem by analytically optimizing pairs of multipliers (αi, αj) at each iteration.
By KKT complementary slackness, αi[yi(wTxi + b) − 1 + ξi] = 0 and (C − αi)ξi = 0, partitioning the observations into three groups:
- Non-Support Vectors (αi = 0): Points outside the margin slab (yif(xi) > 1); removing them leaves the hyperplane unchanged.
- Margin Support Vectors (0 < αi < C): Points lying on the margin boundaries yi(wTxi + b) = 1 (ξi = 0).
- Bounded Support Vectors (αi = C): Points violating the margin (ξi > 0).
Mercer's Theorem and the Kernel Trick
Reproducing Kernel Hilbert Spaces (RKHS)
When class boundaries are nonlinear in Rp, Boser, Guyon, and Vapnik (1992) mapped inputs into a feature space H via Φ: Rp → H. Because both the dual objective and the prediction rule f(x) = ∑i∈*SV* αiyi⟨Φ(xi), Φ(x)⟩H + b depend on the data only through inner products, coordinates of Φ(x) are never evaluated explicitly; instead, inner products are computed via a kernel function K(xi, xj) = ⟨Φ(xi), Φ(xj)⟩H. By Mercer's Theorem (1909), a symmetric function K corresponds to an inner product in a Reproducing Kernel Hilbert Space (RKHS) if and only if its n × n Gram matrix Kij = K(xi, xj) is positive semi-definite (cTKc ≥ 0), ensuring a convex dual program.
| Kernel Function | Definition K(x, z) | Feature Space Dimension | Scientific & Bioinformatics Applications |
|---|---|---|---|
| Linear | xTz | p (Native input space) | High-dimensional microarray & RNA-seq expression (p ≫ n) |
| Polynomial | (γ xTz + r)d | (p + d choose d) monomials | Epistatic SNP-SNP genetic interactions |
| Gaussian RBF | exp(−γ ‖x − z‖22) | Infinite-dimensional (L2 series) | Nonlinear physical phase boundaries, QSAR |
| Spectrum / String | ∑u∈Σk φu(x) φu(z) | |Σ|k (k-mer counts) | Remote protein homology, splice-site detection |
Statistical Learning Theory and Generalization Bounds
Vapnik–Chervonenkis (VC) Dimension
The generalization capacity of an SVM is governed by the Vapnik–Chervonenkis (VC) dimension hVC—the size of the largest point set that the classifier family can shatter (assign all 2hVC binary labelings). Vapnik proved that for data contained in a ball of radius R, canonical hyperplanes with margin γ have VC dimension bounded by:
hVC ≤ min(⌈R2 / γ2⌉, p) + 1 = min(⌈R2 ‖w‖22 / 4⌉, p) + 1
Minimizing ‖w‖22 directly bounds hVC independently of the ambient dimension of the RKHS—explaining why a Gaussian RBF SVM generalizes in an infinite-dimensional Hilbert space, alongside kernel Principal Component Analysis. For calibrated posterior probabilities P(y = +1 | x), Platt scaling fits a sigmoid 1 / [1 + exp(Af(x) + B)] to out-of-fold decision values, connecting maximum-margin classification to Bayesian Inference.
Frequently Asked Questions
Why does an SVM only depend on support vectors rather than all training points?
The SVM hinge loss max(0, 1 − yif(xi)) is zero whenever yif(xi) > 1. By complementary slackness, any point outside the margin slab receives dual multiplier αi = 0 and exerts zero pull on the decision boundary.
How do Support Vector Machines handle multi-class classification?
Multi-class problems with K > 2 classes are decomposed into binary subproblems using either One-vs-Rest (OvR) (K classifiers separating each class from the rest) or One-vs-One (OvO) (K(K − 1)/2 pairwise classifiers combined by majority vote).
When is a linear SVM preferred over a Gaussian RBF kernel SVM?
When the number of features p exceeds the sample size n (as in whole-genome SNP arrays or transcriptomics), data are typically linearly separable in the native space, allowing a linear SVM to train in O(np) time with accuracy comparable to an RBF kernel.
References
- Boser, B. E., Guyon, I. M., & Vapnik, V. N. (1992). A training algorithm for optimal margin classifiers. Proceedings of the Fifth Annual Workshop on Computational Learning Theory (COLT), 144–152. https://doi.org/10.1145/130385.130401
- Cortes, C., & Vapnik, V. (1995). Support-vector networks. Machine Learning, 20(3), 273–297. https://doi.org/10.1007/BF00994018
- Vapnik, V. N. (1999). An overview of statistical learning theory. IEEE Transactions on Neural Networks, 10(5), 988–999. https://doi.org/10.1109/72.788640
- Schölkopf, B., Smola, A. J., Williamson, R. C., & Bartlett, P. L. (2000). New support vector algorithms. Neural Computation, 12(5), 1207–1245. https://doi.org/10.1162/089976600300015565
- Leslie, C., Eskin, E., & Noble, W. S. (2002). The spectrum kernel: A string kernel for SVM protein classification. Pacific Symposium on Biocomputing, 7, 564–575. https://doi.org/10.1142/9789812799623_0053