  Motivated by the occurrence in rate functions of time-dependent
large-deviation principles, we study a class of non-negative functions
$\mathscr L$ that induce a flow, given by $\mathscr L(\rho_t,\dot\rho_t)=0$. We
derive necessary and sufficient conditions for the unique existence of a
generalized gradient structure for the induced flow, as well as explicit
formulas for the corresponding driving entropy and dissipation functional. In
particular, we show how these conditions can be given a probabilistic
interpretation when $\mathscr L$ is associated to the large deviations of a
microscopic particle system. Finally, we illustrate the theory for independent
Brownian particles with drift, which leads to the entropy-Wasserstein gradient
structure, and for independent Markovian particles on a finite state space,
which leads to a previously unknown gradient structure.
