  The new generation of observatories and instruments (VLT/ERIS, JWST, ELT)
motivate the development of robust methods to detect and characterise faint and
close-in exoplanets. Molecular mapping and cross-correlation for spectroscopy
use molecular templates to isolate a planet's spectrum from its host star.
However, reliance on signal-to-noise ratio (S/N) metrics can lead to missed
discoveries, due to strong assumptions of Gaussian independent and identically
distributed noise. We introduce machine learning for cross-correlation
spectroscopy (MLCCS); the method aims to leverage weak assumptions on exoplanet
characterisation, such as the presence of specific molecules in atmospheres, to
improve detection sensitivity for exoplanets. MLCCS methods, including a
perceptron and unidimensional convolutional neural networks, operate in the
cross-correlated spectral dimension, in which patterns from molecules can be
identified. We test on mock datasets of synthetic planets inserted into real
noise from SINFONI at K-band. The results from MLCCS show outstanding
improvements. The outcome on a grid of faint synthetic gas giants shows that
for a false discovery rate up to 5%, a perceptron can detect about 26 times the
amount of planets compared to an S/N metric. This factor increases up to 77
times with convolutional neural networks, with a statistical sensitivity shift
from 0.7% to 55.5%. In addition, MLCCS methods show a drastic improvement in
detection confidence and conspicuity on imaging spectroscopy. Once trained,
MLCCS methods offer sensitive and rapid detection of exoplanets and their
molecular species in the spectral dimension. They handle systematic noise and
challenging seeing conditions, can adapt to many spectroscopic instruments and
modes, and are versatile regarding atmospheric characteristics, which can
enable identification of various planets in archival and future data.
