Learning Robust Dynamics through Variational Sparse Gating