Attacking All Tasks at Once Using Adversarial Examples in Multi-Task Learning
Lijun Zhang, Xiao Liu, Kaleel Mahmood, Caiwen Ding, Hui Guan
TL;DR
This work investigates adversarial robustness in multi-task learning (MTL) and introduces Dynamic Gradient Balancing Attack (DGBA), a framework that optimizes perturbations to simultaneously degrade all tasks by dynamically balancing task gradients. DGBA reformulates the attack as a multi-task optimization, relaxes it to a linear program, and yields an exact, coordinate-wise solution that can be combined with existing white-box attacks. Extensive experiments on NYUv2 and Tiny-Taskonomy show DGBA outperforming strong baselines across various sharing patterns and even when models are adversarially trained, while revealing a trade-off: increased parameter sharing improves task accuracy but raises transferability and vulnerability to attacks. Overall, the study highlights the need to balance accuracy and robustness in MTL design and suggests extensions to large multimodal systems as a future direction.
Abstract
Visual content understanding frequently relies on multi-task models to extract robust representations of a single visual input for multiple downstream tasks. However, in comparison to extensively studied single-task models, the adversarial robustness of multi-task models has received significantly less attention and many questions remain unclear: 1) How robust are multi-task models to single task adversarial attacks, 2) Can adversarial attacks be designed to simultaneously attack all tasks in a multi-task model, and 3) How does parameter sharing across tasks affect multi-task model robustness to adversarial attacks? This paper aims to answer these questions through careful analysis and rigorous experimentation. First, we analyze the inherent drawbacks of two commonly-used adaptations of single-task white-box attacks in attacking multi-task models. We then propose a novel attack framework, Dynamic Gradient Balancing Attack (DGBA). Our framework poses the problem of attacking all tasks in a multi-task model as an optimization problem that can be efficiently solved through integer linear programming. Extensive evaluation on two popular MTL benchmarks, NYUv2 and Tiny-Taxonomy, demonstrates the effectiveness of DGBA compared to baselines in attacking both clean and adversarially trained multi-task models. Our results also reveal a fundamental trade-off between improving task accuracy via parameter sharing across tasks and undermining model robustness due to increased attack transferability from parameter sharing.
