A network trained on several tasks at once has to decide, layer by layer, which weights the tasks share and where each task gets its own. Current methods for learning this sharing pattern, such as AdaShare, DynaShare and sub-network routing, all rely on hand-set penalty coefficients. Those coefficients have to be grid-searched against a held-out validation set, and a bad setting either collapses the network to nothing or shares everything and lets conflicting tasks damage each other. We propose to remove those coefficients. Each task gets a small low-rank "deviation" from the shared weights of every layer, and each deviation gets its own Gaussian prior. The width of each prior is then set by maximizing the marginal likelihood, a training-data score that rewards fitting the data but charges for every unit of flexibility the data did not need. When the evidence says a task needs no deviation at a layer, the prior shrinks to zero and that layer is shared exactly. When it says the task needs one, the prior widens and the layer specializes.
The practical result is a sharing pattern chosen in a single training run, with no validation split and no sharing or sparsity penalties to tune. The chosen pattern also merges into ordinary dense weights at test time, so it avoids the conditional-branching slowdowns that dynamic routers suffer on GPUs. The scientific question is whether the marginal likelihood is a trustworthy judge of sharing decisions in deep multi-task networks. That is not obvious, because the same score is known to rank single-task architectures backwards when priors are diffuse.
Core Claim
We claim that sharing in multi-task networks can be posed as automatic relevance determination on task deviations. Automatic relevance determination means learning one prior precision per parameter group, so that groups whose precision grows without bound are effectively switched off. Posed this way, the online Laplace estimate of the marginal likelihood can learn per-task, per-layer sharing strengths jointly with the weights.
Concretely, for task $t$ and layer $l$ the effective weights are
$$W_{t,l} = W_l + B_{t,l} A_{t,l}, \qquad B_{t,l} \sim \mathcal{N}(0, \alpha_{t,l}^{-1} I).$$
Here $W_l$ are weights shared by all tasks, $A_{t,l}$ and $B_{t,l}$ are rank-$r$ factors private to task $t$, and $\alpha_{t,l}$ is the prior precision controlling how far task $t$ may drift from the shared weights at layer $l$. The precisions are learned by gradient ascent on a Laplace approximation of the log evidence:
$$\log p(D \mid \alpha) \approx \log p(D \mid \hat\theta) + \log p(\hat\theta \mid \alpha) - \tfrac12 \log \det\!\left(\tfrac{1}{2\pi} H_\alpha\right).$$
In this expression $\hat\theta$ is the current weight estimate, and $H_\alpha$ is the curvature of the negative log posterior. We restrict $H_\alpha$ to the deviation factors and approximate it with a Kronecker-factored Gauss-Newton matrix. The last term is MacKay's Occam penalty. It is small only when the data actually pins down a deviation.
Three things would be new relative to AdaShare, DynaShare and sub-network routing. The sharing strength is a learned continuous quantity with a probabilistic meaning rather than a tuned penalty. No validation data is used. And MacKay's effective-parameter count, taken over each deviation block, gives a readable per-layer measure of how much each task specialized.
Where This Sits in Prior Work
The routing side motivates the problem. SNR splits layers into sub-networks connected by relaxed binary gates pruned with an $L_0$ penalty. AdaShare learns per-task execute-or-skip decisions for residual blocks, using Gumbel-Softmax plus hand-designed sparsity and sharing losses. DynaShare adds gates that look at each individual input, on top of the per-task policy. All three hinge on manually weighted penalties.
Less is More – Towards parsimonious multi-task models using structured sparsity prunes shared channels with group lasso. It shows both the payoff and the fragility of this approach: a good penalty lifts NYU-v2 segmentation IoU from 0.2276 to 0.3480, but a slightly larger one prunes everything. That paper explicitly names learning the penalty strength as open. We replace discrete gates with continuous deviations whose magnitude is set by evidence. We do not attempt instance-conditioned routing, and we treat that as out of scope rather than a claimed advantage.
The Bayesian side supplies the method. MacKay's Bayesian Model Comparison and Backprop Nets gives the Occam factor and the effective-parameter count $\gamma$. A Scalable Laplace Approximation for Neural Networks supplies the Kronecker-factored curvature that makes the log-determinant tractable. Scalable Marginal Likelihood Estimation for Model Selection in Deep Learning shows that differentiating this evidence during training can tune hundreds of layer-wise prior precisions and pick sensible architectures, but only in single-task networks. Laplace Redux shows that Laplace applied to a subset of weights is cheap and useful, and its laplace library is our implementation base.
Joint Model and Data Sparsification via the Marginal Likelihood is the closest in spirit. It prunes features by relevance determination with closed-form updates, but only for single-task linear or frozen-feature models. We move relevance determination onto deep, jointly trained task deviations.
One paper constrains the design. Bayesian Model Selection, the Marginal Likelihood, and Generalization shows that the marginal likelihood can correlate negatively with test accuracy in CIFAR-100 architecture search when priors are diffuse. It proposes a conditional version that drops the first $m$ data points from the evidence chain. We address this head on in two ways. First, our priors are learned (empirical Bayes) rather than fixed and diffuse, which is the regime where that paper's failure is most severe. Second, we include an explicit test of whether our evidence ranks sharing patterns correctly, together with a conditional-evidence variant as a fallback.
Research Program
We will build the deviation parameterization on the ResNet-34 backbone that AdaShare and DynaShare use for dense prediction. Deviations are rank-$r$ and placed on every residual block, and task heads are left private.
Training alternates two kinds of steps. Ordinary gradient steps update the shared weights, the deviations and the heads. Every $K$ steps, the precisions $\alpha_{t,l}$ and per-task observation noise are updated by ascending the Laplace evidence. This reuses the online schedule of Scalable Marginal Likelihood Estimation. The per-task noise terms double as automatic loss balancing, playing the role that uncertainty weighting plays in the structured-sparsity work.
Curvature is computed only over the deviation factors. This keeps cost proportional to $T \cdot L \cdot r$ rather than to backbone size. It is an approximation, since it treats the shared weights as fixed when scoring deviations, and we will measure its effect by comparing against a Kronecker-factored Laplace over the last two stages in full.
After training, any block with $\alpha_{t,l}$ above a fixed large threshold is marked shared and its deviation is discarded. The remaining deviations are folded into dense per-task weights. The analysis side reports $\gamma_{t,l}$ for every task and layer, giving a map of where each task specializes. We will check whether this map reproduces the qualitative pattern AdaShare had to impose by hand, namely shared early layers and specialized late ones. Our model is never told this pattern.
The main risk is that the evidence prefers under-fitting, sharing everything, because the Occam charge is overestimated. The conditional-evidence ablation and the ranking experiment below are designed to expose exactly this.
Baselines
The naive reference points are single-task networks and a fully shared backbone with task heads. These anchor the multi-task lift $\Delta T$, the average relative improvement over single-task models across all metrics. A full-sharing result of $\Delta T \le 0$ would also confirm negative transfer on the chosen splits.
The strongest existing competitor is DynaShare. It reports a performance lift of +14.4 $\Delta T$ on NYU v2, a 78% relative lift improvement on Cityscapes, and +15.50% average improvement over single-task models on MIMIC-III. It is the strongest competitor because it is the best reported learned-sharing method on exactly our benchmarks. AdaShare is the second learned-sharing competitor. It reports +1.1% relative gain with 80% fewer parameters on Tiny-Taskonomy, and wins on 4 of 7 NYU v2 metrics against Cross-Stitch and MTAN. The group-lasso method of Less is More is the strongest pruning competitor, with 0.3480 IoU on NYU-v2.
For fairness, all methods use the same backbone, data and augmentation. We re-run each baseline with its full penalty grid, and those baselines get a validation split carved from the training data. We charge the grid's total GPU-hours against the baseline and report results both at matched total compute and at unrestricted tuning. Our method trains on the full training set with a single hyperparameter setting for the rank $r$ and the update interval.
Beating the baselines has a precise meaning. We must match DynaShare's $\Delta T$ within seed noise at full data, using a fraction of its tuning compute and with lower measured wall-clock latency. And we must exceed it in the reduced-data regimes, where its validation split costs the most.
Two ablations isolate the key ingredient. The first keeps the identical deviation architecture but replaces the learned per-block precisions with a single L2 penalty on all deviations, tuned on validation. This tests whether evidence-driven per-block precisions matter beyond the architecture itself. The second replaces the ordinary marginal likelihood with the conditional version from Bayesian Model Selection, the Marginal Likelihood, and Generalization. This tests whether prior sensitivity hurts sharing selection.
Why not just…?
Why not just grid-search AdaShare's penalty coefficients on a validation set? This is the real threat. With enough compute and data it may well match us. Our claim is narrower: equal quality at a fraction of the search cost, and better quality when holding out validation data hurts. We settle this with compute-matched comparisons and with training-set subsets of 10%, 25% and 100%, on NYU v2 and on the clinical MIMIC-III setting where data is scarce. If validation-tuned AdaShare wins even at 10% data under matched compute, the method's case reduces to interpretability, and we will say so.
Why not just put a tuned weight-decay or group-lasso penalty on the deviations? This is the ablation above, and it is a serious alternative, because a single well-tuned coefficient might suffice. The evidence's claimed advantage is a different strength per task and layer, which a single coefficient cannot express and a per-block grid cannot afford. If the single-penalty version matches us at equal tuning compute, the per-block Occam machinery is not earning its cost.
Why not just trust the marginal likelihood, or distrust it outright, given its known failure in architecture search? The negative correlation reported in Bayesian Model Selection, the Marginal Likelihood, and Generalization arose with diffuse fixed priors. We learn the priors, but that does not guarantee safety. We therefore test ranking quality directly, as described below, rather than assuming it.
Proposed Experiments
The main benchmarks are NYU v2 (segmentation mIoU, surface-normal angle error, depth absolute and relative error), Cityscapes (segmentation and depth), the 5-task Tiny-Taskonomy, and MIMIC-III. We report $\Delta T$, parameter count, FLOPs, measured GPU latency, and total tuning GPU-hours, each over three seeds.
The decisive check is a ranking experiment on NYU v2. We enumerate around forty fixed sharing patterns: share the first $k$ stages for each task, with varied rank, and share nothing or everything. For each pattern we compute the Laplace evidence and the conditional evidence from the training data, and we measure test $\Delta T$ after training. Then we report the Spearman correlation between each score and test $\Delta T$. A clearly positive correlation for the ordinary evidence licenses the method. A negative one reproduces the known pathology in the multi-task setting. In that case the conditional variant becomes the method, provided it restores positive correlation.
A second check probes the Occam behavior. We add a synthetic task of random labels to NYU v2. The evidence should shrink that task's deviations everywhere, driving $\gamma$ near zero, and should protect the real tasks from interference. A penalty-based method has no mechanism to single out that task.
A third check is the efficiency claim. Because the chosen pattern merges into dense weights, measured latency should track FLOPs, unlike the branching overhead that DynaShare itself acknowledges.
References
- SNR: Sub-Network Routing for Flexible Parameter Sharing in Multi-Task Learning
- AdaShare: Learning What To Share For Efficient Deep Multi-Task Learning
- DynaShare: Task and Instance Conditioned Parameter Sharing for Multi-Task Learning
- Less is More – Towards parsimonious multi-task models using structured sparsity
- Bayesian Model Comparison and Backprop Nets
- A Scalable Laplace Approximation for Neural Networks
- Scalable Marginal Likelihood Estimation for Model Selection in Deep Learning
- Laplace Redux - Effortless Bayesian Deep Learning
- Joint Model and Data Sparsification via the Marginal Likelihood
- Bayesian Model Selection, the Marginal Likelihood, and Generalization