Abstract
Multi-task learning (MTL) aims to solve multiple tasks jointly by sharing a base representation, improving efficiency and generalization. However, varying convergence speeds often prevent a single model checkpoint from achieving peak performance across all tasks. We propose a novel approach for "asynchronous" convergence: monitoring per-task validation metrics and switching to a knowledge distillation (KD) loss once a task converges. This prevents overfitting on converged tasks while the model continues learning others. Evaluating on two 5-task e-commerce datasets, our method consistently outperforms existing loss weighting and gradient balancing approaches, achieving average improvements of 0.9% and 1.5% over the best-performing baselines.
Introduction
In multi-task learning, the "tug-of-war" between tasks of varying difficulty often leads to sub-optimal results. While a simple classification task might converge quickly, a complex regression task requires more training steps. Standard synchronous training forces a compromise: continuing training to benefit hard tasks often causes easy tasks to overfit, memorizing noise instead of patterns. Existing solutions like GradNorm or Dynamic Weight Averaging (DWA) attempt to synchronize learning rates by manipulating gradients or loss weights, but these constraints are often difficult to tune and can lead to optimization instability.
Methodology: The Switch-and-Distill Strategy
We introduce a strategy that embraces the natural, asynchronous learning rates of different tasks. The process involves three key components:
- Convergence Monitoring: Validation metrics for each task are tracked independently during training.
- The Switch and Rewind: Once a task's performance plateaus (determined by a patience hyperparameter), it is marked as "converged." Crucially, the task's state is rewound to its best-recorded checkpoint to undo any overfitting that occurred during the patience window.
- Self-Distillation: For all subsequent steps, the ground-truth loss for the converged task is replaced with a Knowledge Distillation (KD) loss. The model is regularized to match the probability distributions or scores produced by its own "best" checkpoint.
This "soft freeze" allows shared layers to continue evolving for remaining tasks without degrading the performance of converged ones.
Experimental Setup
The method was evaluated on two internal 5-task MTL setups from Amazon:
- Diverse Setup: A varied mix including Attribute Identification (RAI), Purchase Similarities (SIMS), Tariff Classification (TC), Product Type Classification (PTC), and Duplicate Detection (Dedup).
- Related Setup: Tasks with similar underlying logic, such as Duplicate Detection (Dedup), Perceived Duplicates (PD-I/II), Variations (Var), and Unit of Measurement Identification (UoMI).
Datasets ranged from 28K to 5M training examples per task, utilizing English product titles and descriptions.
Results and Discussion
Our asynchronous KD approach consistently outperformed standard baselines and sophisticated balancing techniques across both experimental setups.
In the Diverse setup, we observed a 1.5% average improvement over the best baseline. The Related setup saw a 0.9% improvement. Notably, while baseline methods often exhibited performance "dips" due to overfitting after reaching a peak, our approach maintained a stable plateau.
Key insights from the experiments include:
- KD as Regularization: Unlike hard freezing of layers, KD allows weights to update while maintaining output stability for converged tasks.
- Rewinding is Critical: Switching to KD without rewinding is insufficient, as the model has typically already begun to overfit by the time convergence is detected.
- Efficiency vs. Performance: While sequential training often yields the highest scores, joint training is more efficient, reaching high performance in significantly fewer steps (e.g., 10,600 steps for Joint vs. 16,800 for Sequential Small in the Diverse setup).
Conclusion
Asynchronous convergence via knowledge distillation offers a robust alternative to gradient balancing in MTL. By allowing tasks to follow their own schedules, we avoid the pitfalls of forced synchronization. Future work will explore optimizing task ordering in sequential settings and reducing the computational overhead of generating KD targets during training.
Summary updated