The SVM Dual and Support Vectors
A support vector machine's boundary turns out to depend on only a handful of the training points — the ones sitting closest to it. The dual formulation of the SVM's optimization problem is what makes this visible, and it's also what makes the kernel trick possible.
Prerequisites: Support Vector Machines
A support vector machine finds the boundary separating two classes with the widest possible margin — sounds like every training point should matter. It doesn't: solving the SVM's optimization problem in its dual form reveals the boundary depends only on a small subset of points — the support vectors — sitting on or inside the margin. Every other point could be deleted without changing the answer.
The analogy: the boundary is set by whoever's closest to the fence
Two crowds separated by a rope, placed as far from both as possible: to decide exactly where the rope goes, you don't survey everyone — you find whoever in each crowd stands closest to the other crowd and place the rope between those few people. Everyone standing further back could walk away and the rope wouldn't move. Those few closest people are the support vectors.
The mechanics: from the primal problem to the dual
The primal problem minimizes subject to every point being correctly classified with margin at least 1. Using Lagrange multipliers per point, the problem rewrites entirely in terms of the 's:
In plain English: only points on or inside the margin end up with ; every point comfortably on the correct side drops out with . The boundary is , summed only over support vectors. The dual only ever needs dot products — never raw features directly — which is exactly what lets the kernel trick swap in a similarity function for the dot product and get a nonlinear boundary for free.
Worked example: which of five points are support vectors
Five 1-D points separating "trending" (class +1, signal values ) from "mean-reverting" (class −1, values ). The widest-margin boundary sits between the closest pair across classes — here and , since they're nearer each other than any other cross-class pair. Solving the dual, only and get ; , , , all get . Delete those four points and refit: the boundary lands in exactly the same place.
What this means in practice
Support vectors are why SVMs can be memory-efficient at prediction time — store only the support vectors, not the whole training set — and why the model ignores points far from the boundary, unlike least-squares, where every point tugs at the fit. The flip side: the decision only "listens" to the hardest, most boundary-adjacent cases, so a mislabeled point near the boundary can distort the whole surface.
The SVM dual reformulates margin maximization in terms of one weight per point, and only points on or inside the margin — the support vectors — get . The boundary is a weighted sum of support vectors alone, which explains both the SVM's memory efficiency and the mechanism behind the kernel trick.
"Support vectors define the boundary" is often misread as "SVMs are automatically robust to outliers." It's the opposite: because far-away points are ignored entirely, one mislabeled point sitting near the boundary can become a support vector and meaningfully warp the decision surface, with no averaging-out from well-behaved points further away.
Related concepts
Practice in interviews
Further reading
- Cortes & Vapnik, Support-Vector Networks (1995)
- Hastie, Tibshirani & Friedman, The Elements of Statistical Learning, ch. 12.2