Why Are Most Lagrange Multipliers Zero in an SVM?
At a glance
- 1. Write the margin conditions
An SVM requires each training point to satisfy a margin constraint, allowing slack in the soft-margin case.
- 2. Apply complementary slackness
A constraint that is strictly inactive must have a zero multiplier.
- 3. Identify support vectors
Points with positive multipliers lie on or inside the margin and determine the fitted boundary.
- 4. Check the qualification
Soft-margin multipliers are bounded, so points inside the margin can have multipliers equal to the upper bound.
In a support vector machine (SVM), each training example contributes a constraint to the optimization problem and receives a Lagrange multiplier. Most multipliers are zero because most training examples lie safely beyond the required margin. Their constraints do not affect the optimum, so complementary slackness assigns them zero multipliers.
The examples with positive multipliers are called support vectors. They lie on or inside the margin and determine the learned decision boundary. The exact conditions differ slightly between hard-margin and soft-margin SVMs.
The hard-margin condition
For labeled data , where , a linear hard-margin SVM finds and that minimize , subject to
The quantity is the point’s signed margin score. A score of puts the point on its class’s margin boundary; a score greater than puts it beyond that boundary.
Associate a multiplier with each constraint. The Karush–Kuhn–Tucker complementary-slackness condition is
For this product to be zero, either the constraint is tight, or its multiplier is zero. In particular, if a point is strictly beyond the margin, then , so its multiplier must satisfy . A point on the margin may have a positive multiplier.
What changes with a soft margin?
Real datasets may not be perfectly separable. A soft-margin SVM introduces slack variables and typically minimizes
subject to
Here controls the trade-off between a wide margin and penalizing violations. The dual multipliers now satisfy . Complementary slackness includes
Thus, if a point is strictly outside the margin, its constraint is inactive and . If , the point lies exactly on the margin. If , it may be on the margin or inside it, including a point that is misclassified. So the soft-margin statement is not simply “positive multiplier means exactly on the margin.”
A worked one-dimensional example
Take four points on a line:
- Class : and .
- Class : and .
The maximum-margin separator is at , so one optimal classifier has and . The signed margin score is . The inner points, and , each have score and lie on their respective margin boundaries. The outer points, and , each have score and are strictly beyond the margin.
Consequently, complementary slackness sets the outer points’ multipliers to zero. The two inner points can have positive multipliers. In fact, setting each to satisfies the hard-margin stationarity conditions: , and . The inner points are the support vectors; moving or removing a point well beyond the margin need not change this solution.
Why only support vectors affect the classifier
The stationarity condition for the weights is
For a kernel SVM, the corresponding prediction uses
where is the kernel function. Terms with vanish, so those training points do not directly contribute to the decision function. This is why an SVM can have a representation involving only a subset of the training data.
The optimization does not explicitly require a particular percentage of zero multipliers. Sparsity arises because many constraints are inactive at the optimum. How many support vectors there are depends on the data, the kernel, the regularization setting, and whether points are duplicated or lie on the margin. Some datasets can have many support vectors, or even have every point contribute.
Common mistakes
- Thinking every multiplier must be positive. Multipliers are constrained to be nonnegative, not strictly positive. Inactive constraints have zero multipliers.
- Assuming every point on the margin must have a positive multiplier. Complementary slackness gives a necessary relationship, but a tight constraint can still have a zero multiplier, for example in a degenerate solution.
- Treating all soft-margin support vectors alike. A multiplier strictly between and indicates a point on the margin; a multiplier at can indicate a point inside it or a margin violation.
- Confusing zero multipliers with zero training error. A point can be misclassified in a soft-margin SVM and have a positive multiplier at the upper bound. Zero multipliers describe inactive constraints, not a general guarantee about classification accuracy.
References
- Support-Vector Networks, Corinna Cortes and Vladimir Vapnik, Machine Learning (1995)
- Convex Optimization, Stephen Boyd and Lieven Vandenberghe
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.