feat(aggregation): Add GradVac aggregator#638
Open
rkhosrowshahi wants to merge 1 commit intoSimplexLab:mainfrom
Open
feat(aggregation): Add GradVac aggregator#638rkhosrowshahi wants to merge 1 commit intoSimplexLab:mainfrom
rkhosrowshahi wants to merge 1 commit intoSimplexLab:mainfrom
Conversation
Implement Gradient Vaccine (ICLR 2021) as a stateful Jacobian aggregator. Support group_type 0 (whole model), 1 (all_layer via encoder), and 2 (all_matrix via shared_params), with DEFAULT_GRADVAC_EPS and configurable eps. Add Sphinx page and unit tests. Autogram is not supported; use torch.manual_seed for reproducible task shuffle order. Made-with: Cursor
Contributor
Author
|
Hey @ValerianRey : |
Contributor
|
I think the link check action failed because of bad luck, re-running the job fixed it. |
Contributor
|
Thanks a lot for the PR, I'll look at it tonight or tomorrow! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds Gradient Vaccine (GradVac) from ICLR 2021 as a stateful
Aggregatoron the full task Jacobian.Behavior
\bar{\rho}, with the closed-form vaccine update when\rho < \bar{\rho}.group_type:0whole model (single block);1all_layer viaencoder(leaf modules with parameters);2all_matrix viashared_params(one block per tensor, iteration order = Jacobian column order).DEFAULT_GRADVAC_EPSand configurableeps(constructor + mutable attribute).torch.randperm; usetorch.manual_seedfor reproducibility.Files
src/torchjd/aggregation/_gradvac.py, export in__init__.pydocs/source/docs/aggregation/gradvac.rst+ index toctreetests/unit/aggregation/test_gradvac.pyVerification
ruff format/ruff checkon touched pathsty checkon_gradvac.pypytest tests/unit/aggregation/test_gradvac.py tests/unit/aggregation/test_values.py -W error