Title: FOOGD: Federated Collaboration for Both Out-of-distribution Generalization and Detection
Venue: NeurIPS 2024
Accepted: yes
Keywords: Federated learning; Out-of-distribution;
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.

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

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, SM 3 D 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 nonnormalized decentralized distributions, (2) detecting semantic shift data via score values, and (3) generalizing to covariate-shift data by regularizing feature extractor. The prejoct is open in https://github.com/XeniaLLL/FOOGD-main.git .

1 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 OODDetection

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.

2.2 OODGeneralization

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.

2.3 Federated Learning with Wild Data

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 Methodology

3.1 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:

𝜵𝒛 𝐥𝐨𝐠 𝒑𝜽 (𝒛)

Feature

Extractor

Data Augmentation

Score

Model

෡ 𝒁

Score Function

𝓝(𝟎,𝟏)

Client

𝑲

𝒁𝒈𝒆𝒏

𝑿

෡ 𝑿

𝒁

𝒁

LDS

samples of

𝑿

samples of

෡ 𝑿

MMD

𝐒𝐌 𝟑 𝐃: 𝐃𝐞𝐭𝐞𝐜𝐭𝐢𝐨𝐧

𝐒𝐀𝐆:𝐆𝐞𝐧𝐞𝐫𝐚𝐥𝐢𝐳𝐚𝐭𝐢𝐨𝐧

IN

OUT

KSD

𝜵𝒛 𝐥𝐨𝐠 𝒑𝜽 (𝒛)

𝜵𝒛 𝐥𝐨𝐠 𝒑 𝜽 (𝒛)

Feature

Extractor

Data Augmentation

Score

Model

෡ 𝒁

Score Function

𝓝(𝟎,𝟏)

Client

𝒌

𝒁𝒈𝒆𝒏

𝑿

෡ 𝑿

𝒁

𝒁

LDS

samples of

𝑿

samples of

෡ 𝑿

MMD

𝐒𝐌 𝟑 𝐃: 𝐃𝐞𝐭𝐞𝐜𝐭𝐢𝐨𝐧

𝐒𝐀𝐆:𝐆𝐞𝐧𝐞𝐫𝐚𝐥𝐢𝐳𝐚𝐭𝐢𝐨𝐧

IN

OUT

KSD

𝜵𝒛 𝐥𝐨𝐠 𝒑𝜽 (𝒛)

Server

Score

Model

Global

Feature

Extractor

Global

Score Model Composition

Global

Client

𝟏

Client

𝑲

...

𝜵𝒛 𝐥𝐨𝐠 𝒑 𝜽 (𝒛)

Feature

Extractor

Data Augmentation

Score

Model

෡ 𝒁

Score Function

𝓝(𝟎,𝟏)

Client

𝟏

𝒁𝒈𝒆𝒏

𝑿

෡ 𝑿

𝒁

𝒁

LDS

samples of

𝑿

samples of

෡ 𝑿

MMD

𝐒𝐌 𝟑 𝐃: 𝐃𝐞𝐭𝐞𝐜𝐭𝐢𝐨𝐧

𝐒𝐀𝐆:𝐆𝐞𝐧𝐞𝐫𝐚𝐥𝐢𝐳𝐚𝐭𝐢𝐨𝐧

IN

OUT

KSD

𝜵𝒛 𝐥𝐨𝐠 𝒑𝜽 (𝒛)

where L k ( θ g , θ f ; D k ) = ℓ IN k + ℓ IN-C k + ℓ OUT k , and w k represents weight ratio for the k -th client. The OOD measurements ℓ IN k , ℓ IN-C k , ℓ OUT k correspondingly justify the IN generalization, IN-C generalization, and OUT detection in each client k , as follows:

̸

̸

where 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.,

with w 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.

3.2 SM 3 D : Estimating Score Model for Detection

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.,

where the score function of ∇ ˜ z log p σ (˜ z | z ) for d -dimensional features, is computed as follows:

When 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 :

with ϵ 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:

L.5

1.5

1.0

1.0

0.5

0.5

0.0

0.0

S'0-

0.5

YT

1.0

1

-1.5

1.5

-1.0

0.5

0.0

0.5

1.0

1.5

-1.0

0.5

0.0

0.5

1.0

1.5

(a)m=0

(b)m = 0.1

ST

1.5

1.0

1.0

5'0

0.5

0.0

0.0

0.3

-0.5

-1.0

1.0

-1.5

1.5

-1.5

-1.0

0.5

0.0

0.5

1.0

1.5

2.0

2.0

-2.0

-1.5-1.0=0.5

0.0

0.5

1.0

2.0

(c)m = 0.5

(d)Am = 1.0

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 :

In 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.

OODdetection 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 ) ∥ = ∥ ∇ z p θ ∗ ( 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:

3.3 SAG : Enhancing Feature Extractor for Gerneralization

In 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.,

where ϕ ( 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 ) :

We 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:

Besides, 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.

4 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.

Theorem 4.1 (Error Bound of Decentralized Score Matching via SM 3 D ) . Assume the original MMD( Z , Z gen ) ≤ C for randomly initialized score model s θ ( z ) in Eq. (7) , the score model achieves optimum and MMD decreases. By Lemma B.1, we can obtain the final error bound of global s θ ( · ) as:

where C is the upper bound of the MMD, B is batch size, and |D| is the data amount.

5 Experiments

5.1 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 [8], (2) FL with OOD detection : FOSTER [83], FedLN , and FedATOL , (3) FL with OOD generalization : FedT3A , FedIIR [17], FedTHE [26], FedICON [69]. For evaluation, we report the accuracy of IN data (ACCIN) and IN-C data (ACC-IN-C) to validate IN generalization and OOD generalization, respectively. 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

(a) FedATOL

(b) FedAvg+

FOOGD

(c) FedTHE

(d) FedRoD+

FOOGD

IN-C

NO

IN

IN-C

NO

IN

IN

IN-C

OUT

IN

IN-C

OUT

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 . We provide the full implementation details in Appendix D.2.

5.2 Experimental Results

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

framework and achieves significant results for wild data tasks, i.e., IN generalization, IN-C generalization, and OUT detection, on Cifar10, Cifar100, and TinyImageNet. Specifically, FOOGD achieves comparable performance in enhancing both FedAvg and FedRoD, free of the FL framework constraints. FOOGD enjoys the benefits of SM 3 D , achieving distinguishable detection improvement by Eq. (9). Besides, the regularization of score model with global distribution makes SAG regularize main task feature extractor better than contrastive-based methods, e.g., FedICON, and rebalanced-methods, e.g., FedTHE and original FedRoD.

Ablation Studies. We devise the variants of FOOGD , i.e., fix backbone, w/o SM 3 D , and w/o SAG , to study the effectiveness of our three main ideas: (1) obtaining reliable global distribution as guidance, (2) estimating score model by SM 3 D , and (3) enhancing FL method generalization by SAG , respectively. From Tab. 3 and Tab. 4, simply modeling score model enhances detection slightly, since it brings the knowledge of global distribution. When we remove SM 3 D , the estimation of data probability is severely impacted, bringing no detection capability. While 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 the necessity of regularizing feature extractor with global distribution.

Visualization. To explore the wild data distribution of FL OOD methods, we visualize T-SNE of data representations in Fig. 4, and the detection score distributions in Fig. 5, on Cifar10 α = 5 for FedAvg+ FOOGD , FedRoD+ FOOGD and their runner-up methods, FedATOL and FedTHE, respectively. It is evident that FOOGD represents IN-C data more tight with IN data, and constructs a comparably clear decision boundary between IN data and OUT data. Besides, we also discover that FOOGD will push OUT data away from its IN and IN-C data, which validates the guidance from the global distribution. Additionally, in Fig. 5, FOOGD makes the modes among IN, IN-C, and OUT, more separable than existing methods. This also proves the effectiveness of FOOGD in detection task.

Extensive experiments on other IN-C and OUT data. In this part, we study the performance evaluation of FOOGD in additional IN-C and OUT datasets. In Tab. 5, we can find that FOOGD consistently enhances the detection capability for different OUT data, validating the effectiveness of estimating global distribution via SM 3 D . Meanwhile, we compute the average results of different IN-C accuracy for FL models trained on Cifar10 and Cifar100 in Fig. 6. The + FOOGD in each group is short for FedAvg+ FOOGD and FedRoD+ FOOGD , respectively . We provide the details in Appendix E.7 Tab. 13 and Tab 14. FOOGD consistently improve the generalization in all unseen IN-C data, indicating the effectiveness of enhancing feature extractor via SAG .

(a) FedATOL

(b) FedAvg+

FOOGD

(c) FedTHE

(d) FedRoD+

FOOGD

12

14

10

IN-C

IN

O

0.5

0.4

IN-C

OUT

IN

IN

IN-C

1.2

1.0

IN

-NI

OUT

Density

Ax(suag

0.3

Au(suag

15

A;suaG

0.8

0.2

10

0.6

0.4

0.1

0.2

0.1

0.5

0.0

0.2

1.0

0.0

-2

FedAvg

FedLN

FedATOL

FedT3A

FedIIR

+FOOGD

FedRoD

FOSTER

FedTHE

FedICON

+FOOGD

0

20

40

60

ACC-IN-C

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. 6, 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, via utilizing global distribution knowledge.

Hyperparameter sensitivity studies and other empirical studies. Due to the space limitation, we leave the other relevant experiments in Appendix E. Summarily, we study four additional evaluations: (1) 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. (2) We

vary the coefficient of SM 3 D λ m = { 0 . 1 , 0 . 2 , 0 . 5 , 0 . 8 , 1 } in Fig. 11(a)-Fig. 11(b), and vary the coefficient of SAG λ a = { 0 , 0 . 01 , 0 . 05 , 0 . 1 , 0 . 2 , 0 . 5 , 0 . 8 } in Fig. 11(c), to obtain the best modeling in FOOGD . (3) We vary the number of participating clients in Fig. 10 and found FOOGD can have better results among different participating clients.

6 Conclusion and Future Work

In this work, we consider enhancing both detection and generalization capability of FL methods among non-IID settings. To realize it, we try to model global distribution by collaborating clients, and propose FOOGD , which consists of SM 3 D for estimating score model for detection, and SAG to enhance the invariant representation for generalization. We conduct extensive experiments to validate the effectiveness of FOOGD : (1) reliably and flexibly estimating non-normalized decentralized distribution, (2) detecting semantic shift data via the norm of score values, and (3) generalizing adaption of covariate shift data by regularizing feature extractor invariant distribution discrepancy.

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.

Acknowledgments and Disclosure of Funding

This work was supported in part by the Leading Expert of 'Ten Thousands Talent Program' of Zhejiang Province, China (No. 2021R52001), the National Natural Science Foundation of China (No. 62172362), and the Fundamental Research Funds for the Central Universities (No. 226202400241).

References

Kartik Ahuja, Karthikeyan Shanmugam, Kush Varshney, and Amit Dhurandhar. Invariant risk minimization games. In Proceedings of the 37th International Conference on Machine Learning , volume 119, pages 145-155. PMLR, 2020.

Haoyue Bai, Gregory Canal, Xuefeng Du, Jeongyeol Kwon, Robert D Nowak, and Yixuan Li. Feed two birds with one scone: Exploiting wild data for both out-of-distribution generalization and detection. In International Conference on Machine Learning , pages 1454-1471. PMLR, 2023.

Martin Arjovsky, Léon Bottou, Ishaan Gulrajani, and David Lopez-Paz. Invariant risk minimization. arXiv preprint arXiv:1907.02893 , 2019.

Ayush Bharti, Masha Naslidnyk, Oscar Key, Samuel Kaski, and Francois-Xavier Briol. Optimally-weighted estimators of the maximum mean discrepancy for likelihood-free inference. In Proceedings of the 40th International Conference on Machine Learning , volume 202, pages 2289-2312. PMLR, 2023.

Tri Cao, Jiawen Zhu, and Guansong Pang. Anomaly detection under distribution shift. In IEEE/CVF International Conference on Computer Vision, ICCV 2023, Paris, France, October 1-6, 2023 , pages 6488-6500. IEEE, 2023.

Chentao Cao, Zhun Zhong, Zhanke Zhou, Yang Liu, Tongliang Liu, and Bo Han. Envisioning outlier exposure by large language models for out-of-distribution detection. In Proceedings of the 41st International Conference on Machine Learning , volume 235, pages 5629-5659. PMLR, 2024.

Chen-Hao Chao, Wei-Fang Sun, Bo-Wun Cheng, Yi-Chen Lo, Chia-Che Chang, Yu-Lun Liu, Yu-Lin Chang, Chia-Ping Chen, and Chun-Yi Lee. Denoising likelihood score matching for conditional score-based data generation. In International Conference on Learning Representations , 2021.

Shengzhuang Chen, Long-Kai Huang, Jonathan Richard Schwarz, Yilun Du, and Ying Wei. Secure out-of-distribution task generalization with energy-based models. In Advances in Neural Information Processing Systems , volume 36, pages 67007-67020, 2023.

Hong-You Chen and Wei-Lun Chao. On bridging generic and personalized federated learning for image classification. In International Conference on Learning Representations , 2021.

Yongqiang Chen, Wei Huang, Kaiwen Zhou, Yatao Bian, Bo Han, and James Cheng. Understanding and improving feature learning for out-of-distribution generalization. In Advances in Neural Information Processing Systems , volume 36, pages 68221-68275, 2023.

Andrija Djurisic, Nebojsa Bozanic, Arjun Ashok, and Rosanne Liu. Extremely simple activation shaping for out-of-distribution detection. In The Eleventh International Conference on Learning Representations , 2022.

Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In Proceedings of the IEEE conference on computer vision and pattern recognition , pages 3606-3613, 2014.

Xuefeng Du, Zhaoning Wang, Mu Cai, and Yixuan Li. Vos: Learning what you don't know by virtual outlier synthesis. In Proceedings of the International Conference on Learning Representations , 2022.

Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario March, and Victor Lempitsky. Domain-adversarial training of neural networks. Journal of machine learning research , 17(59):1-35, 2016.

Haozhe Feng, Zhaoyang You, Minghao Chen, Tianye Zhang, Minfeng Zhu, Fei Wu, Chao Wu, and Wei Chen. Kd3a: Unsupervised multi-source decentralized domain adaptation via knowledge distillation. In Proceedings of the 38th international conference on machine learning , volume 139, pages 3274-3283, 2021.

Soumya Suvra Ghosal and Yixuan Li. Distributionally robust optimization with probabilistic group. In Thirty-Seventh AAAI Conference on Artificial Intelligence , pages 11809-11817, 2023.

Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition , pages 770-778, 2016.

Yaming Guo, Kai Guo, Xiaofeng Cao, Tieru Wu, and Yi Chang. Out-of-distribution generalization of federated learning via implicit invariant relationships. In Proceedings of the 40th International Conference on Machine Learning , volume 202, pages 11905-11933. PMLR, 2023.

Dan Hendrycks and Thomas G Dietterich. Benchmarking neural network robustness to common corruptions and surface variations. arXiv preprint arXiv:1807.01697 , 2018.

Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. In International Conference on Learning Representations , 2016.

Dan Hendrycks, Mantas Mazeika, Saurav Kadavath, and Dawn Song. Using self-supervised learning can improve model robustness and uncertainty. Advances in neural information processing systems , 32, 2019.

Dan Hendrycks, Mantas Mazeika, and Thomas Dietterich. Deep anomaly detection with outlier exposure. In International Conference on Learning Representations , 2018.

Tzu-Ming Harry Hsu, Hang Qi, and Matthew Brown. Measuring the effects of non-identical data distribution for federated visual classification. arXiv preprint arXiv:1909.06335 , 2019.

Yusuke Iwasawa and Yutaka Matsuo. Test-time classifier adjustment module for model-agnostic domain generalization. Advances in Neural Information Processing Systems , 34:2427-2440, 2021.

Zeyi Huang, Haohan Wang, Eric P Xing, and Dong Huang. Self-challenging improves crossdomain generalization. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part II 16 , pages 124-140. Springer, 2020.

Liangze Jiang and Tao Lin. Test-time robust personalization for federated learning. In The Eleventh International Conference on Learning Representations , 2022.

Xue Jiang, Feng Liu, Zhen Fang, Hong Chen, Tongliang Liu, Feng Zheng, and Bo Han. Detecting out-of-distribution data through in-distribution class prior. In Proceedings of the 40th International Conference on Machine Learning , pages 15067-15088. PMLR, 2023.

Wenyu Jiang, Hao Cheng, Mingcai Chen, Chongjun Wang, and Hongxin Wei. Dos: Diverse outlier sampling for out-of-distribution detection. arXiv preprint arXiv:2306.02031 , 2023.

Ellango Jothimurugesan, Kevin Hsieh, Jianyu Wang, Gauri Joshi, and Phillip B Gibbons. Federated learning under distributed concept drift. In International Conference on Artificial Intelligence and Statistics , pages 5834-5853. PMLR, 2023.

Julian Katz-Samuels, Julia B Nakhleh, Robert Nowak, and Yixuan Li. Training ood detectors in their natural habitats. In Proceedings of the 39th International Conference on Machine Learning , pages 10848-10865. PMLR, 2022.

Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for federated learning. In International conference on machine learning , pages 5132-5143. PMLR, 2020.

Frederic Koehler and Thuy-Duong Vuong. Sampling multimodal distributions with the vanilla score: Benefits of data-based initialization. arXiv preprint arXiv:2310.01762 , 2023.

David Krueger, Ethan Caballero, Joern-Henrik Jacobsen, Amy Zhang, Jonathan Binas, Dinghuai Zhang, Remi Le Priol, and Aaron Courville. Out-of-distribution generalization via risk extrapolation (rex). In Proceedings of the 38th International Conference on Machine Learning , pages 5815-5826. PMLR, 2021.

Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.

Marc Lafon, Clément Rambour, and Nicolas Thome. Heat: Hybrid energy based model in the feature space for out-of-distribution detection. In NeurIPS ML Safety Workshop , 2022.

Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-of-distribution samples and adversarial attacks. Advances in neural information processing systems , 31, 2018.

Ya Le and Xuan Yang. Tiny imagenet visual recognition challenge. CS 231N , 7(7):3, 2015.

Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M Hospedales. Deeper, broader and artier domain generalization. In Proceedings of the IEEE international conference on computer vision , pages 5542-5550, 2017.

Xiang Li, Kaixuan Huang, Wenhao Yang, Shusen Wang, and Zhihua Zhang. On the convergence of fedavg on non-iid data. In International Conference on Learning Representations , 2019.

Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. Proceedings of Machine learning and systems , 2:429-450, 2020.

Yingzhen Li and Richard E Turner. Gradient estimators for implicit models. In International Conference on Learning Representations , 2018.

Xinting Liao, Weiming Liu, Chaochao Chen, Pengyang Zhou, Fengyuan Yu, Huabin Zhu, Binhui Yao, Tao Wang, Xiaolin Zheng, and Yanchao Tan. Rethinking the representation in

Xinting Liao, Chaochao Chen, Weiming Liu, Pengyang Zhou, Huabin Zhu, Shuheng Shen, Weiqiang Wang, Mengling Hu, Yanchao Tan, and Xiaolin Zheng. Joint local relational augmentation and global nash equilibrium for federated learning with non-iid data. In Proceedings of the 31st ACM International Conference on Multimedia , pages 1536-1545, 2023.

federated unsupervised learning with non-iid data. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 22841-22850, 2024.

Qiang Liu, Jason Lee, and Michael Jordan. A kernelized stein discrepancy for goodness-offit tests. In Proceedings of The 33rd International Conference on Machine Learning , pages 276-284. PMLR, 2016.

Quande Liu, Cheng Chen, Jing Qin, Qi Dou, and Pheng-Ann Heng. Feddg: Federated domain generalization on medical image segmentation via episodic learning in continuous frequency space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 1013-1023, 2021.

Qiang Liu and Dilin Wang. Stein variational gradient descent: A general purpose bayesian inference algorithm. Advances in neural information processing systems , 29, 2016.

Weitang Liu, Xiaoyun Wang, John Owens, and Yixuan Li. Energy-based out-of-distribution detection. Advances in neural information processing systems , 33:21464-21475, 2020.

Weiming Liu, Jiajie Su, Chaochao Chen, and Xiaolin Zheng. Leveraging distribution alignment via stein path for cross-domain cold-start recommendation. Advances in Neural Information Processing Systems , 34:19223-19234, 2021.

Weiming Liu, Xiaolin Zheng, Jiajie Su, Longfei Zheng, Chaochao Chen, and Mengling Hu. Contrastive proxy kernel stein path alignment for cross-domain cold-start recommendation. IEEE Transactions on Knowledge and Data Engineering , 35(11):11216-11230, 2023.

Yue Liu, Xihong Yang, Sihang Zhou, Xinwang Liu, Zhen Wang, Ke Liang, Wenxuan Tu, Liang Li, Jingcan Duan, and Cancan Chen. Hard sample aware network for contrastive deep graph clustering. In Proceedings of the AAAI conference on artificial intelligence , volume 37, pages 8914-8922, 2023.

Yue Liu, Xihong Yang, Sihang Zhou, Xinwang Liu, Siwei Wang, Ke Liang, Wenxuan Tu, and Liang Li. Simple contrastive graph clustering. IEEE Transactions on Neural Networks and Learning Systems , 2023.

Zhengquan Luo, Yunlong Wang, Zilei Wang, Zhenan Sun, and Tieniu Tan. Disentangled federated learning for tackling attributes skew via invariant aggregation and diversity transferring. In International Conference on Machine Learning , volume 162, pages 14527-14541. PMLR, 2022.

Zheqi Lv, Wenqiao Zhang, Shengyu Zhang, Kun Kuang, Feng Wang, Yongwei Wang, Zhengyu Chen, Tao Shen, Hongxia Yang, Beng Chin Ooi, et al. Duet: A tuning-free device-cloud collaborative parameters generation framework for efficient device model generalization. In Proceedings of the ACM Web Conference 2023 , pages 3077-3085, 2023.

Zheqi Lv, Wenqiao Zhang, Zhengyu Chen, Shengyu Zhang, and Kun Kuang. Intelligent model update strategy for sequential recommendation. In Proceedings of the ACM on Web Conference 2024 , pages 3117-3128, 2024.

Ahsan Mahmood, Junier Oliva, and Martin Andreas Styner. Multiscale score matching for out-of-distribution detection. In International Conference on Learning Representations , 2020.

Dheeraj Mekala, Adithya Samavedhi, Chengyu Dong, and Jingbo Shang. Selfood: Selfsupervised out-of-distribution detection via learning to rank. In Findings of the Association for Computational Linguistics: EMNLP 2023 , pages 10721-10734, 2023.

Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Artificial intelligence and statistics , pages 1273-1282. PMLR, 2017.

Chirag Modi, Robert M Gower, Charles Margossian, Yuling Yao, David Blei, and Lawrence K Saul. Variational inference with gaussian score matching. In Thirty-seventh Conference on Neural Information Processing Systems , 2023.

A Tuan Nguyen, Philip Torr, and Ser Nam Lim. Fedsr: A simple and effective domain generalization method for federated learning. Advances in Neural Information Processing Systems , 35:38831-38843, 2022.

Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In Proceedings of the NIPS Workshop on Deep Learning and Unsupervised Feature Learning , 2011.

Kunjal Panchal, Sunav Choudhary, Subrata Mitra, Koyel Mukherjee, Somdeb Sarkhel, Saayan Mitra, and Hui Guan. Flash: Concept drift adaptation in federated learning. In Proceedings of the 40th International Conference on Machine Learning , volume 202, pages 26931-26962. PMLR, 23-29 Jul 2023.

Lianyong Qi, Yuwen Liu, Weiming Liu, Shichao Pei, Xiaolong Xu, Xuyun Zhang, Yingjie Wang, and Wanchun Dou. Counterfactual user sequence synthesis augmented with continuous time dynamic preference modeling for sequential poi recommendation. In Proceedings of the

Thirty-Third International Joint Conference on Artificial Intelligence (IJCAI) , 2024.

Yasar Abbas Ur Rehman, Yan Gao, Pedro Porto Buarque De Gusmão, Mina Alibeigi, Jiajun Shen, and Nicholas D Lane. L-dawa: Layer-wise divergence aware weight aggregation in federated self-supervised visual representation learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision , pages 16464-16473, 2023.

Zhe Qu, Xingyu Li, Rui Duan, Yao Liu, Bo Tang, and Zhuo Lu. Generalized federated learning via sharpness aware minimization. In Proceedings of the 39th International Conference on Machine Learning , pages 18250-18280. PMLR, 2022.

Shiori Sagawa, Pang Wei Koh, Tatsunori B Hashimoto, and Percy Liang. Distributionally robust neural networks. In International Conference on Learning Representations , 2019.

Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. Advances in neural information processing systems , 32, 2019.

Vikash Sehwag, Mung Chiang, and Prateek Mittal. Ssd: A unified framework for self-supervised outlier detection. In International Conference on Learning Representations , 2020.

Yiyou Sun, Yifei Ming, Xiaojin Zhu, and Yixuan Li. Out-of-distribution detection with deep nearest neighbors. In Proceedings of the 39th International Conference on Machine Learning , pages 20827-20840. PMLR, 2022.

Xueyang Tang, Song Guo, and Jie Zhang. Exploiting personalized invariance for better out-ofdistribution generalization in federated learning. arXiv preprint arXiv:2211.11243 , 2022.

Yue Tan, Chen Chen, Weiming Zhuang, Xin Dong, Lingjuan Lyu, and Guodong Long. Is heterogeneity notorious? taming heterogeneity to handle test-time shift in federated learning. In Thirty-seventh Conference on Neural Information Processing Systems , 2023.

Arash Vahdat, Karsten Kreis, and Jan Kautz. Score-based generative modeling in latent space. Advances in neural information processing systems , 34:11287-11302, 2021.

Fan Wang, Chaochao Chen, Weiming Liu, Tianhao Fan, Xinting Liao, Yanchao Tan, Lianyong Qi, and Xiaolin Zheng. Ce-rcfr: Robust counterfactual regression for consensus-enabled treatment effect estimation. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining , pages 3013-3023, 2024.

Pascal Vincent. A connection between score matching and denoising autoencoders. Neural computation , 23(7):1661-1674, 2011.

Haoqi Wang, Zhizhong Li, Litong Feng, and Wayne Zhang. Vim: Out-of-distribution with virtual-logit matching. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition , pages 4921-4930, 2022.

Hongxin Wei, Renchunzi Xie, Hao Cheng, Lei Feng, Bo An, and Yixuan Li. Mitigating neural network overconfidence with logit normalization. In Proceedings of the 39th International Conference on Machine Learning , pages 23631-23644. PMLR, 2022.

Qizhou Wang, Zhen Fang, Yonggang Zhang, Feng Liu, Yixuan Li, and Bo Han. Learning to augment distributions for out-of-distribution detection. In Thirty-seventh Conference on Neural Information Processing Systems , 2023.

Yue Wu, Shuaicheng Zhang, Wenchao Yu, Yanchi Liu, Quanquan Gu, Dawei Zhou, Haifeng Chen, and Wei Cheng. Personalized federated learning under mixture of distributions. In Proceedings of the 40th International Conference on Machine Learning , pages 37860-37879. PMLR, 2023.

Qinwei Xu, Ruipeng Zhang, Ya Zhang, Yanfeng Wang, and Qi Tian. A fourier-based framework for domain generalization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition , pages 14383-14392, 2021.

Pingmei Xu, Krista A Ehinger, Yinda Zhang, Adam Finkelstein, Sanjeev R Kulkarni, and Jianxiong Xiao. Turkergaze: Crowdsourcing saliency with webcam based eye tracking. arXiv preprint arXiv:1504.06755 , 2015.

Jingkang Yang, Haoqi Wang, Litong Feng, Xiaopeng Yan, Huabin Zheng, Wayne Zhang, and Ziwei Liu. Semantically coherent out-of-distribution detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision , pages 8301-8309, 2021.

Runpeng Yu, Songhua Liu, Xingyi Yang, and Xinchao Wang. Distribution shift inversion for out-of-distribution prediction. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 3592-3602, 2023.

Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song, Thomas Funkhouser, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365 , 2015.

Shuyang Yu, Junyuan Hong, Haotao Wang, Zhangyang Wang, and Jiayu Zhou. Turning the curse of heterogeneity in federated learning into a blessing for out-of-distribution detection. In 2023 International Conference on Learning Representations , 2023.

Honglin Yuan, Warren Richard Morningstar, Lin Ning, and Karan Singhal. What do we mean by generalization in federated learning? In International Conference on Learning Representations , 2021.

Jingyang Zhang, Nathan Inkawhich, Randolph Linderman, Yiran Chen, and Hai Li. Mixture outlier exposure: Towards out-of-distribution detection in fine-grained environments. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision , pages 5531-5540, 2023.

Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146 , 2016.

Jianyu Zhang, David Lopez-Paz, and Léon Bottou. Rich feature construction for the optimization-generalization dilemma. In International Conference on Machine Learning , pages 26397-26411. PMLR, 2022.

Zhengyi Zhong, Weidong Bao, Ji Wang, Xiaomin Zhu, and Xiongtao Zhang. Flee: A hierarchical federated learning framework for distributed deep neural network over cloud, edge, and end device. 13(5), Oct. 2022.

Haotian Zheng, Qizhou Wang, Zhen Fang, Xiaobo Xia, Feng Liu, Tongliang Liu, and Bo Han. Out-of-distribution detection learning with unreliable out-of-distribution sources. In Thirty-seventh Conference on Neural Information Processing Systems , 2023.

NeurIPS Paper Checklist

The checklist is designed to encourage best practices for responsible machine learning research, addressing issues of reproducibility, transparency, research ethics, and societal impact. Do not remove the checklist: The papers not including the checklist will be desk rejected. The checklist should follow the references and precede the (optional) supplemental material. The checklist does NOT count towards the page limit.

Please read the checklist guidelines carefully for information on how to answer these questions. For each question in the checklist:

You should answer [Yes] , [No] , or [NA] .

[NA] means either that the question is Not Applicable for that particular paper or the relevant information is Not Available.

Please provide a short (1-2 sentence) justification right after your answer (even for NA).

The checklist answers are an integral part of your paper submission. They are visible to the reviewers, area chairs, senior area chairs, and ethics reviewers. You will be asked to also include it (after eventual revisions) with the final version of your paper, and its final version will be published with the paper.

The reviewers of your paper will be asked to use the checklist as one of the factors in their evaluation. While "[Yes] " is generally preferable to "[No] ", it is perfectly acceptable to answer "[No] " provided a proper justification is given (e.g., "error bars are not reported because it would be too computationally expensive" or "we were unable to find the license for the dataset we used"). In general, answering "[No] " or "[NA] " is not grounds for rejection. While the questions are phrased in a binary way, we acknowledge that the true answer is often more nuanced, so please just use your best judgment and write a justification to elaborate. All supporting evidence can appear either in the main paper or the supplemental material, provided in appendix. If you answer [Yes] to a question, in the justification please point to the section(s) where related material for the question can be found.

IMPORTANT, please:

Delete this instruction block, but keep the section heading 'NeurIPS paper checklist" ,

Keep the checklist subsection headings, questions/answers and guidelines below.

Do not modify the questions and only use the provided macros for your answers .

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer: [Yes]

Justification: The abstract and introduction section include the main claims made in the paper.

Guidelines:

The answer NA means that the abstract and introduction do not include the claims made in the paper.

The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.

The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.

It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors? Answer: [Yes]

Justification: The paper focuses on federated modeling, and we will focus on enhancing privacy-preserving ability of FOOGD in our future work.

Guidelines:

The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.

The authors are encouraged to create a separate "Limitations" section in their paper.

The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.

The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.

The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.

The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.

If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.

While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.

3. Theory Assumptions and Proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [Yes]

Justification: We have provided the full set of assumptions and a complete (and correct) proof. Please refer to Section 4 in the main paper and Section B in the Appendix.

Guidelines:

The answer NA means that the paper does not include theoretical results.

All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced.

All assumptions should be clearly stated or referenced in the statement of any theorems.

The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.

Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.

Theorems and Lemmas that the proof relies upon should be properly referenced.

4. Experimental Result Reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: We have provided detailed implementation details 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.

If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.

If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.

Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.

While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example

(a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.

(c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).

(b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.

(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.

5. Open access to data and code

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.

Please see the NeurIPS code and data submission guidelines ( https://nips.cc/ public/guides/CodeSubmissionPolicy ) for more details.

While we encourage the release of code and data, we understand that this might not be possible, so 'No' is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).

The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines ( https: //nips.cc/public/guides/CodeSubmissionPolicy ) for more details.

The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.

The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.

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.

6. 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.

7. 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.

8. 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).

9. Code Of Ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

Justification: The research conducted in the paper fully adheres to the NeurIPS Code of Ethics.

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).

11. 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)?

Answer: [NA]

Justification: The paper poses no such risks.

Guidelines:

The answer NA means that the paper poses no such risks.

Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.

Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.

We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.

12. Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer: [Yes]

Justification: The data and code used in this paper have obtained legal permissions.

Guidelines:

The answer NA means that the paper does not use existing assets.

The authors should cite the original paper that produced the code package or dataset.

The authors should state which version of the asset is used and, if possible, include a URL.

The name of the license (e.g., CC-BY 4.0) should be included for each asset.

For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.

If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.

For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.

If this information is not available online, the authors are encouraged to reach out to the asset's creators.

13. New Assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [NA]

Justification: The paper does not release new assets.

Guidelines:

The answer NA means that the paper does not release new assets.

Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.

The paper should discuss whether and how consent was obtained from people whose asset is used.

At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.

14. Crowdsourcing and Research with Human Subjects

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.

According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.

15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

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.

Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the 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.

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.

A Algorithms

The overall algorithm of FOOGD is in Algo. 1. In line 1:10, the server collaborates with clients to optimize the feature extractor model for representation and the score model for density estimation. The clients execute training local models separately in line 11:19. In each client, SM 3 D estimates data density based on the latent representation of feature extractor, and SAG computes the kernelized stein discrepancy based on score model to regularize the optimization of feature extractor. We update score model with SM 3 D in Algo. 2, and the training procedure of feature extractor is detailed in Algo. 3.

Algorithm 1 Training procedure of FOOGD

Input : Batch size B , communication rounds T , number of clients K , local steps E , dataset D = ∪ k ∈ [ K ] D k Output : feature extractor and score model parameters, i.e., θ T f and θ T s 1: Server executes(): 2: Initialize { θ 0 f , θ 0 s } with random distribution 3: for t = 0 , 1 , ..., T -1 do 4: for k = 1 , 2 , ..., K in parallel do 5: 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 8: Update parameters of { θ t f , θ t s } by Eq. (3) 9: end for 10: return { θ T f , θ T s } 11: Client executes( k , { θ t f , θ t s } ) : 12: Assign global model to local model { θ k f , θ k s } ← { θ t f , θ t s } 13: for each local epoch e = 1 , 2 , ..., E do 14: for batch of samples ( X 1: B , Y 1: B ) ∈ D k do 15: Execute θ k s = SM 3 D ( X 1: B , Y 1: B ) in Algorithm 2 16: Execute θ k f = SAG ( X 1: B , Y 1: B ) in Algorithm 3 17: end for 18: end for 19: return θ E k to server

Algorithm 2 Algorithm of SM 3 D

Input : Batch size B , batch of samples ( X 1: B , Y 1: B ) ∈ D k , fixed feature extractor θ f , and initialized score model θ s

Output : score model parameters, i.e., θ s

1: Feature Extraction Z 1: B ← f θ ( X 1: B )

3: Take Langevin dynamic sampling started at Z 0 to obtain generated samples Z gen by Eq. (6)

2: Sample B random data points Z 0 with z 0 i ∼ N ( 0 , I )

4: Perturb noise on data features to obtain ˜ Z ∼ N ( Z , σ I )

6: Regularize maximum mean discrepancy between generated Z gen and Z by Eq. (7)

5: Compute denoising score matching by Eq. (4)

7: Optimize score model θ s with objective ℓ OUT k by Eq. (8)

8: return θ s

Algorithm 3 Algorithm of SAG

Input : Batch size B , batch of samples ( X 1: B , Y 1: B ) ∈ D k , fixed score model θ s , and initialized feature extractor θ f

Output : feature extractor parameters, i.e., θ f

1: Augment samples ̂ X 1: B = T ( X 1: B )

2: Feature extraction Z 1: B ← f θ ( X 1: B ) , and ̂ Z 1: B ← f θ ( ̂ X 1: B )

4: Compute cross entropy loss between prediction Y pred = Classifier( Z ) and ground truth Y gr

3: Compute kernelized Stein divergence by Eq. (11)

5: Optimize feature extractor θ f with objective ℓ IN k + ℓ IN-C k by Eq. (12)

6: return θ f

B Theoretical Analysis

B.1 Error Bound of SM 3 D

Lemma B.1 (Error Bound of Decentralized Score Matching) . The error bound of global score model aggregated from local scores models is

Proof. For the global score model aggregated from local score models that estimate IN data probability densities, it holds:

Then we formulate the score matching for global distribution as

where ∑ 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,

where v ∼ N ( 0 , I ) and

Therefore, when θ = θ ∗ = θ ∗ k , we have J ESM ( θ ) = J ESM ( θ k ) = 0 ∀ k ∈ [ K ] , the global score matching finally satisfies:

which holds due to ∑ K k =1 w k = 1 .

Theorem B.2 (Error Bound of Decentralized Score Matching via SM 3 D ) . Assume the original MMD( Z , Z gen ) ≤ C for randomly initialized score model s θ ( z ) in Eq. (7) , the score model achieves optimum and MMD decreases. By Lemma B.1, we can obtain the final error bound of global s θ ( · ) as:

where C is the upper bound of the MMD, B is batch size, and |D| is the data amount.

B.2 The overall induction of Kernelized Stein Discrepancy in SAG

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 ) .

Lemma B.3 (Stein identity) . If the ϕ ( · ) in Stein operator 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:

Proof.

Definition B.4 (Stein Discrepancy) . Stein identity induces Stein discrepancy for two distributions p ( z ) and q ( ̂ z ) :

where ϕ ( · ) 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:

Proof. Firstly, considering the expectation of q ( ̂ z ) on the Stein operator with score of p ( z ) , we can expand it via introducing Stein identity:

Then, 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 as

where the last second equation is also held by Stein identity.

Next, we define the

introducing another Stein identity holds, i.e.,

Finally, taking v ( ̂ z , ̂ z ′ ) back 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 ) .

B.3 Bound of Client Model Divergence

In 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 assume F 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 . Let are all -strongly convex: for all ,

Assumption B.7. F 1 , · · · , F N µ θ k F k ( θ k ) ≥ F k ( θ k ) + ( θ k -θ k ) ⊤ ∇ F k ( θ k ) + µ 2 ∥ θ k -θ k ∥ 2 .

Assumption B.8. Let ξ t k 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.

Lemma B.10 (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 t -t 0 ≤ E -1 and θ t 0 k = θ t 0 for all k ∈ [ K ] . It follows that

Proof. Let E be the maximal local epoch. For any round t > 0 , communication rounds from t 0 to t exist t -t 0 < E -1 . and the global model θ t 0 and each local model θ t 0 k are same at round t 0 .

where the Eq. (31b) holds since E ( θ t k -θ t 0 ) = θ t -θ t 0 , and E ∥ X -E ( X ) ∥ ≤ E ∥ X ∥ , and Eq. (31d) derives from Jensen inequality.

C Related Work

C.1 Federated Learning with Non-IID Data

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.

D Experimental Implementation Details

D.1 Experimental Setups

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].

Heterogeneous client data 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.

OODevaluation setups We construct three types of test sets to assess the model's classification, domain generalization, and out-of-distribution detection ability. Test set from IN dataset is used to evaluate how well the model adapts to local training distribution, i.e., model's classification ability. To simulate the non-IID distribution in real-world scenarios, we partition the IN-C dataset with the same heterogeneous distribution as the IN dataset. This setup evaluates the model's generalization ability on the IN-C dataset to determine whether existing FL methods can keep the data-label relationship in the presence of covariate shift in data features. All covariate-shift types in the IN-C dataset are test individually. For testing OOD detection ability, all clients use the same OOD test set for fair evaluation. After collecting performance data from all clients, we calculate a weighted average of the performance based on the volume of data each client holds.

D.2 Implemetnation 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 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.

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.

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.

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.

FedICON [69] performs different contrastive learning during training and test phrase to handle test-time shift problem. Each client finetunes their classifier with learning rate 0.01.

We also compare with centralized OOD generalization and detection methods, adapting them to a FedAvg-like approach for the federated learning scenario.

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.

ATOL [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.

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.

E Extensive Experiment Results

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. (3) We vary the coefficient of SM 3 D λ m = { 0 . 1 , 0 . 2 , 0 . 5 , 0 . 8 , 1 } in Fig. 11(a)-Fig. 11(b), and vary the coefficient of SAG λ a = { 0 , 0 . 01 , 0 . 05 , 0 . 1 , 0 . 2 , 0 . 5 , 0 . 8 } in Fig. 11(c), to obtain the best modeling in FOOGD . (4) We vary the number of participating clients in Fig. 10 and found FOOGD can have better results among different participating clients.

E.1 Evaluation on TinyImageNet Dataset.

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.

E.2 Ablation Studies

We devise the variants of FOOGD , i.e., fix backbone, w/o SM 3 D , and w/o SAG , to study the effectiveness of our three main ideas: (1) obtaining reliable global distribution as guidance, (2) estimating score model by SM 3 D , and (3) enhancing FL method generalization by SAG , respectively.s From Tab. ?? and its full version in Appendix E.2 Tab. 8 and Tab. 9, simply modeling score model fails in both OOD

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.

E.3 Toy Example for validating SM 3 D

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.

E.4 Detection Score Methods Comparison

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.

E.5 Extensive Visualization Results

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,

1.5

1.5

1.5

1.0

1.0

1.0

0.5

0.5

0.5

0.0

0.0

0.0

-0.5

0.5

1.0

0'7-

1.2

0`7-

2.0

1.5

1.0

0.5

0.0

0.5

1.0

1.5

1.5

1.0

0.5

0.0

0.5

1.0

L.5

1.0

-0.5

0.0

0.5

1.0

1.5

1.5

1.0

0.5

0.0

0.5

1.0

1.5

D'Z

(a) Am= 0

(b) Am = 0.05

(c) m = 0.1

(d) Am = 0.2

1.5

1.5

1.5

1.5

1.0

1.0

1.0

1.0

0.5

0.5

0.5

0.0

0.0

0.0

0'0

-0.5

0.5

-0.5

1.0

1.0

1.0

-1.0

1.5

1.5

-1.5

2.0

-1.5

1.0

0°0

0.5

1.0

1.5

1.0

0.5

0.0

0.5

1.0

1.5

2.0

-1.5

1.0

0.5

0.0

0.5

1.0

L.5

-2.0

1.5

1.0

0.5

0°0

0.5

1.0

1.5

2.0

(e) Am = 0.4

(f) Am = 0.5

(g) Am = 0.8

(h) Am = 1.0

(a) FedATOL

(b) FedTHE

(c) FedAvg

(d) FedAvg+

FOOGD

(e) FedRoD

(f) FedRoD+

FOOGD

IN

IN

IN-C

IN-C

OUT

OUT

IN

IN-C

OUT

IN-C

NO

IN

IN

IN-C

NO

IN-C

OUT

IN

FedAvg+ FOOGD , FedRoD+ FOOGD and their runner-up methods, FedATOL and FedTHE, respectively. It is evident that FOOGD represents IN-C data more tight with IN data, and constructs a comparably clear decision boundary between IN data and OUT data. Besides, we also discover that FOOGD will push OUT data away from its IN and IN-C data, which validates the guidance from the global distribution. Additionally, in Fig. 9, FOOGD makes the modes among IN, IN-C, and OUT, more separable than existing methods. This also proves the effectiveness of FOOGD in detection task.

E.6 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 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

(a) FedATOL

(b) FedAvg+

FOOGD

(c) FedTHE

(d) FedRoD+

FOOGD

14

IN

IN-C

12

OUT

10

Density

8

6

D

0.1

0.2

0.3

0.4

0.5

25

IN

IN-C

OUT

20

Density

15

10

5

0.2

0.4

0.6

0.8

1.0

IN

0.5

IN-C

OUT

0.4

Density

0.3

0.2

0.1

0.0

-10

8-

9-

-4

IN

1.4

IN-C

OUT

1.2

1.0

Density

0.8

0.6

0.4

0.2

0.0

-6

-5

out. This also concludes that FOOGD is capable of inter-client generalization, since FOOGD has utilized global distribution knowledge.

E.7 Extensive Experiments on Other IN-C and OUT data

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 3 D . Meanwhile, we compute the average results of different IN-C data on Fig. 12 and provide the details in Tab. 13 and Tab. 14. FOOGD consistently improve the generalization in all unseen IN-C data, indicating the effectiveness of enhancing feature extractor via SAG .

E.8 The Study of Hyper-parameter Sensitivity

We vary the coefficient of SM 3 D λ m = { 0 . 1 , 0 . 2 , 0 . 5 , 0 . 8 , 1 } in Fig. 11(a)-Fig. 11(b), and vary the coefficient of SAG λ a = { 0 , 0 . 01 , 0 . 05 , 0 . 1 , 0 . 2 , 0 . 5 , 0 . 8 } in Fig. 11(c), to obtain the best modeling in FOOGD . To study the effect of different client numbers, we vary the number of participating clients K = { 5 , 10 , 20 , 50 } in Fig. 10 and find FOOGD can have better results among different participating clients.

5

10

20

50

number of clients

K

84

86

88

ACC-IN

Fed-ATOL

FedAvg+FOOGD

(a) IN ACC

5

10

20

50

number of clients

K

82

84

86

88

ACC-IN-C

Fed-ATOL

FedAvg+FOOGD

(b) IN-C ACC

5

10

20

50

number of clients

K

20

25

30

FPR95

Fed-ATOL

FedAvg+FOOGD

(c) OUT FPR95

5

10

20

50

number of clients

K

92

94

96

AUROC

Fed-ATOL

FedAvg+FOOGD

(d) OUT AUROC

0.1

0.2

0.5

0.8

1.0

l

m

91

.

15

91

.

20

91

.

25

91

.

30

AUROC

(a)

λ

m

0.1

0.2

0.5

0.8

1.0

l

m

36

.

6

36

.

8

37

.

0

37

.

2

FPR95

(b)

λ

m

0

0.01

0.05

0.1

0.2

0.5

0.8

l

a

52

54

IN

IN-C

(c)

λ

a

FedAvg

FedLN

FedATOL

FedT3A

FedIIR

+FOOGD

FedRoD

FOSTER

FedTHE

FedICON

+FOOGD

0

25

50

75

ACC-IN-C

(a) Cifar10

α

= 0

.

1

FedAvg

FedLN

FedATOL

FedT3A

FedIIR

+FOOGD

FedRoD

FOSTER

FedTHE

FedICON

+FOOGD

0

20

40

60

ACC-IN-C

(b) Cifar100

α

= 0

.

1

).

1

.

= 0

α

Table 13: IN-C generalization for FL methods trained on Cifar10(

).

1

= 0

.

α

Table 14: IN-C generalization for FL methods trained on Cifar100(

LSUN-C as OUT performance.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis 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.\n\nSTRENGTHS:\nFOOGD is designed to handle both OOD generalization and OOD detection tasks and integrates mechanisms to manage covariate shifts and semantic shifts within the FL setup, which is helpful for deployment environments. The use of SM3D allows for accurate estimation of the probability density of client data distributions and is used to identify out-of-distribution samples. In addition, SAG helps maintain feature space invariance between in-distribution and augmented data samples. Finally, this paper demonstrates the effectiveness of FOOGD through experiments.\n\nWEAKNESSES:\nThere is  no training-log provided in supp materials. There are also questions regarding the foundation methods as listed below.\n\nQUESTIONS:\n(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.\n(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.\n(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.\n(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.\n\nLIMITATIONS:\nThe authors indicated the paper's focus (on privacy issues) as an limitation but not elaborated in paper itself.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-06-15"}

comments: 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.

STRENGTHS:
1.	FOOGD is the first framework in federated learning to simultaneously address OOD generalization and detection, demonstrating significant innovation.
2.	The paper is written clearly and coherently, and it is generally well-organized.
3.	The authors have made an effort to highlight their contributions, providing a reasonably good overview of the key points and innovations presented in the paper.

WEAKNESSES:
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:
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:
See the above weakness.
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2024-07-08

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis 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\n\nSTRENGTHS:\n1. This paper proposes a novel unified framework to simultaneously address OOD (Out-of-Distribution) generalization and detection problems in federated settings.\n\n2. The method has theoretical guarantees and empirical analysis to ensure its effectiveness.\n\n3. The structure of this work is logical, and the writing is well-organized.\n\nWEAKNESSES:\n1. 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.\n\n2. 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.\n\n3. 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.\n\n4. In the methodology section, given the involvement of multiple innovative components, it is recommended to analyze their complexity.\n\n\nReferences:\n\n[1] Haoyue Bai et al. Feed two birds with one scone: Exploiting wild data for both out-of-distribution generalization and detection. ICML, 2023.\n\n[2] Panchal K et al. Flash: concept drift adaptation in federated learning. ICML, 2023.\n\n[3] Jothimurugesan E et al. Federated learning under distributed concept drift. ICAI, 2023.\n\nQUESTIONS:\nSee weaknesses.\n\nLIMITATIONS:\nSee weaknesses.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-09"}

comments: 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.

STRENGTHS:
1.	The presentation is straightforward and clear, with detailed and instructive figures. The formula derivation is thorough and essential.
2.	The paper addresses a significant challenge in federated learning, focusing on learning from large-scale non-IID data with out-of-distribution (OOD) shifts.
3.	The authors conduct extensive and robust experiments, effectively demonstrating the effectiveness of the proposed FOOGD method.
4.	Detailed theoretical foundations are laid out for both the estimation model and the consistency of convergence optimization.
5.	Utilizing score modeling for federated learning is quite novel and insightful for heterogeneously distributed data.

WEAKNESSES:
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:
1.	How to enhance the generalization for unseen client distribution?

LIMITATIONS:
Yes
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 4
DATE: 2024-07-13