Safe Semi-Supervised Learning With Sparse Graphs