arXiv:2507.03159cs.LGmath.OC2025-07被引 5

将训练好的机器学习模型嵌入优化模型,实现高效混合求解。

MathOptAI.jl: Embed trained machine learning predictors into JuMP models

  • 支持神经网络、决策树等多类模型嵌入优化框架
  • 通过灰盒架构实现GPU加速的梯度计算
  • 适合需要融合预测与优化的工业应用

我们提出 exttt{MathOptAI.jl},一个开源的 Julia 库,用于将训练好的机器学习预测器嵌入到 JuMP 优化模型中。该库可嵌入多种神经网络、决策树和高斯过程模型。除了对接 exttt{Lux.jl}、 exttt{Flux.jl} 等 Julia 生态机器学习库外,还通过 Julia 的 Python 接口支持 PyTorch 模型。结合灰盒建模方式,PyTorch 模型的函数、雅可比矩阵和海森矩阵计算被卸载至 Python 的 GPU 上执行,其余非线性算子则在 Julia 的 CPU 上运行。该库已开源,许可证为 BSD-3,地址:https://github.com/lanl-ansi/MathOptAI.jl。

原文摘要 · Abstract (English)

We present \texttt{MathOptAI.jl}, an open-source Julia library for embedding trained machine learning predictors into a JuMP model. \texttt{MathOptAI.jl} can embed a wide variety of neural networks, decision trees, and Gaussian Processes into a larger mathematical optimization model. In addition to interfacing a range of Julia-based machine learning libraries such as \texttt{Lux.jl} and \texttt{Flux.jl}, \texttt{MathOptAI.jl} uses Julia's Python interface to provide support for PyTorch models. When the PyTorch support is combined with \texttt{MathOptAI.jl}'s gray-box formulation, the function, Jacobian, and Hessian evaluations associated with the PyTorch model are offloaded to the GPU in Python, while the rest of the nonlinear oracles are evaluated on the CPU in Julia. \MathOptAI is available at https://github.com/lanl-ansi/MathOptAI.jl under a BSD-3 license.

优化机器学习嵌入式

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。