jump-dev / jump-dev/MathOptInterface.jl

Differentiable Optimization API

Đang mở
#2,969 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Julia
Star
504
Fork
101
Merge trung bình
6 giờ 26 phút
Pull request đã merge (30 ngày)
22

Mô tả

What is the minimal API for differentiable optimization?

1. Attributes to pass input forward and reverse sensitivities.
1. forward inputs sensitivities: are numbers associated with the coefficients of the problem or parameters
2. reverse inputs sensitivities: are numbers associated with variables
2. functions to perform the diff (analogous to optimize!)
3. Attributes to query output forward and reverse sensitivities.
1. forward outputs sensitivities: are numbers associated with variables
2. reverse outputs sensitivities: are numbers associated with the coefficients of the problem or parameters

Important aspects:
a. A function to reset all input sensitivities is extremely important in practice, as resetting manually is very inefficient.
b. Parameters are extremely useful here. Having used DiffOpt and talking to users it is clear that it is very error-prone to touch coefficients directly (also see: https://arxiv.org/abs/2510.25986). POI is almost essential here.
c. Passing coefficients individually is suboptimal because it does not play well with bridges. Passing coefficient sensitivities as functions is key to making it work smoothly. For getters, Lazy operations are importants as we are usually no interested in absolutely every single coefficient
d. In practice, helper methods for objective sensitivity are a lifesaver.
e. Having a JuMP level API is much more ergonomic than having MOI.set and get all around.

We already have use case for existing solvers:
- https://github.com/jump-dev/DiffOpt.jl/tree/jg/lpbasis (HiGHS, Gurobi, Xpress)
- MadNLP (https://github.com/MadNLP/MadDiff.jl/tree/main/ext/MathOptInterfaceExt)
There is a new solver that proposes to do it as well:
- Moreau (https://github.com/jump-dev/DiffOpt.jl/pull/344)

Additional points:
- In DiffOpt, we did not put much effort into sensitivities associated with duals. Attribute-wise, there is nothing special here, but we never have a concrete use case, so we did not venture into it.

Initial discussion in: https://github.com/jump-dev/DiffOpt.jl/pull/344

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.