How can homoscedastic task uncertainty be used to automatically weight multiple losses in a multi-task network?

Quick Overview

Asks how learned per-task noise variances can set the weights of several losses in a multi-task network. Tests understanding of the likelihood-based objective, why the weights balance themselves, implementation details, and the limits of the method.

How can homoscedastic task uncertainty be used to automatically weight multiple losses in a multi-task network?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

A multi-task network shares a backbone between several heads (for example depth regression and semantic segmentation), and each head has its own loss. How can homoscedastic task uncertainty be used to weight those losses automatically, so the weights are learned during training instead of tuned by hand? ```hint Treat each loss as a likelihood Write a Gaussian negative log-likelihood whose noise variance $\sigma^2$ belongs to the task as a whole. Which terms of that expression involve $\sigma$? ``` ```hint Look for what stops the trivial solution If the network could only scale losses down, it would drive every weight to zero. Find the term in the likelihood that prevents this. ``` ```hint Solve for sigma Hold a task's loss fixed and minimize its term over $\sigma$ alone. What does the weighted loss come out to? ``` ### What a Strong Answer Covers - What homoscedastic uncertainty means and why it suits task weighting - The objective that follows from the likelihood, for regression and for classification - Why the learned weights balance the tasks and what stops them from collapsing - Implementation details such as learning the log variance - The limits of the method and the alternatives ### Follow-up Questions - Once each $\sigma$ sits at its optimum for the current losses, what gradient reaches the shared weights? - What goes wrong when one task's loss can be driven close to zero? - How would you make one task count more than the others under this scheme? - When would you pick a gradient-based balancing method such as GradNorm or PCGrad instead?

Overview: Asks how learned per-task noise variances can set the weights of several losses in a multi-task network. Tests understanding of the likelihood-based objective, why the weights balance themselves, implementation details, and the limits of the method.

General logo
General
Nov 24, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

A multi-task network shares a backbone between several heads (for example depth regression and semantic segmentation), and each head has its own loss. How can homoscedastic task uncertainty be used to weight those losses automatically, so the weights are learned during training instead of tuned by hand?

What a Strong Answer Covers Guidance

  • What homoscedastic uncertainty means and why it suits task weighting
  • The objective that follows from the likelihood, for regression and for classification
  • Why the learned weights balance the tasks and what stops them from collapsing
  • Implementation details such as learning the log variance
  • The limits of the method and the alternatives

Follow-up Questions Guidance

  • Once each σ\sigma sits at its optimum for the current losses, what gradient reaches the shared weights?
  • What goes wrong when one task's loss can be driven close to zero?
  • How would you make one task count more than the others under this scheme?
  • When would you pick a gradient-based balancing method such as GradNorm or PCGrad instead?