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

Regret factor in ForwardBackward #91

Merged
merged 5 commits into from
Mar 8, 2024
Merged

Conversation

aldma
Copy link
Collaborator

@aldma aldma commented Jan 30, 2024

This PR adds the possibility to specify a regret factor to increase the stepsize gamma at every iteration, if adaptive, before backtracking. Recent results provide convergence guarantees even without a maximum value on gamma [Theorem 14, arXiv:2208.00779v2].

This feature was implemented for ForwardBackward only. Although it does not seem a good fit for accelerated methods like ZeroFPR, PANOC, and PANOCplus, at least when based on quasi-Newton directions, it is unclear whether the FastForwardBackward solver could benefit from it. See discussion in #86 .

Practical performance seems to improve with values regret_gamma close to 1. Tests and references have also been updated accordingly.

@aldma
Copy link
Collaborator Author

aldma commented Jan 31, 2024

Based on benchmarks and interest, the default value for regret_gamma could be set greater than, but close to, 1. Another possibility is to take an adaptive regret factor, as common in the convex literature.

@lostella
Copy link
Member

@aldma thanks for this! Some comments

  • Accelerated algorithm from Nesterov here (page 143) allows for increasing stepsizes
  • Would it make sense to have regret > 1 by default?
  • I’m not sure about the name “regret”. Maybe “increase” is better? Also I see the backtracking factor is not exposed, but I guess it could be

@aldma
Copy link
Collaborator Author

aldma commented Jan 31, 2024

Thanks @lostella for you comments

  • Nesterov's paper focuses on convex problems, whereas the proof here (Thm 14) is for fully nonconvex ones (thanks @AndThem!)
  • The denomination "regret" comes from the FOM toolbox (webpage), but it is not widespread nor standard (or so it seems). Perhaps the backtracking should be exposed and the two names somehow consistent?
  • I think it makes sense to have r > 1 by default, but I don't see any recommendations more specific than 1 < r < 2. It should perhaps be linked to the backtracking factor too. In FOM they take r = 1/beta, with beta the backtracking factor.

@aplavin
Copy link

aplavin commented Feb 26, 2024

Would be nice to have it included indeed!
Another useful convenience feature is "at first, increase gamma with by large factor, like 2 or 3; after backtracking happens for the first time, switch to a small r like 1.1". This makes the algorithm insensitive to the initial gamma value in a very wide range, even if it happened to start too small.

@AndThem
Copy link

AndThem commented Feb 26, 2024

According to the current theory, the price for not imposing an upper bound on the stepsize is the fact that each failed linesearch step incurs one (wasted) extra gradient evaluation (an extra Lipschitz-like check is required). I believe that selecting a (very large) gamma_max, perhaps after the first couple of iterations, is a much more reasonable choice to avoid such overhead.

Copy link
Member

@lostella lostella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you @aldma!

@lostella lostella merged commit f58002a into JuliaFirstOrder:master Mar 8, 2024
8 checks passed
lostella added a commit that referenced this pull request Mar 9, 2024
- Expose backtracking factor as `reduce_gamma`
- Rename increase factor introduced in #91 from `regret_gamma` to
`increase_gamma`
- Format code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants