-
Notifications
You must be signed in to change notification settings - Fork 44
add strong wolfe condition #183
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
Conversation
johannahaffner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi!
and first of all, sorry for taking so long to get back to you! I've left two small comments, but overall I'm afraid that we can't merge this as is.
The numerical reason for this is that this search makes an assumption that is unlikely to be met in general - that a step length satisfying the Armijo and the Wolfe criteria can be found by backtracking. This is not necessarily the case! The curvature condition might only be satisfied for step lengths that are never checked in this implementation, namely everything that is larger than self.step_init. The way to go about this is with a Zoom line search - something we're in the process of getting in: #177. In that case, an interval in which both criteria are fulfilled is located first, and then bisected.
Without a guarantee that both conditions are likely to be fulfilled in the interval we are looking at, we could reject steps until we run out of iterations, without ever moving anywhere.
| if not isinstance( | ||
| f_info, | ||
| ( | ||
| FunctionInfo.EvalGrad, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can define a union type outside the search, e.g. with _FnInfo = FunctionInfo.EvalGrad | FunctionInfo.EvalGradHessian | ...
| means stricter termination criteria. Must be between 0 and 1. | ||
| - `step_init`: The first `step_size` the backtracking algorithm will | ||
| try. Must be greater than 0. | ||
| - `c`: The parameter for the strong Wolfe condition. Must be between 0 and 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we find a more descriptive name for this parameter?
|
Thanks for replying!
I got the point -- this may have motivated the zoom line search. I have implemented this because this was not in |
This one? https://jaxopt.github.io/stable/_autosummary/jaxopt.HagerZhangLineSearch.html?
Do you mean code duplication between Optimistix and JAXopt? If you're referring to this PR - without a means to locate a promising interval, checking the conditions isn't enough. If you'd like to keep experimenting, then I suggest adding your search to custom solvers defined here Line 84 in 23b99d2
and running the tests for these - currently your search is completely untested. If you'd like to keep working on making a |
Hi, I've implemented the strong Wolfe conditions for the backtracking line search.
However, one potential issue related to the class of QuasiNewton's methods is that the sufficient decrease condition
requires$\nabla f(y_{k+1})$ . Currently, the
stepmethod of theAbstractQuasiNewtonclass does not pass such information (line 213--220):