Universal differential equations for optimal control problems and its application on cancer therapy
Wenjing Zhang, Wandi Ding, Huaiping Zhu · 2025
Read Universal differential equations for optimal control problems and its application on cancer therapy by Wenjing Zhang, Wandi Ding, Huaiping Zhu (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-16035.txt.
Introduction
Wenjing Zhang, Wandi Ding, and Huaiping Zhu recast optimal control problems so that neural networks can solve them. Their paper appeared in 2025. Optimal control means steering a changing system toward a goal at least cost. A classic method sweeps forward and backward through time, but it can be unstable. The team noticed that the sweep mirrors how neural networks are trained.
In their setup, a network stands in for the control choices, and training replaces the backward sweep. The method still obeys the classic rule for the best control, known as the maximum principle. As a test case, they planned a mix of two cancer treatments, immune therapy and chemotherapy. The authors say the same trick could serve disease models, ecology, engineering, and finance.
Catalog record
| CREATOR | Wenjing Zhang, Wandi Ding, Huaiping Zhu |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 52 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2504-16035
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Universal differential equations for optimal control problems and its application on cancer therapy Wenjing Zhang, Wandi Ding, Huaiping Zhu Abstract This paper highlights a parallel between the forward–backward sweeping method for optimal control and deep learning training procedures. We reformulate a classical optimal control problem, constrained by a differential equation system, into an optimization framework that uses neural networks to represent control variables. We demonstrate that this deep learning method adheres to Pontryagin’s Maximum Principle and mitigates numerical instabilities by employing backward propagation instead of a backward sweep for the adjoint equations. As a case study, we solve an optimal control problem to find the optimal combination of immunotherapy and chemotherapy. Our approach holds significant potential across various fields, including epidemiology, ecological modeling, engineering, and financial mathematics, where optimal control under complex dynamic constraints is crucial. Keywords— Optimal control, scientific machine learning, universal differential equations, cancer therapy 1 Deep Learning for Optimal Control: A Pontryagin’s Maximum Principle Perspective Classical optimal control problems are typically tackled using direct methods [ 1 ] , Pontryagin’s Maximum Principle [ 2 ] , or Hamilton-Jacobi-Bellman equations [ 3 ] , which provide strong theoretical underpinnings but can struggle with high-dimensional or highly sensitive systems [ 4 , 1 , 5 , 6 ] . Incorporating modern machine learning techniques into classical optimal control frameworks holds the potential to revolutionize the way we address complex, high-dimensional systems. By leveraging deep learning alongside Pontryagin’s Maximum Principle (PMP), we establish a robust methodology that circumvents common numerical instabilities while maintaining rigorous theoretical guarantees. Pontryagin’s Maximum Principle (PMP) is a foundational tool for solving deterministic optimal control problems, where system dynamics are described by ordinary, partial, or difference equations. These problems are governed by specified state equations, control variables, and objective functionals. PMP provides necessary conditions for optimality by defining a Hamiltonian that encompasses state, control, and adjoint variables. Solving the resulting optimality system typically involves a forward-backward sweep [ 4 ] , which iterates as follows: (1) solve the state equations forward in time using an initial guess for the control; (2) solve the adjoint equations backward in time using boundary or transversality conditions from the optimization of the objective functional; and (3) update the control via PMP’s optimality condition. A well-known challenge in this setting is numerical instability when integrating the adjoint equations backward in time, particularly in highly sensitive systems (such as those near bifurcations). Even small computational errors can rapidly escalate, making solutions from backward-in-time integrators (e.g., the backward Euler method) unreliable [ 7 , 8 ] . Interestingly, the forward-backward structure in optimal control closely parallels the training procedure in deep learning. By representing the control as a neural network and treating the objective functional as the loss function, the forward pass of a neural network—where inputs propagate through successive layers—mirrors solving the state equations forward in time and accumulating the necessary state constraints. Conversely, the backward pass, which computes gradients of the loss function with respect to each parameter, parallels solving adjoint equations backward in time. The training process iteratively adjusts neural network parameters until changes in the objective functional become negligible. This idea is closely related to universal differential equations (UDEs) [ 9 , 63 , 10 ] , which combine known physical laws (represented by differential equations) with unknown mechanisms modeled through universal approximators [ 11 , 12 ] , such as neural networks. In this context, the neural network can represent the controls, while the state equations capture established physical laws. As a result, constraints and controls seamlessly integrate into a unified framework. To address the numerical instability in solving the adjoint equation backward in time, backpropagation in deep learning circumvents many of the issues often encountered in backward-in-time integration of adjoint equations. It provides exact gradients that power standard optimizers, including stochastic gradient descent (SGD) [ 13 ] , momentum-based methods [ 14 ] (such as SGD with momentum [ 15 ] ), adaptive methods [ 16 ] (such as AdaGrad [ 17 ] , RMSProp [ 18 ] , and Adam [ 19 ] ), and approximate second-order techniques [ 20 ] , such as conjugate gradients [ 21 , 22 ] , the Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm [ 23 ] , and limited memory BFGS (L-BFGS) [ 24 ] . In addition, common training strategies—such as mini-batch training [ 25 ] , data augmentation [ 26 ] , and various regularization approaches (for example, dropout [ 27 ] )—as well as learning-rate scheduling [ 28 ] , further enhance performance and generalization. By modeling the control as a neural network and optimizing it via backpropagation, practitioners can often circumvent the instability issues inherent in some forward-backward PMP formulations, thereby leveraging the robustness of gradient-based optimization methods. Scientific machine learning (such as Physics-Informed Neural Networks (PINNs)) blends data-driven techniques with mechanistic models, enabling physically consistent, data-efficient, and interpretable models suitable for a range of forward and inverse problems. While representing a notable advance, PINNs can be computationally costly, numerically tricky, and reliant on good prior physics knowledge [ 29 , 30 ] . To overcome these constraints, UDEs integrate universal approximators [ 9 ] directly into differential equations, offering efficient solvers and greater numerical stability. This synergy opens promising avenues in optimal control, preserving classical rigor while leveraging the flexibility of modern machine learning approaches. Although previous studies [ 5 , 31 ] have applied UDEs, a gap remains in establishing that an optimal control problem formulated as a UDE comply with Pontryagin’s Maximum Principle (PMP). In this work, we briefly review the definition of deep neural networks and their training in Sections 2.1 and 2.2 , then define the optimal control problem within a UDE framework in Section 2.3 . Next, we show that optimizing the control problem by training neural networks ensures the necessary conditions for PMP in Section 3 . In Section 4 , we also provide an application in which we design an optimal treatment strategy for combination immunotherapy for cancer. This model features complex bifurcations and rich dynamical behaviors [ 32 ] , which can cause numerical instabilities when using the forward-backward sweep method. By optimizing our UDE formulation, we demonstrate a stable and efficient training approach for solving the optimal control problem. Finally, we conclude with a discussion in Section 5 . 2 Background Deep learning is a subfield of machine learning that utilizes deep neural networks (DNNs), neural networks with multiple layers, to model and approximate complex functions. The theoretical foundation of deep learning lies in the universal approximation theorem [ 11 , 12 ] , which states that a neural network with sufficient neurons and appropriate training can approximate a wide variety of functions with arbitrary accuracy. Practically, this implies that a properly configured DNN with adequate data can learn nearly any mapping between inputs and outputs. However, training deep neural networks poses several notable challenges [ 33 ] . DNNs, particularly those with millions or billions of parameters, require substantial computational resources, making them expensive and difficult to train. Additionally, deep models trained on limited datasets are prone to overfitting, where they memorize specific training examples rather than generalize to new data. Excessive parameters can also introduce redundancy, increasing