Learning with latent group sparsity via heat flow dynamics on networks