How do you derive the dual of the soft-margin SVM subject to and ? How do you show the box constraint , and what are the KKT conditions that classify each point?
Supervised learning, Soft-margin dual
Level L3 Intermediate. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can form the Lagrangian, eliminate the primal variables and interpret the KKT conditions.
Key idea
Setting the derivatives of the Lagrangian to zero gives , and . Since , the multiplier is boxed: .
Steps
- Introduce multipliers for the margin constraints and for : .
- Set : . Set : .
- Set : . Because , we get . The terms vanish from .
- Substitute back. The dual is subject to and . This is the hard-margin dual with an upper bound . Data enter only through , so we can replace it with a kernel .
- Complementary slackness gives three cases. : (outside the margin, not a support vector). : and (on the margin). : , so and (inside the margin or misclassified).
- Recover from any margin support vector (): . Averaging over all of them is more stable.
Common mistakes
- Forgetting the constraint , which comes from .
- Saying every support vector lies on the margin. Those with lie inside it or on the wrong side.
- Computing from a point with .
How long your answer should be
One page; 7–8 minutes.
Last checked on 4 December 2026.
Read this
Previous in Supervised learning: A 1-D training set has with label , and and with label . What are the hard-margin SVM , and the dual variables , and which points are support vectors?
Next in Supervised learning: The SVM objective is minimised by stochastic subgradient descent (Pegasos) with step . With and , what is the result of running three steps on the single points , and , in that order, and what is the update rule?