  In one calculation, adjoint sensitivity analysis provides the gradient of a
quantity of interest with respect to all system's parameters. Conventionally,
adjoint solvers need to be implemented by differentiating computational models,
which can be a cumbersome task and is code-specific. To propose an adjoint
solver that is not code-specific, we develop a data-driven strategy. We
demonstrate its application on the computation of gradients of long-time
averages of chaotic flows. First, we deploy a parameter-aware echo state
network (ESN) to accurately forecast and simulate the dynamics of a dynamical
system for a range of system's parameters. Second, we derive the adjoint of the
parameter-aware ESN. Finally, we combine the parameter-aware ESN with its
adjoint version to compute the sensitivities to the system parameters. We
showcase the method on a prototypical chaotic system. Because adjoint
sensitivities in chaotic regimes diverge for long integration times, we analyse
the application of ensemble adjoint method to the ESN. We find that the adjoint
sensitivities obtained from the ESN match closely with the original system.
This work opens possibilities for sensitivity analysis without code-specific
adjoint solvers.
