Skip to content

feat(aggregation): GradVac and enhanced interactive plotter#641

Open
rkhosrowshahi wants to merge 21 commits intoSimplexLab:mainfrom
rkhosrowshahi:feature/interactive-plotting-ui
Open

feat(aggregation): GradVac and enhanced interactive plotter#641
rkhosrowshahi wants to merge 21 commits intoSimplexLab:mainfrom
rkhosrowshahi:feature/interactive-plotting-ui

Conversation

@rkhosrowshahi
Copy link
Copy Markdown
Contributor

Summary

This PR adds GradVac (GradVac / GradVacWeighting) and related docs, tests, and changelog updates, and restores the enhanced interactive plotter UI in tests/plots/ (aggregator factories, AlignedMTL scale modes, live angle/length readouts, MathJax labels).

GradVac

  • New aggregator implementation, exports, and unit tests
  • Documentation and README/changelog entries
  • Grouping usage example (docs/source/examples/grouping.rst)

Interactive plotter

  • tests/plots/interactive_plotter.py and tests/plots/_utils.py: factory-based aggregators, checklist selection, improved gradient controls

Note: If you prefer to land GradVac and plotting separately, this branch can be split after review.

rkhosrowshahi and others added 21 commits April 9, 2026 10:39
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.
- Add GOVERNANCE.md documenting technical governance structure
- Add CODEOWNERS file defining project maintainers
- Add CODE_OF_CONDUCT.md referencing Linux Foundation CoC

These files are required for PyTorch Ecosystem membership.

---------

Co-authored-by: Valérian Rey <31951177+ValerianRey@users.noreply.github.com>
- Use group_type "whole_model" | "all_layer" | "all_matrix" instead of 0/1/2
- Remove DEFAULT_GRADVAC_EPS from the public API; keep default 1e-8; allow eps=0
- Validate beta via setter; tighten GradVac repr/str expectations
- Fix all_layer leaf sizing via children() and parameters() instead of private fields
- Trim redundant GradVac.rst prose; align docs with the new API
- Tests: GradVac cases, value regression with torch.manual_seed for GradVac
- Plotter: factory dict + fresh aggregator instances per update; legend from
  selected keys; MathJax labels and live angle/length readouts in the sidebar

This commit includes GradVac implementation with Aggregator class.
…hting

GradVac only needs gradient norms and dot products, which are fully
determined by the Gramian. This makes GradVac compatible with the autogram path.

- Remove grouping parameters (group_type, encoder, shared_params) from GradVac
- Export GradVacWeighting publicly
Seed is already set to 0 because of the autoused fix_randomness fixture declared in conftest.py
Add a Grouping example page covering all four strategies from the GradVac
paper (whole_model, enc_dec, all_layer, all_matrix), with a runnable code
block for each. Update the GradVac docstring note to link to the new page
instead of the previous placeholder text. Fix trailing whitespace in
CHANGELOG.md.
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.

3 participants