svm KKT condition violation that alpha choice in SMO
Equation $12$ of the paper states the $KKT$ condition:

\begin{align}
\alpha_i = 0 &amp;\iff y_iu_i\geq1 \\
0&lt;\alpha_i &lt; C &amp;\iff y_iu_i = 1 \\
\alpha_i = C &amp;\iff y_iu_i \le 1
\end{align}

Hence if $\alpha_i &lt; C$, we are suppose to have $y_iu_i \geq 1$. 

To violate $y_iu_i \geq 1$ means $y_iu_i &lt; 1$,

$$y_iu_i &lt; 1 = y_i^2$$

is equivalent to 

$$y_i(u_i-y_i ) &lt; 0$$

Using the notation of the paper, it is $r_2=y_i E_i &lt; 0$.

Numerically, we consider $y_iE_i$ to be negative if it is smaller than $-\epsilon$ for some small positive number $\epsilon$.