Why do we convert the SVM primal optimization problem into its dual form?

Quick Overview

Asks why the support vector machine is usually solved in its dual form and when the primal is the better choice. Tests understanding of the kernel trick, the variables and constraints of each formulation, support vector sparsity, strong duality and the KKT conditions.

Why do we convert the SVM primal optimization problem into its dual form?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Why do we convert the SVM primal optimization problem into its dual form? Consider the soft-margin SVM with regularization parameter $C$. Explain what the dual gives you that the primal does not, why solving it gives the same answer, and when the conversion is not worth it. ```hint Where the data appears Look at how the training points enter the dual objective and the decision function. ``` ```hint Count and compare Count the optimization variables in each form and compare the constraints they are subject to. ``` ### What a Strong Answer Covers - How the dual depends on the data only through inner products, and why that makes kernels possible - How the number and kind of variables and constraints differ between the primal and the dual - Sparsity of the dual solution and its link to support vectors - Why both problems reach the same optimum (convexity, strong duality, KKT conditions) - When solving the primal is the better choice ### Follow-up Questions - What do the KKT conditions say about a training point with $\alpha_i = 0$, with ${0 < \alpha_i < C}$, and with $\alpha_i = C$? - Why does SMO update two multipliers at a time? - How do you recover the bias $b$ from the dual solution? - How can a kernel SVM be trained approximately in the primal, for example with random Fourier features?

Overview: Asks why the support vector machine is usually solved in its dual form and when the primal is the better choice. Tests understanding of the kernel trick, the variables and constraints of each formulation, support vector sparsity, strong duality and the KKT conditions.

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

Why do we convert the SVM primal optimization problem into its dual form?

Consider the soft-margin SVM with regularization parameter CC. Explain what the dual gives you that the primal does not, why solving it gives the same answer, and when the conversion is not worth it.

What a Strong Answer Covers Guidance

  • How the dual depends on the data only through inner products, and why that makes kernels possible
  • How the number and kind of variables and constraints differ between the primal and the dual
  • Sparsity of the dual solution and its link to support vectors
  • Why both problems reach the same optimum (convexity, strong duality, KKT conditions)
  • When solving the primal is the better choice

Follow-up Questions Guidance

  • What do the KKT conditions say about a training point with αi=0\alpha_i = 0 , with 0<αi<C{0 < \alpha_i < C} , and with αi=C\alpha_i = C ?
  • Why does SMO update two multipliers at a time?
  • How do you recover the bias bb from the dual solution?
  • How can a kernel SVM be trained approximately in the primal, for example with random Fourier features?