TL;DR
ForkMerge is a new training strategy designed to stop auxiliary tasks from accidentally hurting your main model—a phenomenon known as "negative transfer." By periodically forking the model into specialized branches and merging them based on target-task validation performance, it effectively filters out harmful parameter updates while keeping the beneficial ones.
What Problem Does This Paper Address?
In Auxiliary-Task Learning (ATL), we train a model on a "target" task (e.g., predicting user purchases) while simultaneously training on "auxiliary" tasks (e.g., predicting user clicks) to provide extra signals. Ideally, the knowledge from the auxiliary task helps the target task generalize better.
However, in practice, adding auxiliary tasks often leads to Negative Transfer (NT), where the model performs worse than if it had been trained on the target task alone. Most researchers have blamed this on "gradient conflicts"—where the directions of task-specific updates fight each other. Consequently, existing solutions focus on "gradient surgery" to align these vectors.
The authors of this paper argue that this optimization-centric view is incomplete. They demonstrate that gradient conflicts don't always cause negative transfer and, more importantly, that the real culprit is often distribution shift: the auxiliary data pulls the model's internal representation too far away from what the target task actually needs to see at test time.
Methods
The authors propose ForkMerge, a pipeline that shifts the focus from fixing gradients to optimizing for generalization.
The process works in cycles of $\Delta t$ training steps:
- Fork: The current model parameters are copied into two branches.
- Independent Optimization:
- Branch 0 is trained only on the target task.
- Branch 1 is trained jointly on the target and auxiliary tasks.
- Merge: After $\Delta t$ steps, the algorithm searches for an optimal weighting $\lambda^*$ that linearly combines the parameters of both branches to maximize performance on a target validation set.
- Synchronize: The merged parameters become the new starting point for both branches in the next cycle.
By searching for $\lambda^*$ on a validation set, the model can dynamically decide how much to trust the auxiliary signals. If the auxiliary task is helping, $\lambda^*$ will be high; if it's causing "Strong Negative Transfer," the model can simply set $\lambda^*$ to 0, effectively ignoring the harmful branch.
Datasets
The authors evaluated ForkMerge across several diverse domains:
- NYUv2: A multi-task scene understanding dataset (segmentation, depth estimation, surface normals).
- DomainNet: A massive multi-domain image recognition dataset used to test transfer between styles like "Painting," "Real," and "Quickdraw."
- AliExpress: A large-scale industrial recommendation dataset (100M+ records) focusing on Click-Through Rate (CTR) and Conversion Rate (CTCVR).
- CIFAR-10 & SVHN: Used for semi-supervised learning benchmarks where self-supervised tasks act as auxiliaries.
Key Insights and Ideas
- Gradient Conflict is a Red Herring: The authors found that negative transfer and gradient conflicts are not strongly correlated. In fact, conflicting gradients can sometimes act as a helpful form of regularization (similar to weight decay), preventing the model from overfitting the target training data.
- Generalization is the Goal: Negative transfer is most likely to occur when the auxiliary task increases the "Confidence Score Discrepancy" (CSD)—a measure of how much the training distribution shifts away from the test distribution.
- Weak vs. Strong Negative Transfer: The paper distinguishes between Weak NT (which can be fixed by simply tuning the task weight $\lambda$) and Strong NT (where the auxiliary task is so unrelated that any amount of it hurts). ForkMerge handles both by treating the merge step as a dynamic selection process.
Key Results
ForkMerge consistently outperformed state-of-the-art multi-task and auxiliary-learning methods (like PCGrad, GradNorm, and NashMTL):
- DomainNet: While standard equal-weighting led to negative transfer in 23 out of 30 task combinations, ForkMerge successfully avoided negative transfer in all 30 cases.
- NYUv2: It achieved a 4.03% average improvement over the single-task baseline, significantly higher than the next best method (Post-train at 1.49%).
- Efficiency: Despite training two branches, ForkMerge is computationally efficient. Because the branches are independent during the $\Delta t$ steps, they can be trained in parallel on multiple GPUs, potentially reaching $O(1)$ time complexity relative to standard training.
Limitations and Future Work
- Branch Scaling: While the paper introduces a pruning strategy for cases with many auxiliary tasks (forking into $K+1$ branches), the computational overhead still grows with the number of tasks if not carefully managed.
- Hyperparameter Sensitivity: The choice of the interval $\Delta t$ matters. If it's too small, the model lacks "insight" into long-term rewards; if it's too large, the linear combination of parameters might become less effective due to the non-linearity of the loss landscape.
- Future Directions: The authors suggest exploring more sophisticated ways to combine branches beyond simple linear interpolation and integrating ForkMerge with existing task-grouping methods.
Summary updated