Repository navigation
馃珢 PCD
This release introduces PCD and PCDWeighting, and fixes several bugs. Thanks a lot to @DaraVaram for contributing PCD, and to @SajalDevX, @ppraneth and @SausageMan99 for the fixes!
We're trying to grow the community and build even more features! To participate, you can join the Discord community!
Changelog
Added
- Added
PCDandPCDWeightingfrom Not All Objectives Are Born Equal: Priority-Constrained Descent for Hierarchical Multi-Objective Optimization (TMLR 2026). The first row of the Jacobian is treated as the primary objective:PCDfollows its gradient as closely as possible, subject to each other objective receiving at least a fractiontauof normalized first-order progress.PCDandPCDWeightingare stateful: they normalize the gradients by a bias-corrected moving average of their squared norms.
Fixed
- Fixed
ExcessMTLandExcessMTLWeightingproducingnanweights for the rest of the run when a task had a zero gradient at the call that sets its baseline excess risk. The exponentiated gradient update is now computed in log space, so a very large excess risk saturates the weights instead of overflowing. - Fixed
KrumandKrumWeightingsometimes selecting the wrong rows when two rows of the input matrix are almost equal. Rounding errors could make the squared distance between such rows slightly negative, giving anandistance that was then ignored when computing the scores. Squared distances are now clamped to be non-negative before taking the square root. - Fixed
AlignedMTLandAlignedMTLWeightingignoring tasks with a much smaller gradient than the others when the input is infloat64. The tolerance used to find the rank of the Gramian was always based on the machine epsilon of the default dtype (usuallyfloat32) instead of the dtype of the Gramian, so valid small eigenvalues were discarded. - Fixed
Engine.compute_gramiansilently ignoring the contribution of a module when one of its forward passes had no associated backward pass (e.g. because its output was detached). It now raises aValueErrorinstead. - Fixed
jac_to_gradfailing with aRuntimeErrorwhen the tensors do not all have the same dtype (e.g. a model with some parameters infloat32and others infloat64). The aggregated gradient was computed in the promoted dtype and could not be assigned to the.gradfield of the tensors of lower precision. Each tensor now gets a.gradof its own dtype, like withtorch.autograd.