  We show that the impact of energy injection by dark matter annihilation on
the cosmic microwave background power spectra can be apprehended via a residual
likelihood map. By resorting to convolutional neural networks that can fully
discover the underlying pattern of the map, we propose a novel way of
constraining dark matter annihilation based on the Planck 2018 data. We
demonstrate that the trained neural network can efficiently predict the
likelihood and accurately place bounds on the annihilation cross-section in a
$\textit{model-independent}$ fashion. The machinery will be made public in the
near future.
