The SVM Optimisation Problem
The goal is to find the vector of Lagrange multipliers that maximises the dual objective function:
Subject to two constraints:
- Box Constraint: for all
- Summation Constraint:
Tip
Standard algorithms require storing matrix, which is often too costly for large datasets. SMO bypasses this by solving for only two variables at a time.
Sequential Minimal Optimisation (SMO) Logic
Why update two multipliers at once ?
If we tried to update only one multiplier while keeping others fixed, we would violate the summation constraint . Therefore, two is the smallest number of multipliers we can update simultaneously while maintaining valid constraints.
The Core Algorithm:
- Initialise : Usually set all
- Select a pair and to update next using heuristics.
- Optimise with respect to this pair, holding all other multipliers constant.
- Repeat until the system converges to a solution satisfying the KKT condition.
Analytical Update Rules
SMO solves for the new values of and without needing a complex numerical optimiser
Calculate the Bounds ( and )
Because of the box constraint and the summation constraint, the new value of must stay within a specific range
- If :
- If :
Updating
Where:
- (The prediction error)
Clipping and updating
To ensure the constraints are met, is βclippedβ to the range:
- If then
- If , then
- If , then Finally is updated using the new to satisfy the summation constraint:
Selection Heuristics
To speed up convergence, SMO does not pick pairs randomly
Picking the first multiplier
The algorithm alternated between:
- Scanning the entire dataset for examples that violate the KKT conditions
- Scanning only the βnon-boundβ examples (where ) that violates KKT conditions
Picking the second multiplier
Once is chosen, is selected to maximise the step size. This is approximated by picking the example that results in the largest absolute error difference
Convergence and KKT Conditions
The algorithm is guaranteed to converge as long as at least one of the selected multipliers violates the KKT conditions.
The KKT conditions for Soft Margin SVM are:
- . The point is not a support vector and is correctly classified ()
- . The point is a support vector exactly on the margin ())
- : The point is a support vector that either lies between the margins or is misclassified )