NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Gray-Wyner Coding of Model Zoos: Rate-Distortion Storage of Many Fine-Tuned Experts

Organizations increasingly keep dozens of fine-tuned copies of one pretrained network, one per task. Storing and shipping these copies is expensive, and the usual fix is to merge them into a single model or to keep a merged model plus small per-task corrections. This note proposes treating the whole collection of experts as a signal to compress. Each expert is rebuilt from the shared pretrained weights, one shared "common" correction that every task downloads, and a small "private" correction for that task alone. The two corrections are quantized and entropy-coded, meaning each value is stored with fewer bits the more predictable it is. Bits are spent where they reduce task loss most, under a single objective that trades accuracy against storage.

The structure comes from multi-terminal information theory. A Gray-Wyner network sends one common stream to all receivers plus a private stream to each. That theory has been used to compress images for several downstream tasks, but here it is applied to the weights of the task models. The payoff is one tunable curve rather than a single operating point. One end minimizes the total bytes stored for the whole zoo. The other end minimizes the bytes a client downloads to get one task. The strongest current approach, task-localization masks, gives only one hand-tuned point on that curve.

Core Claim

Take $T$ experts $\theta_t$ fine-tuned from a base $\theta_0$. Each has a task vector $\tau_t = \theta_t - \theta_0$, which is simply the change fine-tuning made to the base weights. We represent every task vector as $\hat\tau_t = \hat c + \hat r_t$, where $\hat c$ is a quantized common vector and $\hat r_t$ is a quantized private residual. We choose them by minimizing

$$ \mathcal{L} = \sum_{t=1}^{T} D_t(\theta_0 + \hat c + \hat r_t) + \lambda\Big(\gamma\, R(\hat c) + \sum_{t=1}^{T} R(\hat r_t)\Big), $$

The symbols are defined as follows:

  • $D_t$ is the loss increase of task $t$ relative to its expert, measured on a small calibration set.
  • $R(\cdot)$ is the coded length in bits under a learned entropy model.
  • $\lambda$ sets the overall bit budget.
  • $\gamma \in [1, T]$ sets which rate we care about.

The range of $\gamma$ follows from a simple identity. A weighted sum of the zoo's total storage $R_c + \sum_t R_t$ and $T$ times the average single-task download $R_c + \frac{1}{T}\sum_t R_t$ always has coefficient 1 on each private rate. Its coefficient on the common rate runs from 1 (pure storage) to $T$ (pure per-task download). This is a $T$-task generalization of the $\beta$-weighted objective in Lossy Common Information in a Learnable Gray-Wyner Network, with one deliberate restriction. That paper's image-coding version needs a separate channel for every subset of tasks, $2^n - 1$ in all, and was evaluated only for two tasks. We use a single common channel plus $T$ private ones, so the model grows linearly in $T$.

The claim to test has two parts. First, in the storage regime, jointly coding common and private parts beats both coding each task vector independently and the mask-based scheme at equal bytes. Second, the size of that gain is predicted by how much the task vectors overlap.

Relation to Prior Work

Three lines of work motivate and supply this proposal.

Localizing Task Information for Improved Model Merging and Compression is the closest prior work and the one to beat. It shows that a merged task vector plus per-task binary "TALL-masks" recovers expert performance. Implicitly, it already uses a common-plus-private structure. Its private information, however, can only select entries of the common vector and never correct their values. Its sparsity and consensus thresholds are also set by hand, and the paper does not entropy-code anything, even though it notes that per-task masks grow linearly with the number of tasks. Our scheme contains TALL-masks as a special case: a private residual that only zeroes out common entries. It lets a rate objective decide when richer corrections are worth their bits.

Two papers supply the coding machinery. Radio: Rate–Distortion Optimization for Large Language Model Compression allocates bit depth across weight groups by sensitivity, using dual ascent on a small calibration set. It only handles a single model and has no shared-versus-private structure. We reuse its allocation procedure for each stream. A Rate--Distortion View on Model Updates finds that weight updates in federated learning are sparse, symmetric and heavy-tailed. It shows that entropy coding them directly beats rotating them to look Gaussian. We take this as the justification for heavy-tailed entropy models on task vectors, which are also updates from a shared starting point. That paper, too, codes one model's update rather than a family of related ones.

Towards Minimizing Feature Drift in Model Merging: Layer-wise Task Vector Fusion for Adaptive Knowledge Integration shows that a good layer-wise merge can be computed in closed form from 16–64 samples per task. We use this style of calibration-data distortion proxy, and LOT itself as the unquantized initialization for $c$.

One paper constrains the design. Parameter-Efficient Instance-Adaptive Neural Video Compression reports that small adapter weights vanish to zero under naive quantization. Private residuals will be small, so the quantizer step sizes must be learned per layer rather than fixed.

Research Program

We build the codec in three pieces:

  • Distortion. $D_t$ is approximated by a diagonal-Fisher-weighted squared error on the task-vector perturbation, computed from a calibration set of the size LOT uses. We periodically check it against the true loss on held-out calibration samples.
  • Rate. $R$ is the code length under a per-layer Laplacian entropy model with a learned scale. As an ablation, the scale is predicted from the common stream, analogous to a hyperprior (a small side model that predicts how the main values are distributed). Actual files are produced with an arithmetic coder, so all reported bytes are real.
  • Optimization. We alternate between two steps. With $\hat c$ fixed, each private residual is solved independently with Radio-style dual ascent over per-layer step sizes. With the residuals fixed, $c$ is updated by gradient steps on $\mathcal{L}$, using straight-through quantization (treating rounding as the identity when computing gradients).

Under the quadratic proxy, the unquantized optimum of $c$ has a clean form in two limits. When $\gamma = 1$, sharing is free, and $c$ approaches a Fisher-weighted average of the task vectors. When $\gamma = T$, sharing has no rate advantage, and $c$ shrinks toward entries on which tasks genuinely agree. This agreement structure is what TALL-masks' consensus analysis measures heuristically. Deriving and checking this limit behavior is the analysis component of the program.

We also measure task-vector overlap directly: per-layer Fisher-weighted cosine similarity, and the fraction of TALL's "general" weights. We then test whether overlap predicts the sum-rate gain.

Baselines

The naive reference points are storing all experts in half-precision floating point, and storing only the base plus plain Task Arithmetic at zero private rate. These fix the two ends of the accuracy axis.

Consensus merging and LOT merging. Consensus merging Localizing Task Information for Improved Model Merging and Compression and LOT merging Towards Minimizing Feature Drift in Model Merging: Layer-wise Task Vector Fusion for Adaptive Knowledge Integration represent the zero-private-rate end. LOT reports 82.7% average accuracy on the 8-task ViT-B/32 benchmark. We quantize and entropy-code their merged vectors with our coder so that their bytes are comparable to ours.

TALL-masks (strongest baseline). This is the strongest existing method for the question of recovering expert accuracy from compact storage. It reports cutting a 20-task ViT-L/14 collection from 57 GB to 8.2 GB while retaining 99.7% of expert performance. We run it in two forms. The first is as published. The second, which is fairer and stronger, entropy-codes its masks and quantizes its merged vector with the same Laplacian coder we use. This separates the gain of our structure from the gain of entropy coding alone. Every method gets the same calibration samples per task and the same hyperparameter search budget, measured in number of configurations tried.

Independent Radio-style coding (key ablation). Each $\tau_t$ is coded independently with Radio-style allocation and the same entropy model, which is equivalent to forcing $c = 0$. This isolates the one ingredient we claim matters, the shared common stream.

Shared stream without joint allocation. A second ablation keeps $c$ fixed at the LOT merge and only optimizes the private residuals. It isolates the value of choosing $c$ under the rate objective rather than for accuracy alone.

What counts as beating TALL. We must either match 99.7% normalized accuracy on the 20-task benchmark with noticeably fewer total bytes than entropy-coded TALL-masks, or reach higher accuracy at equal bytes. In both cases the result must hold on the 8- and 14-task benchmarks too.

Why not just…?

Why not just entropy-code each task vector separately, with no common stream? This is the real threat. If fine-tuned task vectors are nearly orthogonal, the common stream buys nothing, and a Radio-style per-expert coder would match us at every $\gamma$. The evidence against it is indirect. Consensus merging gains 4.9 points over Task Arithmetic, and TALL reports a substantial set of "general" weights, both of which suggest real shared structure. Neither result measures it in bits, though. The $c = 0$ ablation settles the question. If its curve lies on ours in the storage regime, the Gray-Wyner framing is wrong for this setting and we will report that.

Why not just compress TALL-masks and the merged vector with a generic entropy coder? It may close much of the gap, which is exactly why the entropy-coded TALL variant is a baseline rather than a straw man. Our scheme can only win where value corrections, rather than mere selections, pay for their bits. The comparison at matched bytes shows whether that happens.

Why not just train low-rank adapters per task instead of full fine-tuning? Adapters make each private part small, but only if chosen at training time, whereas many existing zoos hold full fine-tunes. Adapters also do not remove redundancy across tasks. Learn to Merge: Meta-Learning for Adaptive Multi-Task Model Merging reports about 0.1 MB per task for its adapters on top of a merged base, a useful per-task size target. We include a low-rank truncation of each $\tau_t$, coded with our entropy model, as an extra baseline at matched bytes. We also apply our common/private coder to a zoo of such adapters, to show the two are complementary rather than competing.

Proposed Experiments

We use the 8-, 14- and 20-task CLIP vision benchmarks (SUN397, Stanford Cars, RESISC45, EuroSAT, SVHN, GTSRB, MNIST, DTD and the extended sets) with ViT-B/32 and ViT-L/14, reusing the published fine-tuned checkpoints. We report two things:

  • Accuracy-versus-bytes curves for average absolute accuracy and accuracy normalized to each expert. These are traced for total zoo storage and separately for single-task download, at $\gamma \in \{1, \sqrt{T}, T\}$.
  • Bjontegaard-style bit savings at equal normalized accuracy, a standard way of summarizing the gap between two rate curves.

The results would count against the proposal in any of three cases:

  • the $c = 0$ ablation matches the full method at $\gamma = 1$;
  • the gain does not grow from 8 to 20 tasks;
  • measured overlap fails to predict the per-benchmark gain.

The results would support the proposal if all of the following hold:

  • a clear storage-regime gain over entropy-coded TALL-masks;
  • a gain that grows with task count;
  • the common stream shrinking toward consensus weights as $\gamma \to T$, as the quadratic analysis predicts.

If the ViT results hold, a secondary test applies the same coder to GPT-2 experts on GLUE. The file contains no reported per-task merging numbers there, so all comparisons in that setting would be run by us.