Large margin nearest neighbors optimizes the matrix \mathbf{M} with the help of semidefinite programming.
Here the slack variables \xi_{ijl} absorb the amount of violations of the impostor constraints.