Efficient compilation of expressive problem space specifications to neural network solvers