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

Forced Gauss-Newton step for last iterations of truncated backward. #81

Merged
merged 2 commits into from
Mar 3, 2022

Conversation

luisenp
Copy link
Contributor

@luisenp luisenp commented Feb 14, 2022

Motivation and Context

Our current derivation of implicit/truncated backward modes hols only for Gauss-Newton. However, regardless of the optimization method used, we can first find the fixed point, then force the optimizer to apply a GN step. Preliminary experiments with Levenberg-Marquardt show that this improves the error in gradient computation, compared with numerical derivatives.

Marking as bugfix, since this means that previous version of LM was incorrect.

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@luisenp luisenp added the bug Something isn't working label Feb 14, 2022
@luisenp luisenp self-assigned this Feb 14, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 14, 2022
@mhmukadam
Copy link
Member

@luisenp, should we merge this now (after comments are resolved) given that we are not going with the full Hessian route?

@luisenp
Copy link
Contributor Author

luisenp commented Mar 2, 2022

@mhmukadam Yes, but I'm planning to make a few changes before merging. In particular, I'm not sure we actually need this for truncated grad, in the sense that (AFAIK) there is no theory specifying that the grad enabled loops need to have some specific form. @bamos ?

@luisenp luisenp merged commit bfac2cd into main Mar 3, 2022
@luisenp luisenp deleted the lep.implicit_last_step_gn branch March 3, 2022 23:00
suddhu pushed a commit to suddhu/theseus that referenced this pull request Jan 21, 2023
…acebookresearch#81)

* Forced Gauss-Newton step for last iterations of truncated backward.

* Added comment for GN step for truncated grad loop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants