Learning the latent structure of collider events