This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
bug-fix: just-in-time update in SVRG; feature: averaging for SVRG #120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The just in time update for SVRG (formerly line 141 in$(1 - \eta*\alpha)$ in each step, which has not been accounted for. My patch fixes this bug by maintaining the dense updates separately and adding a correction by summing the geometric series $\sum_{t'<t} (1-\eta*\alpha)^{t'}$ at inner iteration t.
svrg_fast.pyx
) is incorrect when alpha > 0. In particular, the updates made in previous steps are scaled by a factorMoreover, the patch also adds support for averaging inner iterates of SVRG, which has the same theoretical guarantees but exhibits better empirical performance. My implementation of averaging uses the sparse update scheme described by Bottou (2012).
I've tested the code by comparing against my trusted (dense) implementation of SVRG. The coefficients learnt my this patch match those of my implementation up to 1e-8.