Learning the Problems that KMG Contracting Solves