Codes and some experimental data for SPIN algorithm, appears in ICML2014.