Exploring galaxy evolution with generative models