How does the Sequential Minimal Optimization (SMO) algorithm solve the dual SVM problem?

Quick Overview

A machine learning interview question on how Sequential Minimal Optimization trains a kernel SVM by solving the dual problem two multipliers at a time. It tests the dual constraints, the analytic pair update with clipping, KKT stopping conditions and the practical cost of the solver.

How does the Sequential Minimal Optimization (SMO) algorithm solve the dual SVM problem?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

How does the Sequential Minimal Optimization (SMO) algorithm solve the dual SVM problem? Walk through what one iteration does and how the algorithm knows it is finished. ```hint Count what can move Look at the equality constraint in the dual and ask how few multipliers you can change at once without leaving the feasible set. ``` ```hint Shrink the subproblem Once two multipliers are tied by a linear constraint, the objective along that line is a quadratic in one variable. ``` ```hint Stopping rule Think about which optimality conditions tell you that the current multipliers are already optimal. ``` ### What a Strong Answer Covers - The dual problem with its box and equality constraints, and why the equality constraint forces updates in pairs - The analytic two-variable update: the feasible segment, its bounds, the curvature term and clipping - How the pair is chosen and how KKT conditions checked within a tolerance decide convergence - The bias and error cache updates after each step - Practical cost: kernel caching, shrinking, and how run time scales with the number of samples and with $C$ ### Follow-up Questions - What goes wrong in the update when $\eta \le 0$, and how does SMO handle it? - Why does the working-set selection rule matter so much for convergence speed? - Linear SVM solvers often drop the bias term or fold it into the features. How does that change the size of the subproblem? - How would you warm-start SMO when sweeping over values of $C$ in a grid search?

Overview: A machine learning interview question on how Sequential Minimal Optimization trains a kernel SVM by solving the dual problem two multipliers at a time. It tests the dual constraints, the analytic pair update with clipping, KKT stopping conditions and the practical cost of the solver.

General logo
General
Nov 25, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

How does the Sequential Minimal Optimization (SMO) algorithm solve the dual SVM problem? Walk through what one iteration does and how the algorithm knows it is finished.

What a Strong Answer Covers Guidance

  • The dual problem with its box and equality constraints, and why the equality constraint forces updates in pairs
  • The analytic two-variable update: the feasible segment, its bounds, the curvature term and clipping
  • How the pair is chosen and how KKT conditions checked within a tolerance decide convergence
  • The bias and error cache updates after each step
  • Practical cost: kernel caching, shrinking, and how run time scales with the number of samples and with CC

Follow-up Questions Guidance

  • What goes wrong in the update when η≤0\eta \le 0 , and how does SMO handle it?
  • Why does the working-set selection rule matter so much for convergence speed?
  • Linear SVM solvers often drop the bias term or fold it into the features. How does that change the size of the subproblem?
  • How would you warm-start SMO when sweeping over values of CC in a grid search?