  Statistical spin dynamics plays a key role to understand the working
principle for novel optical Ising machines. Here we propose the gauge
transformations for spatial photonic Ising machine, where a single spatial
phase modulator simultaneously encodes spin configurations and programs
interaction strengths. Thanks to gauge transformation, we experimentally
evaluate the phase diagram of high-dimensional spin-glass equilibrium system
with $100$ fully-connected spins. We observe the presence of paramagnetic,
ferromagnetic as well as spin-glass phases and determine the critical
temperature $T_c$ and the critical probability ${{p}_{c}}$ of phase
transitions, which agree well with the mean-field theory predictions. Thus the
approximation of the mean-field model is experimentally validated in the
spatial photonic Ising machine. Furthermore, we discuss the phase transition in
parallel with solving combinatorial optimization problems during the cooling
process and identify that the spatial photonic Ising machine is robust with
sufficient many-spin interactions, even when the system is associated with the
optical aberrations and the measurement uncertainty.
