Is there a Lagrangian action that leads to gradient descent? It is well-known that Hamilton's equations $$\dot{x}^\mu=\Omega^{\mu\nu} \frac{\partial H(x)}{\partial x^\mu}\tag{1}$$ where $\Omega$ is the symplectic form and $x^\mu=(q,p)$ follow from a Lagrangian, namely $$L(x)=\dot{q}p-H(x).\tag{2}$$
Gradient descent is given by the equation $$\dot{x}^\mu=-G^{\mu\nu}\frac{\partial f(x)}{\partial x^\mu},\tag{3}$$ where $G$ is a Riemannian metric and the flow decreases $f(x)$. My intuition is that there is no way to get the gradient descent equations from a Lagrangian action, but I'm curious if this is true and why not?
 A: *

*Let us rewrite OP's eq. (3) as
$$ \dot{x}^j~=~-g^{jk}(x)\frac{\partial V}{\partial x^k}
\qquad \Leftrightarrow \qquad 
g_{jk}(x)\dot{x}^k~=~-\frac{\partial V}{\partial x^j}. \tag{3}$$
We note that this dynamics has no time-reversal symmetry.

*Moreover, eq. (3) implies that
$$ V(x_i)-V(x_f) ~=~ \int_{t_i}^{t_f} \! \mathrm{d}t ~\dot{x}^jg_{jk}(x)\dot{x}^k~\geq~0 . $$
We conclude that this dynamics cannot have closed orbits, and that it is dissipative in nature. 

*If we consider a sufficiently small neighborhood, we can use Riemann normal coordinates, and assume that the metric components $g_{jk}$ are constant. We can even assume that the metric components $g_{jk}$ are diagonal. By furthermore scaling the $x^j$-coordinates, we may assume that the metric components $g_{jk}=\delta_{jk}$. More generally, this is known as Aristotelian mechanics, which has no conventional stationary action principle. See also this Phys.SE post.  
A: Ok, I think I figured out the argument: For gradient descent, all solutions around a global minimum will converge to this minimum. As (time-independent) Lagrangian dynamics is equivalent to Hamiltonian dynamics, it is clear the energy (value of Hamiltonian) is preserved under time evolution. By continuity, the value of the Hamiltonian along a solution should be the same as at the minimum. However, this implies that the Hamiltonian must be constant in some neighborhood as all solutions should converge to the same minimum. Consequently, for a general function $f$, there is no Lagrangian action.
