Sparse Representation Learning for Temporal Networks