feat(aggregation): Add ExcessMTLWeighting#747
Open
KhusPatel4450 wants to merge 1 commit into
Open
Conversation
5143ce9 to
d4a29f8
Compare
d4a29f8 to
5a6358f
Compare
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.
feat(aggregation): Add ExcessMTLWeighting
Implements
ExcessMTLWeightingfrom Robust Multi-Task Learning with Excess Risks (He et al., ICML 2024).At each forward call, per-task excess risks are estimated via a second-order Taylor approximation (Equations 6-7) using an AdaGrad-style diagonal Hessian accumulated across all calls. Task weights are then updated via an exponentiated gradient step (Equation 9) and normalised to the probability simplex.
Design notes
_grad_sum([m, n], accumulates squared gradients) and_weights([m], current task weights). Both move with.to(device)and appear instate_dict().n_warmup_steps, default0): during warmup, weights stay uniform and gradient statistics are collected. On the first post-warmup call, the average excess risk over the warmup period is saved as a normalisation baseline (initial_w), following Appendix C.1. Settingn_warmup_steps=0matches the official implementation and LibMTL behaviour (first call's excess used as baseline directly).[1/m, ..., 1/m]and always sum to 1, following the paper (vs. LibMTL's sum-to-m)._n_steps: stored as a registered buffer (scalartorch.long) so warmup progress survives checkpointing. Zeroed in-place inreset()to preserve device placement.References