
The Kibble–Zurek mechanism predicts how the number of topological defects produced during a phase transition scales with the quench rate, but it does not tell us when the locations of individual defects are determined. In this work, we found that a recurrent neural network can predict the eventual locations of defects from extremely small fluctuations of the order parameter near the critical point, well before the defects are fully established and before the conventional freeze-out time. The onset of machine-learning predictability itself follows universal Kibble–Zurek scaling, demonstrating that machine learning can reveal when spatial information about the locations of individual defects emerges during a nonequilibrium phase transition, beyond conventional defect-density measurements while still obeying Kibble–Zurek universality.