Sparse graph code