  Detection of phase transitions is a critical task in statistical physics,
traditionally pursued through analytic methods and direct numerical
simulations. Recently, machine-learning techniques have emerged as promising
tools in this context, with a particular focus on supervised and unsupervised
learning methods, along with non-learning approaches. In this work, we study
the performance of unsupervised learning in detecting phase transitions in the
$J_1$-$J_2$ Ising model on the square lattice. The model is chosen due to its
simplicity and complexity, thus providing an understanding of the application
of machine-learning techniques in both straightforward and challenging
scenarios. We propose a simple method based on a direct comparison of
configurations. The reconstruction error, defined as the mean-squared distance
between two configurations, is used to determine the critical temperatures
($T_c$). The results from the comparison of configurations are contrasted with
that of the configurations generated by variational autoencoders. Our findings
highlight that for certain systems, a simpler method can yield results
comparable to more complex neural networks. This work contributes to the
broader understanding of machine-learning applications in statistical physics
and introduces an efficient approach to the detection of phase transitions
using machine determination techniques.
