  Identifying the counterparts of submillimetre (submm) galaxies (SMGs) in
multiwavelength images is a critical step towards building accurate models of
the evolution of strongly star-forming galaxies in the early Universe. However,
obtaining a statistically significant sample of robust associations is very
challenging due to the poor angular resolution of single-dish submm facilities.
Recently, a large sample of single-dish-detected SMGs in the UKIDSS UDS field,
a subset of the SCUBA-2 Cosmology Legacy Survey (S2CLS), was followed up with
the Atacama Large Millimeter/submillimeter Array (ALMA), which has provided the
resolution necessary for identification in optical and near-infrared images. We
use this ALMA sample to develop a training set suitable for machine-learning
(ML) algorithms to determine how to identify SMG counterparts in
multiwavelength images, using a combination of magnitudes and other derived
features. We test several ML algorithms and find that a deep neural network
performs the best, accurately identifying 85 per cent of the ALMA-detected
optical SMG counterparts in our cross-validation tests. When we carefully tune
traditional colour-cut methods, we find that the improvement in using machine
learning is modest (about 5 per cent), but importantly it comes at little
additional computational cost. We apply our trained neural network to the
GOODS-North field, which also has single-dish submm observations from the S2CLS
and deep multiwavelength data but little high-resolution interferometric submm
imaging, and we find that we are able to classify SMG counterparts for 36/67 of
the single-dish submm sources. We discuss future improvements to our ML
approach, including combining ML with spectral energy distribution-fitting
techniques and using longer wavelength data as additional features.
