MathOptAI's ExaModels extension currently throws an error for GrayBox predictors because ExaModels can't trace opaque functions. Adding VectorNonlinearOracle to ExaModels would materialize jac!/hess! callbacks to full matrices, O(n^2) for a neural network with n inputs. For large NNs, this is prohibitive.
The goal: extend VectorNonlinearOracle with optional jvp!/vjp!/hvp! callbacks. These are O(n) per call (matching torch.func.jvp/vjp/vhp).
MathOptAI's ExaModels extension currently throws an error for
GrayBoxpredictors because ExaModels can't trace opaque functions. AddingVectorNonlinearOracleto ExaModels would materialize jac!/hess! callbacks to full matrices, O(n^2) for a neural network with n inputs. For large NNs, this is prohibitive.The goal: extend
VectorNonlinearOraclewith optionaljvp!/vjp!/hvp!callbacks. These are O(n) per call (matchingtorch.func.jvp/vjp/vhp).NLPModelsfor leveraging efficient composition of models@register_multivariateAdd @register_multivariate for n-argument custom operators #239