Phase Transitions In Inference