"Hey, that's not an ODE": Faster ODE Adjoints with 12 Lines of Code

09/20/2020
by   Patrick Kidger, et al.
0

Neural differential equations may be trained by backpropagating gradients via the adjoint method, which is another differential equation typically solved using an adaptive-step-size numerical differential equation solver. A proposed step is accepted if its error, relative to some norm, is sufficiently small; else it is rejected, the step is shrunk, and the process is repeated. Here, we demonstrate that the particular structure of the adjoint equations makes the usual choices of norm (such as L^2) unnecessarily stringent. By replacing it with a more appropriate (semi)norm, fewer steps are unnecessarily rejected and the backpropagation is made faster. This requires only minor code modifications. Experiments on a wide range of tasks—including time series, generative modeling, and physical control—demonstrate a median improvement of 40 function evaluations, so that the overall training time is roughly halved.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset