Skip to main content
QUICK REVIEW

[Paper Review] FAMO: Fast Adaptive Multitask Optimization

Bo Liu, Yihao Feng|arXiv (Cornell University)|Jun 6, 2023
Domain Adaptation and Few-Shot LearningComputer Science6 citations
TL;DR

FAMO is a fast, adaptive multitask optimization method that balances loss reduction across tasks using only O(1) space and time per iteration by leveraging loss history to dynamically weight tasks. It achieves state-of-the-art performance on supervised and reinforcement learning benchmarks while being significantly more efficient than existing gradient manipulation methods that require O(k) space and time to store and compute all task gradients.

ABSTRACT

One of the grand enduring goals of AI is to create generalist agents that can learn multiple different tasks from diverse data via multitask learning (MTL). However, in practice, applying gradient descent (GD) on the average loss across all tasks may yield poor multitask performance due to severe under-optimization of certain tasks. Previous approaches that manipulate task gradients for a more balanced loss decrease require storing and computing all task gradients ($\mathcal{O}(k)$ space and time where $k$ is the number of tasks), limiting their use in large-scale scenarios. In this work, we introduce Fast Adaptive Multitask Optimization FAMO, a dynamic weighting method that decreases task losses in a balanced way using $\mathcal{O}(1)$ space and time. We conduct an extensive set of experiments covering multi-task supervised and reinforcement learning problems. Our results indicate that FAMO achieves comparable or superior performance to state-of-the-art gradient manipulation techniques while offering significant improvements in space and computational efficiency. Code is available at \url{https://github.com/Cranial-XIX/FAMO}.

Motivation & Objective

  • To address the challenge of under-optimization in multitask learning where some tasks learn slowly due to conflicting gradients.
  • To design an MTL optimizer that ensures balanced loss reduction across all tasks without requiring storage or computation of all task gradients.
  • To achieve O(1) space and time complexity per iteration, making it scalable for large models and many tasks.
  • To outperform existing gradient manipulation methods in both performance and computational efficiency on diverse MTL benchmarks.

Proposed method

  • FAMO uses a dynamic task weighting mechanism based on historical loss trends rather than computing all task gradients at each step.
  • It introduces a regularization term with coefficient γ to stabilize the optimization of task weighting logits, which are updated using a stochastic gradient-based approach.
  • The method ensures that each task’s loss decreases approximately at the same rate by adaptively adjusting task weights using only the loss history and a single gradient computation per iteration.
  • It avoids the O(k) space and time overhead of previous methods by not storing or explicitly computing gradients for all tasks at each update.
  • The loss history is used to estimate the relative progress of each task, enabling balanced optimization without full gradient computation.
  • The approach is compatible with standard optimization frameworks and integrates seamlessly with existing deep learning pipelines.
Figure 1: Top left: The loss landscape, and individual task losses of a toy 2-task learning problem ( $\filledstar$ represents the minimum of task losses). Top right: the runtime of different MTL methods for 50000 steps. Bottom: the loss trajectories of different MTL methods. Adam fails in 1 out of
Figure 1: Top left: The loss landscape, and individual task losses of a toy 2-task learning problem ( $\filledstar$ represents the minimum of task losses). Top right: the runtime of different MTL methods for 50000 steps. Bottom: the loss trajectories of different MTL methods. Adam fails in 1 out of

Experimental results

Research questions

  • RQ1Can we design a multitask learning optimizer that ensures balanced loss reduction across all tasks while maintaining O(1) space and time complexity per iteration?
  • RQ2How does FAMO compare to state-of-the-art gradient manipulation methods in terms of performance and computational efficiency on diverse MTL benchmarks?
  • RQ3What is the impact of the regularization coefficient γ on FAMO’s stability and performance across different datasets?
  • RQ4Can FAMO effectively mitigate conflicting gradients in stochastic reinforcement learning settings without incurring high computational costs?

Key findings

  • FAMO achieves performance comparable to or better than state-of-the-art methods like CAGrad and NashMTL on both supervised and reinforcement learning MTL benchmarks.
  • On the MetaWorld-10 benchmark, FAMO achieves a success rate of 0.83 ± 0.05, outperforming PCGrad and Soft Modularization, and matching CAGrad while being significantly faster.
  • FAMO introduces negligible training overhead compared to linear scalarization (LS), with relative training time close to 1.0 across all datasets, unlike methods such as NashMTL that scale poorly with task count.
  • The ablation study shows that FAMO is robust to different values of γ, though performance is more sensitive on datasets like CityScapes where one task loss is near zero initially.
  • FAMO outperforms our reproduction of NashMTL, even when applied once every 100 steps, indicating its superior efficiency and stability.
  • FAMO maintains balanced loss reduction across tasks, as evidenced by its consistent performance across multiple metrics including Δm% on NYU-v2 and QM-9.
Figure 2: The average loss $L^{0}$ and the two task losses $L^{1}$ and $L^{2}$ for the toy example.
Figure 2: The average loss $L^{0}$ and the two task losses $L^{1}$ and $L^{2}$ for the toy example.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.