1: \begin{abstract}
2: A statistical mechanic study of the $XY$ model with nonlinear
3: interaction is presented on bipartite sparse random graphs. The model
4: properties are compared to those of the $p$-clock model, in which the
5: planar continuous spins are discretized into $p$ values. We test the
6: goodness of the discrete approximation to the XY spins to be used in
7: numerical computations and simulations and its limits of convergence
8: in given, $p$-dependent, temperature regimes. The models are applied
9: to describe the mode-locking transition of the phases of light-modes
10: in lasers at the critical lasing threshold. A frequency is assigned to
11: each variable node and function nodes implement a frequency matching
12: condition. A non-trivial unmagnetized phase-locking occurs at the
13: phase transition, where the frequency dependence of the phases turns
14: out to be linear in a broad range of frequencies, as in standard
15: mode-locking multimode laser at the optical power threshold.
16: \end{abstract}