pyepo.func.jax.blackbox

Differentiable Black-box optimization function

Attributes

Classes

blackboxOpt

Differentiable Black-Box Optimizer (DBB) -- gradient via solution interpolation.

negativeIdentity

Negative Identity Backpropagation (NID) -- hyperparameter-free DBB.

Module Contents

class pyepo.func.jax.blackbox.blackboxOpt(optmodel, lambd=10, processes=1, solve_ratio=1.0, dataset=None)

Bases: pyepo.func.jax.abcmodule.optModule

Differentiable Black-Box Optimizer (DBB) – gradient via solution interpolation.

Replaces the solver’s zero gradient with an interpolation estimate: for an upstream gradient \(\mathbf{d}\), the vector-Jacobian product is \((\mathbf{w}^*(\hat{\mathbf{c}} + \lambda \mathbf{d}) - \mathbf{w}^*(\hat{\mathbf{c}})) / \lambda\). Larger lambd smooths more (recommended 10-20).

Reference: Vlastelica et al. (2020) https://openreview.net/forum?id=BkevoJSYPB

lambd
forward(pred_cost)

Forward pass

class pyepo.func.jax.blackbox.negativeIdentity(optmodel, processes=1, solve_ratio=1.0, dataset=None)

Bases: pyepo.func.jax.abcmodule.optModule

Negative Identity Backpropagation (NID) – hyperparameter-free DBB.

Treats the solver Jacobian as a signed identity: \(\partial \mathbf{w}^* / \partial \hat{\mathbf{c}} \approx -\mathbf{I}\) for minimization (and \(+\mathbf{I}\) for maximization), a straight-through gradient estimator needing no extra solve.

Reference: Sahoo et al. (2023) https://openreview.net/forum?id=JZMR727O29

forward(pred_cost)

Forward pass

pyepo.func.jax.blackbox.DBB
pyepo.func.jax.blackbox.NID