Paper: Unleashing the power of Neural Collapse for Transferability Estimation (ICLR-2024)

Reviewer comment (Novelty):
There is a very relevant related work that is discussing NC for transfer learning, that is currently not cited in this submission: Galanti, Tomer, András György, and Marcus Hutter. "On the role of neural collapse in transfer learning." ICLR 2022. The authors should discuss this paper and the contributions of the submission related to that.

Author response:
**[A1]** Thank you for your kind reminder. We added a discussion in the related work section.


[1] investigates the impact of pre-trained networks undergoing neural collapse on source training data on various types of target datasets. The authors find that neural collapse occurring on the source data can generalize to new samples and even unseen categories. We list the main difference from [1] below:

- The task and setting are different.  [1] study the ability of models, which undergo neural collapse on source tasks, to learn representations for classification that are transferable to new, unseen classes. However, our task is to propose a metric to estimate the transferability of a given pre-trained model.  Whether this model undergoes neural collapse on the source data is unknown.
- [1] primarily investigates the performance of models experiencing neural collapse in experiments to learn about phenomena and draw conclusions. In contrast, our work is inspired by the characteristics of neural collapse to propose a method for transferability estimation.

Reviewer comment (Experiments):
The authors claim that a key component of their method is the class fairness term. It is unclear how FaCe compares to a variant without that term (and everything else the same), i.e., if S_m = C_m and not C_m+F_m. There is no ablation to understand how this part affects the final metric.

Author response:
**[A2]** We agree that the ablation study is crucial. As shown in Section 4.6, we provide the ablation study of two terms of FaCe. The results validate that both terms are effective, and they complement each other to achieve the best average performance.

Reviewer comment (Experiments):
The experimental validation is weak. There are very few and small-scale datasets in Tab1, while even fewer in Tabs 2 and 3. A more extensive evaluation is needed to showcase any improvements of FaCe vs the other metrics. Currently this is not clear from Tab1 where there seems to not be a clear winner at all.

Author response:
**[A3]** We follow existing work and select a set of common-used representative target datasets. These datasets cover various data types, such as animals, traffic signs, textures, and more, providing a diverse set of evaluation scenarios.

**In Appendix A.3, we add experiments on the large-scale dataset food101 (~101,000 images) in Table 1, and include more target datasets in Table 2, 3.**

As shown in Appendix A.3, Table 6,7,8, in the presence of a large-scale dataset, we still achieve competitive average performance (Table 6). Moreover, on more target datasets, we also obtain the best average performance on the other two model zoos (Table 7, 8).

Reviewer comment (Experiments):
Can you provide ablations for performance when only one of the two terms is used, i.e., C and F for FaCe? i.e., add two more columns in tables 1/2/3 with that. It is understood that GBC is close, but it would be great to see the performance of your method, in your experimental setup, for each of the two terms separately and then together. This would help clarify the contribution of this paper.

Author response:
**[A2]** We agree that the ablation study is crucial. As shown in Section 4.6, we provide the ablation study of two terms of FaCe. The results validate that both terms are effective, and they complement each other to achieve the best average performance.


The reviewer might have confused C and **F (our key contribution)** in Table 4.

Note that the Class Fairness term **(F)** works in all three tasks. To be specific, in (a) heterogeneous model zoo with single source, and \(c\) homogeneous model zoo with multiple sources and loss functions, using F alone can approximate the final FaCe results. This clearly illustrates the effectiveness of F.


We posit the reason of the variance collapse term (**C**) being less effective, F potentially enlargers the between-class variance, which is some overlap with the role of C. FaCe combines these two aspects and achieves the highest performance.

Reviewer comment (Experiments):
Why are only a subset of papers presented in Tab2 and 3? Can you provide results for all, e.g., in an appendix if the issue is space?

Author response:
**[A5]** In Table 1-3, the comparison methods are the same (LEEP, NCE, LogME, H-score, GBC).

We suspect that when you mentioned "a subset of papers," you might refer to the target datasets. We also provide more results in Appendix A.3. **On these new target datasets, FaCe still achieves state-of-the-art performance.**


We agree that it is fairer to include all the target datasets of the compared methods. However, in this field, different papers typically utilize different downstream datasets on different pre-trained models. Even the two mentioned papers (LogMe and GBC) differ. In the experiments of GBC, datasets like Imagenette, CUB, Dogs, and Flower are not conducted by LogME. Thus, we simply adopt 7 commonly used datasets for comparing transferability estimation methods.


In the rebuttal, we further provide results on a new target dataset Food101, and there are a total of 8 datasets. Besides, we also validate the effectiveness of our method on various tasks, including image classification, semantic segmentation, and even text classification. Compared to other works in this field, our experiments are extensive. We believe such extensive results can well support the effectiveness of FaCe in transferability estimation tasks.

Reviewer comment (Writing):
The introduction contains repetitive statements regarding transferability estimation and its objectives. For clarity and brevity, such redundancy should be avoided.

Author response:
**[A1]** Thanks for your suggestion, we have updated the related description in the Introduction.

Reviewer comment (Writing):
The meaning of the variable 't' in Equation (6) is not defined in the surrounding context.

Author response:
**[A2]** Sorry for the typos, the variable t is the temperature of softmax, we have updated the related description in Section 3.2.

Reviewer comment (Evaluation):
When calculating the Variance Collapse, the authors assign equal weight to each category. However, during performance evaluation, categories with larger sample sizes play a more significant role. To ensure FaCe genuinely represents the potential performance of pre-trained models on the target dataset, the current setup seems somewhat flawed. An explanatory note from the authors is sought.

Author response:
**[A3]** The final fine-tuned accuracy is computed on the test set. In practice, we may not know the class distribution of the test set when calculating the score, so it's not possible to pre-assign weights to certain classes. What we can obtain is the class distribution of the training set. In downstream tasks, to ensure generalization on the test set, the class distribution of the training set is often balanced.

Reviewer comment (Theory):
In the process of computing and presenting equidistance, the class fairness score F only explores equal distances of each class to the remaining classes. Due to the domain shift, features don't lie on a unit sphere. Thus, "equal distance of each class to the other classes" is not synonymous with "equal distances amongst all classes." The claim "Due to the domain shift, the features do not lie on the unit sphere" lacks sufficient justification. A detailed explanation from the authors would be appreciated.

Author response:
**[A4]** When Neural Collapse (NC) occurs, the features of the training data collapse to class means, and the class means, along with the classifier weights, converge to the vertices of a simplex equiangular tight frame (ETF). At this point, the class means of the features can be considered as distributed on a hypersphere [1]. However, the model is pre-trained on the source data. On downstream target data,  domain shift exists, and the class means will not be located on the hypersphere. 

Our class fairness term is inspired by NC2. A widely-used metric in existing literatures is defined as $$ \mathcal{NC}_2(W) = \left\|\frac{W W^{\top}}{\left\|{W} {W}^{\top}\right\|_F}-\frac{1}{\sqrt{K-1}}\left({I}_K-\frac{1}{K} \mathbf{1}_K \mathbf{1}_K^{\top}\right)\right\|_F.$$ Essentially, this metric measures the equiangularity of the classifier weights or class means. To use this metric, it should be under the scenarios where the class means are located on the hypersphere. 

Hence, we chose not to use the equiangularity measure of NC2 as found in existing work but instead propose to approximate NC2 using the equidistance of each class distribution.

We apologize for any confusion caused by the unclear description.  We have clarified the relevant description in Section 3.2.

- [1] Neural Collapse: A Review on Modelling Principles and Generalization. TMLR 2023.

Reviewer comment (Experiments):
The paper's primary contribution builds upon Variance Collapse by incorporating Class Fairness for a more accurate assessment of model fairness across classes. Yet, the experimental section lacks ablation studies on Class Fairness. To substantiate the effectiveness of the method, the inclusion of relevant experimental evidence is imperative.

Author response:
**[A5]** We agree that the ablation study is crucial. As shown in Section 4.6, we provide the ablation study of two terms of FaCe. The results validate that both terms are effective, and they complement each other to achieve the best average performance.

Reviewer comment (Evaluation):
While employing FaCe as the criterion to judge the generalizability of pre-trained models in target domains, have the authors considered the impact of differences in class distributions and class counts between source and target domains?

Author response:
**[A6]** In transferability estimation, only the pre-trained source model is available, and the information about the source data is unknown. We believe that the only source model available is a more practical setup. In this setting, we cannot obtain the class distribution of the source or consider differences between the source and target. Your idea is reasonable, and we will consider about it in future work.

Reviewer comment (Experiments):
The authors extended the concept of equiangularity to equidistance. In the process of calculating distances between classes, why was the current method chosen? Were alternative approaches contemplated?

Author response:
**[A7]** The most naive approach is to represent a class using its class mean and compute the class mean (CM) distances. However, due to significant differences in the intra-class variances of different classes in the target data, it is more reasonable to fit Gaussian distributions to the feature distributions of different classes and calculate the overlap. When measuring overlap between distributions, the introduction of Bhattacharyya (Bh) distance is a common practice.

We provide experiments using class mean distances as an alternative to measuring class distribution overlap below. Table (a) (b) and \(c\) correspond to Tables 1 2 and 3,  in our paper, respectively (*i.e.*, (a) heterogeneous model zoo with a single source, (b) heterogeneous model zoo with multiple sources, and \(c\) homogeneous model zoo with multiple sources and loss functions). The values in the table are the average results. It can be seen that FaCe with Bhattacharyya distance (FaCe W/ Bh) has a better average performance.


| (a) | FaCe w/ Bh | FaCe w/ CM |
|:---:|:---:|:---:|
| Kendall | 0.56  | 0.32  |
| Pearson | 0.62  | 0.37  | 

| (b) | FaCe w/ Bh | FaCe w/ CM |
|---|:---:|:---:|
| Kendall | 0.62  | 0.55  |
| Pearson | 0.78  | 0.44  |

|\(c\)| FaCe w/ Bh | FaCe w/ CM |
|:---:|:---:|:---:|
| Kendall | 0.38  | 0.36  |
| Pearson | 0.37  | 0.73  |

Reviewer comment (Novelty):
The first term of NC is common. This idea is commonly used in various classification tasks.

Author response:
**[A1]** We agree that the first term of NC is commonly used in various classification tasks. However, our work introduces the first term of NC as a metric during the downstream fine-tuning process, as shown in Figure 1. Motivated by the observation that the NC of the pre-trained model is correlated with the corresponding fine-tuned model, we include the first term of NC, i.e., the variance collapse term, for transferability estimation, which could be considered as a baseline method of the proposed FaCe. 

Even for this term, we want to clarify the difference between the variance collapse term and several closely related works, Hscore [1] considers between-class variance and feature redundancy; GBC [2] is based on the summation of the pairwise class separability. Our variance collapse term is the magnitude of between-class covariance compared to within-class covariance, which is different from them.

- [1] An information theoretic approach to transferability in task transfer learning
- [2] Transferability Estimation Using Bhattacharyya Class Separability

Reviewer comment (Experiments):
The fine-tuning hyperparameters of different pre-trained models may have a significant impact, and the phenomena observed in the paper might lack persuasiveness.

Author response:
**[A3]** We follow existing works [1,2,3] in transferability estimation and select a set of hyperparameters that perform best on the downstream dataset.  In fact, the results are obtained based on different seeds, indicating the robustness of the fine-tuning process. We have clarified this point in the experimental details of Section 4.1.
- [1] Transferability Estimation using Bhattacharyya Class Separability.
- [2] LEEP: A New Measure to Evaluate Transferability of Learned Representations.
- [3] LogME: Practical Assessment of Pre-trained Models for Transfer Learning.

Reviewer comment (Experiments):
The paper lacks experiments on the relationship between the accuracy of pre-trained models, the accuracy of fine-tuned models, and the proposed FaCe method.

Author response:
**[A4]** In revision, we updated the zip file of supplementary materials, which added a file named "Acc-FaCe.xlsx." This file provides the accuracy and FaCe values of our experiments. Besides, Figure 4 presents the qualitative results of the fine-tuned model accuracy and FaCe Score, along with comparisons to other methods. However, the classifier dimension of the pre-trained model does not match the number of classes in the downstream target data, making it impossible to provide accuracy directly for the pre-trained model.

Reviewer comment (Theory):
Between-class covariance, $\Sigma_B$, is defined as the distance between the class avg and the global avg, which does not align with the definition of between-class, a distance between classes.

Author response:
**[A1]** Here, we directly adopt the common definition of variance. Intuitively, the distance between the class avg and the global avg in $\Sigma_B$ serves the purpose of quantifying the total distance between all class means and the global mean. When the distances between classes are large, the class means will be farther away from the global mean, and when the distances are small, they will be closer to the global mean. Therefore, $\Sigma_B$ can effectively reflect the distance between classes.

Reviewer comment (Theory):
Class Fairness term might be related to Variance Collapse term. Class Fairness term uses intra-class and inter-class covariance, which are also used in Variance Collapse term. But, the relationship between the two terms is not studied enough.

Author response:
**[A2]** Variance Collapse score (VC) is the magnitude of between-class covariance compared to within-class covariance. Different from that, the covariance in Class Fairness score (CF)  is used to estimate the parameters of Gaussian distributions when modeling class features. These two terms complement each other, and we have conducted ablation experiments in Table 4 to investigate their individual effects.

Thanks for your suggestion, we have included some explanations of the relationship between the two terms in Section 4.6.

Reviewer comment (Theory):
Why does between-class covariance $\Sigma_B$ in Variance Collapse use global average $h_G$ instead of class average $h_k$? I believe $\Sigma_B=\frac{1}{K} \Sigma_{k_i} \Sigma_{k_j} (h_{k_i} - h_{k_j})^2 $ would be more correct for the between-class covariance than $h_G$.

Author response:
**[A3]** Thanks for your suggestion. $\Sigma_B$ in Eq. (3) measures the sum of distances between all class means and the global mean, while the $\Sigma_B$ you mentioned measures the sum of distances between pairwise class means. These two forms may be influenced by class imbalance, but they are equivalent when the classes are balanced. We simplify the notation $k_i$ and $k_j$ as $i$ and $j$. The proof is provided below.
$$
\begin{align}
\Sigma_B = &\frac{1}{K} \Sigma_{i} \Sigma_{j} (h_{i} - h_{j})^2 \\
= & \frac{1}{K} \Sigma_{i} \Sigma_{j} (h_{i} - h_G + h_G- h_{j})^2 \\
= & \frac{1}{K} \Sigma_{i} \Sigma_{j} [ (h_{i} - h_G)^2 + (h_G- h_{j})^2 + 2(h_{i} - h_G)(h_G- h_{j}) ] \\
= & \frac{1}{K} \Sigma_{i}K(h_{i} - h_G)^2 + \frac{1}{K}\cdot K\cdot \Sigma_{j} (h_{j} - h_G)^2 + 2 \cdot \frac{1}{K} \Sigma_{i}\Sigma_{j}(h_{i} - h_G)(h_G- h_{j}) .
\end{align}
$$
When the number of each classes is balanced, we have $h_G = \frac{1}{K}\Sigma_{k_j} h_{k_j} = \frac{1}{K}\Sigma_{k_i} h_{k_i}$, The third term above can be transformed into:
$$
\begin{align}
\frac{2}{K} \Sigma_{i}\Sigma_{j}(h_{i} - h_G)(h_G- h_{j})
& = \frac{2}{K}\cdot\Sigma_{i}(h_{i} - \frac{1}{K}\Sigma_{j} h_{j} )\Sigma_{j}(\frac{1}{K}\Sigma_{i} h_{i} - h_{j}) \\
& = \frac{2}{K}\cdot(\Sigma_{i}h_{i} - K\cdot\frac{1}{K}\Sigma_{j}h_{j} ) \cdot (K\cdot\frac{1}{K}\Sigma_{i}h_{i} - \Sigma_{j}h_{j}) \\
& = 0
\end{align}
$$
Therefore,
$$
\begin{align}
\Sigma_B = \frac{1}{K} \Sigma_{i}K(h_{i} - h_G)^2 + \frac{1}{K}\cdot K\cdot \Sigma_{j} (h_{j} - h_G)^2 = 2 \Sigma_{i}(h_{i} - h_G)^2  = 2K \cdot \frac{1}{K}\Sigma_{i}(h_{i} - h_G)^2
\end{align}
$$
In our task, fine-tuning accuracy is measured on the test set. To ensure generalization, the training set is typically class-balanced.

We provide the comparisons of these two methods on the heterogeneous model zoo with a single source (Table 1 in our paper) below. Method "FaCe w/ global cov'' is our $\Sigma_B$, and FaCe w/ btw-distance is your proposed one, the results show that there is minimal difference between the two.

|  | Method | CIFAR10 | CIFAR100 | Pets | CUB | gtsrb | DTD | STL10 | Avg. |
|---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| Kendall | FaCe w/ global cov | 0.81  | 0.83  | 0.39  | 0.33  | 0.10  | 0.56  | 0.90  | 0.56  |
|  Kendall | FaCe w/ btw-distance | 0.83  | 0.83  | 0.39  | 0.33  | 0.10  | 0.57  | 0.90  | 0.57  |
| pearson | FaCe w/ global cov | 0.89  | 0.85  | 0.64  | 0.39  | -0.05  | 0.71  | 0.91  | 0.62  |
|  pearson | FaCe w/ btw-distance | 0.89  | 0.85  | 0.63  | 0.39  | -0.06  | 0.71  | 0.91  | 0.62  |

Reviewer comment (Theory):
Bhattacharyya coefficient looks similar to Variance Collapse term. Bhattacharyya coefficient is a multiplication between inverse within-class covariance and between-class covariance, while Variance Collapse is a multiplication of within-class covariance and inverse between-class covariance. How about replacing Variance Collapse with inverse Bhattacharyya coefficient for simplicity of formulation?

Author response:
**[A4]** The Bhattacharyya coefficient measures the overlap between class distributions and quantifies the separation between them. The intuitive difference between the Bhattacharyya coefficient and Variance Collapse score is that VC additionally considers the compactness within classes.

Your idea is reasonable as well. We provide the comparisons of these two methods on the heterogeneous model zoo with a single source (Table 1 in our paper) below.  FaCe w/ VC is the original version of FaCe, and FaCe w/ neg-Bh is a variant that replaces our variance collapse term with the sum of the negative Bhattacharyya coefficient between classes. Specifically, we replace the score $C$ in FaCe with: $$ C_{negBh}=- \sum_{i=1}^{K}\sum_{j=1，i\neq j}^{K} B(k_i,k_j).$$
The results are shown below. Our ultimate goal is to consider models that exhibit both large inter-class distances and relatively uniform class distributions as better. While replacing the first term with other forms may have some impact on the final results, the effect is not significant.

|  |  | CIFAR10 | CIFAR100 | Pets | CUB | gtsrb | DTD | stl10 | Avg. |
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| Kendall| FaCe w/ VC | 0.81  | 0.83  | 0.39  | 0.33  | 0.10  | 0.56  | 0.90  | 0.56  |
| Kendall | FaCe w/ neg-Bh | 0.81  | 0.89  | 0.41  | 0.23  | -0.05  | 0.61  | 0.83  | 0.53  |
| Pearson | FaCe w/ VC | 0.89  | 0.85  | 0.64  | 0.39  | -0.05  | 0.71  | 0.91  | 0.62  |
| Pearson  | FaCe w/ neg-Bh | 0.88  | 0.91  | 0.64  | 0.57  | -0.01  | 0.58  | 0.78  | 0.62  |