Shared Compression Sets for Certified Multi-Task Learning

When a network learns many tasks at once, we would like a guarantee on how well each task will do on new data, and we would like it without setting aside a validation split. Sample compression offers a route to such guarantees. The idea is to find a small subset of the training examples from which the training procedure can rebuild essentially the same model, and then bound the error using the size of that subset instead of the parameter count. Pick-to-Learn is a practical version of this. It grows the subset one hard example at a time, retraining after each addition, and the resulting certificates hold without a validation set. Pick-to-Learn has only been built for single tasks and for tasks that arrive in sequence. We propose a multi-task version, Joint Pick-to-Learn, in which a single compression set serves all tasks at once. Each chosen input carries its labels for every task, so every chosen example counts toward every task's certificate.

The central quantity is how fast this shared set grows as tasks are added. Suppose the tasks share structure. Then the examples that pin down task $j$ also pin down most of task $k$, the joint set grows much more slowly than the sum of the per-task sets, and each task's certificate gets tighter than it would be if that task were learned alone. Suppose instead the tasks conflict. Then the joint set approaches the sum of the per-task sets. This gives something the field lacks: a measure of negative transfer that comes with a certificate and lives at the level of examples rather than weights. It also lets us test directly an open tension in the literature, namely whether training tasks jointly makes a model easier to compress or whether conflicting gradients make it harder.

Core Claim

Let $T$ be the joint compression set chosen for $K$ tasks from $n$ training inputs. Let $T_k$ be the set single-task Pick-to-Learn would choose for task $k$ alone. We define the sample amortization ratio

$$\rho = \frac{|T|}{\sum_{k=1}^{K} |T_k|},$$

which lies between roughly $1/K$ (fully shared structure) and 1 (no sharing). Each task's certificate is a sample-compression bound computed from $|T|$, the task's empirical loss on the examples not in the compression set, and a confidence level of $\delta/K$ to cover all tasks simultaneously. It has the form

$$R_k \le B\left(\hat{L}_k(S \setminus T),\ |T|,\ n,\ \delta/K\right),$$

where $R_k$ is the true risk of task $k$, $\hat{L}_k(S\setminus T)$ is its loss on the training points outside $T$, and $B$ is the bound for real-valued losses from Sample Compression Unleashed. That paper bridges sample compression and PAC-Bayes and shows the certificate does not depend on parameter count.

We claim three things. First, on related-task benchmarks $\rho$ is well below 1. Second, the per-task joint certificate is therefore tighter than the single-task certificate, even after paying the $\log K$ cost of covering all tasks. Third, $\rho$ tracks independently measured negative transfer: it rises when tasks are made to conflict.

Relation to Prior Work

The method comes from The Pick-to-Learn Algorithm. That paper wraps any learner in a loop that adds the highest-loss point and retrains. It shows the loop satisfies the properties needed for a valid compression certificate and reports a risk bound of 0.143 against 0.177 for a PAC-Bayes bound on an MNIST binary split with $N=1000$. We reuse the loop and change what gets picked. The closest existing work plays two different roles.

Sample Compression for Continual Learning applies Pick-to-Learn to tasks arriving in sequence. It adds early stopping driven by the bound itself, which we adopt, and it fills a replay buffer from the examples left out of the compression set. It never faces tasks whose gradients interact within the same update, and that is exactly our setting.

Deep Multi-Task Learning Has Low Amortized Intrinsic Dimensionality motivates the proposal. It shows that multi-task networks can be described with far fewer weight parameters than the tasks need separately: about 32 per task against 400 for a single task on MNIST SP. It turns this into the first non-vacuous multi-task bounds, but it does so through weight description length, random subspaces and quantized training. We ask the analogous question on the example side. Our method keeps the full, unconstrained network, which avoids the expensive quantized-subspace training that paper flags.

Compression-Based Regularization with an Application to Multi-Task Learning compresses features with an information bottleneck and finds a U-shaped curve in excess risk. It works on shallow models and gives no sample-level certificate. Its U-curve suggests that $\rho$ should also depend on sample size.

The combinatorial result in Sample Compression for Multi-label Concept Classes shows that maximum multi-label classes of dimension $d$ have compression schemes of size at most $d$. Its dimension is not a sum over labels, which is theoretical support for expecting $\rho<1$. That paper offers no algorithm for neural networks.

Research Program

The selection rule is the main design question. When the task losses on one input disagree, it is not obvious which input counts as the worst fit. We compare two rules.

The worst-task rule picks the input whose largest normalized task loss is highest. Each task's loss is divided by that task's running median so that tasks with large loss scales do not dominate. This rule directly targets each task's certificate.

The summed rule picks by total normalized loss. This rule prefers inputs that are hard for many tasks at once, which should lower $\rho$ when tasks share structure.

Both rules are deterministic given the current compression set, so the certificate stays valid. When a task label is missing, as in partially labeled data, the chosen input enters with whichever labels it has, and each task's bound uses its own labeled count.

Retraining after every single addition is too slow for datasets like CelebA. We therefore add fixed-size batches of the highest-loss points and warm-start each retraining from the previous model. Both steps keep the rebuilt model a deterministic function of the ordered compression set. We also use bound-based early stopping from continual Pick-to-Learn. We will report wall-clock cost against ordinary multi-task training, since retraining overhead is Pick-to-Learn's known weakness.

The analysis side has three parts. We measure $\rho$ against the number of tasks $K$. We measure $\rho$ against the weight-side amortization ratio from the amortized-intrinsic-dimensionality paper on the same benchmarks. We measure $\rho$ against the gradient cosine similarity between tasks and against the drop in accuracy from joint training relative to single-task training.

Baselines

The naive reference is ordinary joint training on all data with no certificate, alongside separate single-task networks. It sets the accuracy ceiling. A certified method counts as practical if it stays within one point of joint-training accuracy, for example F1 on CelebA.

The first certified baseline is independent single-task Pick-to-Learn: run the loop separately for each task with the same backbone and retraining schedule, and combine the $K$ certificates with the same $\delta/K$ correction. This is the ablation that isolates our key ingredient, sharing the compression set. Joint Pick-to-Learn beats it if its per-task certificates are tighter on average and its measured $\rho$ is clearly below 1.

The second is the held-out test-set bound. Hold out the same fraction of data that ends up in our compression set, train jointly on the rest, and apply a Hoeffding-style bound with the same $\delta/K$ correction. On single-task regression, Pick-to-Learn reported bound 0.172 and risk 0.064 against 0.250 and 0.173 for the test-set approach at $N=200$ (Pick-to-Learn). We expect that advantage to shrink at CelebA's scale, and we will report where the two methods cross over.

The strongest existing multi-task certificate is the weight-compression bound from Deep Multi-Task Learning Has Low Amortized Intrinsic Dimensionality. It reports an error bound of 0.527 on split-CIFAR10 and 0.203 on Products. We will rerun it with the published protocol on the same splits and the same compute budget per method. Beating it means a tighter certificate at equal or better test error on those two benchmarks.

For accuracy under conflicting tasks, RotoGrad serves as the strongest method, run with the same backbones. It reports a median surface-normal angle of 20.80 against 26.16 for vanilla training on NYUv2 (RotoGrad). No reported certificate was found on Lacuna for CelebA or NYUv2 multi-task models.

Why not just…?

Why not just certify each task with its own Pick-to-Learn run? This is exactly our main ablation. If $\rho$ turns out near 1 on real benchmarks, the shared set buys nothing, and we would report that tasks share structure in their weights but not in their examples. That would itself be a clean answer to the open tension.

Why not just use a held-out split? This is a real threat when data is large. With about 160k CelebA images, a 10% hold-out gives tight Hoeffding bounds while costing little accuracy. The honest claim is regime-dependent. Joint Pick-to-Learn should win when each task has few labels: MNIST SP, subsampled CelebA, and partially labeled tasks. We will sweep $n$ and report the crossover point rather than claim a uniform win.

Why not just use the weight-compression bound that already exists for multi-task learning? That bound requires training inside quantized random subspaces, and it bounds the compressed network, not the network one would actually deploy. Our certificate applies to an unconstrained backbone. The head-to-head comparison on split-CIFAR10 and Products settles which bound is tighter. The two ratios could also turn out to be complementary diagnostics.

Proposed Experiments

We use MNIST SP with 30 tasks, split-CIFAR10 and Products, where weight-side bounds already exist, plus CelebA with 40 tasks on ResNet18 and ViT backbones. NYUv2 is excluded from certification because its roughly 800 training images make any sample-compression bound loose. We use it only to check whether $\rho$, computed on dense losses, orders its task pairs the same way their measured conflict does.

The decisive test is a controlled relatedness sweep. On MNIST SP we replace a growing fraction of tasks with label-permuted versions. The claim predicts that $\rho$ rises monotonically toward 1 and that per-task certificates loosen. We also correlate $\rho$ with pairwise gradient cosine and with the accuracy gap between joint and single-task training on CelebA task pairs. A rank correlation near zero would falsify the use of $\rho$ as a transfer diagnostic.

Finally, we compare the worst-task and summed rules on certificate tightness, test F1 and wall-clock cost. We also test whether training on only the compression set, or instead training on all data and certifying separately, loses accuracy relative to joint training. That accuracy cost is the known weakness of compressed models and must be reported honestly.