🤖 AI Summary
In multi-task learning (MTL), performance degradation arises from gradient conflicts between tasks and heterogeneous convergence rates, making task balancing a fundamental challenge. To address this, we propose a dual-balancing mechanism: first, gradient direction alignment via gradient normalization and cosine similarity constraints; second, a learnable task-weight gating module that decouples task importance modeling from gradient alignment, enabling dynamic, differentiable, and task-agnostic joint optimization. Our method is the first to unify gradient magnitude and direction balancing within a single framework, fully compatible with any backpropagation-based model. Evaluated on standard benchmarks including MTL-Bench, it achieves an average accuracy improvement of 3.2% over strong baselines. Moreover, it significantly mitigates overfitting on dominant tasks while enhancing generalization for low-resource tasks.