We train the pruning function by reducing it to a rank learning problem.
in training, we collect all the complete solutions that are considered in each pruning step, and compute their hamming losses from the ground truth.