When one network is trained on several tasks at once, such as segmentation, depth and surface normals from the same image, the tasks often pull the shared weights in different directions. A family of "gradient balancing" methods fixes this by combining the per-task gradients into one update that no task strongly dislikes. These methods have a knob, for instance how far the combined update may stray from the plain average, and that knob is tuned on convolutional networks. Other work shows that the right setting of related knobs moves sharply when the backbone changes. A curvature-reducing loss parameter is best near 3 for CNNs but near 10 for Vision Transformers. Gradient norms inside a hybrid convolution-plus-attention backbone can differ by a factor of ten between layer types. We argue that these two facts are connected. A balancer computes task agreement over the whole backbone's gradient, so it effectively listens only to the layer type with the largest gradients. On a new architecture, it is therefore balancing a different part of the network than the part it was tuned on.
The proposal has two parts. First, we test directly whether the best balancing knob and the ranking of balancing methods shift across ResNet, Swin, plain ViT and hybrid backbones on standard dense multi-task benchmarks. Second, we test a simple remedy: solve the balancing problem separately for each group of layers of the same type, so that each group gets its own task weights. The claim is falsifiable and practical. If the remedy works, a single knob value tuned on a ResNet should transfer to a Swin or a hybrid backbone with little loss. Global balancing, by contrast, should need retuning.
Core Claim
Conflict-averse gradient descent, CAGrad (Conflict-Averse Gradient Descent for Multi-task learning), searches for the update that maximizes the worst-off task's improvement. It restricts that update to a ball of radius $c\|g_0\|$ around the average gradient $g_0$. Because the radius scales with $\|g_0\|$, the method is invariant to overall gradient scale. It is not invariant to how that scale is spread across layers. The inner products that decide which task is "worst-off" are sums over layers, so blocks with large gradient norms dominate them. In a hybrid backbone like the C-C-T-T design of Training Object Detectors from Scratch: An Empirical Study in the Era of Vision Transformer, where convolutional and attention layers differ in gradient norm by up to 10x, the balancer's decision is effectively made by the convolutional stages alone.
Our claim has three parts:
- The value of $c$ that works best under global balancing depends on the backbone.
- This dependence is predicted by a measurable quantity, namely the share of cross-task inner-product mass contributed by each block type.
- Resolving the balancing per block group removes most of the dependence.
Concretely, let the shared parameters be partitioned into block groups $b = 1, \dots, B$, for example convolutional stages, attention projections and MLP blocks. Let $g_i^b$ be task $i$'s gradient restricted to group $b$, and let $g_0^b$ be the task-average gradient on that group. The block-resolved update for group $b$ is
$$ d^b = \arg\max_{d} \; \min_{i} \langle g_i^b, d \rangle \quad \text{subject to} \quad \|d - g_0^b\| \le c\,\|g_0^b\|, $$
with one shared $c$ across all groups and all architectures. Each group solves CAGrad's dual over a vector of task weights whose length equals the number of tasks. The added cost over standard CAGrad is therefore $B$ tiny optimization problems per step. CAGrad already pays for the per-task gradients.
This is not adaptive optimization in disguise. Adam rescales each coordinate after the balancer has already chosen its task weights. It therefore cannot undo a choice of weights that was dictated by one layer type.
How This Relates to Prior Work
Several papers motivate the gap.
- Backbone-dependent knobs. Geometric Insights into Focal Loss shows that the optimal focal parameter depends on backbone curvature. Hyperparameter Transfer Laws for Non-Recurrent Multi-Path Neural Networks derives an $\eta \propto L^{-3/2}$ depth law for learning rate. With that law, the error in predicting ViTs' optimal learning rate falls from 0.314 to 0.057 decades. Neither paper touches multi-task balancing knobs.
- Cross-family failure of tuning. A Language-Guided Bayesian Optimization for Efficient LoRA Hyperparameter Search finds that tuned settings transfer within a model family but not across families. This is the failure mode we expect for the conflict radius $c$.
Three balancers supply the methods we build on and stress-test. All three tune their knobs on fixed CNNs and treat the backbone as an undifferentiated vector.
- CAGrad supplies the objective we reuse.
- IMGrad (Injecting Imbalance Sensitivity for Multi-Task Learning) argues that magnitude imbalance across tasks matters more than direction. This constrains our design: block resolution must also equalize magnitudes within each group, not only directions.
- RotoGrad (RotoGrad: Gradient Homogenization in Multi-Task Learning) rotates the final shared representation. Its learning-rate ratio between rotation and network is likewise left unscaled across architectures.
The closest structural work is Recon. Recon shows that gradient surgery leaves the frequency of conflicts unchanged, that conflicts concentrate in specific layers, and that branching the top-$K$ conflict layers cuts severe conflicts by 67–79%. We take from Recon the evidence that conflict is layer-localized. We differ in two ways. Recon buys separation with extra parameters and a pilot-then-retrain pipeline, while we change only how the update is combined. Recon also never asks whether its layer profile holds in attention backbones. AutoMTL searches CNN-only sharing graphs and explicitly leaves loss balancing as an orthogonal plug-in. DeMT builds a strong Swin-based multi-task model with fixed, hand-tuned optimization. We use it as a realistic hybrid testbed.
Research Program
Measurement study. For each backbone and benchmark, we log per-task gradients at checkpoints throughout training. From these logs we compute, per block group:
- the cosine similarity between task gradients, as in Recon;
- the ratio of gradient norms between tasks, as in IMGrad;
- the "conflict share," defined as group $b$'s fraction of the total cross-task inner product $\sum_b \langle g_i^b, g_j^b \rangle$.
This answers an open question by itself: whether attention backbones show Recon-style localized conflict, or conflict spread through token-mixing projections.
Sensitivity study. We sweep $c$ for global CAGrad, and the analogous constraint for IMGrad, on every backbone. We then record the optimal value and the regret incurred by using the ResNet-tuned value instead.
Intervention. We apply block-resolved CAGrad and IMGrad. We repeat the transfer test and check whether the remaining regret correlates with the measured conflict share.
Baselines
The naive reference is uniform-weighted joint training, which simply sums the task losses. It is run on every backbone at the same learning rate and schedule as the other methods. It anchors $\Delta m\%$, the average per-task performance change relative to single-task models.
The strongest existing competitors are global CAGrad and IMGrad, run through the same code path as our method.
- For CAGrad on NYUv2, the CAGrad paper reports $\Delta m\% = 0.20\%$, against PCGrad's 3.97%.
- Injecting Imbalance Sensitivity for Multi-Task Learning reports IMGrad at $\Delta m\% = -4.57\%$, Nash-MTL at $-4.04\%$ and CAGrad at 0.29%.
- On a Swin-T backbone, DeMT reports a 3.36% average per-task improvement.
These figures come from different setups and sign conventions; note the 0.20 versus 0.29 for CAGrad. We therefore treat them as sanity anchors and reproduce every baseline ourselves. We will not rely on the published values for our comparisons.
Fairness. Every method gets the same data, backbone weights, schedule and number of seeds. Every method also gets an identical tuning budget on its balancing knob, swept on the ResNet source architecture and then frozen.
Oracle. Global CAGrad retuned separately on each target architecture, at a budget matched per architecture, serves as an oracle. It is the honest upper bound for "just retune."
Key ablation. The ablation that isolates our ingredient is global CAGrad applied after normalizing each block group's gradient to unit norm. This removes the scale-dominance effect but still yields one task-weight vector for the whole backbone.
What counts as winning. Block-resolved balancing with the frozen ResNet value of $c$ must (a) close most of the gap between transferred global CAGrad and the per-architecture oracle, (b) beat the per-block-normalized ablation on hybrid and ViT backbones, and (c) do so by more than seed variance in $\Delta m\%$.
Structural comparator. Recon applied on top of CAGrad is included as a parameter-adding alternative. Recon reports CAGrad at 3.74% rising to 5.80% with Recon added, on its own metric.
Why not just…?
Why not just retune $c$ per architecture? This is a real threat, because $c$ is one scalar and a five-point sweep is cheap for a single model. The per-architecture oracle is in the design precisely to settle this. If transferred global CAGrad already sits within seed noise of the oracle, the premise is false and we will report that. The proposal still matters in two cases. The first is where retuning is not cheap: many tasks, large backbones, or architectures being searched over, as in AutoMTL-style sharing search, where every candidate would need its own sweep. The second is if the regret turns out to be predictable from conflict share, since that turns retuning from blind search into a measurement.
Why not just normalize each layer's gradient before global balancing? This is the one-line fix a reviewer would propose, and it is our central ablation. It removes norm dominance, but it still forces one compromise across blocks. Recon's evidence suggests that different blocks host different conflicts. If per-block normalization matches block-resolved balancing, we will conclude that scale, not per-block task weighting, was the problem, and recommend the simpler fix.
Why not rely on Adam, which already rescales per coordinate? Adam acts after the balancer has fixed its task weights. It equalizes step sizes but cannot change which task the balancer decided to protect. We test this by running every method under both SGD and AdamW. The architecture dependence of the optimal $c$ should survive under AdamW if our account is right.
Why not branch the conflicting layers as Recon does? Recon adds up to 13% task-specific parameters and requires a pilot run. Its $K$ and threshold are themselves backbone-dependent knobs with no transfer rule. We compare against Recon and also combine the two, since block-resolved balancing could inform which blocks to branch.
Proposed Experiments
Benchmarks. - NYUv2: segmentation, depth and normals. - Cityscapes: segmentation and depth. - PASCAL-Context: five tasks, which stresses the task-count dimension.
Backbones. - ResNet-50, as the source architecture for tuning. - Swin-T, the DeMT configuration. - A plain ViT. - A C-C-T-T hybrid.
Metrics. We report $\Delta m\%$, the per-task metrics (mIoU, RMSE, mean angle error), the regret of transferred $c$ relative to the oracle, and the frequency of severe conflicts per block group as in Recon.
Decisive checks. 1. Under global CAGrad, the optimal $c$ must differ across backbones by more than the sweep resolution. If it does not, the problem does not exist. 2. Measured conflict share must be concentrated in convolutional stages for the hybrid backbone, and the size of this concentration must rank-correlate with the transfer regret. 3. Block-resolved balancing must shrink the cross-architecture spread of the optimal $c$ and beat the per-block-normalized ablation on the non-ResNet backbones.
A secondary check on Meta-World MT10 is optional and depends on compute. It would test whether the effect appears in small MLP policies, where block types are homogeneous. There we predict no gain, which serves as a negative control. The relevant anchor is IMGrad's reported 0.93 success rate on MT10.
References
- Conflict-Averse Gradient Descent for Multi-task learning
- Training Object Detectors from Scratch: An Empirical Study in the Era of Vision Transformer
- Geometric insights into focal loss: Reducing curvature for enhanced model calibration
- Hyperparameter Transfer Laws for Non-Recurrent Multi-Path Neural Networks
- A Language-Guided Bayesian Optimization for Efficient LoRA Hyperparameter Search
- Injecting Imbalance Sensitivity for Multi-Task Learning
- RotoGrad: Gradient Homogenization in Multi-Task Learning
- Recon: Reducing Conflicting Gradients From the Root For Multi-Task Learning
- AutoMTL: A Programming Framework for Automating Efficient Multi-Task Learning
- DeMT: Deformable Mixer Transformer for Multi-Task Learning of Dense Prediction