  The interpretation of data from indirect detection experiments searching for
dark matter annihilations requires computationally expensive simulations of
cosmic-ray propagation. In this work we present a new method based on Recurrent
Neural Networks that significantly accelerates simulations of secondary and
dark matter Galactic cosmic ray antiprotons while achieving excellent accuracy.
This approach allows for an efficient profiling or marginalisation over the
nuisance parameters of a cosmic ray propagation model in order to perform
parameter scans for a wide range of dark matter models. We identify importance
sampling as particularly suitable for ensuring that the network is only
evaluated in well-trained parameter regions. We present resulting constraints
using the most recent AMS-02 antiproton data on several models of Weakly
Interacting Massive Particles. The fully trained networks are released as
DarkRayNet together with this work and achieve a speed-up of the runtime by at
least two orders of magnitude compared to conventional approaches.
