  The classical XY model has been consistently studied since it was introduced
more than six decades ago. Of particular interest has been the two-dimensional
spin model's exhibition of the Berezinskii-Kosterlitz-Thouless (BKT)
transition. This topological phenomenon describes the transition from bound
vortex-antivortex pairs at low temperatures to unpaired or isolated vortices
and anti-vortices above some critical temperature. In this work we propose a
novel machine learning based method to determine the emergence of this phase
transition. An autoencoder was used to map states of the XY model into a lower
dimensional latent space. Samples were taken from this latent space to
determine the thermal average of the vortex density which was then used to
determine the critical temperature of the phase transition.
