Skip to content
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

L-BFGS for HessianUpdateStrategy #14046

Open
MarcYin opened this issue May 15, 2021 · 7 comments
Open

L-BFGS for HessianUpdateStrategy #14046

MarcYin opened this issue May 15, 2021 · 7 comments
Labels
enhancement A new feature or improvement scipy.optimize

Comments

@MarcYin
Copy link

MarcYin commented May 15, 2021

When the input vector is large, BFGS and SR1 HessianUpdateStrategy give memory error. Is it possible to use L-BFGS for the Hessian update, which should reduce the memory requirements for Hessian.

@AtsushiSakai AtsushiSakai added scipy.optimize enhancement A new feature or improvement labels May 15, 2021
@MarcYin
Copy link
Author

MarcYin commented Aug 30, 2021

Any updates?

@MarcYin MarcYin closed this as completed Aug 30, 2021
@MarcYin MarcYin reopened this Aug 30, 2021
@andyfaff
Copy link
Contributor

First, I assume that you are using trust-constr, as HessianUpdateStrategy is only available for that method. Only SR1 and BFGS are available at this time. If you were to implement a class that inherits HessianUpdateStrategy and implements its methods then you would also be able to use that.
Is it imperative that you use trust-constr?

@MarcYin
Copy link
Author

MarcYin commented Aug 31, 2021

Hi, yes, I am using trust-constr and the existing Hessian update strategies can easily exceed the memory limit of normal computer when large scale optimisation required. Adding L-BFGS hessian update will make the trust-constr a more general optimisation algorithm. I tried to code it up, but have not been able to do it...I just wandering if anyone is familiar with the L-BFGS hessian update and could help on this.

@andyfaff
Copy link
Contributor

@MarcYin, is there a reason why you can't use L-BFGS-B directly?

@MarcYin
Copy link
Author

MarcYin commented Nov 16, 2021

Hi, it seems that the trust region method is more robust when the optimised variables are highly correlated compared to the L-BFGS-B from here: http://fa.bianp.net/blog/2013/numerical-optimizers-for-logistic-regression/.

In my case, I have a large number of variables (more than 300,000) that are highly correlated, so I want to have a go with the trust region method but with limited memory requirement, to see if there is an improvement on the reduction of iterations or total optimisations time.

@paulestano
Copy link
Contributor

Hi what is the status on this? If the documentation is correct, lots of the scipy.optimize optimizers do now support HessianUpdateStrategy. There is also now some evidence in the literature that L-BFGS Hessian update is robust enough to be used in other scenarios than the L-BFGS-B paper (there is for instance, this paper dealing with this). I think it could be useful to port it into HessianUpdateStrategy. I'd be happy to submit something if that's useful

@dschmitz89
Copy link
Contributor

Hi again @paulestano , in general you can pick up any issue as long as there is no open PR yet. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or improvement scipy.optimize
Projects
None yet
Development

No branches or pull requests

5 participants