value of one of the $n$ latent variables in $z$.

**Bound optimization:** Optimization of a bound ${b}\in 
\mathcal{F}$ can be done in closed form by setting $\mu_j$ to be the mean of all examples assigned to cluster $j$: $$\begin{aligned}
    \mu_j = \frac{\sum_{i \in I_j} x_i}{|I_j|}, \quad I_j =\{1 \leq i \leq n \mid z_i = j\}.
    \label{eq:kmeans_update}\end{aligned}$$

[Latent Structural SVM]{}
-------------------------

A [Latent Structural SVM]{}([LS-SVM]{}) [@yu09] defines a structured output classifier with latent variables. It extends the Structural SVM [@joachims09] by introducing latent variables.

Let $\{ (x_1, y_1), \dots, (x_n, y_n) \}$ denote a set of labeled examples with $x_i \in \mathcal{X}$ and $y_i \in \mathcal{Y}$. We assume that each example $x_i$ has an associated latent value $z_i \in \mathcal{Z}$. Let $\phi(x, y, z):\mathcal{X} \times 
\mathcal{Y} \times \mathcal{Z} \rightarrow \mathbb{R}^d$ denote a *feature map*. A vector $w \in \mathbb{R}^d$ defines a classifier $\hat{y}:\mathcal{X} \rightarrow \mathcal{Y}$, $$\begin{aligned}
  \hat{y}(x) = \operatorname*{argmax}_y ( \max_z w \cdot \phi(x,y,z) ).\end{aligned}$$ The LS-SVM training objective is defined as follows, $$\begin{aligned}
    F(w) = \frac{\lambda}{2} ||w||^2 + \frac{1}{n}\sum_{i=1}^n \hspace{-0.05cm} \Big( \hspace{-0.05cm} & \max_{y, z} \left( w \cdot \phi(x_i, y, z) + \Delta(y, y_i) \right) - \max_z w \cdot \phi(x_i, y_i, z) \Big),
    \label{eq:LSSVM_objective}\end{aligned}$$ where $\lambda$ is a hyper-parameter 