Learning To Solve Differential Equation Constrained Optimization Problems

Vincenzo Di Vito, Mostafa Mohammadian, Kyri Baker, Ferdinando FiorettoarXiv 2024 · DOI

Abstract

This paper introduces DE-OP, a novel dual-network architecture designed to solve optimization problems constrained by differential equations (DEs) in near real-time. By integrating neural differential equations with proxy optimizers through a primal-dual learning framework, the authors achieve up to 25x higher precision than standard learning-based methods while ensuring full compliance with complex system dynamics. The framework is validated on high-stakes domains including dynamic portfolio optimization and stability-constrained power flow.

Introduction

Many critical engineering and scientific tasks—from stabilizing a power grid to managing high-frequency financial portfolios—rely on DE-constrained optimization. These problems require finding the best control strategy for a system governed by Ordinary (ODEs) or Stochastic (SDEs) Differential Equations.

Traditional numerical methods, such as shooting or collocation, are often too computationally expensive for real-time applications. Conversely, recent "proxy optimizers" (neural networks trained to mimic solvers) are fast but typically focus on steady-state constraints. These static models often ignore underlying system dynamics, leading to solutions that may cause physical instability or violate fundamental laws of physics over time. DE-OP addresses this "static trap" by creating a surrogate model that is both lightning-fast and "physics-aware."

Methods

The DE-OP (DE-Optimization Proxy) framework utilizes a dual-network architecture to bridge the gap between speed and physical accuracy:

  • Neural Optimization Surrogate ($F_\omega$): This network acts as the "decision-maker," taking problem parameters $\zeta$ (e.g., consumer demand) and predicting optimal decision variables $\hat{u}$ (e.g., generator outputs).
  • Neural Differential Equation ($N_\theta$): This network acts as the "simulator," taking decisions from the first network to predict resulting state trajectories $\hat{y}(t)$ by approximating the underlying DEs.
The DE-OP dual-network architecture, integrating an optimization surrogate $F_\omega$ with a neural differential equation simulator $N_\theta$ to compute the DE-OP loss.

To synchronize these networks, the authors employ a Lagrangian Dual approach. Differential equations and initial conditions are treated as implicit equality constraints within the loss function. This allows the model to be trained end-to-end using gradient descent, penalizing the decision-maker if its choices lead the simulator to violate stability or physical constraints.

Experimental Setup

The DE-OP framework was validated on two distinct domains:

  1. Dynamic Portfolio Optimization: Based on a stochastic Black-Scholes model using 10,000 samples from the Nasdaq database to simulate asset price fluctuations governed by SDEs.
  2. Stability-Constrained AC-Optimal Power Flow (AC-OPF): Tested on WSCC 9-bus and IEEE 57-bus systems with 10,000 load demand scenarios, using IPOPT for ground-truth labels.

Key Results and Insights

Experimental results highlight the necessity of modeling dynamics. "Static" proxy optimizers that ignore DEs failed catastrophically, often resulting in optimality gaps exceeding 100%. In contrast, DE-OP demonstrated superior precision and compliance.

Comparison of optimality gaps across different proxy architectures and static baselines. DE-OP with n-SDE achieves the lowest gap, while static-only methods fail to capture dynamic constraints.
  • Superior Precision: In financial modeling, DE-OP achieved an optimality gap of 9.11%, significantly outperforming LSTM-based approaches (21.17%) and static baselines (>100%).
  • Stability Compliance: In power systems, DE-OP reached zero stability violations within just 10 epochs, whereas baseline methods maintained violation rates of 4-8% even after extensive training.
  • Computational Efficiency: The Neural-ODE component proved to be approximately 20 times faster than traditional numerical solvers (e.g., Dopri5), enabling the near real-time performance required for grid stability.

Conclusion

DE-OP provides a robust framework for solving complex, time-dependent optimization problems by unifying optimization and physics. While the current model benefits from pre-training on trajectories, future work will explore training from scratch and scaling the framework to Partial Differential Equations (PDEs). The ability to produce near-optimal, physics-compliant decisions in milliseconds marks a significant step toward deploying deep learning in safety-critical dynamic environments.

Summary updated

BibTeX
@misc{vito2024learning,
  author = {Vincenzo Di Vito and Mostafa Mohammadian and Kyri Baker and Ferdinando Fioretto},
  title = {{Learning To Solve Differential Equation Constrained Optimization Problems}},
  year = {2024},
  eprint = {2410.01786},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.01786},
}
Figure