# Structural SVM with Latent Variables Notes

Structural SVM is a variation of SVM, hereafter to be refered as SSVM

### Special prediction function of SSVM

Firstly let’s recall the normal SVM’s prediction function:

ω is the weight vector，x is the input，b is the bias， is sign function， is the prediction result.

On of SSVM’s specialties is its prediction function：

y is the possible prediction result，Υ is y’s searching space，and Φ is some function of x and y.Φ will be a joint feature vector describes the relationship between x and y

Then for some given , different prediction will be made according to different x.

### SSVM’s special loss function and its optimization problem

For a normal SVM, we use the Hinge Loss as the loss function:

Its optimization problem will be:

for SSVM, the loss function will be more complicated,

The risk function in the paper is the loss function, loss function is the function to compute the difference between the prediction and the real value, it can be represented as:

for a given , we can also say that the prediction of is a function of ω：

for the new loss function, our optimization problem turns to be:

different from the hinge loss function, the loss function we use now:

is not convex according to variable , so this problem is not solvable.

Why is it non-convex? Because is very complicated, it results from searching a discrete space , which can not be expressed by any kind of convex function.

So we should firstly turn this non-convex problem to be convex.

### Turning SSVM’s non-convex optimization problem to be convex

###### Considering the following non-equality:

for given and ω：

is the max，so

must be bigger or equal to 0

step further:

as the last term in the second line is not related to y, so it can be moved out of .

finally we get：

The above described derivation shows the conversion.

The key part, our loss function turns to be:

this is a convex function to , cause we have a theorem:

**The upper bound of a convex function is also convex.**

For ’s value space , every gets its corresponding convex function:

The upper bounds of all these convex functions form a convex function, according to , the first term is a constant, so this loss function is convex to .

What’s more, we also know that:

**The summation of convex function is also convex**

Then the converted optimization problem:

turns to be a convex problem.

The second half of the paper solves the optimization problem with latent variables using the same technique.

Link of the paper: