DaWin: Training-free Dynamic Weight Interpolation for Robust Adaptation

## Abstract

Abstract Adapting a pre-trained foundation model on downstream tasks should ensure robustness against distribution shifts without the need to retrain the whole model. Although existing weight interpolation methods are simple yet effective, we argue their static nature limits downstream performance while achieving efficiency. In this work, we propose DaWin , a training-free d yn a mic w eight in terpolation method that leverages the entropy of individual models over each unlabeled test sample to assess model expertise, and compute per-sample interpolation coefficients dynamically. Unlike previous works that typically rely on additional training to learn such coefficients, our approach requires no training. Then, we propose a mixture modeling approach that greatly reduces inference overhead raised by dynamic interpolation. We validate DaWin on the large-scale visual recognition benchmarks, spanning 14 tasks across robust fine-tuning – ImageNet and derived five distribution shift benchmarks – and multi-task learning with eight classification tasks. Results demonstrate that DaWin achieves significant performance gain in considered settings, with minimal computational overhead. We further discuss DaWin ’s analytic behavior to explain its empirical success. Here is our code .

## 1 Introduction

The emergence of foundation models (Bommasani et al., ; Radford et al., ; Brown et al., ) has significantly lowered the barrier to deploying artificial intelligence solutions across a wide range of real-world problems. Leveraging the strong general knowledge acquired through large-scale pre-training, foundation models can be efficiently adapted for numerous tasks. However, recent studies have shown that while fine-tuning improves performance on specific downstream tasks, it may often undermine the model’s generalizability and robustness (Wortsman et al., ). For example, a model fine-tuned on ImageNet has better accuracy on in-distribution (ID) data yet may underperform in out-of-distribution (OOD) data such as ImageNet-A (Hendrycks et al., ).

To address this issue, robust fine-tuning methods (Wortsman et al., ) have been recently developed to adapt models to ID while maintaining strong OOD generalization. Some approaches incorporate regularization into the learning objective (Ju et al., ; Tian et al., ; Oh et al., ), while others focus on preserving the knowledge of the pre-trained model by modifying fine-tuning procedure (Kumar et al., ; Lee et al., ; Goyal et al., ). Notably, weight interpolation approaches allow for the integration of knowledge from multiple models via simple interpolation or averaging and have proven effective in both robust fine-tuning (Wortsman et al., ; ; Jang et al., ) and multi-task learning (Ilharco et al., ; Yadav et al., ; Yu et al., ) settings.

The weight interpolation approaches are particularly appealing because they are easily applied to any fine-tuned model as a post-hoc plug-in method, delivering competitive performance. Most existing works (Wortsman et al., ; ) focus on creating a single merged model using a static global interpolation coefficient $\lambda$ for *all* test samples: $(1-\lambda)\theta_{0}+\lambda\theta_{1}$, where $\theta_{0}$ and $\theta_{1}$ are the weights of two individual models. While these methods efficiently achieve strong performance, we argue that the optimal coefficients vary across input data samples, leaving notable potential for improving the performance of the interpolation-based approaches. Recent studies on dynamic merging (Cheng et al., ; Lu et al., ; Tang et al., ) explore sample-wise interpolation with $(1-\lambda(x))\theta_{0}+\lambda(x)\theta_{1}$, which introduce extra learnable modules to replace the global coefficient with sample-wise coefficient $\lambda(x)$ from a given sample $x$. Yet, these methods require additional training and careful design of the router modules to determine $\lambda(x)$, which brings non-trivial complexity.

In this work, we propose a dynamic weight interpolation framework, DaWin, that performs sample-wise interpolation *without any additional training*.
To begin with, we conduct a pilot study to investigate the upper-bound performance of dynamic interpolation methods. Specifically, we simulate an oracle sample-wise weight interpolation by leveraging ground truth test labels for sample-wise model expertise estimation via the cross-entropy (X-entropy) loss. Given a test sample, a model yielding a smaller X-entropy incurs larger importance for that sample during weight interpolation, reflecting the expertise of the corresponding model. Here, we observed that fine-grained dynamic interpolation (*e.g*., at a sample level) indeed significantly outperforms static interpolation.

Our pilot study informatively guides our methodology design by approximating the upper-bound performance in practical scenarios when the ground truth labels of test samples are not available.
Specifically, we design an entropy ratio-based score function that can act as a reliable alternative to the X-entropy ratio to robustly determine the sample-wise interpolation coefficients across different samples from diverse domains. The rationale behind using entropy as a surrogate is grounded in the observation that the entropy of a sample’s predicted probability distribution strongly correlates with X-entropy. Lastly, to resolve the computation overhead induced by sample-wise interpolation operation during inference time, we further devise a mixture modeling-based (Ma & Leijon, ) coefficient clustering method that dramatically reduces the computation. Compared with the most competitive baseline, DaWin improves the performance by 4.5% and 1.8% in terms of the OOD accuracy and multi-task learning average accuracy for CLIP (Radford et al., ) image classification, even though DaWin requires far less computational cost during the training or inference.

Our contributions can be summarized in three key points:

- i.
We present an intuitive numerical analysis of oracle dynamic interpolation methods and show that the X-entropy ratio is a reliable metric to compute per-sample interpolation coefficients.
- ii.
We propose a practical implementation, DaWin, that approximates the oracle dynamic interpolation by leveraging the prediction entropy ratio of individual models on unlabeled test samples to determine sample-wise interpolation coefficients automatically.
- iii.
Extensive validation shows that DaWin consistently improves classification accuracy on distribution shift and multi-task learning setups while not remarkably increasing the inference time, and we provide a theoretical analysis to explain the empirical success of DaWin.

## 2 Preliminary

### 2.1 Background

Classification under distribution shift.
We consider a classification problem over a domain $\mathcal{X}$ with input $x$ and a label space $\mathcal{Y}=\{1,...,C\}$, where the goal is to approximate the true labeling function $h:\mathcal{X}\rightarrow\mathcal{Y}$ with a parametric model $f:\mathcal{X}\rightarrow\Delta^{C-1}$. This model maps $x$ to $C-1$ dimensional simplex, which aims to minimize error $l:\mathcal{Y}\times\mathcal{Y}\rightarrow\mathbb{R}$ on inputs drawn from any potential target distribution $P_{T}$. In the robust fine-tuning scenario (Wortsman et al., ; Kumar et al., ), the target distribution $P_{T}$, where a pre-trained model $f$ being adapted to, is typically assumed to be covariate-shifted version (OOD) of the ID source distribution $P_{S}$. Both distributions share the same class label space $\mathcal{Y}$, and have the same conditional distribution over target labels, i.e., $P_{S}(y|x)=P_{T}(y|x)$, but have different marginal distributions over input $P_{S}(x)\neq P_{T}(x)$.

Model merging.
Let $f(\cdot;\theta_{0})$ and $f(\cdot;\theta_{1})$ denote models that are individually trained on the same or different datasets but have identical architecture. For example, $f(\cdot;\theta_{0})$ could represent a pre-trained model such as CLIP (Radford et al., ), while $f(\cdot;\theta_{1})$ is the fine-tuned counterpart on a particular downstream task. Model merging approach (Wortsman et al., ; ) constructs a merged model $f(\cdot;\theta_{\lambda})$, which achieves a better trade-off between ID and OOD performance than the individual models by interpolating in the weight space $\theta_{\lambda}=(1-\lambda)\theta_{0}+\lambda\theta_{1}$. We will use the terms interpolation and merging interchangeably. Throughout the paper, we use the term static interpolation to denote methods that induce a single merged model corresponding to a single interpolation coefficient applied for all test samples. In contrast, dynamic interpolation refers to methods that yield multiple merged models, with interpolation coefficients depending on the sample $x$ or domain $\mathcal{X}$.

### 2.2 Pilot Study

Our goal.
We begin by conducting a pilot study to understand the benefits of dynamic interpolation, which adapts interpolation coefficients at a finer granularity (such as sample level, $\lambda(x)$), as opposed to using global coefficient $\lambda$ for all samples (Wortsman et al., ; ). To explore the upper limits of these methods, we experiment with ground truth labels as an oracle to estimate upper-bound performance and understand the maximum potential of model interpolation methods. This study will further guide our method design in Sec. 3 by approximating the oracle performance.

**Table 1: Pilot experiments for upper-bound analysis. We evaluate zero-shot (ZS), fine-tuned (FT), and several interpolation methods with CLIP ViT-B/32 on ImageNet (IN) and its five distribution shifts: ImageNet (IN)-V2/R/A/S and ObjectNet (ObjNet). Given test domain $\mathcal{X}$, domain-wise coefficients $\lambda^{*}({\mathcal{X}})$ are found by grid search over each test set, and the sample-wise coefficients $\lambda^{*}(x)$ for each test sample $x$ are determined by the X-entropy loss ratio of individual models. $\dagger$ denotes oracles that utilize ground truth test labels.**
| Method | Model Weight |  | Acc. Under Distribution Shifts |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  |  | IN | IN-V2 | IN-R | IN-A | IN-S | ObjNet | Avg |
| ZS (Radford et al., ) | $\theta_{0}$ | 63.4 | 55.9 | 69.3 | 31.4 | 42.3 | 43.5 | 48.5 |
| FT (Wortsman et al., ) | $\theta_{1}$ | 78.4 | 67.2 | 59.3 | 24.7 | 42.2 | 42.0 | 47.9 |
| WiSE-FT (Wortsman et al., ) | $(1-\lambda)\theta_{0}+\lambda\theta_{1}$ | 79.1 | 68.4 | 65.4 | 29.4 | 46.0 | 45.9 | 51.0 |
| Dynamic Interpolation$\dagger$ (domain) | $(1-\lambda^{*}(\mathcal{X}))\theta_{0}+\lambda^{*}(\mathcal{X})\theta_{1}$ | 79.1 | 68.5 | 72.9 | 36.3 | 48.5 | 48.9 | 55.0 |
| Dynamic Interpolation$\dagger$ (sample) | $(1-\lambda^{*}(x))\theta_{0}+\lambda^{*}(x)\theta_{1}$ | 83.4 | 74.4 | 77.9 | 42.9 | 53.4 | 54.6 | 60.6 |

Figure: Figure 1: Distribution of interpolation coefficients. Histograms of sample-wise interpolation coefficients induced by the X-entropy ratio between two models (ZS and FT). Oracle coefficient estimates vary significantly within a domain (IN) and across domains (IN v.s. IN-V2/R/A/S/ObjNet) regarding symmetry and skewness.
Refer to caption: x1.png

Setup and hypothesis. We assess the top-1 classification accuracy of several approaches on ImageNet-1K (IN) (Russakovsky et al., ) and distribution-shifted benchmarks IN-V2/R/A/S/ObjNet (Recht et al., ; Hendrycks et al., ; ; Wang et al., ; Barbu et al., ) by fine-tuning the CLIP ViT-B/32(^1^11We employed the pre-trained model available at: [https://github.com/openai/CLIP](https://github.com/openai/CLIP).)
(Radford et al., ) on IN. Besides the individual models (zero-shot; ZS and fine-tuned; FT), we include a representative static interpolation method, WiSE-FT (Wortsman et al., ), which determines the interpolation coefficient $\lambda$ via grid search on the ID validation set.
Then, we implement two oracle interpolation methods: Dynamic Interpolation$\dagger$ per domain and per sample.
For the domain-wise dynamic interpolation, oracle coefficients $\lambda^{*}(\mathcal{X})$ are determined by grid search over all test samples within each domain $\mathcal{X}$, such as art or sketch. In contrast, for sample-wise oracle interpolation coefficients $\lambda^{*}(x)$, we use negative X-entropy to measure models’ expertise on a specific input $x$, which results in $\lambda^{*}(x)=\exp(-l(f(x;\theta_{1}),y))/(\exp(-l(f(x;\theta_{0}),y))+\exp(-
l(f(x;\theta_{1}),y)))$. Note that we can regard the model $f(x;\theta)$ as an estimator of a conditional probability density function, e.g., $p_{\theta}(y|x)$. Then, given the equality between the X-entropy over the one-hot label and negative log-likelihood, $\lambda^{*}(x)$ can be interpreted as a posterior of Bernoulli distribution in the noise-contrastive estimation (Gutmann & Hyvärinen, ), i.e., $\lambda^{*}(x)=p_{\theta_{1}}(y|x)/(p_{\theta_{0}}(y|x)+p_{\theta_{1}}(y|x))$, which models the probability whether a data $(x,y)$ comes from the distribution $p_{\theta_{1}}(y|x)$. See Appendix A.1 for more.

In this experiment, we hypothesize that (1) Fine-grain interpolation, which adapts coefficients at a finer level (such as the sample level), can lead to substantial improvements compared to static interpolation, such as WiSE-FT. (2) Per-sample interpolation coefficients can effectively estimated with X-entropy-based model expertise measurement.

Results and interpretations. We verify our hypothesis in Table 1. Here, the domain-wise and sample-wise dynamic interpolation methods perform far better than individual models or static interpolation. Moreover, compared with the domain-wise interpolation method, sample-wise interpolations show much higher performance in all cases. This supports our hypotheses that fine-grain interpolation leads to better downstream accuracy, and the negative X-entropy can be used as a reliable estimator of per-sample model expertise to induce the interpolation coefficients.

In Figure 1, the interpolation coefficients $\lambda^{*}(x)$, computed using the X-entropy ratio (corresponding to the last row of Table 1), vary significantly within and across domains. On the one hand, the estimated coefficients are widely distributed from zero to one on all evaluation datasets. On the other hand, the distributions of coefficients also vary depending on the domain, e.g., IN and IN-A exhibit right-skewed and left-skewed distributions, respectively. This confirms that optimal coefficient estimation varies by sample, motivating the exploration of the sample-wise dynamic interpolation method.
In summary, we conclude that *determining proper interpolation coefficients on a sample-wise basis dramatically elevates the achievable performance of model merging-based approaches*.

Figure: Figure 2: Correlation between entropy ratio and X-entropy ratio. We split each test set into four subsets (TrueTrue, TrueFalse, FalseTrue, FalseFalse) based on the correctness of two models’ predictions (ZS and FT). On each split and the entire data, we show scatter plots of the entropy ratio (x-axis) and x-entropy ratio (y-axis) computed by two models with corresponding Pearson correlations. The top and bottom rows denote results from ImageNet and ImageNet-R. Results imply that the entropy ratio strongly correlates with the X-entropy ratio overall, except FalseFalse case, wherein we could not expect satisfactory performance for individual models and interpolation methods as an inherent limitation given fixed individual models.
Refer to caption: extracted/5897869/figure_files/motive_corr.png

## 3 Method

### 3.1 Revisiting Entropy as a Measure of Model Expertise

While the pilot study in the previous section provides encouraging results, those oracle methods cannot work in practice. This is because we do not have access to the ground truth labels for incoming test samples.
This leads us to the question: how can we reliably estimate the interpolation coefficient solely based on the test input $x$? There is extensive literature which adopts entropy as a proxy of X-entropy (Grandvalet & Bengio, ; Chapelle & Zien, ; Shu et al., ; Wang et al., ; Prabhu et al., ). The rationale behind using entropy as a surrogate is grounded in the observation that the entropy of a sample’s prediction distribution strongly correlates with X-entropy, even under distribution shifts (Wang et al., ) those models have not explicitly trained on. This work presents the first attempt to leverage the sample-wise entropy to measure each model’s expertise to determine the interpolation coefficients given each test sample. It is worth noting that this approach differs from AdaMerging (Yang et al., ), which seeks to learn a global coefficient inducing a single merged model to minimize the expected entropy over the entire test set.

In this section, we will show that entropy is well-correlated with X-entropy and can thus be used to estimate model expertise. Specifically, we divide the test set into four splits, $\{$TrueTrue, TrueFalse, FalseTrue, FalseFalse$\}$, based on the correctness of predictions made by two models (zero-shot and fine-tuned CLIP). For example, TrueTrue represents the set $\{(x_{i},y_{i})|f(x_{i};\theta_{0})=y_{i}\;\text{and}\;f(x_{i};\theta_{1})=y_{
i}\}$. We then compute the Pearson correlation coefficients between entropy and X-entropy within each split.
Figure 2 shows scatter plots with fitted regression lines of the entropy and X-entropy ratios between two models on IN (top) and IN-R (bottom).
Specifically, we plot $\frac{H(f(x;\theta_{0}))}{H(f(x;\theta_{0}))+H(f(x;\theta_{1}))}$ and $\frac{l(f(x;\theta_{0}),y)}{l(f(x;\theta_{0}),y)+l(f(x;\theta_{1}),y)}$ for entire test samples and compute Pearson correlation coefficient between them, where $H$ denotes the entropy.

Here, aside from the FalseFalse case where both models failed to produce reliable predictions(^2^22However, even individuals fail, an interpolated model can yield correct predictions (Yong et al., ).), we observe strong correlations (Schober et al., ) across the remaining splits and the entire dataset. This implies that entropy is a reasonable proxy to the X-entropy for estimating per-sample model expertise and, ultimately, computing sample-wise interpolation coefficients.

Figure: Figure 3: Framework overview. DaWin estimates per sample model expertise (exponentiated negative entropy) and then produces coefficients based on the relative expertise of models for dynamic interpolation.
Refer to caption: extracted/5897869/figure_files/dawin_framework.png

### 3.2 Dynamic Interpolation via Entropy Ratio

After confirming a strong correlation between the entropy and X-entropy, we propose a new dynamic weight interpolation, DaWin, by defining sample-wise interpolation coefficients $\lambda(x)$ as below:

$$ $\lambda(x)=\frac{\exp(-H(f(x;\theta_{1})))}{\exp(-H(f(x;\theta_{0})))+\exp(-H( f(x;\theta_{1})))}.$ (1) $$

Here, $H$ represents the entropy over the output probability distribution of model $f(\cdot;\theta)$ given input $x$. The value of $\lambda(x)$ approaches 1 when model $f(\cdot;\theta_{1})$ exhibits lower entropy (greater expertise), whereas it approaches 0 if the entropy of model $f(\cdot;\theta_{1})$ becomes higher. Figure 3 illustrates the overall framework. Intuitively, this approach is analogous to classifier selection methods (Giacinto & Roli, ; Ko et al., ), which aims to dynamically select suitable classifier(s) given a test sample. However, DaWin differs in terms of its motivation, expertise metric, and goal as we pursue finding the interpolation coefficients that may induce better performance compared with the best model selection method (See Table 5). We further discuss the connection between DaWin and the selection-based method in Sec. 6. Note that our sample-wise expertise estimations do not require any hyperparameters for computing interpolation coefficients. This eliminates the need for intensive hyperparameter tuning often required in prior works (Wortsman et al., ; Ilharco et al., ) to achieve the best result. Meanwhile, if we assume access to all test samples simultaneously, we can refine the coefficient computation by introducing per-domain expertise offset terms (please see Appendix A.1). We use this offset adjustment by default, which brings consistent improvements.

Sample-wise entropy valley hypothesis. One of the most popular hypotheses that explain the success of weight interpolations is linear mode connectivity (LMC; Frankle et al. ()), which ensures that interpolated models are also laid on good solution space as well as low-loss converged individual models. Although entropy is a concave function that denies the LMC in nature, we believe that a similar statement can be claimed, which we refer to sample-wise entropy valley as follows:

- i)
There exists $\lambda$ such that $\mathbb{E}_{x}[H(f(x;\lambda\theta_{0}+(1-\lambda)\theta_{1})]\leq\min\{
\mathbb{E}_{x}[H(f(x;\theta_{0}))],\mathbb{E}_{x}[H(f(x;\theta_{1}))]\}$.
- ii)
Given $\lambda$ obeyed to (i) and evidence of sample-wise linear feature connectivity (Zhou et al., ), there also exists $\lambda(x)$ such that $\mathbb{E}_{x}[H(f(x;\lambda(x)\theta_{0}+(1-\lambda(x))\theta_{1})]\leq
\mathbb{E}_{x}[H(f(x;\lambda\theta_{0}+(1-\lambda)\theta_{1})]$.

As empirical validation of this hypothesis, Figure 6 shows that the interpolated model actually induces smaller entropy than individuals (i) on average, and DaWin achieves lower entropy than static interpolation (ii). Given the strong correlation between entropy and X-entropy, this hypothesis advocates the benefit of DaWin than static interpolation methods.

### 3.3 Efficient Dynamic Interpolation by Mixture Modeling

Although our primary goal is to achieve better downstream task performance by way of dynamic interpolation, performing interpolation on every sample inevitably increases the inference-time computation, with the cost scaling linearly with the number of model parameters (Lu et al., ). To ensure practicality while pursuing state-of-the-art downstream task performance, we devise an efficient dynamic interpolation method by leveraging mixture modeling.

Let $\{x_{i}\}_{i=1}^{N}$ denote the $N$ test samples and $\{\lambda(x_{i})\}_{i=1}^{N}$ the corresponding interpolation coefficients computed by DaWin framework. Note that $\lambda(x_{i})\in[0,1]$ for all $i=1,\dots,N$, and they can be regarded as sampled observations from some Beta distributions. Then, we accurately model the probability density function of interpolation coefficients via Beta mixture model(^3^33We advocate Beta mixture more than a non-parametric method, e.g., $K$-means, for better performance due to the distributional structure. For cases of more than two models, it can be easily extended to Dirichlet mixture.) as follows:

$$ $\Lambda_{i}\sim\Sigma_{k=1}^{K}\pi_{k}\text{Beta}(\lambda(x_{i});a_{k},b_{k}),$ $$

where $\Lambda_{i}$ indicates random variables of $\lambda(x_{i})$ and $\{\pi_{k}\}_{k=1}^{K}$ are the prior probabilities for each Beta distribution $\text{Beta}(\cdot;a_{1},b_{1}),...,\text{Beta}(\cdot;a_{K},b_{K})$. We initialize the parameters $(a_{k},b_{k})_{k=1}^{K}$ randomly for each Beta distribution and estimate the initial membership of each sample via $K$-means clustering. Then, the expectation-maximization (EM) algorithm is adopted to iteratively refine the parameters of the Beta mixture and the membership inference quality. This process only takes around 30 seconds for 50K samples. Finally, given a test sample $x_{i}$, we infer the membership of that sample via maximum likelihood $k^{*}=\operatorname*{arg\,max}_{k}\text{Beta}(\lambda(x_{i});a_{k},b_{k})$, and use the mean of the corresponding Beta distribution $\frac{a_{k^{*}}}{a_{k^{*}}+b_{k^{*}}}$. This approach significantly reduces the computational burden of sample-wise dynamic interpolation from $N$ (number of test samples) to $K$ (number of pre-defined clusters), where $K\ll N$.
We outline the detailed procedures of DaWin in Algorithm 1 (Appendix A.1).

## 4 Experiments

### 4.1 Setup

Tasks and datasets. We validate DaWin on two scenarios: (1) robust fine-tuning (Wortsman et al., ) and (2) multi-task learning (Ilharco et al., ) with focusing on the top-1 classification accuracy (Acc). Following robust fine-tuning literature (Wortsman et al., ; Kumar et al., ),
we use ImageNet-1K and its five OOD variants, ImageNet-V2, ImageNet-R, ImageNet-A, ImageNet-Sketch, and ObjectNet, to evaluate robustness under distribution shifts. For multi-task learning, we follow the standard evaluation protocol (Ilharco et al., ; Yang et al., ) using eight benchmark datasets: SUN397, Cars, RESISC45, EuroSAT, SVHN, GTSRB, MNIST, and DTD. Please see the Appendix A.2 for the omitted references and description for each dataset.

Models and baselines. For robust fine-tuning, we adopt CLIP ViT-{B/32, B/16, L/14} (Radford et al., ) as zero-shot (ZS) models to ensure a fair comparison with (Wortsman et al., ; ; Ilharco et al., ; Yang et al., ), and fine-tuned (FT) checkpoints for each backbone from Jang et al. () (see details in Appendix A.2). For the weight interpolation baseline methods, we include WiSE-FT (Wortsman et al., ), Model Soup (Wortsman et al., ), and Model Stock (Jang et al., ), along with the traditional output ensemble method. In addition, we consider several state-of-the-art robust fine-tuning methods such as LP-FT (Kumar et al., ), CAR-FT (Mao et al., ), FLYP (Goyal et al., ), Lipsum-FT (Nam et al., ), and CaRot (Oh et al., ). For multi-task learning, we use CLIP ViT-B/32 as our backbone and consider the model merging baselines as follows: weight averaging, Fisher Merging (Matena & Raffel, ), RegMean (Jin et al., ), Task Arithmetic (Ilharco et al., ), Ties-Merging (Yadav et al., ), AdaMerging (Yang et al., ), and Pareto Merging (Chen & Kwok, ). For a fair comparison, we do not experiment with other training-intensive dynamic methods that introduce lots of additional parameters (Tang et al., ), the post-hoc methods (Yang et al., ) and test-time prompt tuning (Shu et al., ), which are orthogonal to baseline and our methods. For DaWin, we set $K$ to 3, 5, 2 for ViT-{B/32, B/16, L/14} in the robust fine-tuning and $K=1$ in the multi-task setups.

Figure: Figure 4: ID and OOD trade-off analysis. Trade-offs in terms of ID and OOD classification accuracy on ImageNet distribution shift benchmarks with CLIP ViT-{B/32, B/16, L/14} from left to right. The hyperparameter grid of WiSE-FT is set to $\{0.1,0.2,...,0.9\}$. DaWin achieves performance beyond the Pareto-optimal points given two models, ZS and FT (See Figure A in Appendix A.3 for more results).
Refer to caption: x2.png

### 4.2 Results on Robust Fine-tuning

Better performance trade-off between ID and OOD.
In Figure 4, we present the accuracy for ID ($x$-axis) and OOD average ($y$-axis) across three backbone models, along with baseline performance. Achieving superior ID/OOD trade-offs beyond or even comparable to the WiSE-FT hyperparameter sweep is challenging. Nevertheless, DaWin provides a remarkably better performance trade-off compared to baseline methods. It is also worth noting that DaWin does not require any hyperparameter tuning. Instead, it dynamically generates interpolation coefficients solely based on the trained models’ output. This distinguishes DaWin from other hyperparameter-intensive fine-tuning such as CaRot (Oh et al., ) and Lipsum-FT (Nam et al., ) or existing interpolation methods (Wortsman et al., ). Table 2 provides detailed train/inference costs and ID/OOD accuracies. Compared with Model Soups (Uniform and Greedy Soups) and Model Stock, which require more than two models to ensure diversity among interpolation candidate models (Wortsman et al., ) or periodic interpolations during training (Jang et al., ), DaWin operates with only a single fine-tuned model while achieving significantly better performance trade-off. These trends hold across other backbones (see Tables 4.2 and 4.2), verifying DaWin’s generality in terms of modeling scale. Although DaWin compromises the inference-time efficiency for accuracy, given that existing works typically require hyperparameter tuning in practice (Wortsman et al., ), relative computation overhead is minor given that we set $(K+M)\lesssim H$ in all our experiments (See Figure 8).

**Table 2: Accuracy on ImageNet (ID) and its OOD for CLIP ViT-B/32. Cost (T, I) denote the number of training runs required to build the final model and the number of evaluations during inference, respectively. Given $M$ models, $N$ denotes the number of test samples, and $H$ and $K$ denote the size of the hyperparameter grid and the number of mixture components, respectively. Note that $(K+M)\lesssim H$ in all our experiments. Coefficients for Output ensemble and WiSE-FT were picked by grid search on ID validations set.**
| Method | Cost (T) | Cost (I) | ImageNet Acc (ID) | Avg. Acc on OOD |
| --- | --- | --- | --- | --- |
| ZS | - | $\mathcal{O}(1)$ | 63.35 | 48.48 |
| FT | 1 | $\mathcal{O}(1)$ | 78.35 | 47.08 |
| Output ensemble | 1 | $\mathcal{O}(M)$ | 78.97 | 51.76 |
| WiSE-FT (Wortsman et al., ) | 1 | $\mathcal{O}(H)$ | 79.14 | 51.02 |
| Uniform Soup (Wortsman et al., ) | 48 | $\mathcal{O}(1)$ | 79.76 | 52.08 |
| Greedy Soup (Wortsman et al., ) | 48 | $\mathcal{O}(1)$ | 80.42 | 50.83 |
| Model Stock (Jang et al., ) | 2+$\alpha$ | $\mathcal{O}(1)$ | 79.89 | 50.99 |
| DaWin w/o mixture modeling | 1 | $\mathcal{O}(N+M)$ | 78.71 | 54.41 |
| DaWin | 1 | $\mathcal{O}(K+M)$ | 78.70 | 54.36 |

Ablation study. We explore alternative metrics beyond entropy for estimating sample-wise model expertise, as shown in Figure 5. Specifically, we consider four different pseudo label (PL) approaches (Lee et al., ) to replace the entropy, $\{\hat{y},\tilde{y}\}\times\{\text{soft},\text{hard}\}$, where $\hat{y}=\frac{1}{2}f(x;\theta_{0})+\frac{1}{2}f(x;\theta_{1})$ and $\tilde{y}=f(x;\frac{1}{2}\theta_{0}+\frac{1}{2}\theta_{1})$. The settings $\{\text{soft},\text{hard}\}$ indicate whether the argmax operation is applied to PL or not. We observe that some PLs slightly outperform entropy in terms of ID accuracy but bring no gains in OOD accuracy. To maintain simplicity in line with Occam’s razor (Good, ), we adopt entropy as the expertise metric on unlabeled test samples.

Figure: Figure 5: Effectiveness of our expertise metric. We evaluate five different expertise metrics on ID (left) and OOD (right). Entropy ($H$) behaves like loss ($l$) with the pseudo labels, where its performance nearly matches or surpasses the best-performing $l$ though its simplicity.

Figure: Table 3: Accuracy on ImageNet (ID) and distribution shifts (OOD) for CLIP ViT-B/16.

Entropy analysis. Our DaWin method is built on the correlation between entropy and X-entropy. While the analyses from Sec. 2.2 support using entropy as a proxy of X-entropy, it does not answer how the entropy of interpolated final models behaves. To explore this, we analyze the average entropy of interpolated models generated by DaWin in Figure 6. We see that the simple weight averaging (WA) produces lower entropy compared to individual models, and our DaWin achieves the lower entropy in all cases. This indicates that DaWin’s expertise-based interpolation successfully weighs individual experts for accurate prediction and decreases per-sample entropy accordingly. In Sec. 6, we further provide a discussion on the analytic behavior of DaWin’s weighting strategy.

Figure: Figure 6: Entropy comparison on ImageNet-A for CLIP ViT-B/32. We visualize the average entropy from each method on the entire dataset and four different splits based on the correctness of zero-shot (ZS) and fine-tuned (FT) models. Compared with individual models, weight averaging (WA) induces lower entropy overall, and our DaWin achieves the lowest entropy across all splits (See Figure F in Appendix for full results).
Refer to caption: x5.png

Applications: dynamic selection and dynamic output ensemble. Given that DaWin is motivated by the concept of “entropy as a measure of model expertise,” we can extend this beyond weight interpolation to two other approaches, dynamic classifier selection (DCS; Giacinto & Roli (); Britto et al. ()) and dynamic output ensemble (DOE; Alam et al. (); Li et al. ()).

**Table 5: Results of per-sample dynamic classifier selection (DCS), dynamic output ensemble (DOE), and dynamic weight interpolation (DaWin) on ImageNet (ID) and under distribution shifts (OOD) for different CLIP ViT backbone models.**
|  | Model | Method |  |  |  |
| --- | --- | --- | --- | --- | --- |
|  | FT | DCS | DOE | DaWin |  |
| ID | B/32 | 78.35 | 78.59 | 78.71 | 78.71 |
| B/16 | 82.80 | 82.15 | 83.24 | 83.38 |  |
| L/14 | 87.07 | 86.53 | 87.07 | 86.88 |  |
| OOD | B/32 | 47.08 | 52.87 | 52.71 | 54.41 |
| B/16 | 56.25 | 64.90 | 64.85 | 66.85 |  |
| L/14 | 70.59 | 74.71 | 75.14 | 76.01 |  |

To be specific, DCS aims to select the most suitable classifier for each test sample based on the competence (referred to as expertise in our terminology) among multiple classifiers. We provide the results of DCS by adopting entropy as a competence measurement for classifier selection, *i.e*., selecting a lower entropy model per sample. Besides, we also present a dynamic output ensemble (DOE) by our $\lambda(x)$ directly on the output probability space rather than weight space. In Table 5, we see that entropy-based DCS and DOE bring large performance gains compared with a single fine-tuned model (FT), while the DaWin achieves the largest gain. This implies that users can flexibly build their dynamic system using test sample entropy according to their budget and performance criteria.

### 4.3 Results on Multi-task Learning

We now evaluate existing merging approaches and our DaWin on multi-task learning benchmarks with CLIP ViT-B/32. Following the standard evaluation protocol (Yang et al., ), we have $M$ tasks and models individually fine-tuned on each task (where $M=8$). We do not know where each test sample arises from during evaluation and cannot choose true experts per domain.
While both AdaMerging and DaWin use unlabeled testset, DaWin produces dynamic merged models given tasks or samples, whereas AdaMerging induces a single merged model for all tasks by default.

Figure: Figure 7: Merging coefficient visualization. We visualize DaWin’s coefficients across 8 datasets (columns) with 8 fine-tuned models (rows).
Refer to caption: x6.png

Here, we modify the interpolation formula in Sec. 2.1 into task arithmetic formulation, *i.e*., given weights of pre-trained model $\theta_{0}$ and fine-tuned models $\{\theta_{j}\}_{j=1}^{M}$, a dynamic interpolation is defined as $\theta_{\lambda(x)}=\theta_{0}+\lambda_{0}\sum_{j=1}^{M}\lambda_{j}(x)\tau_{j}$ where $\tau_{j}=\theta_{j}-\theta_{0}$, $\lambda_{j}(x)$, and $\lambda_{0}$ denote the task vector (Ilharco et al., ), weight for $j$-th task vector, and scaling term (set to $0.3$ following Ilharco et al. ()), respectively. In Table 6, DaWin greatly outperforms advanced weight averaging methods (Jin et al., ) and adaptive merging methods (Chen & Kwok, ) that require tough training, whereby approaching a ground truth expert selection method, e.g., Individuals$\dagger$. This verifies the versatility of DaWin, which is beneficial for adapting the model on multiple tasks as well as a single-task setup. Figure 7 shows the average of estimated sample-wise coefficients (y-axis) per dataset (x-axis). DaWin assigns the highest weights to true experts (diagonal) per task and leverages relevant experts by reflecting task-wise similarity, e.g., SVHN $\Leftrightarrow$ MNIST for digit recognition and EuroSAT $\Leftrightarrow$ RESISC45 for scenery classification.

**Table 6: Multi-task learning performance. We use CLIP ViT-B/32 for evaluation across eight benchmark tasks. $\dagger$ denotes optimal-like performance using the ground truth domain indicator to select models for each domain. We report the layer-wise method for AdaMerging (Yang et al., ) here, which surpasses those of the task-wise method. Note that AdaMerging and Pareto Merging both require a non-trivial amount of training.**
| Method | SUN397 | Cars | RESISC45 | EuroSAT | SVHN | GTSRB | MNIST | DTD | Avg. |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Pre-trained | 63.2 | 59.6 | 60.2 | 45.2 | 31.6 | 32.6 | 48.3 | 44.4 | 48.1 |
| Jointly fine-tuned | 73.9 | 74.4 | 93.9 | 98.2 | 95.8 | 98.9 | 99.5 | 77.9 | 88.9 |
| Individuals$\dagger$ | 75.3 | 77.7 | 96.1 | 99.8 | 97.5 | 98.7 | 99.7 | 79.4 | 90.5 |
| Weight Average (Ilharco et al., ) | 65.3 | 63.3 | 71.4 | 72.6 | 64.2 | 52.8 | 87.5 | 50.1 | 65.9 |
| Fisher Merging (Matena & Raffel, ) | 68.6 | 69.2 | 70.7 | 66.4 | 72.9 | 51.1 | 87.9 | 59.9 | 68.3 |
| RegMean (Jin et al., ) | 65.3 | 63.5 | 75.6 | 78.6 | 78.1 | 67.4 | 93.7 | 52.0 | 71.8 |
| Task Arithmetic (Ilharco et al., ) | 55.3 | 54.9 | 66.7 | 75.9 | 80.2 | 69.7 | 97.3 | 50.1 | 68.8 |
| Ties-Merging (Yadav et al., ) | 65.0 | 64.3 | 74.7 | 75.7 | 81.3 | 69.4 | 96.5 | 54.3 | 72.6 |
| AdaMerging (Yang et al., ) | 64.2 | 68.0 | 79.2 | 93.0 | 87.0 | 92.0 | 97.5 | 58.8 | 80.0 |
| AdaMerging++ (Yang et al., ) | 65.8 | 68.4 | 82.0 | 93.6 | 89.6 | 89.0 | 98.3 | 60.2 | 80.9 |
| Pareto Merging (Chen & Kwok, ) | 71.4 | 74.9 | 87.0 | 97.1 | 92.0 | 96.8 | 98.2 | 61.1 | 84.8 |
| DaWin | 66.2 | 66.7 | 91.3 | 99.2 | 94.7 | 98.1 | 99.5 | 74.6 | 86.3 |

## 5 Related Work

Robust fine-tuning aims to adapt a model on a target task while preserving the generalization capability learned during pre-training. A straightforward approach injects regularization into the learning objective. For example, Ju et al. () proposed a regularization motivated by Hessian analysis, Tian et al. (; ) devised a trainable projection method to constrain the parameter space, CAR-FT (Mao et al., ) devised the context-awareness regularization, and CaRot (Oh et al., ) introduced a regularization based on singular values. Another line of works modifies the training procedure to keep the pre-trained knowledge by decoupling the tuning of a linear head from the entire model (Kumar et al., ), employing a data-dependent tunable module (Lee et al., ), utilizing bi-level optimization (Choi et al., ), or mimicking the pre-training procedure (Goyal et al., ). In contrast, weight interpolation approaches emerged as an effective yet efficient solution that conducts simple interpolation of individual model weights (Izmailov et al., ; Wortsman et al., ; ; Jang et al., ). Unlike existing works inducing a single interpolated model, we propose a dynamic interpolation method that produces per-sample models for better adaptation.

Model merging studies mainly focus on integrating multiple models trained on different tasks into a single model to create a versatile, general-purpose multi-task model. After some seminal works in the era of foundation models (Ilharco et al., ; ; Jin et al., ), numerous advances have been made those aim at reducing conflict between merged parameters (Yadav et al., ; Yu et al., ; Marczak et al., ), merging with weight disentanglement (Wang et al., ; Ortiz-Jimenez et al., ; Jin et al., ), optimizing interpolation coefficients on unlabeled test samples (Yang et al., ; Chen & Kwok, ) or learning additional modules generating per-sample/domain coefficients dynamically (Cheng et al., ; Lu et al., ; Tang et al., ; Yang et al., ). While those methods provide huge performance gains compared with static methods such as (Wortsman et al., ), they all bring extra learnable modules and training. We focus on methods that do not induce extra complex training and devise a training-free dynamic merging method, DaWin, which seeks a good trade-off between efficiency and downstream performance.

Figure: Figure 8: Accuracy and wall-clock inference time with CLIP ViT-B/32. We compare search-based methods, a test-time method (AdaMerging), and ours regarding the accuracy and inference time on robust fine-tuning (left) and multi-task learning evaluation on the SVHN dataset (right).
Refer to caption: x7.png

## 6 Discussion

Accuracy and runtime trade-off.
While we focus on improving accuracy through model merging approaches, it is crucial to ensure the extra computation demands of DaWin during inference are manageable. Fig. 8 presents trade-offs between the accuracy and wall-clock time for various merging methods. For methods requiring hyperparameter tuning, e.g., WiSE-FT and Task Arithmetic, the wall-block time (logarithm of second) reflects a cumulative time for evaluations across all hyperparameters. For methods like DaWin or AdaMerging, we include the time required for additional workloads. In both settings, DaWin shows favorable trade-offs that outperform the most efficient one in terms of accuracy while its runtime is far less than computation-heavier methods such as per sample interpolation without mixture modeling (Sample-wise Interp.) or AdaMerging. Thus, DaWin provides a high-performing merging solution that can be flexibly adapted considering a given cost budget.

Theoretical analysis. To understand the empirical success of DaWin, we present an analytic behavior of entropy-based dynamic weight interpolation in contrast to input-independent uniform weight interpolation, which yields a uniform interpolation coefficient (Wortsman et al., ).

###### Lemma 6.1 ( Expert-biased weighting behavior of DaWin ; Proof is deferred to Appendix A.4 ) .

Suppose we have $M$ different models $\{f(\cdot;\theta_{j})\}_{j=1}^{M}$ parameterized by $\{\theta_{j}\}_{j=1}^{M}$ with a homogeneous architecture defined by $f(\cdot)$. Let $\lambda(x)=(\lambda_{1}(x),\dots,\lambda_{M}(x))$ be the sample-wise interpolation coefficient vector given $x$. If the models that render a correct prediction for $x$ always have smaller output entropy $H(\cdot)$ compared with the models rendering an incorrect prediction, DaWin’s interpolation coefficients of true experts for the sample $x$ are always greater than $\frac{1}{M}$. That is,

$$ $\displaystyle\lambda_{j\in\mathcal{J}}(x)\geq\frac{1}{M}\;\;$ $\displaystyle\text{where}\;\;\mathcal{J}=\{i|\operatorname*{arg\,max}_{c}[f(x; \theta_{i})]_{c}=y\}\;\;\text{if}\;\;H(f(x;\theta_{j\in\mathcal{J}}))\leq H(f( x;\theta_{k\notin\mathcal{J}}))\;\;\forall j\;\text{and}\;k,$ $$

where $[f(x;\theta)]_{c}$ indicates the probability mass for class $c$. Lemma 6.1 implies that, under the entropy-dominancy assumption, DaWin always produces per-sample expert-biased coefficient vectors, which result in the interpolated models being biased towards true experts, i.e., models that produce correct prediction given $x$. This desirable behavior is aligned with the motivation of dynamic classifier selection discussed in Sec. 4.2, whereas DaWin conducts interpolation rather than selection. Meanwhile, as the number of models participating in interpolation increased, samples that at least one model correctly classifies also increased. Therefore, the coverage of DaWin for weighing the correct experts expands accordingly. This analysis endows a potential clue for remarkable gains observed in the multi-task setting, which conducts merging beyond two models (See Sec. 4.3).

Conclusion. This work has presented a novel training-free dynamic weight interpolation method, DaWin, that estimates the sample-wise model expertise with output entropy to produce reliable per-sample interpolation coefficients. We further proposed a mixture modeling approach, which greatly enhances computational efficiency. We then extensively evaluated DaWin with three different backbone models on two application scenarios, robust fine-tuning and multi-task learning, spanning 14 benchmark classification tasks. Regarding ID/OOD trade-offs in robust fine-tuning setup and overall accuracy in multi-task setup, DaWin consistently outperforms existing methods, implying its generality. This empirical success was further explained by discussing an analytic behavior of DaWin.

###### Lemma 6.1 ( Expert-biased weighting behavior of DaWin ; Proof is deferred to Appendix A.4 ) .

#### Acknowledgments

We thank the researchers and interns at NAVER AI Lab – Byeongho Heo, Taekyung Kim, Sanghyuk Chun, Sehyun Kwon, Yong-Hyun Park, and Jaeyoo Park – for their invaluable feedback. Most of the experiments are based on the NAVER Smart Machine Learning (NSML) platform (Sung et al., ). We also appreciate on the constructive comments from Max Khanov, Hyeong Kyu Choi, and Seongheon Park at University of Wisconsin–Madison. This work was supported by Institute of Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (RS-2022-00143911, AI Excellence Global Innovative Leader Education Program) and the National Research Foundation of Korea (NRF) grant funded by the Korea government(MSIT)(RS-2024-00457216, 2022R1A4A3033874)

## Appendix A Appendix

We provide the following items in this Appendix:

- •
(A.1) Algorithm and additional details on DaWin
- •
(A.2) Additional details on the experiment setup
- •
(A.3) Additional empirical results
- •
(A.4) Missing proof
- •
(A.5) Limitation and future work

### A.1 Algorithm and additional details on DaWin

Figure: Algorithm 1 Procedure for training-free dynamic weight interpolation (DaWin)

##### Incorporating domain-wise expertise.

While the eq equation 1 yields sample-wise interpolation coefficients solely based on the per-sample expertise estimation, if we can access the whole test samples simultaneously, we can refine the coefficient computation by introducing domain-wise offset terms. These terms are automatically estimated by the per-domain entropy of each model. Given the significant performance improvements with domain-wise dynamic interpolation (*c.f.* Table 1), we expect domain-wise expertise per model can be a complimentary benefit to compute the interpolation coefficient. Therefore, we modify the sample-wise coefficient term in Eq. 1 as below:

$$ $\displaystyle\lambda(x)$ $\displaystyle=\frac{\exp(-H(f(x;\theta_{1})))+O({X})/T({X})}{\exp(-H(f(x; \theta_{0})))+\exp(-H(f(x;\theta_{1})))+O({X})},$ (2) $\displaystyle O(X)$ $\displaystyle=\frac{1}{2}(\frac{\text{std}(H(f(X;\theta_{0})))}{\text{mean}(H( f(X;\theta_{0})))}+\frac{\text{std}(H(f(X;\theta_{1})))}{\text{mean}(H(f(X; \theta_{1})))})\quad\;T(X)=\frac{H(f(X;\theta_{0}))+H(f(X;\theta_{1}))}{H(f(X; \theta_{0}))},$ $$

where $O({X})$ and $T({X})$ denote the per-domain offset (formulated as an average coefficient of variation) and relative domain expertise terms, respectively. By incorporating domain-wise expertise, DaWIN offers more stable dynamic interpolation coefficients, correcting some of the inaccuracies in sample-wise estimation (see Table A). It is worth noting that these sample-wise and domain-wise expertise estimations do not require any hyperparameters for computing interpolation coefficients. This eliminates the need for intensive hyperparameter tuning that is often required in prior works (Wortsman et al., ; Ilharco et al., ) to achieve the best performance.

##### X-entropy ratio and likelihood ratio.

Let $f(x;\theta)=p_{\theta}(y|x)$ be a classifier parameterized with $\theta$ that models the ground truth conditional probability distribution $p(y|x)$. Given that we observe one-hot encoded target labels so that $l(f(x;\theta),y)=-\log(p_{\theta}(y|x))$, then we can rewrite the oracle sample-wise coefficient in Sec 2.2 as follow, $\lambda^{*}(x)=p_{\theta_{1}}(y|x)/(p_{\theta_{0}}(y|x)+p_{\theta_{1}}(y|x))$.

##### Details on Beta Mixture Model (BMM) with Expectation Maximization algorithm.

To enhance the inference-time efficiency of dynamic interpolation, we propose a mixture modeling approach over the estimated per-sample interpolation coefficients to reduce the number of interpolation operations from $N$ (entire test sample) to $K$ (pre-defined number of mixture components). Here, we elaborate on the detailed procedure of Beta Mixture Modeling(^4^44The same procedure is adopted for the Dirichlet Mixture Model in multi-task learning scenario by modifying the probability density function from Beta distribution to Dirichlet distribution.).

We have coefficient estimates over $N$ test samples via Eq. 1 or Eq. 2 as $\{\lambda(x_{i})\}_{i=1}^{N}$. Our goal is to model those coefficients with a mixture of $K$ Beta distributions as below:

$$ $\displaystyle\text{Beta}(\lambda(x_{i});a_{k},b_{k})=\frac{\Gamma(a_{k}+b_{k}) }{\Gamma(a_{k})\Gamma(b_{k})}\lambda(x_{i})^{a_{k}-1}(1-\lambda(x_{i}))^{b_{k} -1}$ (3) $\displaystyle p(\lambda(x_{i}))=\sum_{k=1}^{K}\pi_{k}\text{Beta}(\lambda(x_{i} );a_{k},b_{k})$ (4) $$

where $a_{k}>0$ and $b_{k}>0$ are the shape parameters of component $k$, $\Gamma(\cdot)$ and $\pi_{k}$ denote the Gamma function and mixing prior probabilities for each Beta component satisfying $\sum_{k=1}^{K}\pi_{k}=1$ and $\pi_{k}\geq 0$. We first initialize the responsibilities $\{\gamma_{ik}\}$ by applying K-Means clustering to $\{\lambda(x_{i})\}$ to assign the initial membership per each observation to one of $K$ components. We also initialize the parameter estimates of BMM as below:

$$ $\displaystyle\text{Mixing Priors}(\pi_{k}):\pi_{k}^{(0)}$ $\displaystyle=\frac{N_{k}^{(0)}}{N},\quad\text{where}\;\;N_{k}^{(0)}=\sum_{i=1 }^{N}\gamma_{ik}^{(0)}.$ (5) $\displaystyle\text{Shape Parameters}(a_{k},b_{k}):a_{k}^{(0)}$ $\displaystyle=C_{k}^{(0)}\times\bar{\lambda}_{k}^{0}+\epsilon,$ (6) $\displaystyle b_{k}^{(0)}$ $\displaystyle=C_{k}^{(0)}\times(1-\bar{\lambda}_{k}^{(0)})+\epsilon$ (7) $\displaystyle\text{where}\;\;\bar{\lambda}_{k}^{(0)}$ $\displaystyle=\frac{1}{N_{k}^{0}}\sum_{i=1}^{N}\gamma_{ik}^{(0)}\lambda(x_{i}),$ (8) $\displaystyle s^{2,(0)}_{k}$ $\displaystyle=\frac{1}{N_{k}^{0}}\sum_{i=1}^{N}\gamma_{ik}^{(0)}(\lambda(x_{i} )-\bar{\lambda}^{(0)}_{k})^{2},$ (9) $\displaystyle C_{k}^{(0)}$ $\displaystyle=\frac{\bar{\lambda}_{k}^{0}(1-\bar{\lambda}_{k}^{0})}{s^{2,(0)}_ {k}}-1,$ (10) $$

where $\epsilon$ is a small positive constant to ensure numerical stability. Here, the initial shape parameters are estimated by method-of-moments (Pearson, ). Then, we conduct the expectation step (E-step) and the maximization step (M-step) alternatively until convergence to refine the parameter estimate as follows:

- •
E-step:
–
Compute log responsibilities $\text{ln}\gamma^{(t)}_{ik}$.
–
Update responsibilities $\gamma^{(t)}_{ik}=\text{exp}(\text{ln}\gamma^{(t)}_{ik})$.
- •
M-step:
–
Update mixing priors $\pi_{k}^{(t+1)}$.
–
Update shape parameters $a_{k}^{(t+1)},b_{k}^{(t+1)}$ using method-of-moments estimation.
- •
Convergence Check:
–
Compute log-likelihood $\mathcal{L}^{(t+1)},\;\;\text{where}\;\mathcal{L}^{(t)}=\sum_{i=1}^{N}\text{ln
}p(\lambda({x_{i}}))$
–
If $|\mathcal{L}^{(t+1)}-\mathcal{L}^{(t)}|<\text{tolerence}$, stop the iterations.

Then, we get the estimated parameter $\Theta=\{\pi_{k},a_{k},b_{k}\}_{k=1}^{K}$ of BMM to infer per-sample weight interpolation coefficients.

### A.2 Additional details on the experiment setup

In this section, we provide extended details for task definition, baseline methods, and implementation details. Some contents might be duplicated from the main paper.

#### A.2.1 Tasks and Datasets

We validate DaWin on two scenarios: (1) robust fine-tuning (Wortsman et al., ) and (2) multi-task learning (Ilharco et al., ) with focusing on the top-1 classification accuracy (Acc). Following robust fine-tuning literature (Wortsman et al., ; Kumar et al., ), we use ImageNet-1K (Russakovsky et al., ) and its five variants, ImageNet-V2 (Recht et al., ), a post-decade reproduced version of the original ImageNet test set by following the dataset generating process of ImageNet, ImageNet-R (Hendrycks et al., ), a rendition-specific collection of 200 ImageNet classes, ImageNet-A (Hendrycks et al., ), an actual examples from ImageNet test set misclassified by a ResNet-50 model over 200 ImageNet classes, ImageNet-Sketch (Wang et al., ), a sketch-specific collection of 1000 ImageNet classes, and ObjectNet (Barbu et al., ) for evaluating robustness under distribution shifts. For multi-task learning, we follow the standard evaluation protocol (Ilharco et al., ; Yang et al., ) using eight benchmark datasets from the optical character images, traffic signs, scenery or satellite imagery, and fine-grain categorization over cars and texture: SUN397 (Xiao et al., ), Cars (Krause et al., ), RESISC45 (Cheng et al., ), EuroSAT (Helber et al., ), SVHN (Yuval, ), GTSRB (Stallkamp et al., ), MNIST (LeCun, ), and DTD (Cimpoi et al., ).

#### A.2.2 Models and Baselines

For robust fine-tuning, we adopt CLIP ViT-{B/32, B/16, L/14} (Radford et al., ) as zero-shot (ZS) models to ensure a fair comparison with (Wortsman et al., ; ; Ilharco et al., ; Yang et al., ), and fine-tuned (FT) checkpoints for each CLIP ViT backbone from Jang et al. ().
For the weight interpolation baseline methods, we include WiSE-FT (Wortsman et al., ), which conducts a weight interpolation between a pre-trained model and a fine-tuned model given a single pre-defined interpolation coefficient, Model Soup (Wortsman et al., ), which conducts averaging of all models’ weights (Uniform Soup) or greedily selected models’ weights (Greedy Soup) trained with different training hyperparameter configurations, and Model Stock (Jang et al., ), iteratively interpolate a pre-trained model with few fine-tuning model based on the cosine distance between pre-trained model weight and the fine-tuning model weights, along with the traditional output ensemble method. In addition, we consider several state-of-the-art robust fine-tuning methods such as LP-FT (Kumar et al., ), a two-stage method to avoid pre-trained feature distortion, CAR-FT (Mao et al., ), a regularized fine-tuning method leveraging context-aware prompt, FLYP (Goyal et al., ), a contrastive learning based fine-tuning method, Lipsum-FT (Nam et al., ), a regularized fine-tuning method motivated by energy score gap between zero-shot and fine-tuned models, and CaRot (Oh et al., ), a theory-inspired singular value regularization method.

For multi-task learning, we use CLIP ViT-B/32 as our backbone and consider the model merging baselines as follows: a simple weight averaging (Ilharco et al., ), Fisher Merging (Matena & Raffel, ), a Fisher information metric-based weighted averaging method, RegMean (Jin et al., ), an averaging method that minimizes $L_{2}$ distance between the averaged weight and individual weights, Task Arithmetic (Ilharco et al., ), a method perform arithmetic across task vectors rather the original weight vector itself which are produced by the subtractions between a pre-trained model weight and individual fine-tuned model weights, Ties-Merging (Yadav et al., ), a post-hoc weight refinement method mitigating conflicts between task vectors, AdaMerging (Yang et al., ) and Pareto Merging (Chen & Kwok, ) methods those driving additional optimization procedure to a global interpolation coefficient and the conditional coefficient generation models that trained to minimize entropy over entire test sample.

#### A.2.3 Implementation Details

For fine-tuning CLIPs on ImageNet, Wortsman et al. () and its successor (Jang et al., ) conducted multiple training with different training configurations such as data augmentation, learning rate, weight decay, and random initialization seeds given fixed epochs (16) and batch size (512). Here, we use the best model weight provided by the authors of Jang et al. () per each backbone. For fine-tuning weights of CLIP on multi-task learning setup, we adopt the official checkpoints from Ilharco et al. () on the eight datasets.

On DaWin’s evaluation, we first get the entropy of batch test samples from the interpolation candidate models(^5^55Candidate models are constituted with the pre-trained and fine-tuned models for robust fine-tuning setting, the task-specific eight fine-tuned models for multi-task learning setting.) (wherein temperature scaling (Guo et al., ) is applied in the robust fine-tuning setup with ID validation set), then we compute interpolation coefficients by building a softmax-like model expertise ratio term with exponentiated negative entropy of each model. We further perform the mixture modeling over the batch test samples and finally conduct dynamic model merging with interpolation coefficients corresponding to estimated membership from the fitted mixture model to obtain the prediction per sample. About the Beta (on robust fine-tuning setup) and Dirichlet (on multi-tasks learning setup) mixture modeling on interpolation coefficients for DaWin, we set $K$ to 3, 5, 2 for ViT-{B/32, B/16, L/14} in the robust fine-tuning and $K=1$ in the multi-task setups. Unless otherwise mentioned, we adopt the offset adjustment term (Eq. equation 2) by default, assuming that the entire test samples per task are available and fit the Beta (and Dirichlet) mixture model on the entire coefficients per task, likewise assumption of Yang et al. (; ); Chen & Kwok ().

### A.3 Additional empirical results

**Table A: Ablation study on offset adjustment. We validate the effect of using the offset adjustment term on ImageNet ID and OOD accuracy.**
| Model | Offset Adjustment | ID | Avg. Acc on OOD |
| --- | --- | --- | --- |
| ViT-B/32 | - | 78.3 | 54.1 |
| ✓ | 78.7 | 54.4 |  |
| ViT-B/16 | - | 83.1 | 66.6 |
| ✓ | 83.4 | 66.9 |  |
| ViT-L/14 | - | 86.7 | 75.9 |
| ✓ | 86.9 | 76.0 |  |

We ablate the offset adjustment and expertise metric to investigate the effectiveness of the design choices of each component. Firstly, as we can see in Table A, offset adjustment consistently boosts the ID and OOD accuracy across all cases, which supports the use of domain-wise relative expertise (average entropy over all test samples) to enhance sample-wise expertise estimation.

**Table B: Sensitivity analysis on sample size. We report DaWin’s ImageNet and its OOD variants’ accuracy of CLIP ViT-B/32 under varying sample wise for fitting Beta Mixture Model. DaWin shows robustness against varying sample size.**
| Sample size | ImageNet Accuracy | Avg. Acc on OOD |
| --- | --- | --- |
| 32 | 78.55 | 54.30 |
| 64 | 78.69 | 54.27 |
| 128 | 78.71 | 54.27 |
| 256 | 78.70 | 54.28 |
| 512 | 78.70 | 54.25 |
| 1024 | 78.71 | 54.24 |
| 2048 | 78.67 | 54.26 |
| $N$ | 78.70 | 54.36 |

To secure inference time efficiency, we adopt the Beta mixture modeling approach on the batch-wise DaWin’s coefficients. The fitness of the Beta mixture model may be improved as the sample size is increased, whereas a smaller sample size enables more granular interpolations to be applied. Therefore, we evaluate the performance of DaWin under varying sample sizes. Table B presents the ID and OOD performance of DaWin on the ImageNet distribution shift benchmark for the CLIP ViT-B/32 backbone model. DaWin shows strong robustness against varying sample sizes.

Figure: Figure A: ID and OOD trade-off analysis. We visualize performance trade-offs regarding ID and OOD classification accuracy on the ImageNet distribution shift benchmarks with CLIP ViT-$\{$B/32, B/16, L/14$\}$ from left to right. Interpolation coefficients are swept over $\{0.1,0.2,...,0.9\}$.
Refer to caption: x9.png

In Figure A, we present the results of DaWin with WiSE-FT as a plug-in augmentation on the robust fine-tuning setup. We multiply our estimated coefficients from Beta mixture by a scalar coefficient $\alpha$, e.g., $\lambda_{wise}(x)=\lambda(x)\times\alpha$. Although it brings slight benefits in the case of CLIP ViT-B/32, the WiSE-FT interpolation trace becomes almost a line on the ViT-B/16 and ViT-L/14 cases. This implies that DaWin already achieves performance beyond the Pareto-optimal trade-offs and cannot be further improved by WiSE-FT, given models $f(\cdot;\theta_{0})$ and $f(\cdot;\theta_{1})$. Meanwhile, Figure B reveals that DaWin produces larger $\lambda(x)$ for samples that are hard to recognize the target object due to overwhelming background semantics, which the pre-trained model may wrongly pay attention to.

Figure: Figure B: DaWIN’s bottom-5 and top-5 estimated coefficient analysis. We visualize the images with labels corresponding to bottom-5 and top-5 sample-wise interpolation coefficients estimated by DaWIN of pre-trained and ImageNet fine-tuned CLIP ViT-B/32. Each row denotes the actual test samples from ImageNet, ImageNet-V2, ImageNet-R, ImageNet-A, ImageNet-Sketch, and ObjectNet. We see that the images corresponding to coefficients lean towards the fine-tuned model, which typically contains multiple semantics, and the object corresponding to the ground truth label is overwhelmed by other semantics.
Refer to caption: x12.png

Figure: Figure C: Correlation between entropy and X-entropy. We split each testset into four subsets (TrueTrue, TrueFalse, FalseTrue, FalseFalse) based on the correctness of the two models’ predictions. On each data split and the entire dataset, we visualize scatter plots of entropy (x-axis) and cross-entropy (y-axis) computed by two models (zero-shot and fine-tuned) with corresponding Pearson correlation coefficients per model. Each row from top to bottom shows results from ImageNet, ImageNetV2, ImageNetR, ImageNetA, ImageNetSketch, and ObjectNet.
Refer to caption: x13.png

DaWin adopts entropy as a proxy of X-entropy to estimate the model expertise without access to the true target label. Figure C presents the correlation between entropy and X-entropy of the pre-trained CLIP ViT-B/32 $f(\cdot;\theta_{0})$ and ImageNet fine-tuned counterpart $f(\cdot;\theta_{1})$. Results indicate that the model producing correct predictions holds a strong correlation between entropy and X-entropy while the model failing to correctly predict test samples shows bad or no correlation. However, if at least one model success in making a correct prediction in a given sample $x$, and the entropy of the correct predictor may be smaller than that of another model, thereby DaWin would be likely to produce $\lambda(x)$ biased towards the correct predictor’s weight (See Lemma 6.1).

Figure: Figure D: Correlation between entropy ratio and X-Entropy ratio. We split each testset into four subsets (TrueTrue, TrueFalse, FalseTrue, FalseFalse) based on the correctness of the two models’ predictions. On each split and the entire dataset, we visualize scatter plots of entropy ratio (x-axis) and cross-entropy ratio (y-axis) computed by two models (zero-shot and fine-tuned) with corresponding Pearson correlation coefficients. Each row from top to bottom shows results from ImageNet, ImageNetV2, ImageNetR, ImageNetA, ImageNetSketch, and ObjectNet.
Refer to caption: x14.png

In Figure D, we provide the extended results of Figure 2, showing the correlations between entropy ratio and X-entropy ratio, on the whole evaluation datasets of robust fine-tuning setup. The entropy ratio approximates the X-entropy ratio overall across datasets and sub-populations of each dataset, even though for the most challenging OOD, i.e., ImageNet-A, which is constructed with natural adversarial examples, there is a weak-yet-non-trivial correlation (Schober et al., ) between entropy and X-entropy. Moreover, we note that weight interpolation (or output ensemble) has an advantage that elicits the correct prediction by modifying the relative feature importance (Yong et al., ) even though two individual models fail to produce correct predictions (i.e., in the FalseFalse case), thereby expected to outperform the model selection method (See Table 5).

Figure: Figure E: Estimated coefficient density analysis on ImageNet distribution shift benchmarks with CLIP ViT-B/32. We visualize histograms of estimated sample-wise interpolation coefficients by the expertise ratio, which is computed using X-entropy (Oracle; we can not access it in reality) and entropy as expertise metrics. Each column denotes the splits $\{\texttt{Entire},\texttt{TrueTrue},\texttt{TrueFalse},\texttt{FalseTrue}, \texttt{FalseFlase}\}$ of the test set, those are categorized by the correctness of zero-shot CLIP, and ImageNet fine-tuned CLIP’s predictions. Each low denotes the result of the test set: from ImageNet, ImageNet-V2, ImageNet-R, ImageNet-A, ImageNet-Sketch, and ObjectNet. Entropy-based coefficient estimation shows remarkably good fitness in the TrueTrue, FalseTrue splits, and produces left-skewed distribution in the case of TrueFalse, which is desired to construct the interpolated model biased towards zero-shot model weight. Overall, except the FalseFalse case, the entropy-based coefficient estimation provides reasonable alternatives to X-entropy-based oracle coefficients.
Refer to caption: x15.png

We visualize the histogram of interpolation coefficients computed by entropy and X-entropy ratio in Figure E. While the entropy-based coefficients quite diverge from the oracle X-entropy-based coefficients in some cases (e.g., TrueFalse and FalseFalse of ImageNet-Sketch and ObjectNet), the overall distributions of entropy-based coefficients show good fitness to X-entropy-based coefficients across datasets. This result supports using entropy as a proxy of X-entropy to estimate model expertise given unlabeled test-time input to determine the per-sample interpolation coefficient.

Figure: Figure F: Entropy comparison on ImageNet distribution shiftㄴ with CLIP ViT-B/32. Across IN, IN-V2, IN-R, IN-A, IN-S, and ObjNet from top to bottom, we visualize the final output entropy from each model on the entire dataset and four different splits based on the correctness of zero-shot (ZS) and fine-tuned (FT) models. Compared with individual models, weight averaging (WA) induces lower entropy overall, and our DaWin achieves the lowest entropy across all splits.
Refer to caption: x16.png

In Figure F, we provide the extended results of Figure 6, showing the average entropy over test samples, on the whole evaluation datasets of robust fine-tuning setup. In almost all of cases, weight interpolation achieves smaller entropy than individual models, and DaWin achieves the smallest entropy. This supports our sample-wise entropy valley hypothesis in Section 3.2 and helps us to understand DaWin’s great performance gains.

### A.4 Missing proof

In Sec. 6, we provided an analytic behavior of DaWin, which generated true-expert biased interpolation weight vectors as below:

###### Lemma A.1 ( Restatement of expert-biased weighting behavior of DaWin ) .

Suppose we have $M$ different models $\{f(\cdot;\theta_{j})\}_{j=1}^{M}$ parameterized by $\{\theta_{j}\}_{j=1}^{M}$ with a homogeneous architecture defined by $f(\cdot)$. Let $\lambda(x)=(\lambda_{1}(x),\dots,\lambda_{M}(x))$ be the sample-wise interpolation coefficient vector given $x$. If the models that render a correct prediction for $x$ always have smaller output entropy $H(\cdot)$ compared with the models rendering an incorrect prediction, DaWin’s interpolation coefficients of true experts for the sample $x$ has always greater than $\frac{1}{M}$. That is

$$ $\displaystyle\lambda_{j\in\mathcal{J}}(x)\geq\frac{1}{M}\;\quad$ $\displaystyle\text{where}\;\;\mathcal{J}=\{i|\operatorname*{arg\,max}_{c}[f(x; \theta_{i})]_{c}=y\}$ $\displaystyle\text{if}\;\;H(f(x;\theta_{j\in\mathcal{J}}))\leq H(f(x;\theta_{k \notin\mathcal{J}}))\;\;\text{for all}\;\;j\;\text{and}\;k.$ $$

where $[f(x;\theta)]_{c}$ indicates the probability mass for class $c$.

###### Proof.

The proof is very straightforward, given the assumption and definitions of problem setup.

$$ $\displaystyle H(f(x;\theta_{j\in\mathcal{J}}))$ $\displaystyle\leq H(f(x;\theta_{k\notin\mathcal{J}}))$ (By assumption) $\displaystyle\exp(-H(f(x;\theta_{j\in\mathcal{J}})))$ $\displaystyle\geq\exp(-H(f(x;\theta_{k\notin\mathcal{J}})))$ $\displaystyle\lambda_{j\in\mathcal{J}}(x)$ $\displaystyle\geq\lambda_{k\notin\mathcal{J}}(x)$ (By definition of $\lambda(x)$ ) $\displaystyle\lambda_{j\in\mathcal{J}}(x)$ $\displaystyle\geq\frac{1}{M}$ (Given that $\sum_{j=1}^{M}\lambda_{j}(x)=1$ ) $$

∎

###### Lemma A.1 ( Restatement of expert-biased weighting behavior of DaWin ) .

###### Proof.

### A.5 Limitation and future work

By following previous works (Wortsman et al., ; Ilharco et al., ; Yang et al., ), we limited our validation scope to an image classification of fully fine-tuned visual foundation models with restricted scale and architecture, e.g., CLIP ViT-$\{$B/32, B/16, L/14$\}$. Exploring DaWin on diverse model architecture (Liu et al., ; Gu & Dao, ; Liu et al., ), large-scale modeling setup (Dehghani et al., ), large language models (Yu et al., ; Goddard et al., ; Rame et al., ), multimodal generative models (Liu et al., ; Biggs et al., ; Nair et al., ), continual adaptation scenario (Marczak et al., ), and parameter-efficient tuning regime (Li & Liang, ; Hu et al., ; Chronopoulou et al., ) can be exciting future work directions.

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 6
presentation: 4
questions: * Could you please comment on the memory requirement of DaWin and how it compares to other methods, for both with and without mixture modeling?
* I am also not so sure about your provided costs for inference in Table 2. Could you point me where $H$ is defined and elaborate a bit the provided terms? Am I correct, that DaWin (without mixture modeling) requires 3 model evaluations (2 to compute the entropy for the individual models for a given $x$ and 1 for the averaged model)?
* In the experiments, DaWin sacrifices ID performance for better OOD performance compared to WiSE-FT. Could you elaborate in which application scenario I would want to choose DaWin over WiSE-FT. I would think in practice good ID performance still wins over good OOD performance if you cannot have both.
soundness: 3
strengths: In general, the paper written in a clear and understandable way. It provides novel experimental evidence, that averaging the weights of pre-trained and fine-tuned models to keep OOD performance high might not be fine grained enough. The proposed heuristic to select sample based averaging coefficients intuitively makes sense and is backed up by well designed experiments.
The performance and computational complexity of DaWin is compared to a sensible selection of existing methods.
summary: A new method for robust fine-tuning, called "dynamic weight interpolation" (DaWin) is proposed. It is directly related to the well known model averaging method WiSE-FT. However, while WiSE-FT averages model parameters, using a fixed coefficient $\lambda$ that does not depend on the input data, DaWin proposes to make the coefficient data dependent, i.e., to use $\lambda(x)$. The optimal $\lambda(x)$ is computed, using a heuristic that is based on the entropy of the model output. DaWin is tested against many existing robust fine-tuning methods, yielding slightly better OOD performance compared to WiSE-FT.
weaknesses: I see two problems:

1) In section 2.2, the a pilot study is provided to show the necessity of sample-wise averaging coefficients $\lambda(x)$ for good out of distribution performance after fine-tuning. As I understood, the goal is to find the best possible OOD performance that we can achieve with an oracle $\lambda^*(x)$ for the sample-wise coefficients that actually knows the true labels for a given $x$.

The paper states, that such an oracle would be $\lambda^*(x) = p_{\theta_1}(y|x) / (p_{\theta_0}(y|x) + p_{\theta_1}(y|x))$, i.e., the probability whether data $(x,y)$ comes from the distribution $p_{\theta_1}(y|x)$. However, while this would make sense if we merge the output of the models (analogous to classifier selection), I cannot imagine that it is the seeked best oracle for $\lambda^*(x)$ if we perform weight averaging. To obtain this oracle, we would have to test for each $x$, if there exists a $\lambda^*(x)$, such that the model with parameters $\theta_{\lambda^*}$ predicts the correct $y$.

In the following sections, the paper makes some approximations to compute $\lambda^*(x)$ based on the entropy of the model output, which does not require the knowledge of $y$. The reader is lured into the impression, that the only performance gap to the oracle is caused by these approximations. However, I think this is not true, since the oracle itself might not be optimal. However, this issue is about presentation and could be fixed.

2) I think performance gains compared to WiSE-FT and other methods are often minimal. Although DaWin does not require fine-tuning, there is still a considerable memory overhead. To be able to perform per-sample averaging, we need to store both sets of weights. For large models, this might be a severe problem that is not worth the effort.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: 1. From my point of view, the dynamic weighting strategy per sample is another form of confidence-based selection, where the preference is determined solely by model confidence. Given this, what if we fuse the outputs instead of the model weights? Do the tasks (e.g., ImageNet - ImageNet-A) reveal any trends in the weighting of these models?

2. How can we determine whether the performance is correlated with the **distribution distances** between datasets?

3. Could the proposed method result in negative weight mixtures for some datasets? If so, why?

4. Is it possible that some checkpoints could **decrease** the final performance on specific datasets? Furthermore, do the semantic distances and relationships between classes from different datasets (and their corresponding checkpoints) affect the performance of one another?

5. For the evaluation of wall-clock time, is it tested per dataset? or per sample?

6. Please also review the drawbacks section.
soundness: 3
strengths: 1. DaWin requires no additional training, making it highly practical for real-world deployment.
2. The usage of Beta mixture models ensures adaptation scalability, reducing the inference-time overhead of dynamic interpolation.
3. DaWin shows its performance on both robust fine-tuning and multi-task learning problems.
4. DaWin does not require extensive hyperparameter tuning.
summary: This paper proposes a dynamic weight interpolation method DaWin. It merges pre-trained and fine-tuned models based on per-sample entropy without training. It further uses Beta mixture models to cluster interpolation coefficients to keep computation efficient. DaWin achieves considerable performance, offering a scalable solution for adaptable model merging.
weaknesses: 1. The model utilizes Beta Mixture Models for efficiency, but only complexity and wall-clock time results are provided. There are no reported MACs or FLOPs per sample, limiting insights into computational costs.  

2. Since the model performs per-sample interpolation, it requires three inferences per sample, increasing computational demands.  

3. The dynamic interpolation adjustment can be viewed as an incremental improvement over existing interpolation methods, rather than a novel breakthrough. The level of novelty remains unclear.  

4. While the paper presents a comprehensive experimental study, the explanations for the results are shallow. There is limited discussion on why DaWin performs well or poorly on specific datasets or distributions (e.g., SUN397 and Cars). Additionally, relationships among datasets are critical but remain under-explored.  

5. The entropy-based expert assumption is built on simple object concepts, implying that the datasets are sufficiently learnable through fine-tuning a CLIP model, where entropy should ideally align with correct predictions. However, in real applications, entropy can be misleading, resulting in overconfident but incorrect predictions. The model design does not address how to correct these wrong predictions. While the TrueTrue/TrueFalse breakdown in Figure 2 is insightful, it is not directly leveraged in the experiments, which limits the depth of the analysis.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: Please refer to questions in weaknesses but here are additional questions that are not weaknesses but I'm curious about:

1. Did they see any trends in where they obtained similar interpolation coefficients for samples? Maybe certain clusters of samples are always better explained by a given model or not. Are there conclusions one could draw about the test set from this ?
soundness: 3
strengths: The paper is quite interesting and presents their main idea clearly. I summarise the strengths below:
1. Clarity: the paper is clear and gets across the main message (can we use an estimate of entropy at the sample level in order to improve OOD performance).  I like the 'GT' set up as it clearly shows the potential improvements of such an approach and gets across the intuition of why this is useful.

2. Experiments: they have a range of results backing up their claims and showing that their method improves over the baselines. They further generalise their approach to other settings (e.g. dynamic classifier selection or ensemble selection)

3. The consider compute and performance and show how they are trading off compute (though maybe not as badly as others) for improved performance.
summary: This paper describes a method of doing sample based parameter merging in order to improve performance on OOD test samples. The main idea is to estimate the entropy of each model and then to use this to perform the merging step. As this is quite slow, they also describe a faster mixture-modelling technique. They first demonstrate with 'GT' data that if you had an oracle for the entropy you would do well. They then show that this oracle / estimated entropy is correlated and finally that they achieve superior results over similar methods.
weaknesses: 1. Clarity: There are a few parts of the paper that are lacking details or are confusing:
1a. in the intro a foundational model != ImageNet. People refer to foundational models primarily for large scale models trained on vast amounts of data (GPT,Gemini,Flamingo)
1b. It is unclear how precisely H(-) is computed. I appreciate this is probably obvious to the authors but it would be helpful to briefly mention.
1c. I am unconvinced by their linear mode connectivity explanation. My understanding is the point of the linear mode connectivity is that *along that line between model weights*, the error is bounded to some height. But this is *not* what's being checked -- it's being done for a single interpolated example.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. How well does DaWin generalize to tasks beyond classification benchmarks (e.g., NLP or reinforcement learning)?
2. Can the reliance on entropy as an expertise proxy limit DaWin's performance in certain scenarios, such as multi-modal data?
3. How does DaWin compare in terms of inference speed and energy consumption to AdaMerging and WiSE-FT?
4.What scenarios, if any, might lead to simpler methods outperforming DaWin, and how can this be systematically explored?
soundness: 3
strengths: 1. Training-free approach: DaWin eliminates the need for additional model training, providing a plug-and-play solution.
2. Entropy-based dynamic interpolation: This novel use of entropy helps improve sample-wise performance across diverse tasks.
3. State-of-the-art results: DaWin outperforms WiSE-FT and other interpolation methods on ImageNet and multi-task benchmarks with minimal computational overhead.
4. Computational efficiency: The use of mixture modeling reduces the inference cost, making DaWin scalable to large datasets.
summary: The paper titled "DaWin: Training-Free Dynamic Weight Interpolation for Robust Adaptation" introduces DaWin, a novel method for dynamically merging model weights without additional training. Traditional weight interpolation methods, such as WiSE-FT, use static coefficients for merging models, limiting their effectiveness when models exhibit different levels of expertise across samples. DaWin addresses this limitation by proposing sample-wise dynamic weight interpolation, utilizing entropy-based measures to adjust interpolation coefficients in real-time. DaWin achieves state-of-the-art performance on both robust fine-tuning tasks (ImageNet benchmarks) and multi-task learning (e.g., EuroSAT, MNIST) with minimal computational overhead.
weaknesses: 1. **Incremental novelty**: While the method provides refinements over static interpolation, it shares similarities with existing methods (e.g., AdaMerging), which reduces its overall originality.
2. Over-reliance on entropy: The assumption that entropy reliably measures model expertise across all scenarios is not thoroughly validated, and alternative metrics could be explored further.
3. Trade-offs not fully explored: The paper does not sufficiently address the performance trade-offs between per-sample interpolation and simpler methods like weight averaging.

Meta-review: This submission introduces DaWin, a dynamic weight interpolation method that combines pre-trained and fine-tuned models based on per-sample entropy without requiring additional training. It further utilizes Beta mixture models to efficiently model interpolation coefficients, ensuring computational efficiency. DaWin demonstrates significant performance improvements and offers a scalable solution for adaptable model merging. After the rebuttal, all four reviewers recommended acceptance, and the area chair concurs with their recommendation to accept this submission.

Decision: Accept (Poster)