Layerwise goal-oriented adaptivity for neural ODEs: an optimal control perspective
Michael Hintermüller, Michael Hinze, Denis Korolev
TL;DR
This work casts neural network design as an optimal control problem over neural ODEs on a continuous depth horizon $[0,T]$, and introduces a layerwise, goal-oriented adaptivity driven by a dual-weighted residual error estimator. By discretizing with a discontinuous Galerkin Petrov–Galerkin scheme (DG(0) for state/adjoint) and a CG(1) gradient discretization, the authors derive an explicit forward-backward time-stepping framework and an error-driven mechanism to insert layers where needed. They prove existence, regularity, and discretization-consistency of the optimality system, and develop a posteriori estimators to guide adaptive mesh (layer) refinement. Numerical experiments on Swiss roll binary and Peaks multiclass tasks show that adaptive layer insertion yields faster convergence and smaller networks than non-adaptive or random-layer schemes, highlighting practical benefits for efficient and scalable neural ODE design.
Abstract
In this work, we propose a novel layerwise adaptive construction method for neural network architectures. Our approach is based on a goal--oriented dual-weighted residual technique for the optimal control of neural differential equations. This leads to an ordinary differential equation constrained optimization problem with controls acting as coefficients and a specific loss function. We implement our approach on the basis of a DG(0) Galerkin discretization of the neural ODE, leading to an explicit Euler time marching scheme. For the optimization we use steepest descent. Finally, we apply our method to the construction of neural networks for the classification of data sets, where we present results for a selection of well known examples from the literature.
