Sparse hierarchical representation learning on molecular graphs