-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explore repeated terms in a function #22
Comments
This also appears in @michel2323's GO models. At the very least, we should be able to deal with objective functions that are separable, even ones with a subset of terms that have a similar structure. |
The experimental MadDiff does this well IIRC. Since they type everything, compilation time absolutely blows up if the tool fails to spot such a repeated pattern though. |
Hello ! A proper example of partial separability may be ExpressionTreeForge (ETF) is able to detect the partial separability of a function as long as its operators are supported by ETF.
However, none of my tries were able to compete with the gradient computation from JuMP. Final note, as it stands now, ETF is not a module particularly fast. I hope this helps ! |
Currently, MathOptSymbolicAD exploits problems in which there is repeated structure in the Jacobian. So if you have a bunch of constraints But at the moment we don't recurse into a partially separable function. So if the objective is
Yes. https://github.com/exanauts/ExaModels.jl does exactly what we do here, except they (ab)use the Julia type system instead of Symbolics.jl :) Their input format also forces the user to provide the repeated structure, instead of detecting it automatically like we do here. |
If I understand correctly, you use Symbolics.jl to compute symbolic differentiation ETF uses Symbolics only to retrieve an |
Perhaps to clarify, I don't intend to use ETF in this package. It was just a link I was chatting to @amontoison about that seemed relevant and adjacent. It has some useful ideas 😄 |
I am glad you did, I misunderstood :') |
A lot of problems have the form:
sum_i f(x_i)
, for example machine learning problems where the sum is over observations in a dataset. We can improve the performance of this if we identify the commonf
term.This structure appears in the inverse ising problems [private link]:
https://github.com/lanl-ansi/nlp-jump-examples/blob/47d6ccb26c6041390b0662b1d8c1041f28d787ed/inverse_ising/inverse_ising-logrise.jl#L37-L40
The text was updated successfully, but these errors were encountered: