The Global Network of Optical Magnetometers for Exotic physics searches (GNOME) conducts an experimental search for certain forms of dark matter based on their spatiotemporal signatures imprinted on a global array of synchronized atomic magnetometers. The experiment described here looks for a gradient coupling of axion-like particles (ALPs) with proton spins as a signature of locally dense dark matter objects such as domain walls. In this work, stochastic optimization with machine learning is proposed for use in a search for ALP domain walls based on GNOME data. The validity and reliability of this method were verified using binary classification. The projected sensitivity of this new analysis method for ALP domain-wall crossing events is presented.