Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Differentiable Optimization API

未关闭
#2,969 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
julia

调研方向

从 DiffOpt.jl PR #344 中的初始讨论开始,并比较其中引用的 DiffOpt lpbasis、MadDiff 和 Moreau 实现。检查它们如何处理敏感性属性、微分函数、重置、参数、系数函数、惰性 getter 以及 JuMP 级别的辅助函数;由于没有指定目标文件或测试,因此完成的标准是达成一个一致的最小 API。

由索引模型根据 Issue 内容生成。

描述

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:

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

主要语言
Julia
星标
506
派生
103
平均合并
1 天 1 小时
30 天内合并 PR
9

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

jump-dev/MathOptInterface.jl 的其他 Issue

查看 jump-dev/MathOptInterface.jl 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。