When a single network is trained on several tasks at once (multi-task learning), some tasks help each other and some interfere. Deciding which tasks should share a network, the task grouping problem, is currently settled either by training many candidate groups or by heuristic affinity scores computed from gradients. We propose a different score. For each task, ask a probabilistic question: after the network has seen the other tasks in its group, how well does it predict this task's data? Bayesian model selection calls this quantity a conditional marginal likelihood, or conditional evidence. It is the probability of the data under the model with its parameters averaged over what earlier data implies, rather than fixed at one trained value. It rewards fit and penalizes both parameter conflict between tasks and wasted flexibility, and it does so on training data without a validation split.
The practical claim is that this score can be computed in closed form for every candidate group from one jointly trained network. We store a local quadratic picture of each task's loss (its gradient and curvature around a shared anchor), and every group's evidence then reduces to sums, solves, and log-determinants of those stored pieces. A colleague could summarize it in two sentences. Train once, record each task's curvature. Then score any grouping by how much each task's data is "explained in advance" by its group-mates, which captures interactions among three or more tasks at the cost of linear algebra rather than training runs.
Core Claim
Existing grouping methods either measure transfer as a point-estimate loss change, or predict it with a learned black box, or relax it into a differentiable search. The first category covers pairwise affinities (TAG, HOA) and the mean-value-theorem affinity plus mixed-integer program of Towards Principled Task Grouping for Multi-Task Learning. The learned black box is MTG-Net in Efficient and Effective Multi-task Grouping via Meta Learning on Task Combinations. The differentiable search is Gumbel-Softmax over encoder branches in DMTG: One-Shot Differentiable Multi-Task Grouping. None of them computes the evidence of a partition.
Our claim is narrower than "use the marginal likelihood for grouping." It has two parts. First, the multi-task setting supplies a natural conditioning set that repairs the known failure of raw evidence. Second, under a Laplace approximation the resulting score decomposes into three interpretable terms whose relative weights we can test.
On the first part: Bayesian Model Selection, the Marginal Likelihood, and Generalization shows that the raw log marginal likelihood can anti-correlate with test accuracy under diffuse priors in neural architecture search on CIFAR-100. The cause is a large penalty paid as the posterior contracts away from a vague prior. That paper conditions on the first $m$ data points to wash out the prior, but it leaves the choice of $m$ open. In a task group, the other tasks' data already do most of this washing for the shared parameters. We therefore expect the score to depend far less on $m$ than single-task conditional evidence does. That expectation is testable, and it motivates the whole design.
The Score
Write $A$ for a set of tasks already observed and $B$ for a task being scored. Let $\Lambda_S = P + \sum_{s \in S} H_s$ be the posterior precision after observing tasks $S$, where $P$ is the prior precision and $H_s$ is task $s$'s curvature, taken as a generalized Gauss-Newton matrix (a positive semi-definite approximation to the Hessian of the loss). Let $\hat\theta_S$ be the corresponding mode, obtained by one Newton step from the shared anchor. The Laplace approximation then gives
$$\log p(D_B \mid D_A) \approx \ell_B(\hat\theta_{A\cup B}) \;-\; \tfrac12 (\hat\theta_{A\cup B}-\hat\theta_A)^\top \Lambda_A (\hat\theta_{A\cup B}-\hat\theta_A) \;+\; \tfrac12\log\det\Lambda_A - \tfrac12\log\det\Lambda_{A\cup B},$$
where $\ell_B$ is task $B$'s log-likelihood. The three terms mean the following:
- Fit: how well the joint solution fits $B$.
- Tug: how far $B$ drags the parameters from where $A$ wanted them, weighted by how certain $A$ was. This is a curvature-aware measure of negative transfer.
- Occam: how much new parameter volume $B$ forces the posterior to give up, following Bayesian Model Comparison and Backprop Nets.
A group $G$ is scored by summing, over its members $t$, the evidence for the held-back part of $t$'s data. The conditioning set is the rest of the group plus a fraction $m$ of $t$'s own data. We call this leave-one-task-out conditional evidence. A partition's score is the sum of its group scores, plus a per-group cost term if hardware budgets require one. Because the tug and Occam terms are computed jointly over all members, a third task can change a pair's score. The score is therefore high-order by construction, which answers the objection that pairwise averaging is "often wildly inaccurate" (Efficient and Effective Multi-task Grouping via Meta Learning on Task Combinations).
Research Program
Anchor and storage. We train one all-task shared network to obtain the anchor. For each task we then store its gradient and curvature. Storing curvature for the full backbone is impossible, and sums of Kronecker-factored blocks are not themselves Kronecker-factored. We therefore restrict the Laplace treatment to a subspace: the last shared block plus task heads, represented as low-rank-plus-diagonal factors. Log-determinants of group sums then come from the Woodbury identity in time roughly cubic in the rank.
This subspace choice extends two earlier methods. Invariance Learning in Deep Neural Networks with Differentiable Laplace Approximations uses Kronecker-factored Laplace evidence to select augmentations for single-task classifiers. Bayesian Uncertainty for Gradient Aggregation in Multi-Task Learning places Bayesian inference only on task heads and uses diagonal precision to weight gradients. We borrow its precision-weighting intuition, which reappears in our tug term, but use it to select structure rather than to aggregate updates. We also include some shared backbone parameters rather than stopping at the heads.
Search. With cheap scores, exact enumeration covers five to nine tasks. For CelebA-40 and MIMIC-III-27 we use greedy merging followed by local swap search. We run an ablation that substitutes the mixed-integer solver of Towards Principled Task Grouping for Multi-Task Learning on a pairwise linearization of our score.
Main risk. A single anchor may misrepresent groups whose optimum lies far from the all-task solution. We measure this directly rather than assuming it away. We also test a cheap repair: re-anchoring at each group's one-step mode and recomputing curvature on a small data subset.
Baselines
Naive references. The do-nothing points are one fully shared network over all tasks and independent single-task networks, trained with identical backbones, schedules, and tuning budgets. Every grouping is reported as total loss relative to both. This is the convention of DMTG, which reports on Taskonomy-5 a 22% total-loss reduction versus naive shared training and 13% versus single-task training (DMTG: One-Shot Differentiable Multi-Task Grouping). That is the strongest reported number in the file, and we treat it as the bar. Beating it means matching or exceeding DMTG's relative reduction under our own re-run on the same Taskonomy-5 split. Because we train one network with one set of heads, we should also do so with less peak memory than DMTG's $K\times N$ over-parameterized start.
Strongest learned competitor. MTG-Net is the strongest competitor at scale. On MIMIC-III-27 it reportedly "almost doubled the performance gain" of HOA/TAG at similar compute (Efficient and Effective Multi-task Grouping via Meta Learning on Task Combinations). No reported absolute AUC was found on Lacuna for this benchmark, so we re-run MTG-Net ourselves. We give it the same total GPU-hours our method spends, which covers the anchor run plus its trial group runs.
Grouping heuristics. We compare against TAG and HOA pairwise affinities and against the mean-value-theorem affinity with mixed-integer programming, using identical anchors and group-size constraints.
Key ablations. Three ablations isolate the ingredients. The first is raw, unconditioned evidence, which tests whether the conditioning matters. The second is conditional evidence on the first $m$ points of a single task, as in Bayesian Model Selection, the Marginal Likelihood, and Generalization, without cross-task conditioning. The third is a "no-Occam" version that keeps the fit and tug terms but drops the log-determinants. We add a diagonal-curvature variant to test whether cross-parameter correlations matter.
Why not just…?
Why not just score groups by held-out loss under the same quadratic surrogate? This is the real threat. A linearized validation-loss estimate uses the same stored gradients and curvatures and may rank groups just as well, which would make the Bayesian framing decorative. We run exactly this variant on the same splits. If its rank correlation with trained group performance equals ours, we will report that the gain comes from the curvature surrogate and not from evidence. The evidence version must win in the regimes where Invariance Learning in Deep Neural Networks with Differentiable Laplace Approximations argues holdouts hurt, namely small per-task data. We test this by subsampling CelebA attributes and MIMIC tasks.
Why not just use gradient-cosine affinity (TAG) or pairwise averaging (HOA)? These scores see only first-order agreement between two tasks. The file records HOA taking over 18 hours on CelebA-9 versus about one hour for DMTG (DMTG: One-Shot Differentiable Multi-Task Grouping), and records MTG-Net substantially beating both on MIMIC-III-27. Our no-Occam ablation is nearly a curvature-weighted TAG, so the comparison shows directly whether the second-order and volume terms add anything.
Why not just run DMTG's differentiable search? DMTG optimizes only training loss under a temperature-sensitive relaxation and must hold every branch-to-task connection in memory. It has no term against over-allocating branches. Our score does not relax the discrete choice, and it penalizes extra groups through the Occam term. Whether that penalty picks better partitions than DMTG's annealed loss is settled by the Taskonomy-5 and CelebA-40 comparisons.
Why not just train every group on small benchmarks? For five tasks this is feasible, and we do it: it serves as ground truth. It stops being feasible at CelebA-40 or MIMIC-III-27, where the number of possible combinations is astronomically large.
Proposed Experiments
Scoring fidelity. The decisive check is on Taskonomy-5, where all 31 non-empty task subsets can be trained to convergence. We compute the Spearman rank correlation between each method's predicted group score and the trained group's held-out total loss. The comparison covers our score, its ablations, TAG, HOA, the mean-value-theorem affinity, and MTG-Net's predictions. We repeat this on ETTm1-7 (127 subsets) and CelebA-9 using sampled subsets.
The proposal fails if either of two things happens. The conditional score may not beat raw evidence in rank correlation, which would mean the conditioning argument is wrong. Or it may not beat the held-out-loss surrogate, which would mean the Bayesian part adds nothing.
Sensitivity to $m$ and the prior. We sweep $m$ and the prior precision. Our prediction is that leave-one-task-out conditioning flattens the sensitivity curve relative to single-task conditional evidence. We expect raw evidence to show the sign flip under diffuse priors that Bayesian Model Selection, the Marginal Likelihood, and Generalization reports for architecture search.
Final partition quality at scale. On CelebA-40 and MIMIC-III-27 we select partitions with each method under matched compute and constraints. We report total loss relative to naive shared and single-task training, mean attribute accuracy or task AUC, calibration error, and wall-clock time including the anchor run.
Anchor fidelity. For each Taskonomy-5 group we compare the predicted mode shift against the actual trained parameters in the scored subspace. We check whether the error of the quadratic model predicts where our rankings fail, and whether re-anchoring repairs those cases.
References
- Towards Principled Task Grouping for Multi-Task Learning
- Efficient and Effective Multi-task Grouping via Meta Learning on Task Combinations
- DMTG: One-Shot Differentiable Multi-Task Grouping
- Bayesian Model Selection, the Marginal Likelihood, and Generalization
- Bayesian Model Comparison and Backprop Nets
- Invariance Learning in Deep Neural Networks with Differentiable Laplace Approximations
- Bayesian Uncertainty for Gradient Aggregation in Multi-Task Learning