Paper: Rethinking the OoD Generalization for Deep Neural Network: A Frequency Domain Perspective (ICLR-2024)

Reviewer comment (Presentation):
The introduction includes a lot of discussion of related work, and doesn’t describe the contributions of the paper very clearly until the bullet-point list. I would suggest separating this into two sections, one that is a clear and direct introduction of the paper, focusing on your specific contributions, and a separate section covering related work that explains how the current paper fits into the context of the literature.

Author response:
Thank you very much for your valuable suggestion about writing. We will make revisions and improve the paper further.

Reviewer comment (Presentation):
A large portion of the paper is spent describing the difference between “diversity shift” and “correlation shift”, but I’m not convinced that this is actually relevant to the proposed method and contribution. My impression from the paper is that some augmentation strategies help only with either one or the other type of distribution shift, but the proposed method helps with both. However, since the proposed method doesn’t directly use anything relating to diversity or correlation shift, I would encourage the authors to avoid spending so much time describing it (or omit it entirely); as a reader I found it confusing and a bit distracting.

Author response:
Via frequency-based analysis of two shifts,  we empirically explain why the performance of some algorithms deteriorates rapidly in OoD environments and why some algorithms outperform others in one type of domain shift while fail in another one. Based on these analysis, we further propose our CFA. 

By comparing the performance of different methods on two shifts, we can highlight the advantages of our CFA.

Reviewer comment (Theory):
The theoretical analysis is billed as a proof of correctness for the proposed CFA method, but the theoretical model looks like it’s a linear prediction that would be quite far from the nonlinear neural nets used in practice. The analysis is still valuable to gain intuition, but I would recommend explaining a bit more about the assumptions behind it and treating it as an illustrative toy setting rather than a full proof of the practical algorithm.

Author response:
The proof of nonlinearity is too complex to achieve, and the linear model can partially prove CFA's effectiveness.

Reviewer comment (Reproducibility):
Equations 5 and 6: f and F should be defined. I would guess that f is somehow the model output, but it’s not clear if this is logits, probabilities, top-class prediction, etc. This kind of detail is necessary for others to be able to reproduce and build on the proposed method.

Author response:
Thank You for the reminder. $F$ means Discrete Fourier Transform. $f$ means the output of model. For classification task, it means the probabilities.

Reviewer comment (Experiments):
I have some doubts about the experimental results, it seems that results are reported (e.g. for Colored MNIST) only for a certain degree of correlation/ratio between color and digit. How does the proposed method behave in under different degrees of correlation (as in [1])

Author response:
Colored MNIST is transforming from [1] as follows: [1] defines three environments (two training, one test) ; first, assign a preliminary binary label y˜ to the image based on the digit: y˜ = 0 for digits 0-4 and y˜ = 1 for 5-9. Second, obtain the final label y by flipping y˜ with probability 0.25. Third, sample the color id z by flipping y with probability p, where p is 0.2 in the first environment, 0.1 in the second, and 0.9 in the test one. Finally, color the image red if z = 1 or green if z = 0.

[1] Martin Arjovsky, Léon Bottou, Ishaan Gulrajani, and David Lopez-Paz. Invariant risk minimization, 2020.

Reviewer comment (Experiments):
Related to the point above, the explanation about the nature of the shift in the different dataset is lacking. E.g. for MNIST, what ratio/correlation was used? For CelebA which attributes were considered? Etc.

Author response:
According to [2], the OoD distribution shift can be divided into two patterns: diversity shift and correlation shift, referring to different reasons for domain shift. Diversity shift is caused by the appearance of new unseen environment features in the test set while
correlation shift delineates the spurious correlation between environment features and labels.

For CelebA, [2 ]treats “hair color” as the classification target and “gender” as the spurious attribute.
 
For NICO,  consisting of real-world photos of animals and vehicles captured in a wide range of contexts such as “in
water”, “on snow” and “flying”. There are 9 or 10 different contexts for each class of animal and vehicle. This dataset simulates a scenario where animals and vehicles are spuriously correlated with different contexts.

[2] Nanyang Ye, Kaican Li, Haoyue Bai, Runpeng Yu, Lanqing Hong, Fengwei Zhou, Zhenguo Li, and Jun Zhu. Ood-bench: Quantifying and understanding two dimensions of out-of-distribution generalization, 2022.

Reviewer comment (Novelty):
Comparison or references to relevant work in the debiasing/generalization fields are missing; e.g. [2,3,4]

Author response:
We are reproducing LfF + BE  proposed in [4] on CMNIST used in our paper for fair comparsion. But we find that the CMNIST used in OoD generalization fields is quiet different from that in debiasing fields. In OoD generalization, in our CFA, we only use  object category as supervised information without extra arribute information as supervision. However, in [4], it seems that extra arribute information is needed in the training.

Reviewer comment (Experiments):
I think that your method could provide some sort of "explanability" in terms of visual interpretation of certain frequencies. Could you add some examples e.g. for ColoredMNIST or CelebA showing the reconstructed images for the most important frequency (both positive and negative)?

Author response:
Thanks for your advice. In Figure 4, we reconstructed images of PACS. As it can be seen, the most important positive frequency is about shape or contour of the object, while the negative one is about the color of the object.

Reviewer comment (Experiments):
How where the $\alpha$ and $\beta$ hyperparameters chosen? How robust is your method to changes in these values?

Author response:
In the supplementary, we have evaluated the parameter sensitivity of CFA by changing one parameter and fixing the other. U-shaped parameter sensitivity curves are shown in Figure 9. From this figure, we can observe that suitable values of $\alpha$ and $\beta$ help to improve the generalization performances.

Reviewer comment (Novelty):
The analysis approach has quite strong similarity to that of [1], but the authors did not explore or comment about any differences or improvements compared to previous work. Conceptually, the analysis is also similar to [5], which is not discussed.

Author response:
[1] uses Shapley values to analyse the importance of frequency components to adversarial robustness, while we extend Shapley values to OoD generalization. [1] and our method focus on different research areas, but we both resort to Shapley values to analyse in frequency domain.

[5] finds that neural networks can exhibit different frequency biases, tending to adopt frequency shortcuts based on data characteristics because of simplicity-bias learning.They foresee that avoiding frequency shortcut learning may hold promise in improving generalization. But they do not give a concrete method to improve generalization yet. In our method, we precisely attribute which frequency components of training images are important for generalization via Shapley values and propose CFA to improve generalization.

Reviewer comment (Experiments):
There exist limitations on the approximation of Shapley values through random sampling of permutation proposed by Castro et al. [2], and Castro et al. further improved the approximation in [3], which was not applied by the authors.

Author response:
Thanks for providing us more profound methods of the approximation of Shapley values. Intuitively, if we can attribute which frequency components of training images are important for generalization more precisely, CFA can have better performance in OoD generalization. We will try to use the improved approximation of Shapley values in [3] to refine our CFA.

Reviewer comment (Experiments):
Experiments are limited to comparison with empirical risk minimization, invariant risk minimization, etc., while the proposed augmentation approach is not analyzed and put in context with related works in comparison with existing state-of-the-art (frequency) augmentation approaches.

Author response:
In Table 2, DFF proposed by Lin et al. (new SOTA in CVPR, 2023) is to modulate the frequency components to learn domain-generalizable features, which is the most similar one to our CFA. Thus, we mainly compare our CFA with DFF cross seven datasets.

Reviewer comment (Reproducibility):
There are vague experiment details, such as the unknown portion of the randomly sampled permutations, image resolution, training setup, and unclear classification tasks on datasets like CelebA.

Author response:
Our implementation of experiments is based on the OoD-bench and DomainBed suits, which are open-source and details like image resolution, training setup for different datasets are fixed. Thus, we do not give more details in the paper. For readers nor familar with OoD-bench or DomainBed, we will provide more experiment details in the supplementary.

[1] Ishaan Gulrajani and David Lopez-Paz. In search of lost domain generalization. In International Conference on Learning Representations, 2021.

https://github.com/facebookresearch/DomainBed

As for the details of calculation of Shapley values, we should supplement further in the paper. For image resolution of 224, we divide the image to $16 \times 16$ patches in the frequency domain and sample 1000 times for each sample.

Reviewer comment (Experiments):
Results are limited to MLP and ResNet18 models, without exploring Transformers or even other CNN architectures, and are conducted on small datasets. Generalization from ImageNet to datasets such as ImageNet-R and ImageNet-O should be studied.

Author response:
We implement more experiments with Vit on two datasets. As it can be seen, CFA stills have impressive performance. Experiments on other datasets are still running. 
| Backbone | Dataset | Algorithm | Baseline | S    | W    | S+W                              |
|----------|---------|-----------|----------|------|------|----------------------------------|
| Vit      | CelebA  | ERM       | 82.0     | 84.4 | 83.7 | 85.0 ($\uparrow$3.0）  |
|          | PACS    | ERM       | 82.4     | 86.0 | 85.8 | 86.7  ($\uparrow$4.3) |

As for large-scale datasets, we alreary experiment on DomainNet, which is a dataset of common objects in six different domains and 345 categories (classes). Domainet has around 600,000 images, while ImageNet-R has 200 ImageNet classes resulting in 30,000 images. Thus, we believe that experiments on DomainNet is quite convincing.

Reviewer comment (Writing):
Formulas have unclear components or use of symbols:  
 - ‘m’ was used twice in equations (2) and (3)  
 - no explanation for the designated set ‘T’ and the function f(.) in equation (6)  
 - no explanation for ‘N’ when introducing the specific permutation π ∈ Π(N)

Author response:
We randomly sample m=1000 of all permutations  for each data sample.  N means  all the permutations of image patches, while T means  ramdomly remain some frequency components to calculate Shapley values.