Beyond Trees: Classification with Sparse Pairwise Dependencies