FOOGD: Federated Collaboration for Both Out-of-distribution Generalization and Detection

Authors: xinting  liao
weiming  liu
pengyang  zhou
fengyuan  yu
jiahe  xu
jun  wang
wenjie  wang
chaochao  chen
xiaolin  zheng
feature  extractor
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-12 16:59:08

Abstract: Federated learning (FL) is a promising machine learning paradigm that collaborates with client models to capture global knowledge. However, deploying FL models in real-world scenarios remains unreliable due to the coexistence of in-distribution data and unexpected out-of-distribution (OOD) data, such as covariate-shift and semantic-shift data. Current FL researches typically address either covariate-shift data through OOD generalization or semantic-shift data via OOD detection, overlooking the simultaneous occurrence of various OOD shifts. In this work, we propose FOOGD, a method that estimates the probability density of each client and obtains reliable global distribution as guidance for the subsequent FL process. Firstly, SM3D in FOOGD estimates score model for arbitrary distributions without prior constraints, and detects semantic-shift data powerfully. Then SAG in FOOGD provides invariant yet diverse knowledge for both local covariate-shift generalization and client performance generalization. In empirical validations, FOOGD significantly enjoys three main advantages: (1) reliably estimating non-normalized decentralized distributions, (2) detecting semantic shift data via score values, and (3) generalizing to covariate-shift data by regularizing feature extractor. The project is open in https://github.com/XeniaLLL/FOOGD-main.git.

Main paper: 
 introduction: 
 Federated learning (FL) [56] provides a distributed machine learning paradigm, which collaboratively models decentralized data resources. Specifically, each client models its data locally and server improves model performance by aggregating client models, which indirectly shares knowledge among clients and preserves privacy. FL further makes efforts to adapt real-world scenarios, i.e., adapting non-independent and identical distribution (non-IID) [39, 30] .Beyond non-IID issues, deploying FL models in real-world also encounters different tasks of out-ofdistribution (OOD) shift [69, 26, 6] , e.g., tackling covariate shifts (OOD generalization) and handling semantic shifts (OOD detection). In FL, OOD generalization task is devised to capture the invariant data-label relationships of covariate-shift data intra-and inter-client, which offers the potential of adapting unseen clients [17, 60, 70, 84] . The OOD detection task in FL aims to find semantic-shift data samples that do not belong to any known categories of all client data during FL training [83] . Both OOD generalization and detection simultaneously exist in FL, hindering the deployment of FL methods. Nevertheless, the existing work only tackles each OOD task in isolation. SCONE [3] proposes a unified margin-based framework to realize OOD generalization and OOD detection tasks in centralized machine learning. But it is infeasible to FL due to two reasons, i.e., being non-trivial in searching for consistent margin among non-IID distribution, and requiring outlier exposure of data. This motivates us to a crucial yet unexplored question: Can we devise a FL framework that adapts to wild data, which coexists with non-IID in-distribution (IN) data, covariate-shift (IN-C) data, and semantic-shift (OUT) data? In this work, we simultaneously promote OOD generalization and detection by collaborating with clients in FL. The objectives of OOD generalization and detection vary among different clients due to their non-normalized and heterogeneous probability densities. This motivates us to build systematic and global guidance to distinguish IN, IN-C, and OUT data. As depicted in Fig. 1 , for non-IID client distributions, we first estimate the probability density in each local client and then compose these local estimations for global distribution in server. Once a reliable global distribution estimation is established, we can leverage it to guide FL OOD tasks in deployment. However, this approach presents two challenges, i.e., CH1: How to estimate the reliable and global probability density among decentralized clients for detection? and CH2: How to enhance intra-and inter-client OOD generalization based on global distribution estimation?To fill these gaps, we propose a federated collaboration framework named as FOOGD, which estimates client distribution in feature space via score matching with maximum mean discrepancy (SM 3 D) and enhances the client model generalization by Stein augmented generalization (SAG). To solve CH1, inspired by the flexibility of score matching [58, 7] , we originally devise SM 3 D to train score model that estimates limited and heterogeneous data distributions for each client, and aggregate score models in server as global estimation. Because the score values are vectors indicating position and changing degree of the log data density [55] , SM 3 D brings the potential of discriminating OUT data in low-density areas with large change degree. However, it is unreliable to directly apply vanilla score matching for modeling decentralized data, which suffers from sparsity and multimodal complexity [72, 55] . To obtain a reliable density estimation, SM 3 D explores wider space by generating random samples via Langevin dynamic sampling, and constrains the generated samples to be similar to data samples via maximum mean discrepancy (MMD). To mitigate CH2, SAG regularizes feature invariance between data samples and its augmented version, which is measured by scorebased discrepancy. Though the existing generalization methods capture the invariance in feature space [1, 34] , the vital feature information is inevitably lost due to strictly invariant constraints [87, 10] . This also deteriorates the performance of solving FL OOD generalization. With the benefits of distributional alignment based on Stein indentity [46] , SAG in client model captures IN-C data in a similar feature space with IN data, which not only avoids representation collapse but also maintains diversifying information. Thus SAG makes FOOGD generalize to IN-C data from local covariate-shift distribution and unseen client distribution.The main contributions are: (1) We are the first to study OOD generalization and detection in FL simultaneously, and formulate a evaluation on deploying FL methods in the wild data. (2) We propose FOOGD which estimates reliable global distributions based on arbitrary client probability densities, to guide both OOD generalization and detection. (3) We devise SM 3 D which not only explores wider probability space for density estimation, but also provides the score function values to detect OUT samples. (4) We utilize SAG to maintain the invariance between IN-C and IN data in feature space, which obtains better generalization without collapsing for FL scenarios. (5) We provide theoretical analyses and conduct extensive experiments to validate the effectiveness of FOOGD.2 Related Works 2.1 OOD Detection OOD detection discriminates semantic shift (OUT) data during deployment time [3, 20, 53] . There are two main categories of OOD detection work, i.e., enhancing training-time regularization [48, 21, 75, 13] , and measuring post-hoc detection function of a well-trained model [20, 74, 37] . The first category focuses on ensuring predictors produce low-confidence predictions for OOD data during training, which is effective but mainly requires access to real OUT data [21, 5, 80, 86] . By the way, selecting different auxiliary detection objectives [22, 57] unexpectedly varies the overall performance. The second category utilizes the classification logits [74] , energy score [35, 48] , and feature space estimation [37, 66] from pre-trained models, to detect the OUT data. This reduces the costly computation burden but rigidly relies on the data distribution captured in the pre-trained model. As one kind of methods in post-hoc way, density-based estimation methods [37, 66, 68] can relieve the cost of collecting or synthesizing representative OOD datasets, avoiding biased and ineffective detection [74, 35] and bringing the potential of densities composition. 
ood generalization: 
 OOD generalization targets extracting invariant feature-label relationships and maintaining the deployment performance of model with covariate-shift data in the open-world [31, 54] . To reach this goal, IRM-based work [2, 1, 34] utilizes invariant risk regularization to find invariant representations from different covariate shift data. Besides, there are various work calibrating invariant representations by distribution robust optimization methods [65, 16] , feature alignment methods [15, 14] , augmentaed training [10] , gradient manipulation methods [24] , diffusion modeling [82] and so on. SCONE [3] takes advantage of unlabeled wild mixture data to enhance generalization and build detectors simultaneously. However, SCONE is not suitable for FL, since it requires a hyper-parameter of energy margin and the outlier exposure data [83, 75] . To tackle the meta-task detection and generalization, Chen [9] propose an Energy-Based Meta-Learning (EBML) framework that learns meta-training distribution via two energy-based neural networks. However, it is tough to model two reliable energy models in decentralized models where data and computation resources are constrained.In FL, wild data makes it challening in tackling non-IID modeling, OOD generalization, and OOD detection. Firstly, FL with non-IID data presents significant challenges in balancing global and local model performance [56, 8, 39, 43, 89, 42] (Appendix C). Secondly, FL considers two aspects of generalization, i.e., (1) intra-client generality, and (2) inter-client generality. The intra-client generalization keeps the invariant relationship between data samples and class labels [26, 69, 70, 63] , which is similar to centralized OOD generalization. The inter-client generality work captures invariant representation for heterogeneous client distributions, making the global model adaptive to a newly unseen client [84, 60, 17, 44] . Lastly, regarding OOD detection in FL, it is expected to detect semantic shift data out of the whole class categories set among decentralized data, yet avoid wrongly distinguishing unseen data classes of other clients. FOSTER [83] treats unseen data classes in each client as OUT, and enhances their detection capability via synthesizing virtual data with external classes of other clients. Different from the above methods, we aim to enhance OOD detection and generalization simultaneously by collaborating with different clients. Recently, FedGMM [77] utilizes a federated expectation-maximization algorithm to fit data distribution among clients by estimating Gaussian mixture models(GMM), and detects OUT data via computing GMM probability. It can only roughly capture the data distribution with the prior assumption of GMM. Meanwhile, a orthogonal paradigm of studies focus on tackling concept shifts in federated process [61, 29] . However, it overlooks the coexistence of wild data, resulting in suboptimal performance in federated tasks of OOD generalization and detection.3. T3A [25] adjusts a trained linear classifier using a pseudo-prototype. The filter number is set to be 100 for experiments on Cifar10, Cifar100 and TinyImageNet, 50 for experiments on PACS.To summary, we study four additional evaluations: (1) To compare the performance in domain generalization, we also provide the leave-one-out study on PACS [38] in Tab. 11, where FOOGD also obtains better results. (2) In Tab. 10 We compute different detection metrics, i.e., MSP, energy score, and ASH, and validate that Eq. ( 9) is consistently powerful in detection. Additionally, we present the results of TinyImageNet in Tab. 7, and report our main results with variances in Tab. 15 and Tab. 16. It vividly states that FOOGD can also generalize in the task of more classes and more heterogeneous data distribution.We devise the variants of FOOGD , i.e., fix backbone, w/o SM generalization and detection tasks, since feature extractor not adjusted with the global distribution. When we remove SM 3 D, the estimation of data probability is severely impacted, bringing no detection capability. On the contrary, the generalization performance decreases once we remove SAG. Moreover, compared with fix backbone, both w/o SM 3 D and w/o SAG have better generalization and detection results, indicating that it is necessary to introduce the global distribution.To illustrate the effectiveness of SM 3 D, we further visualize a density estimation of 2-D toy example in Fig. 3 . In detail, we model the red points sampled from target distribution, by tuning a series of coefficients, i.e., λ m = {0, 0.05, 0.1, 0.2, 0.4, 0.5, 0.8, 1} in Eq. ( 8). To start with, the blue generated data contract loosely close to the red target data. Then the distribution divergence gets smaller, making generated distribution overlap with targeted distribution. While, as the effect of MMD increases, the distribution alignment dramatically worsens, even causing the blue generated data to collapse into the expectation of target distribution. As we can see, the mutual impacts between score matching and MMD estimation, SM 3 D has more compact density estimation when λ m = 0.1, compared with blankly using score matching (λ m = 0) or simply using MMD (λ m = 1). In the brand new objective of density estimation, SM 3 D expand the searching range and depth of score modeling, making it possible to comprehensively model data density. Moreover, with the calibration of MMD estimation, original data representation and the generated latents based on the score model are effectively matched, bringing more realistic and correct estimation. Hence SM 3 D could ensure a more aligned and reliable density estimation for sparse and multi-modal data.To study the effectiveness of our choice, i.e., IsOUT(•) defined by the norm of score model in Eq. ( 9), we compare it with existing benchmarks, MSP [20] , Energy score [3] , and ASH [12] . As listed in Tab. 10, MSP is the runner-up method to detection, and it is flexible to detect in all baseline methods. However, IsOUT(•) is more competitive and reliable, since it utilizes the global distribution as guidance.To explore the wild data distribution of FL OOD methods, we visualize T-SNE of data representations in Fig. 8 , and the detection score distributions in Fig. 9 , on Cifar10 α = 5 for FedAvg, FedRoD, To validate the effectiveness of FOOGD in domain generalization tasks, i.e., each client contains one domain data and we train domain generalization model by leave-one-out, following FedIIR [17] .To obtain a fair comparison, we pretrain all models from scratch and utilize adaption methods as stated in their main paper, instead of using a public ImageNet pre-trained model. In terms of Tab. 11, FOOGD obtains performance improvements for FedAvg and FedRoD. Compared with existing adaption methods, FOOGD achieves outstanding results even in the toughest task, i.e., leaving Sketch domain out. This also concludes that FOOGD is capable of inter-client generalization, since FOOGD has utilized global distribution knowledge.In this part, we study the performance evaluation of FOOGD in additional IN-C and OUT datasets. In Tab. 12, we can find that FOOGD consistently enhances the detection capability for different OUT data, validating for the effectiveness of estimating global distribution via SM , with an open-source dataset or instructions for how to construct the dataset). (d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility.In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results. 
problem setting: 
 Federated Learning Formulation with Wild Data. We first formulate the wild data in FL deployment and provide the optimization goal of FL. Empirically, we assume a dataset decentralizes among K clients, i.e., D = ∪ k∈[K] D k . The data distribution of k-th client is simulated following the real-world wild data, i.e.,D k = D IN k + D IN-C k + D OUT k .The objective of the FL model, which simultaneously tackles OOD generalization and detection, is defined as follows: where EQUATIONL k (θ g , θ f ; D k ) = ℓ IN k + ℓ IN-C k + ℓ OUTEQUATIONwhere f θ (•) is main task model, g θ (•) is detector, I is indicator function, and y pred is predicted label.Framework Overview. To optimize the FL objective in Eq. ( 1), we propose FOOGD whose framework overview is depicted in Fig. 2 . For K clients with non-IID data, FOOGD composes their local distributions and aggregate their model parameters in server. In each client, the data samples x as well as its fourier augmented [79] counterparts x, are fed into the same feature extractor of main task f θ (•) to obtain their latent features, z = f θ (x) and z = f θ ( x), respectively. To avoid overwhelming communication costs brought by score models, score matching with maximum mean discrepancy (SM 3 D) trains a score model s θ (•) in feature space. This model captures the data distribution by estimating the gradient of log densities (score functions) of latent features z, i.e., s θ * (z) = ∇ z log p θ (z) ≈ ∇ z log p D (z) [7, 72] . Then score model serves as the detector for the objective in Eq. (2c), discriminating OUT based on the norm of score function values. Besides, Stein augmented generalization (SAG) enhances the generalization capabilities of the feature extractor f θ (•), by the distribution regularization defined via score model. Because score model based distribution ensures that data features and their neighboring augmented samples, e.g., z and z, maintain a consistent probability space [46] . The local modeling iterates until performance converges.In each communication round, since both main task model and score model are parameterized neural networks, it is practical to follow conventional weighted average aggregation [56] , i.e.,EQUATIONwithw k = |D k | K k=1 |D k | , ∀ k∈[K]. These collaborative processes among clients continue until the global model converges, bringing reliable and comprehensive global distribution in the form of global score model. We introduce the details later and illustrate the algorithm of FOOGD in Appendix A Algo. 1.In this part, we introduce the estimation of FL data distribution and how to utilize it for detection. As shown in Fig. 1 , a reliable probability density is eagerly necessary for distinguishing IN and OUT data [75, 27] . Different from existing centralized OUT aware and OUT synthesis methods [13, 21] , the FL framework suffers from the accessibility of OUT data [83] . In this study, we aim to explicitly capture the local IN data distribution of clients, and subsequently compose them to reliable global distribution for discrimination. However, it remains challenging to estimate heterogeneous and non-normalized probability density without prior information during FL modeling.Dynamic Feature Density Estimation. FOOGD estimates score model via score matching in the feature space [72, 32, 7] , i.e., p D (z), circumventing the need for prior distribution knowledge or distribution normalization [72] . Moreover, it alleviates the computational burden by modeling the score of latent representations in a smaller, yet more expressive and continuous space, compared to the scores of the original data [71] . Specifically, given the latent features z = f θ (x), we perturb it via adding random noise v ∼ N (0, I) to obtain z = z + σv, which follows noise-perturbed data distribution p σ ( z|z) := N z; z, σ 2 I . And we model it with noise conditional score model [67] s θ ( z, σ) by minimizing the denoising score matching (DSM) loss, i.e.,EQUATIONwhere the score function of ∇ z log p σ ( z | z) for d-dimensional features, is computed as follows:EQUATIONWhen the noise get to zero, i.e., σ → 0, we have the exact score values s θ ( z, σ) = s θ (z). However, score model based density estimation will inevitably fail once the distribution contains sparse data samples [67, 55, 67] or multiple modalities [32] , as shown in Fig. 3 (a). SM 3 D is motivated to broadly explore the generated random features z gen that samples from the whole distribution space. In detail, SM 3 D first sample from a random distribution, e.g., Normal distribution, as the start latent features, i.e., z 0 ∼ N (0, I). Then SM 3 D utilizes T -step Langevin dynamic sampling [67] (LDS) from density vector fields modeled by the score model, to derive generated latent features z gen = z T :EQUATIONwith ϵ indicating the step size and w t ∼ N (0, I) introducing stochasticity in each step. Lastly, the distribution of a batch of the generated features Z gen = {z gen,i } B i=1 , i.e., p gen (z gen ), is supposed to approximate the distribution of original features Z = {z i } B i=1 , i.e., p D (z), with the calibration of maximum mean discrepancy (MMD(Z, Z gen )) matching: where k(z, z ′ ) = exp( 1 h ∥z -z ′ ∥ 2 ) with bandwidth h is Gaussian kernel function [47, 49] within a unit ball in universal Reproducing Kernel Hilbert Space (RKHS). Because MMD is a non-parametric method that accurately measures the distance between two densities in RKHS, it provides reliable estimations and adapts well to complex data modalities [4] . This approach mitigates the limitations of directly using DSM to estimate distributions by exploring a wider feature space. Unfortunately, as depicted in Fig. 3 (d) , simply using MMD matching does not enhance density estimation, when the target distribution is unknown or inaccurate. But it is quite necessary that the latent distribution is inaccurate and heterogeneous in FL. To fill this gap, SM 3 D seeks to harness and integrate the strengths of both density estimation paradigms, via a trade-off coefficient λ m :EQUATIONEQUATIONIn this way, SM 3 D brings an accurate and flexible implementation for non-normalized data distribution.The implementation procedure of SM 3 D is in Appendix A Algo.2. To illustrate the effectiveness of SM 3 D, we further visualize a density estimation of 2-D toy example in Fig. 3 . In detail, we model the red target points by tuning a series of coefficients, i.e., λ m = {0, 0.1, 0.5, 1} in Eq. ( 8). As we can see, with the mutual impacts between score matching and MMD estimation, SM 3 D has more compact density estimation when λ m = 0.1, compared with blankly using score matching (λ m = 0) or simply using MMD (λ m = 1). As a brand new objective of density estimation, SM 3 D expands the searching range and depth of score modeling, making it possible to comprehensively model data density. Moreover, with the calibration of MMD estimation, original data features and the generated samples based on the score model are effectively matched. Hence SM 3 D could ensure a more aligned and reliable density estimation for sparse and multi-modal data.OOD detection in clients. Remind that the score function indicates the gradient of the log density, which are actually vector fields pointing to the highest density area, as shown in the score function visualization of Fig. 2 . The IN data should point to the high density and reflect the distance via its vector norm. While the OUT data cannot present this satisfying property and further exposure boldly, since the OUT data is always in low-density area [48, 55] . That is, the norm of the score∥s θ * (z)∥ = ∥ ∇zp θ * (z) p θ * (z)∥ decreases in regions of higher density, while increases in lower density. It indicates the larger the norm of score is, the more likely the data sample is OUT. For negative threshold τ < 0, we have detection score function:EQUATION)3.3 SAG: Enhancing Feature Extractor for GerneralizationIn this section, we will illustrate how to enhance generalization capability of feature extractor in FOOGD.In FL scenarios, solving OOD generalization needs not only to keep the local IN-C data classification correctly, but also to maintain performance consistency among all participating clients. The non-IID issue creates a contradiction between achieving both targets. This is because enhancing IN-C accuracy intra-client requires diversification across different classes, whereas inter-client generalization benefits from all IN data being closely clustered, irrespective of class distinctions. Hence, it is expected to balance the feature diversification of different classes and the feature consistency of in-distribution, to realize the consistent data-label relationships intra-and inter-client.Diversifying Feature Invariance Augmentation. FOOGD regularizes invariance among client feature extractors using distribution-aware divergence between the original data x and its augmented version x = T (x) by transformation T . To address this, we propose SAG, which utilizes global distribution and optimizes distributional invariance between latent features of the original and augmented data. This approach maintains the distinguishable diversification of features and consistent data-label mapping across clients.In the feature space, SAG regularizes original data samples to be aligned with augmented ones, i.e., aligning z = f θ (x) and z = f θ ( x). However, directly computing the norm regularization between z and z will cause mode collapse [28] in FL, further degrading the estimation of score model s θ (•) based on SM 3 D. While contrastive methods [62, 73, 51, 50] like FedICON [69] , and L-DAWA [64] ensure diversification and alignment for generalization, they rely on selecting negative samples instead of leveraging global distribution knowledge. Consequently, they fail to maintain consistent invariance among clients. Instead, SAG alternatively introduces kernelized Stein operator guided by score function, i.e.,EQUATIONwhere ϕ(z) is implemented with kernel function k(•, •) mentioned in Eq. ( 7) [46] , while p(z) and q( z) are the distributions for a batch of features Z = {z i } B i=1 , and Z = { z i } B i=1 , respectively. By utilizing the kernelized Stein operator, SAG encourages the samples of augmented features to align with high probability regions of the original features. Additionally, the second term of (10) improves feature diversification and prevents data from collapsing directly to the original distribution modes. According to a fundamental theory named as Stein identity, i.e., E q(x) [A q ϕ(x)] = 0 for arbitrary distribution q(x) [46] , Stein operator brings the potential of measuring two data distributions with the guidance of global distribution estimation. Because score models capture local probability densities and are aggregated into a global score model on the server, they inherit distribution information from all participating clients. Specifically, we first illustrate kernelized Stein discrepancy (KSD) [46, 41, 45] that measures the distribution discrepancy between original data p(z) and augmented data q( z):EQUATIONWe provide the full induction of KSD between original data and augmented data in Appendix B.2. And KSD(p(z), q( z)) equals zero if and only if p(z) and q( z) are the same. By taking the derivative of KSD, we can obtain the updating direction of moving z towards z, which not only keep the invariance of features, but also guarantee diversification avoiding collapse. Therefore, the augmented representation Z has minimal KSD with the original latents Z. This ensures that the final objective of the feature extractor is to minimize the subsequent classification error (between predictions Y pred and ground truth Y gr ) and achieve invariant alignment:EQUATIONBesides, the score model in Eq. ( 11) communicates among different clients to obtain the global distribution, making it possible to be reliable guidance of invariance among clients. This makes SAG a potential generalization approach for modeling feature invariance in the overall FL scenario, even acting warm-start for unseen clients. Therefore, FOOGD is capable of both local IN-C data generalization and consistent performance generalization of clients. The algorithm of SAG can be found in Appendix A Algo. 3. 
theoretical discussion: 
 In this section, we provide the error bound of modeling score model via SM 3 D in federated scenarios, and provide the error bound in Theorem 4.1. Besides, the federated training procedure of score model is the same with the main task model. This indicates that our federated learning convergence bound is unchanged, following [40] . We provide more theoretical details in Appendix B. EQUATION)where C is the upper bound of the MMD, B is batch size, and |D| is the data amount. 
experimental setups: 
 Datasets. Following SCONE [3] , we choose clear Cifar10, Cifar100 [33] , and TinyImageNet [36] as the IN data, and select the corresponding corrupted versions [19] , i.e., Cifar10-C, Cifar100-C and TinyImageNet-C as IN-C data. We evaluate detection with five OUT image datasets: SVHN [59] , Texture [11] , iSUN [78] , LSUN-C and LSUN-R [81] . To simulate the non-IID scenarios, we sample data by label in a Dirichlet distribution parameterized by non-IID degree [23] , i.e., α, for K clients.The smaller α simulates the more heterogeneous client data distribution in federated settings. To evaluate FOOGD on unseen client generalization data, we also use PACS [38] dataset for leave-one-out domain generalization. Details of dataset simulation are in Appendix D.1.Comparison Methods and Evaluations. We study the performance of FOOGD with the state-of-theart (SOTA) federated learning model and FedAvg-like derivant of SOTA centralized OOD methods, i.e., LogitNorm [76] (FedLN), ATOL [88] (FedATOL), T3A [25] (FedT3A). We compare FOOGD with three types of baseline models, i.e., (1) Vanilla FL model: FedAvg [56] and FedRoD We compute the maximum softmax probability [20] (MSP) and report the standard metrics used for OOD detection, i.e., the area under the receiver operating characteristic curve (AUROC), and the false positive rate at threshold corresponding to a true positive rate of 95% (FPR95) [20] .Implementation Details. We choose WideResNet [85] as our main task model for Cifar datasets, and ResNet18 [18] for TinyImageNet and PACS, and optimize each model 5 local epochs per communication round until converging with SGD optimizer. We conduct all methods at their best Table 1 : Main results of federated OOD detection and generalization on Cifar10. We report the ACC of brightness as IN-C ACC, the FPR95 and AUROC of LSUN-C as OUT performance. Non-IID α = 0.1 α = 0.5 α = 5.0 Method ACC-IN ↑ ACC-IN-C↑ FPR95↓ AUROC↑ ACC-IN ↑ ACC-IN-C↑ FPR95↓ AUROC↑ ACC-IN ↑ ACC-IN-C↑Performance Comparison on non-IID data. We categorized our baseline models into two groups based on whether they consider personalization. The results for Cifar10, Cifar100, and TinyImageNet are shown in Tab. 1, Tab. 2, and Tab. 7 in Appendix E.1, respectively. For the first group without considering personalization, the existing centralized OOD methods, i.e., LogitNorm (FedLN), ATOL (FedATOL) and T3A (FedT3A), are not directly competitive among different non-IID scenarios. Though FedATOL achieves satisfying results for both generalization and detection tasks on Cifar10 α = 5, it fails neither in smaller α and dataset containing more classes (i.e., Cifar100). Meanwhile, the vanilla FedAvg degrades its performance in OOD generalization for both Cifar10 and Cifar100 data, and shows no potential of detecting OUT data samples. FedIIR pays more effort to maintain the inter-client generalization via restricting model consistency, making it less effective in non-IID settings. For the second group of personalized FL methods, personalization is quite necessary for both IN data generalization and IN-C generalization, which is similarly illustrated in FedTHE [26] and FedICON [69] . In general, personalized methods are worse in FL detection than non-personalized methods, indicating that there is a conflict between detecting OUT data and enhancing prediction in non-IID setting. More surprisingly, we also discover that personalized adaption methods also detect outliers better compared with vanilla FedRod model. FOSTER has better detection in more heterogenous data distribution, i.e., α = 0.1, compared with its results in α = 5, but its overall performance is supposed to enhance in the future. FOOGD is a flexible FL Client Generalization on PACS Dataset. To validate the effectiveness of FOOGD in domain generalization tasks, i.e., each client contains one domain data and we train domain generalization model by leave-one-out, following FedIIR [17] . To compare fairly, we pretrain all models from scratch and utilize adaption methods as stated in their main paper. In terms of Tab. 9) is consistently powerful in detection. In the future, we plan to integrate privacy enhancement techniques, such as differential privacy, into FOOGD. While the score model in FOOGD captures the score function of the data probability in the latent space, which is extremely difficult to be used for reconstructing the original data by attacking. The primary risk exposure for each client arises from the exchange of model parameters, i.e., the feature extractor and score model. Hence, FOOGD has a comparable level of privacy exposure as existing FL methods dealing with non-IID and OOD shifts, acquiring to be addressed comprehensively.In the supplemental materials, we provide all algorithms in Appendix A, the theoretical analysis in Appendix B, additional related work on federated learning with non-IID data in Appendix C, experimental implementation details in Appendix D, the additional experimental details in Appendix E.The overall algorithm of FOOGD is in Algo. for k = 1, 2, ..., K in parallel do5: Send {θ t f , θ t s } to client k 6: {θ t,k f , θ t,k s } ← Client executes(k, {θ t f , θ t s }) 7:end for EQUATIONProof. For the global score model aggregated from local score models that estimate IN data probability densities, it holds:EQUATIONThen we formulate the score matching for global distribution asEQUATIONwhere K k=1 w k = 1, and the last term is held by Jensen inequation.In term of Vincent [72] , the DSM for each local model s θ k (z) is bounded as follows,EQUATIONwhere v ∼ N (0, I) andEQUATIONTherefore, whenθ = θ * = θ * k , we have J ESM (θ) = J ESM (θ k ) = 0 ∀k ∈ [K], the global score matching finally satisfies:EQUATIONwhich holds due to EQUATION)where C is the upper bound of the MMD, B is batch size, and |D| is the data amount.Assume feature distributions p(z) and q( z) are two bounded distributions satisfying lim ||z||→∞ p(z)ϕ(z) = 0 and lim || z||→∞ q( z)ϕ( z) = 0. And we denote the gradient of log density in z as ∇ z log q( z) = ∇ z q( z) q( z) .A q ϕ( z) = ϕ( z)∇ z log q( z) + ∇ z ϕ( z)introduced in Eq. ( 10) is Stein class, then we have a fundamental property called Stein identity as below:EQUATIONProof.EQUATIONDefinition B.4 (Stein Discrepancy). Stein identity induces Stein discrepancy for two distributions p(z) and q( z):EQUATIONwhere ϕ(•) is the stein class function satisfying boundary conditions, and F is the function space.Lemma B.5. If F is a unit ball in reproducing kernel Hilbert space (RKHS) with positive definite kernel function k(•, •) ∈ F, we obtain the Kernelized Stein Discrepancy for p(z) and q( z) as below:EQUATIONProof. Firstly, considering the expectation of q( z) on the Stein operator with score of p(z), we can expand it via introducing Stein identity:EQUATIONThen, with the property of RKHS, we have k( z, z ′ ) := ⟨ϕ( z), ϕ( z ′ )⟩ H , s p ( z) and s q ( z) are short for ∇ z log p( z) and ∇ z log q( z), respectively, the Stein discrepancy can be rewritten asEQUATIONwhere the last second equation is also held by Stein identity.EQUATIONintroducing another Stein identity holds, i.e.,EQUATIONFinally, taking v( z, z ′ ) to Eq. ( 26) and substitute s θ ( z) = ∇ z log p θ ( z), we can obtain the final KSD without the requirement of computing score values of q( z).KSD(p(z), q( z))EQUATIONIn this part, we first introduce mild and general assumptions [40] , and induct the model updating divergence bound for each client. Because FOOGD aggregates client models similar to its original model, i.e., FedAvg and FedRod, its generalization bound is unchanged compared with the generalization bound proposed in [40] . Please kindly refer to the original paper.Assumption B.6. Let F k (θ) be the expected model objective for client k, and assumeF 1 , • • • , F K are all L-smooth, i.e., for all θ k , F k (θ k ) ≤ F k (θ k ) + (θ k -θ k ) ⊤ ∇F k (θ k ) + L 2 ∥θ k -θ k ∥ 2 . Assumption B.7. Let F 1 , • • • , F N are all µ-strongly convex: for all θ k , F k (θ k ) ≥ F k (θ k ) + (θ k - θ k ) ⊤ ∇F k (θ k ) + µ 2 ∥θ k -θ k ∥ 2 . Assumption B.8. Let ξ tk be sampled from the k-th client's local data uniformly at random. The variance of stochastic gradients in each client is bounded:E ∥∇F k (θ t k , ξ t k ) -∇F k (θ t k )∥ 2 ≤ σ 2 k . Assumption B.9.The expected squared norm of stochastic gradients is uniformly bounded, i.e.,E ∥∇F k (θ t k , ξ t k )∥ 2 ≤ V 2 for all k = 1, • • • , K and t = 1, • • • , T -1.Next, we introduce the lemma related to the bound of client model divergence.With assumption B.9, η t is non-increasing and η t < 2η t+E (learning rate of t-th round and E-th epoch) for all t ≥ 0, there exists t 0 ≤ t, such that tt 0 ≤ E -1 and θ t0 k = θ t0 for all k ∈ [K]. It follows thatEQUATION)Proof. Let E be the maximal local epoch. For any round t > 0, communication rounds from t 0 to t exist tt 0 < E -1. and the global model θ t0 and each local model θ t0 k are same at round t 0 .EQUATIONwhere the Eq. (31b) holds since E(θ t k -θ t0 ) = θ tθ t0 , and E∥X -E(X)∥ ≤ E∥X∥, and Eq. (31d) derives from Jensen inequality.Federated Learning (FL) with non-IID data presents significant challenges in balancing global and local model performance. One prominent method, FedAvg [56] , uses simple averaging but struggles with client heterogeneity, often degrading individual client models. To improve global performance, methods like FedProx [39] introduce regularization to keep local updates close to the global model, and SCAFFOLD [30] uses control variates to reduce variance from client heterogeneity. For local personalization, meta-learning and transfer learning techniques such as DFL [52] focus on enhancing individual client models to adapt better to local data. Lastly, methods like FedRoD [8] attempt to achieve joint global and local performance by decomposing models, aiming to balance both objectives, though extreme non-IID settings still pose challenges. However, these FL methods modeling non-IID data take no actions to OOD data, causing them less advantageous.Datasets Following SCONE [3] , we choose clear TinyImageNet [36] , Cifar10 and Cifar100 [33] and as the IN data. For OOD generalization, we select the corresponding synthetic covariate-shift dataset as IN-C data, by leveraging 15 common corruptions for all datasets, and 4 additional corruptions for Cifar10-C and Cifar100-C [19] . To evaluate FOOGD on unseen client data, we also perform experiments on PACS [38] for leave-one-out domain generalization. For OOD detection, we evaluate five OUT image datasets: SVHN [59] , Texture [11] , iSUN [78] , LSUN-C and LSUN-R [81] .The original train and test datasets are split to all clients to simulate the practical non-IID scenario [23] . Specifically, we sample a proportion of instances of class j to client k using a Dirichlet distribution, i.e., p j,k ∼ Dir(α), where α denotes the non-IID degree of each class among the clients. A smaller α indicates a more heterogeneous data distribution. For the PACS dataset, 3 clients are set where each client holds data from one distinct domain, and the remaining unseen domain data is used for testing. We choose WideResNet [85] as our main task model for Cifar datasets, and ResNet18 [18] for TinyImageNet and PACS, and optimize each model 5 local epochs per communication round until converging with SGD optimizer. We conduct all methods at their best and report the average results of three repetitions with different random seeds. We consider client number K = 10, participating ratio of 1.0 for performance comparison, and the hyperparameters λ m = 0.5, λ a = 0.05.Below are the detailed settings and hyperparameters for all federated baseline models.1. FedAvg [56] is the classic federated learning method in which clients perform multiple epochs of SGD on their local data. The learning rate is set to 0.1, with a momentum of 0.9 and weight decay of 5e-4. 2. FedIIR [17] tries to implicitly learn invariant relationships through inter-client gradient alignment.We set the ema parameter 0.95 and penalty term 1e-3. FedRoD [8] is the personalized federated learning method that adopts two classifiers to achieve both generic and personalized performance.4. FOSTER [83] learns a class-conditional generator to synthesize virtual external-class OOD samples to enhance the detection ability. The weight for the outlier exposure term is set to 0.1.FedTHE [26] also contains a personalized classifier. This method adopts an test time adaptation strategy that interpolates the personalized head and global classifier to enforce feature space alignment. We set α = 0.1 and β = 0.3 as suggested in the original paper. We also compare with centralized OOD generalization and detection methods, adapting them to a FedAvg-like approach for the federated learning scenario.1. LogitNorm [76] applies a straightforward modification to the cross-entropy loss, imposing a constant norm on the logits to improve detection capabilities. τ is tuned to be set as 0.04. [88] generates OOD data to devise an auxillary OOD detection task to facilitate real OOD detection. We set the dimension of the latent to be 100, the mean and variance of the Gaussian distribution generating OOD data to be 5.0 and 0.1.Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material? Answer: [Yes] Justification: We have provided publicly available dataset and experiment details information in Section 5.1 of the main paper and Section A and D of the Appendix. We commit to releasing the source code after the paper is accepted. Guidelines:• The answer NA means that paper does not include experiments requiring code. • At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable). • Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted. 
experimental setting/details: 
 Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?Answer: [Yes]Justification: We have provided detailed implementation details and training settings in Section 5.1 of the main paper and Section A and D of the Appendix.Guidelines:• The answer NA means that the paper does not include experiments.• The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them. • The full details can be provided either with the code, in appendix, or as supplemental material. 
experiment statistical significance: 
 Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?Answer: [Yes] Justification: Our experimental results are computed three times and report the average result.Guidelines:• The answer NA means that the paper does not include experiments.• The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper. • The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions). • The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.) • The assumptions made should be given (e.g., Normally distributed errors). • It should be clear whether the error bar is the standard deviation or the standard error of the mean. • It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified. • For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates). • If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text. 
experiments compute resources: 
 Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?Answer: [Yes] Justification: My research group supports me in computer resources.Guidelines:• The answer NA means that the paper does not include experiments.• The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage. • The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute. • The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper). Guidelines:• The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.• If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics. • The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction). 10. Broader Impacts Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed? Answer: [Yes] Justification: The paper discussed both potential positive societal impacts and negative societal impacts in Section 1 of the Appendix. Guidelines:• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact. • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster. • The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology. • If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML). 
safeguards: 
 Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)? Answer: [NA] Justification: The paper does not involve crowdsourcing nor research with human subjects. Guidelines:• The answer NA means that the paper does not involve crowdsourcing nor research with human subjects. • Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper. • We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution. • For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review. 
 
 Appendix:  


Decision: This paper focuses on simultaneously dealing with OOD detection and OOD generalization in FL scenarios for the first time. To solve this novel challenge, the proposed method, FOOGD, that estimates the probability density of each client to derive the global data distribution using SM3D, and employs SAG to train a feature extractor that captures invariant yet diverse knowledge, enabling both local covariate shift generalization and inter-client generalization. Extensive experiments are conducted to demonstrate the effectiveness of the proposed method.
The reviewers initially suggested the following strong points and concerns.

Strong points:
- FOOGD is the first framework in federated learning to simultaneously address both OOD generalization and detection, effectively tackling a significant challenge in the field.

- The use of score modeling in federated learning is both novel and insightful, particularly for managing heterogeneously distributed data.

- The theoretical and empirical analyses effectively demonstrate the effectiveness of the proposed method.

Concerns:

- The computational costs of the proposed method seem to be high (as noted by all reviewers).

- Certain sections lack sufficient explanations or detailed content.

- There are privacy concerns regarding the transmission of detailed model parameters and score function values between clients and the server.

- The effectiveness of the proposed method appears to heavily depend on the accuracy of the score modeling, raising concerns in scenarios where data distributions are highly complex or sparse.

The authors have adequately addressed the reviewers' concerns, leading all reviewers to raise their initial scores. The authors are advised to incorporate these changes into the final version of the paper.

Reviews: review: paper_summary: paper_summary: This paper focuses on the federated learning setup that non-IID, semantic-shift, and covariate-shift take place in the same time. And the authors propose a framework of FOOGD with a unnormalized distribution estimation method, i.e., SM3D, to release the distribution assumption and constraints in heterogeneous modeling. Both federated OOD generalization and detection can be soundly solved via SM3D and SAG modules. Compared with existing methods, FOOGD is validated via extensive experiments for effectiveness.

After rebuttal, I raise the Rating from 7 to 8.
strength_weakness: strength_weakness: 1.	How to understand IsOUT() function with negative threshold in Equation 9?
2.	Score model brings additional computation cost. 
3.	The correspondence between federated loss of $\mathcal{L}_k$ and the practical loss $\mathcal{L}_s$ and $\mathcal{L}_f$ are not explicitly explained.
questions: questions: 1.	How to enhance the generalization for unseen client distribution?
limitations: limitations: Yes
paper_summary: paper_summary: This paper addresses various OOD (Out-of-Distribution) shifts that may occur in federated settings by proposing a unified framework to simultaneously tackle OOD generalization and detection issues. Specifically, this paper introduces FOOGD, which estimates arbitrary client probability densities to create a reliable global distribution that guides both OOD generalization and detection. Besides, it presents $SM^3D$ and SAG to respectively enhance OOD detection and generalization capabilities. Finally, extensive experiments demonstrate the effectiveness of the proposed methods
strength_weakness: strength_weakness: 1. This paper proposes the FOOGD, $SM^3D$, and SAG methods to address OOD generalization and detection problems. It is essential to clearly define the relationships among these three methods in the abstract and introduction to enhance the readability of the entire paper.

2. This paper uses 'semantic-shift' to describe the issue of unknown class bias in OOD detection, following the traditional machine learning concept[1]. However, in federated learning, this problem is generally referred to as 'concept shift'[2][3]. It is recommended to revise this terminology to align better with the conventions of the federated learning community.

3. In the related work section (Section 2.3), it is recommended to include a discussion on 'concept shift' in federated learning and cite relevant literature.

4. In the methodology section, given the involvement of multiple innovative components, it is recommended to analyze their complexity.


References:

[1] Haoyue Bai et al. Feed two birds with one scone: Exploiting wild data for both out-of-distribution generalization and detection. ICML, 2023.

[2] Panchal K et al. Flash: concept drift adaptation in federated learning. ICML, 2023.

[3] Jothimurugesan E et al. Federated learning under distributed concept drift. ICAI, 2023.
questions: questions: See weaknesses.
limitations: limitations: See weaknesses.
paper_summary: paper_summary: This paper introduces FOOGD, a federated collaboration framework designed to achieve both out-of-distribution (OOD) generalization and detection. FOOGD estimates the probability density of each client to obtain a reliable global distribution and incorporates the SM3D model and SAG module to enhance the detection capability of the score model and the generalization ability of the feature extractor.
strength_weakness: strength_weakness: 1.	The experimental section discusses the results and performance comparisons. Although this section provides performance metrics for multiple datasets, the description of the chosen statistical analysis methods (such as whether hypothesis testing or confidence interval calculation was performed) is insufficient, affecting the reliability of the result interpretation.
2.	Evaluation metrics like ACC-IN and ACC-IN-C are not explained.
3.	The related work section only introduces some comparison methods and lacks more related work, such as FedAvg. Besides, some references are incomplete, such as ref. 46.
4.	No open-source code has been provided.
questions: questions: 1.	Could the experimental results section provide a more detailed analysis of OOD to better explain the superiority of the FOOGD method in this aspect?
limitations: limitations: See the above weakness.
paper_summary: paper_summary: This paper introduces a FL framework FOOGD aimed at addressing the simultaneous challenges of the out-of-distribution (OOD) generalization and OOD detection in decentralized environments. FOOGD estimates the data distribution of different clients through SM3D and introduces SAG to ensure the consistency of features.
strength_weakness: strength_weakness: There is  no training-log provided in supp materials. There are also questions regarding the foundation methods as listed below.
questions: questions: (1) The dual approach of handling both OOD generalization and detection introduces significant computational complexity and overhead. However, FOOGD is not clearly stated, and there are no experiments to quantitatively analyze it. The iterative process of updating and aggregating both main task models and score models can still be costly in terms of bandwidth and synchronization requirements among clients.
(2) The need to transmit detailed model parameters and score function values between clients and the server can lead to high communication costs. In addition, the score function values may cause privacy leakage issues, thereby attacking the score model.
(3) While the FOOGD framework aims to generalize across different client distributions, the inherent diversity and possible sparsity of client data can cause the model to overly adapt to specific local patterns, reducing its effectiveness in capturing broader, global trends.
(4) The effectiveness of FOOGD heavily relies on the accuracy of the local density estimation provided by the SM3D component. However, in scenarios where data distributions are highly complex or sparse, it may lead to less reliable detection of OOD samples and potential false positives or negatives.
limitations: limitations: The authors indicated the paper's focus (on privacy issues) as an limitation but not elaborated in paper itself.

Comments: title: Response to reviewer RpTd
Response to Reviewer MUVw
Response to Reviwer dEK5
Response to reviwer cFix
Response to Reviewer cFix
Response to Reviewer cFix
Response to Reviwer cFix
Thanks for your response
comment: Thank you for appreciating our work. We will make sure to include the relevant details and the addressed specific issues in the camera-ready version.
We are pleased that our work has received professional evaluation and recognition. We are more than willing to incorporate the suggested revisions into our camera-ready version to address the issues raised.
Thank you very much for your reviews and response. We sincerely appreciate it for your time and effort in evaluating our work. We are grateful for your valuable feedback and are particularly thankful for your recognition of the contributions we have made.
Thank you for your timely response and insightful reviwes. We are delighted to have addressed your concens and to know that you appreciate our work! The conversation with you are greatly beneficial for our work, such as providing mor detailed explainations. Once again, we are sincerely gratitude for your thorough and patient reviews.
Thank you for the detailed response. Some concerns have been addressed in the response, so I have raised the mark to the positive rating.
**For weakness 4, we release our project in an anonymous page: https://anonymous.4open.science/r/FOOGD/, and we have released the test model trained on Cifar10 $\alpha=0.5$ for FedAvg-FOOGD, in our supplements, for validating the effectiveness of FOOGD.**

**For the response of question 1, please point out your concerns directly. We are willing to clarify all the misunderstandings.**

In summary, we believe that some previous rebuttals might have caused a misunderstanding. We hope you can reconsider our response to see if it resolves your issue. If you have any other questions, please kindly consider responding; we would be happy to discuss them. Please provide us your additional concens as soon as possible, since the the rebuttal time is approaching the end.
Table 2: Main results of federated OOD detection and generalization on Cifar100. We report the ACC of brightness as IN-C ACC, the FPR95 and AUROC of LSUN-C as OUT performance.

| Non-IID \ Method | $\alpha=0.1$ |  |  |  | $\alpha=0.5$ |  |  |  | $\alpha=5$  |  |  |  |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|  | ACC-IN $\uparrow$ | ACC-IN-C $\uparrow$ | FPR95 $\downarrow$ | AUROC $\uparrow$ | ACC-IN $\uparrow$ | ACC-IN-C $\uparrow$ | FPR95 $\downarrow$ | AUROC $\uparrow$ | ACC-IN $\uparrow$ | ACC-IN-C $\uparrow$ | FPR95 $\downarrow$ | AUROC $\uparrow$ |
| FedAvg | 51.67 $\pm$ 1.37 |    47.54 $\pm$ 0.48   | 78.35 $\pm$ 1.64 | 67.16 $\pm$ 1.17 | 58.28 $\pm$ 0.48 |    54.62 $\pm$ 0.67   | 72.84 $\pm$ 0.81 | 70.86 $\pm$ 1.52 | 61.40 $\pm$ 0.12 |    56.72 $\pm$ 0.17   | 72.68 $\pm$ 0.34 | 70.59 $\pm$ 0.19 |
| FedLN | 52.48 $\pm$ 1.41 |    48.15 $\pm$ 1.57   | 66.94 $\pm$ 1.61 | 74.82 $\pm$ 0.50 | 59.39 $\pm$ 0.72 |    53.86 $\pm$ 1.23   | 68.31 $\pm$ 1.24 | 73.41 $\pm$ 0.33 | 61.00 $\pm$ 0.40 |    56.33 $\pm$ 0.82   | 69.18 $\pm$ 0.46 | 75.87 $\pm$ 0.74 |
| FedATOL | 43.65 $\pm$ 0.54 |    41.08  $\pm$  0.60   | 65.26 $\pm$ 0.96 | 81.64 $\pm$ 0.33 | 60.62 $\pm$ 0.61 |    56.63 $\pm$ 0.91   | 70.10 $\pm$ 0.81 | 79.27 $\pm$ 0.61 | 64.16 $\pm$ 0.81 |    63.61 $\pm$ 0.42   | 80.27 $\pm$ 1.61 | 60.51 $\pm$ 1.75 |
| FedT3A | 51.67 $\pm$ 1.37 |    51.50 $\pm$ 0.29   | 78.35 $\pm$ 1.64 | 67.16 $\pm$ 1.17 | 58.28 $\pm$ 0.48 |    55.42 $\pm$ 1.63   | 72.84 $\pm$ 1.56 | 70.86 $\pm$ 1.52 | 61.40 $\pm$ 0.12 |    55.51 $\pm$ 0.96   | 72.68 $\pm$ 0.34 | 70.59 $\pm$ 0.19 |
| FedIIR | 51.63 $\pm$ 0.61 |  47.88 $\pm$ 1.19   | 81.91 $\pm$ 0.47 | 63.99 $\pm$ 0.53 | 58.66 $\pm$ 0.41 |    55.72 $\pm$ 0.29   | 77.62 $\pm$ 1.10 | 65.87 $\pm$ 0.46 | 61.70 $\pm$ 0.76 |    57.65 $\pm$ 0.80   | 72.57 $\pm$ 0.37 | 69.07 $\pm$ 0.52 |
| FedAvg+FOOGD | 53.84 $\pm$ 0.83 |    51.69 $\pm$ 0.32   | 36.40 $\pm$ 1.11 | 91.41 $\pm$ 0.36 | 61.82 $\pm$ 0.20 |    59.91 $\pm$ 0.31   | 55.70 $\pm$ 0.78 | 86.42 $\pm$ 0.24 | 64.96 $\pm$ 0.51 |    64.18 $\pm$ 0.31   | 57.70 $\pm$ 0.87 | 84.03 $\pm$ 0.15 |
| FedRoD | 73.13 $\pm$ 0.85|69.26 $\pm$ 0.41| 66.34 $\pm$ 1.53 | 73.02 $\pm$ 1.82 | 66.88 $\pm$ 0.61 |    61.28 $\pm$ 0.98   | 70.13 $\pm$ 0.86 | 69.48 $\pm$ 0.65 | 61.34 $\pm$ 0.78 |    55.80 $\pm$ 1.21   | 74.86 $\pm$ 0.98 | 67.76 $\pm$ 1.31 |
| FOSTER | 72.54 $\pm$ 1.51 |    67.50 $\pm$ 0.57| 61.25 $\pm$ 1.05 | 75.44 $\pm$ 0.89 | 62.45 $\pm$ 0.55 |    57.62 $\pm$ 0.87   | 73.26 $\pm$ 1.13 | 68.71 $\pm$ 0.85 | 53.80 $\pm$ 0.31 |    49.28 $\pm$ 0.74   | 76.94 $\pm$ 1.62 | 65.47 $\pm$ 1.72 |
| FedTHE | 73.83 $\pm$ 0.48 |    69.09 $\pm$ 0.56   | 64.73 $\pm$ 0.79 | 75.16 $\pm$ 0.34 | 66.22 $\pm$ 0.68 |61.19 $\pm$ 0.92   | 72.95 $\pm$ 1.84 | 69.38 $\pm$ 1.64 | 61.03 $\pm$ 0.22 |    57.03 $\pm$ 0.16   | 71.43 $\pm$ 0.64 | 69.01 $\pm$ 0.87 |
| FedICON | 72.22 $\pm$ 0.72 |67.79 $\pm$ 0.31   | 61.36 $\pm$ 0.39 | 77.12 $\pm$ 0.55 | 65.86 $\pm$ 0.81 |61.83 $\pm$ 0.55   | 69.99 $\pm$ 1.02 | 71.03 $\pm$ 0.39 | 62.11 $\pm$ 0.74|57.62 $\pm$ 0.28   | 70.91 $\pm$ 0.97 | 70.84 $\pm$ 0.73 |
| FedRoD+FOOGD | 77.88 $\pm$ 0.28 |75.70 $\pm$ 0.26|58.81 $\pm$ 0.48 | 86.07 $\pm$ 0.39 |  70.30 $\pm$ 0.46 |    68.23 $\pm$ 0.25| 45.19 $\pm$ 0.67 | 89.59 $\pm$ 0.28 | 64.94 $\pm$ 0.79 |    62.56 $\pm$ 0.72   | 65.18 $\pm$ 1.19 |80.47 $\pm$ 0.32|

**As we can see, the model performance variance of FOOGD is very small, indicating the performance stability of FOOGD in OOD data. This also validates that our model is effective and practical for federated learning with wild data.**

**For weakness 2, we reply that ACC-IN and ACC-IN-C are commonly used accuracies for the two test sets, i.e., in-distribution data (Non-IID data) and covariate-shift data (OOD Generalization), respectively**. We have introduced them in lines 278-2799 of the main paper. This is used in federated learning considering semantic shifts, e.g., FedTHE, where ACC-IN corresponds to original local test, and ACC-IN-C corresponds to corrupted local test. 

**For weakness 3, the related work, e.g., FedAvg as well as their implementations are listed in lines 664-693, please kindly refer to this part for more details.** In this work, we mainly focus on tackle the OOD shifts in federated learning, which is orthogonal to the existing work that tackles heterogeneity. We will add a section for introducing work related on FL with non-IID data. 
**The reference you indicated, i.e., ref.46, is the SVHN dataset that is commonly used in detecting OUT samples.** SVHN is a real-world image dataset from Google Street View house numbers, comprising 73,257 training samples and 26,032 testing samples across 10 classes. We introduce it as an OOD detection task in line 267  and line 646 of paper.
**We are not planning to address the problems you raised in future work, instead, we reverse these problems in our current work. The future version indicates that the camera-ready version we revised based on the current version, because it is impossible to resubmit on the current version.** 
We elaborate our revised version in the following.

**The evidential results for weakness 1 is explained in our A1, where we provide the reason for choosing accuracy for OOD generalization, and FPR95 and AUROC for OOD detection, which statistically follow the work of FedTHE, FOSTER, and SCONE.** This is introduced in lines 272-282 of main paper, and lines 654-663 in appendix. We omit the statistics in our rebuttal due to space limits. And we provide the revised two main tables as below.

**Table 1: Main results of federated OOD detection and generalization on Cifar10. We report the ACC of brightness as IN-C ACC, the FPR95 and AUROC of LSUN-C as OUT performance.**
| Non-IID\Method | $\alpha=0.1$ |  |  |  | $\alpha=0.5$ |  |  |  | $\alpha=5$  |  |  |  |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|  | ACC-IN $\uparrow$ | ACC-IN-C $\uparrow$ | FPR95 $\downarrow$ | AUROC $\uparrow$ | ACC-IN $\uparrow$ | ACC-IN-C $\uparrow$ | FPR95 $\downarrow$ | AUROC $\uparrow$ | ACC-IN $\uparrow$ | ACC-IN-C $\uparrow$ | FPR95 $\downarrow$ | AUROC $\uparrow$ |
| FedAvg | 68.03 $\pm$ 1.17 |    65.44 $\pm$ 1.18   | 83.41 $\pm$ 1.57 | 58.05 $\pm$ 0.89 | 86.59 $\pm$ 1.13 |    83.72 $\pm$ 1.74   | 43.70 $\pm$ 0.83 | 84.18 $\pm$ 0.23 | 86.50 $\pm$ 0.33 |    85.08 $\pm$ 0.49   | 38.24 $\pm$ 0.55 | 85.37 $\pm$ 0.29 |
| FedLN | 75.24 $\pm$ 0.44 |    71.77 $\pm$ 0.67   | 56.14 $\pm$ 0.91 | 84.14 $\pm$ 0.37 | 86.10 $\pm$ 0.89 |    84.20 $\pm$ 1.82   | 39.26 $\pm$ 1.14 | 89.64 $\pm$ 0.52 | 87.20 $\pm$ 1.26 |    85.08 $\pm$ 1.43   | 33.33 $\pm$ 2.38 | 90.87 $\pm$ 0.58 |
| FedATOL | 55.93 $\pm$ 1.87 |    54.44 $\pm$ 1.72   | 49.50 $\pm$ 1.59 | 86.22 $\pm$ 2.74 | 87.55 $\pm$ 0.91 |    85.64 $\pm$ 0.54   | 27.87 $\pm$ 1.32 | 93.48 $\pm$ 0.69 | 89.27 $\pm$ 0.68 |    88.28 $\pm$ 1.32   | 19.66 $\pm$ 2.62 | 95.25 $\pm$ 0.78 |
| FedT3A | 68.03 $\pm$ 1.17 |    61.52 $\pm$ 1.39   | 83.41 $\pm$ 1.57 | 58.05 $\pm$ 0.89 | 86.59 $\pm$ 1.13 |    82.85 $\pm$ 0.44   | 43.70 $\pm$ 0.83 | 84.18 $\pm$ 0.23 | 86.50 $\pm$ 0.33 |    85.01 $\pm$ 1.46   | 38.24 $\pm$ 0.55 | 85.37 $\pm$ 0.29 |
| FedIIR | 68.26 $\pm$ 0.66 |    66.12 $\pm$ 0.74   | 79.48 $\pm$ 0.99 | 63.31 $\pm$ 1.38 | 86.75 $\pm$ 0.98 |    84.75 $\pm$ 1.92   | 40.91 $\pm$ 0.64 | 84.94 $\pm$ 0.49 | 87.77 $\pm$ 0.66 |    86.10 $\pm$ 0.95   | 34.69 $\pm$ 1.07 | 87.66 $\pm$ 0.47 |
| FedAvg+FOOGD | 75.09 $\pm$ 0.79 |    73.71 $\pm$ 0.93   | 35.32 $\pm$ 1.02 | 91.21 $\pm$ 0.78 | 88.36 $\pm$ 0.43 |    87.26 $\pm$ 0.86   | 17.78 $\pm$ 0.62 | 96.53 $\pm$ 0.18 | 88.90 $\pm$ 0.29 |    88.25 $\pm$ 0.12   | 12.02 $\pm$ 0.34 | 97.77 $\pm$ 0.41 |
| FedRoD | 91.15 $\pm$ 0.87 |    89.90 $\pm$ 0.85   | 47.97 $\pm$ 1.88 | 80.96 $\pm$ 0.90 | 89.62 $\pm$ 0.55 |    87.70 $\pm$ 0.80   | 37.03 $\pm$ 1.40 | 86.50 $\pm$ 0.97 | 87.69 $\pm$ 0.88 |    86.26 $\pm$ 1.19   | 36.13 $\pm$ 1.12 | 86.65 $\pm$ 0.36 |
| FOSTER | 90.22 $\pm$ 0.88 |    88.70 $\pm$ 0.82   | 47.40 $\pm$ 1.27 | 77.44 $\pm$ 0.93 | 86.92 $\pm$ 1.85 |    85.82 $\pm$ 1.10   | 42.03 $\pm$ 1.51 | 83.91 $\pm$ 1.11 | 87.83 $\pm$ 1.38 |    85.96 $\pm$ 1.02   | 36.42 $\pm$ 1.14 | 86.19 $\pm$ 0.87 |
| FedTHE | 91.05 $\pm$ 0.66 |    89.77 $\pm$ 0.91   | 58.14 $\pm$ 2.79 | 82.04 $\pm$ 1.15 | 89.14 $\pm$ 0.93 |    87.68 $\pm$ 0.41   | 40.28 $\pm$ 2.43 | 85.30 $\pm$ 1.91 | 88.14 $\pm$ 0.24 |    86.18 $\pm$ 0.57   | 35.35 $\pm$ 1.94 | 86.79 $\pm$ 0.37 |
| FedICON | 89.06 $\pm$ 0.43 |    89.18 $\pm$ 0.81   | 48.22 $\pm$ 1.48 | 81.28 $\pm$ 0.44 | 75.83 $\pm$ 1.07 |    75.35 $\pm$ 0.36    | 56.19 $\pm$ 1.58 | 79.88 $\pm$ 0.51 | 87.20 $\pm$ 1.13 |    85.39 $\pm$ 0.99   | 35.63 $\pm$ 1.16 | 86.45 $\pm$ 0.41 |
| FedRoD+FOOGD | 93.51 $\pm$ 0.65 |    92.74 $\pm$ 0.46   | 32.99 $\pm$ 1.30 | 91.76 $\pm$ 0.26 | 90.46 $\pm$ 0.78 |    90.16 $\pm$ 0.51   | 25.51 $\pm$ 1.46 | 94.19 $\pm$ 0.78 | 89.44 $\pm$ 0.88 |    88.62 $\pm$ 0.37   | 18.91 $\pm$ 0.46 | 96.25 $\pm$ 0.22 |
Thank you for the response. However, I am unhappy with the response since it did not address my concerns completely. All the problems are planned to be addressed in future work rather than the current version, and the authors did not provide evidence to address the issues in the response. Thus, I will make a weak reject decision for the paper.
It clearly addresses my concerns, and I will raise my score.
Thank you for the detailed response, the author effectively addressed my issue, I will increase my grade.
Hope you can add these details to your appendix.
It clears my concerns and I have lifted scores.