<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Federated Learning under Distributed Concept Drift</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10463991</idno>
					<idno type="doi"></idno>
					<title level='j'>Proceedings of Machine Learning Research</title>
<idno>2640-3498</idno>
<biblScope unit="volume">206</biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Ellango Jothimurugesan</author><author>Kevin Hsieh</author><author>Jianyu Wang</author><author>Gauri Joshi</author><author>Phillip B. Gibbons</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Federated Learning (FL) under distributed concept drift is a largely unexplored area. Although concept drift is itself a well-studied phenomenon, it poses particular challenges for FL, because drifts arise staggered in time and space (across clients). Our work is the first to explicitly study data heterogeneity in both dimensions. We first demonstrate that prior solutions to drift adaptation, with their single global model, are ill-suited to staggered drifts, necessitating multiple-model solutions. We identify the problem of drift adaptation as a time-varying clustering problem, and we propose two new clustering algorithms for reacting to drifts based on local drift detection and hierarchical clustering. Empirical evaluation shows that our solutions achieve significantly higher accuracy than existing baselines, and are comparable to an idealized algorithm with oracle knowledge of the ground-truth clustering of clients to concepts at each time step.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">INTRODUCTION</head><p>Federated learning (FL) <ref type="bibr">(Kone&#269;n&#253; et al., 2016;</ref><ref type="bibr">McMahan et al., 2017)</ref> is a popular machine learning (ML) paradigm that enables collaborative training without sharing raw training data. FL is crucial in the era of pervasive computing, where massive IoT and mobile phones continuously generate relevant ML data that cannot be easily shared due to privacy and communication constraints. FL also enables different organizations such as hospitals <ref type="bibr">(Rieke et al., 2020)</ref> and retail stores <ref type="bibr">(Yang et al., 2019)</ref> to jointly obtain valuable insights while preserving data privacy. FL has become an important technology in the real world with massive deployments (500+ million installations on Android devices) as well as a growing market with many solution providers <ref type="bibr">(Mar-ketsAndMarkets, 2021)</ref>.</p><p>Existing FL solutions generally assume the training data comes from a stable underlying distribution, and the training data in the past is sufficiently similar to the test data in the future. Unfortunately, this assumption is often violated in the real world, where the underlying data distribution is non-stationary and constantly evolves. For instance, user sentiment and preference change drastically due to external environments such as the pandemic and macroeconomics <ref type="bibr">(Koh et al., 2021;</ref><ref type="bibr">Garg et al., 2021)</ref>. Data collected by cameras are also subject to various data changes such as unexpected weather and novel objects, which can lead to significant ML model performance losses <ref type="bibr">(Suprem et al., 2020;</ref><ref type="bibr">Bhardwaj et al., 2022;</ref><ref type="bibr">Khani et al., 2023)</ref>. This concept drift problem (defined in &#167;2.1) has been studied extensively in a centralized learning environment <ref type="bibr">(Gama et al., 2014;</ref><ref type="bibr">Tahmasbi et al., 2021;</ref><ref type="bibr">Mallick et al., 2022)</ref>. These centralized solutions, however, cannot address the fundamental challenges of concept drifts in FL where data is heterogeneous over time and across different clients. When different clients experience the data drift at different times, no single global model can perform well for all clients. Similarly, when multiple concepts exist simultaneously, no centralized training decision works well for all clients. Several recent works have recognized the problem of FL under concept drift and proposed solutions that adapt learning rates or add regularization terms <ref type="bibr">(Chen et al., 2021;</ref><ref type="bibr">Manias et al., 2021;</ref><ref type="bibr">Casado et al., 2021;</ref><ref type="bibr">Guo et al., 2021)</ref>. Although these solutions perform better than drift-oblivious algorithms such as FedAvg <ref type="bibr">(McMahan et al., 2017)</ref>, the solutions still use a single global model for all clients, and hence fail to address the aforementioned fundamental challenges of heterogeneity over time and across clients. Meanwhile, centralized ensemble methods that use multiple models for adapting to drift also suffer-in response to a localized data drift, a newly created global model is trained over a mixture of concepts. The models in an ensemble are distinguished solely over time, and do not account for heterogeneity across clients.</p><p>In this work, we present the first FL solutions that employ multiple models to address FL under distributed concept drift. Our solutions aim to create one model for each new concept so that all clients under the same concept can train that model collaboratively, similar to what is done for personalized or clustered FL <ref type="bibr">(Ghosh et al., 2019</ref><ref type="bibr">(Ghosh et al., , 2020;;</ref><ref type="bibr">Mansour et al., 2020;</ref><ref type="bibr">Sattler et al., 2020;</ref><ref type="bibr">Duan et al., 2021)</ref>. We introduce two new algorithms for model creation and client clustering so that our solution addresses all the challenges of distributed concept drift. Our first algorithm, FedDrift-Eager, is a specialized algorithm that creates models based on drift detection. FedDrift-Eager is effective if new concepts are introduced one at a time. Our second algorithm, FedDrift, is a general algorithm that leverages hierarchical clustering to adaptively determine the appropriate number of models. FedDrift isolates drifted clients and conservatively merges clients via hierarchical clustering, so that FedDrift can effectively handle general cases where an unknown number of new concepts emerge simultaneously.</p><p>We empirically evaluate our solution using four popular concept drift datasets, and we compare our solution against state-of-the-art centralized concept drift solutions (KUE <ref type="bibr">(Cano and Krawczyk, 2020)</ref> and DriftSurf <ref type="bibr">(Tahmasbi et al., 2021)</ref>) and a recent FL solution that adapts to concept drifts (Adaptive-FedAvg <ref type="bibr">(Canonaco et al., 2021)</ref>). Our results show that (i) FedDrift-Eager and FedDrift consistently achieve much higher and more stable model accuracy than existing baselines (average accuracy 93% vs. 90% for the best baselines, across six dataset/drift combinations); (ii) FedDrift performs much better than FedDrift-Eager when multiple new concepts are introduced at the same time; and (iii) our solution achieves a similar model accuracy as Oracle (94% accuracy), an idealized algorithm that knows the timing and distribution of concept drifts. On the real-world drift in the FMoW dataset <ref type="bibr">(Koh et al., 2021)</ref>, FedDrift achieves 64% accuracy vs. 58% accuracy for the best baselines. We make our source code and datasets publicly available to facilitate further research on this problem. 2</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">BACKGROUND AND MOTIVATION</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Problem Setup</head><p>We consider a FL setting with P clients, assumed to be stateful and participating at each round, and a central server that coordinates training across the clients. Training data are decentralized and arriving over time. The data at each client c = 1, . . . , P and each time t = 1, 2, . . . are sampled from a distribution (concept) P (t) c (x, y). We consider that data may be non-IID in two dimensions, varying across clients 2 <ref type="url">https://github.com/microsoft/FedDrift</ref> and across time. We say that there is a concept drift at time t and at client c if P (t) c &#824; = P (t-1) c</p><p>(the standard definition of drift with respect to a single node <ref type="bibr">(Gama et al., 2014)</ref>). Under distributed concept drift, the time of change-points as well as the source or target distributions can differ across clients.</p><p>We seek a solution for adaptation to concept drift, generally involving any change in P(x, y). In contrast, by decomposing the joint distribution P(x, y) = P(x)P(y|x) = P(y)P(x|y), we distinguish from the special cases where P(y|x) is invariant (called covariate shift or virtual drift <ref type="bibr">(Shimodaira, 2000;</ref><ref type="bibr">Tsymbal, 2004;</ref><ref type="bibr">Kairouz et al., 2021)</ref>) and P(x|y) is invariant (called label shift or target shift <ref type="bibr">(Zhang et al., 2013;</ref><ref type="bibr">Azizzadenesheli et al., 2019)</ref>). (The datasets we consider in our evaluation ( &#167;5) contain general concept drifts with changes in the conditional distributions, with the exception of the FMoW dataset where the concept drift is specifically label shift.)</p><p>A single-model solution is to learn a single global model h (which is a function of time but is notationally suppressed) that is used for inference at all clients. The objective is to minimize over all time t,</p><p>where &#8467; is the loss function. However, the optimal single model may not be well-suited in the presence of concept drifts. While the optimal single model can perform well under cases like covariate shift in which the feature-to-label mapping P(y|x) is fixed (although achieving fast convergence still requires a specialized strategy; e.g., FedProx <ref type="bibr">(Li et al., 2020)</ref>), lower loss can often be obtained under the latter case by using specialized models for different concepts.</p><p>The multiple-model option is to learn a set of global models {h m } for m &#8712; [M ] concepts, and a time-varying clustering of clients. We denote the cluster identities by one-hot vectors w </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Motivation</head><p>The prior work on drift adaptation in FL only consider restrictive settings such as (i) drifts occurring simultaneously in time (e.g., Figure <ref type="figure">1</ref>(left)), where a centralized approach works well <ref type="bibr">(Canonaco et al., 2021)</ref>, or (ii) drifts with only minor deviations from a majority concept (e.g., Figure <ref type="figure">1</ref>(right)), where updates from drifting clients are suppressed and the minority concept goes unlearned <ref type="bibr">(Chen et al., 2021;</ref><ref type="bibr">Manias et al., 2021)</ref>. Our work is the first to explicitly study the more general settings arising in distributed drifts, with heterogeneous data across clients and over time.</p><p>Consider the distributed drift pattern depicted in Figure <ref type="figure">2</ref>. This is representative of an emerging trend (e.g., a breaking   news event) that effects different clients at different times (e.g., due to their lag in learning of the news). For example, consider a next word prediction app in the period when "war" emerges as the popular next word after "Ukraine" or "slap" emerges after "Will Smith". Even for this simple case of a single staggered transition between two concepts, prior work results in significant accuracy loss. In particular, their use of a single global model (and at best a single global drift detection test) results in poor accuracy during the transition period (time steps 4-8 in Figure <ref type="figure">2</ref>, see Figure <ref type="figure">5</ref>(left) in &#167;5).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A A A A A B B B B B A A A A A B B B B B A A A A A B B B B B A A A A A B B B B B A A A A A B B B B B A A A A A B B B B B A A A A A B B B B B A A A A A B B B B B A A A A A B B B B B A A A A A B B B B B time clients A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A B B B B B A A</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A A A B B B B B B B A A A B B B B B B B A A A A B B B B B B A A A A B B B B B B A A A A B B B B B B A A A A A B B B B B A A A A A A B B B B A A A A A A B B B B A A A A A A A A B B A A A A A</head><p>We also consider more challenging cases, as depicted in Figure <ref type="figure">3</ref>, where multiple concepts emerge at the same time and concept drifts may be recurring (a.k.a. periodic).</p><p>To demonstrate the challenge of distributed drift in realworld data, we consider the Functional Map of the World (FMoW) dataset adapted from the WILDS benchmark <ref type="bibr">(Christie et al., 2018;</ref><ref type="bibr">Koh et al., 2021)</ref>. The task is to classify the building type or land use from a satellite image, where images are over five major geographical regions (Africa, Americas, Asia, Europe, and Oceania) and across 16 years. Class distribution changes over time due to human activity and environmental processes. For the 10 most common classes, Figure <ref type="figure">4</ref> shows how the class distribution in Africa changes more rapidly over time, such as a reduction in places of worship and an increase in single-unit residential buildings. However, the global class distribution is relatively slow-changing. Our evaluation shows that the model trained on the global dataset only achieves 48% accuracy on Africa after the major drift at 2014, compared to 66% on the rest of the world. This real-world example highlights the necessity to mitigate data drift differently across regions, and existing centralized solutions cannot address this fundamental challenge.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3">Related Work</head><p>Concept drift has been studied extensively in the centralized setting for decades. We refer the reader to the surveys by <ref type="bibr">Gama et al. (2014)</ref> and <ref type="bibr">Lu et al. (2018)</ref>. As previously discussed, applying these centralized algorithms to FL is not well-suited for distributed concept drifts with heterogeneous data across time and clients. We demonstrate this in our experimental evaluation ( &#167;5), where we compare against state-of-the-art algorithms such as KUE <ref type="bibr">(Cano and Krawczyk, 2020)</ref> and DriftSurf <ref type="bibr">(Tahmasbi et al., 2021)</ref>, and include concrete examples showing why their performance is worse when multiple concepts exist simultaneously.</p><p>Drift in FL, on the other hand, has so far seen only preliminary study. One line of work considers the setting where there is one concept in the system to be learned (either like the example in Figure <ref type="figure">1</ref>(right) when a minority of clients drift, or when clients observe the main concept under random noise), and seek to speed up the convergence of a model for that one concept by suppressing clients with heterogeneous data via regularization <ref type="bibr">(Guo et al., 2021;</ref><ref type="bibr">Chen et al., 2021)</ref> or drift detection <ref type="bibr">(Manias et al., 2021)</ref>. When it comes to adapting to a new concept over time, we are only aware of two works, and both only consider drifts with uniform timing (Figure <ref type="figure">1</ref>(left)). First, <ref type="bibr">Casado et al. (2021)</ref> consider only the covariate shift setting (where the labeling P(y|x) is fixed and only P(x) changes) and uses drift detection to partition data from distinct concepts, in order to train a single model accurately in the course of revisiting each partition (i.e., rehearsal). Second, <ref type="bibr">Canonaco et al. (2021)</ref> propose Adaptive-FedAvg, in which the server tunes the learning rate used by all clients based on the variability across updates, with the goal of reacting fast when drift occurs while also achieving stable performance in the absence of drift. We compare against Adaptive-FedAvg in our evaluation. Our solution to drift in FL ( &#167;3, &#167;4) relies on learning multiple models, which has been studied in prior work on personalized FL and clustered FL. Clients with similar data can be grouped into clusters, where each cluster trains its global model <ref type="bibr">(Ghosh et al., 2019</ref><ref type="bibr">(Ghosh et al., , 2020;;</ref><ref type="bibr">Mansour et al., 2020;</ref><ref type="bibr">Sattler et al., 2020;</ref><ref type="bibr">Briggs et al., 2020;</ref><ref type="bibr">Duan et al., 2021)</ref>. As we extend the problem of data heterogeneity in FL with the dimension of time, we train multiple models with the algorithm in &#167;3, which is inspired by the prior clustering algorithms IFCA <ref type="bibr">(Ghosh et al., 2020)</ref> and HypCluster <ref type="bibr">(Mansour et al., 2020)</ref>. This serves as the starting point of our solution, where our main contribution is the creation of new clusters as new concepts arrive over time. Our solution in &#167;4 to handle an unknown number of concepts relies on hierarchical clustering, which has been studied in static FL by <ref type="bibr">Briggs et al. (2020)</ref>. In this prior work, it is unclear how to set the distance threshold at which to stop merging clusters. In contrast, our approach has the advantage that the stop merging criterion is identical to the drift detection threshold, which has an intuitive interpretation of performance loss.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">MULTIPLE-MODEL TRAINING IN FL</head><p>As discussed above, distributed concept drift often means that multiple concepts are present simultaneously. Hence, our proposed solution learns multiple global models, where each model is trained by a cluster of clients for each distinct concept. In this section, we present Algorithm 1 for multiplemodel training in FL for a given input clustering, which may vary over time as drifts occur. Then in &#167;4, we will show how to learn the necessary input clustering, and how new clusters can be created to adapt to newly appearing concepts.</p><p>We define a time step as the granularity at which new data may arrive at a client. A time step may consist of multiple communication rounds. The set of data arriving at client c and time t is denoted by S </p><p>c,m } &#964; t=1 ) for each model m = 1, 2, . . . , M do</p><p>c that arrived at client c at time t are sampled when computing a local update to the global model h m . Further, the cluster identity of a client at a given time indicates which model is used for inference.</p><p>Within each time, the training of the global models in Algorithm 1 is equivalent to Federated Averaging <ref type="bibr">(McMahan et al., 2017)</ref>, since the aggregation weight of each client within each cluster is fixed at time &#964; . So the convergence of Algorithm 1 can be guaranteed by directly using previous analyses for Federated Averaging, such as <ref type="bibr">(Li et al., 2020;</ref><ref type="bibr">Wang and Joshi, 2021)</ref>. The difference here is that the objective function that clients are minimizing at time &#964; is replaced by the following:</p><p>where</p><p>denotes the local objective function on client c, and the normalized weight is defined as</p><p>.</p><p>(2)</p><p>In the ideal case where each cluster maps to one concept in the system, each h m is specialized for each concept that is sampled from a unique data distribution (P(x, y)), and these h m form a strong solution to our overall objective in &#167;2.1. This ideal solution is the Oracle algorithm in our evaluation in &#167;5, and we empirically demonstrate that our proposed solutions achieve comparable accuracy.</p><p>Note that, as stated, each client c in Algorithm 1 retains its complete history of both the cluster indicators w</p><p>c,m and the local data arrivals S (t) c . To reduce this overhead, each client could instead maintain just a sliding window of the most recent time steps, as long as the window suffices for the minibatch sampling in LOCALUPDATE.</p><p>Thus, we have separated the problem of concept drift in FL into two components: (i) determining the time-varying clustering of clients in response to concept drifts, which is then used as input for (ii) the multiple-model training in Algorithm 1. Suppose, hypothetically, that there is a global model already initialized for each concept up to some moderate accuracy. In this restrictive setting, Algorithm 2 can be used to determine the cluster identities for each new time step. Each client tests the global models from the previous time step over its newly arrived data and chooses to identify with the model with the best loss (breaking ties randomly). <ref type="foot">3</ref>This restrictive setting covers time steps involving drifts that occur between concepts known to the system; e.g., the later stages of a staggered drift from concept A to concept B after some clients have already observed concept B (Figure <ref type="figure">2</ref>). However, Algorithm 2 does not have any mechanism to spawn new clusters or determine the number of clusters. In &#167;4, we will show how to determine the input for Algorithm 1 with clustering algorithms that can spawn clusters over time to react to drifts to new concepts.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">CLUSTERING ALGORITHMS</head><p>Under concept drift in FL, data are heterogeneous both over time and across clients. The concept at each time and client is the ground-truth clustering that we seek to learn. Ideally, the models trained by each cluster correspond 1-to-1 to the concepts present in the system. Specifically, we want to avoid two miss-clustering problems: (P1) spawning multiple clusters that correspond to a single concept, because then each model would be trained over only a subset of the relevant data, not taking full advantage of collaborative training, and (P2) merging clients corresponding to multiple concepts into a single cluster (model poisoning).</p><p>We present two clustering algorithms for adapting to concept drift. First, in &#167;4.1 we handle the case where only one new concept emerges at a time, which includes the example drift pattern in Figure <ref type="figure">2</ref>, by incorporating a straightforward drift detection algorithm. Second, in &#167;4.2 we give a general algorithm that handles the general case where multiple new concepts may emerge simultaneously, which includes the example drift pattern in Figure <ref type="figure">3</ref>, by incorporating a bottomup technique that isolates clients that detect drift (addressing P2) and iteratively merges clusters corresponding to the same concept (addressing P1).</p><p>Algorithm 3 FedDrift-Eager at time &#964; &#8467;</p><p>In the rest of this section, we assume that the first time step starts with one concept and one model, and that our clustering is run for each time step &#964; &gt; 1 as new data arrive.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Special Case: One New Concept at a Time</head><p>When a new concept emerges, the clients that observe the drift should be split off to a new cluster to start training a new model. Drift detection has been well-studied in the centralized, non-FL, setting <ref type="bibr">(Gama et al., 2004;</ref><ref type="bibr">Baena-Garc&#237;a et al., 2006;</ref><ref type="bibr">Bifet and Gavald&#224;, 2007;</ref><ref type="bibr">Harel et al., 2014;</ref><ref type="bibr">Pesaranghader and Viktor, 2016;</ref><ref type="bibr">Pesaranghader et al., 2018;</ref><ref type="bibr">Tahmasbi et al., 2021)</ref>. As we noted in &#167;2.2, for staggered drifts in FL, trying to apply a drift detection test globally at the server over the aggregate error results in poor performance during the transition period. Instead, in Algorithm 3, we apply drift detection locally at each client.</p><p>There are many drift detection tests in the literature, but the particular test is not our focus and for simplicity we consider a test of the following form. A drift is signaled at client c at time &#964; with respect to a model h m if the loss of the model over the newly arrived data, denoted as &#8467; (&#964; ) c,m , degrades by a threshold &#948; relative to the loss measured at time &#964; -1:</p><p>(3)</p><p>This test checks for any drift that incurs performance degradation with respect to a given model. However, the desired condition for creating a new model should check only for concept drifts that correspond to a concept previously unobserved and ill-suited for all existing models. For other drifts, such as the later stage of the staggered drift from concept A to concept B in Figure <ref type="figure">2</ref> (after concept B has already been detected and an appropriate model created), a client should join an existing cluster (in this case, the cluster for B). Hence, in Algorithm 3, the drift detection test for model creation compares against the best performing model:</p><p>We note that detection tests that compare across multiple models have been previously studied in centralized learning in the context of adapting to recurring drifts <ref type="bibr">(Katakis et al., 2010)</ref>. The clustering in Algorithm 3 (FedDrift-Eager) applies this multiple-model drift detection test at each client, and creates a new cluster for all the clients that detect a new concept; otherwise, each client identifies with the cluster with the best-performing model. This algorithm relies on the assumption that only one new concept occurs at a time by assigning the drifted clients to a single cluster. Despite this limitation, Algorithm 3 still merits interest as it experimentally performs well on the non-trivial case of the staggered drift in Figure <ref type="figure">2</ref> that has not been addressed by the prior work, as shown in &#167;5. However, for the drift in Figure <ref type="figure">3</ref> in which concepts B and C emerge simultaneously at different clients, this algorithm creates only one cluster and sub-optimally tries to train a single model for both new concepts (problem P2 above). Next, we extend this algorithm to address the general case where an unknown number of new concepts can occur at a time.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">General Case</head><p>When drifts to new concepts are detected at multiple clients, in general we do not know whether the drifts all correspond to one concept or multiple concepts (or even zero concepts in the event of false positives in detection). We designed Algorithm 4 (FedDrift) for clustering in the face of this uncertainty. For each client that detects drift to a new concept, Algorithm 4 conservatively isolates the clients to individual clusters, and then merges clusters corresponding to the same concept slowly and safely over time by iteratively applying classical hierarchical agglomerative clustering (Shalev-Shwartz and Ben-David, 2014).</p><p>The generic hierarchical clustering procedure is specified by a distance function over the set of elements to be clustered and a stopping criterion, and at each step until the stopping criterion is met, merges the two closest clusters, where the distance between clusters of multiple elements is commonly defined to be the maximum distance between their constituents (known as a max-linkage clustering). In Algorithm 4, the MERGE subroutine combines two clusters i and j by averaging their models with weight proportional to the size of each model's training dataset (over all clients) and unifying the cluster identities.</p><p>To specify a distance function for hierarchical clustering, Algorithm 4 first aggregates at the server the loss estimates L ij of the model h i evaluated over a subsample of the data associated with the cluster for model h j . 4  Then the distances between each cluster are initialized as</p><p>sures the loss degradation of model h i when evaluated over 4 More precisely, at client c, the data clustered to hj are subsampled proportionate to the size of the local dataset relative to the global dataset for hj, t w</p><p>5 We note that D(i, j) is not necessarily a true distance function as there is no guarantee that it satisfies the triangle inequality.</p><p>Algorithm 4 FedDrift at time &#964; &#8467;</p><p>+ &#948; then Initialize a local model at client c to be added to the set of global models at &#964; + 1, and assign client c to its own cluster else w</p><p>c,j for all c, t D(k, l) = max(D(i, l), D(j, l)) for all l Delete models h i , h j the data associated with h j , relative to the loss over its own data. We informally interpret this difference as the magnitude of drift between the concept associated with h i to the concept associated with h j , analogous to the drift detection condition in Eq (3) (although not identical due to the bias of L ii measuring a model's accuracy over its own training data). The term D(i, j) is defined to be symmetric by also accounting for the magnitude of the drift L ji -L jj in the reverse direction from concept j to concept i.</p><p>In addition to defining the cluster distances D(i, j), employing hierarchical clustering also requires setting a stopping criterion. Typically, that corresponds to specifying either the desired number of clusters (which in our case is unknown), or an upper limit on the distance between clusters to stop merging. By our identification of the cluster distance as a magnitude of drift, we naturally re-use the drift detection threshold &#948; to also represent the tolerance level up to which clusters can be merged, eliminating one hyperparameter.</p><p>In Algorithm 4, both creating new clusters and merging existing clusters are based on the observed difference of the models' accuracy across two samples of data. For the clustering to accurately distinguish concepts, we assume that relevant changes in the concepts are manifested in the degradation of a model's predictive accuracy, and that the local sample size is sufficient for statistical significancethe same assumptions necessary for prior drift detection tests <ref type="bibr">(Harel et al., 2014;</ref><ref type="bibr">Pesaranghader and Viktor, 2016;</ref><ref type="bibr">Pesaranghader et al., 2018;</ref><ref type="bibr">Tahmasbi et al., 2021)</ref>.</p><p>One subtlety to Algorithm 4 is that the hierarchical clustering is iteratively run at every time step, because the cluster distances vary with time. A simpler alternative would be to only try merging newly created clusters of local models after one time step of training. However, at that one time step, even models corresponding to the same concept may fail to merge given the limited sample size and limited number of training iterations. In other words, while the models are still warming-up, they may still be separated by a distance exceeding &#948;. As the models converge over time, the distance may drop below &#948;, which Algorithm 4 accounts for by iteratively attempting to merge.</p><p>The hierarchical clustering strategy of Algorithm 4 allows it to adaptively determine the appropriate number of clusters even when an unknown number of new concepts emerge at a time, but it also incurs additional computational resources relative to Algorithm 3. Algorithm 4 creates more global models M , adding to the communication cost of sending O(M P ) models. Additionally, the hierarchical clustering adds an O(M 2 log M ) time complexity at the server at every time step (using a heap data structure for finding the minimum pairwise distance). In Appendix B, we discuss how we can restrict Algorithm 4 to create fewer overall models for higher efficiency. Also, similar to Algorithm 1, each client c could maintain w </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">EXPERIMENTAL RESULTS</head><p>We empirically demonstrate that FedDrift-Eager and FedDrift are more effective than prior centralized drift adaptation and achieve high accuracy that is comparable to an oracle algorithm in the presence of distributed concept drifts. Prior work on FL under drifts is limited to simple cases such as in Figure <ref type="figure">1</ref>, as noted in &#167;2.2. Our evaluation covers the synthetic drifts in Figures <ref type="figure">2</ref> and<ref type="figure">3</ref>, which represent more complex scenarios where drifts (i) occur across clients with staggered timing, (ii) correspond to different concept changes across different clients, and (iii) involve recurring concepts (e.g., the sequence A-B-C-D-A). We also evaluate on the real-world drift in the FMoW dataset ( &#167;2.2), which shows gradual concept changes staggered across clients.</p><p>The synthetic drift patterns are studied with respect to the following datasets: SINE <ref type="bibr">(Pesaranghader et al., 2016)</ref>, CIR-CLE <ref type="bibr">(Pesaranghader et al., 2016)</ref>, SEA <ref type="bibr">(Bifet et al., 2010), and</ref><ref type="bibr">MNIST (LeCun et al., 1998)</ref>. SINE and CIRCLE each have 2 defined concepts, and we generate partitions of the data under the 2-concept staggered drift of Figure <ref type="figure">2</ref>, while SEA and MNIST have more defined concepts, and we generate partitions under both the 2-concept and 4-concept drift patterns of Figures 2 and 3 for 10 clients and 10 time steps. For the real drift in FMoW, we evaluate on a subset of the data including the 10 most common classes, and identify each of the 5 major regions as one client and each new year as one time step. Appendix A has further dataset details.</p><p>We compare our algorithms FedDrift-Eager and FedDrift against the following baselines. First, the Oblivious algorithm learns a single model with FedAvg and has no mechanism for drift adaptation. Second, we consider traditional (non-FL) drift adaptation algorithms applied centrally at the server on top of FedAvg. Drift adaptation is typically classified into three categories, and we compare against algorithms representative of each: the drift detection method DriftSurf <ref type="bibr">(Tahmasbi et al., 2021)</ref>, two ensemble methods KUE <ref type="bibr">(Cano and Krawczyk, 2020)</ref> and AUE <ref type="bibr">(Brzezinski and Stefanowski, 2013)</ref>  <ref type="foot">6</ref> , and a Window method that forgets data older than one time step (more are reported in Appendix B). Third, Adaptive-FedAvg <ref type="bibr">(Canonaco et al., 2021)</ref> is an FL algorithm that learns a single model and adapts to drifts by centrally tuning the learning rate used by all clients as a function of the variability across updates. Fourth, we compare to static FL clustering algorithms IFCA <ref type="bibr">(Ghosh et al., 2020)</ref> and CFL <ref type="bibr">(Sattler et al., 2020)</ref>, which we extend to the time-varying setting by adding a window method (more variations reported in Appendix B). Fifth, Oracle is an idealized algorithm that has oracle access to the concept ID at training time and runs the multiple-model training of Algorithm 1 with the ground-truth clustering.</p><p>We run our experiments using the FedML framework <ref type="bibr">(He et al., 2020)</ref>. At each time step, each client observes a new batch of training data. For all the experiments on synthetic datasets, the models trained under each algorithm are fully connected neural networks with a single hidden layer of size 2d where d is the number of features. On the FMoW dataset, each algorithm trains ResNet18 models pretrained on ImageNet <ref type="bibr">(He et al., 2016)</ref>. After training for each time step, we test each algorithm over the batch of data arriving at the following time step, for all time steps. Each experiment is run for 5 trials, and we report the mean and the standard deviation. Additional algorithm details are in Appendix A.</p><p>In Table <ref type="table">2</ref>, we report the test accuracy averaged across all clients and all time steps except for the times of drifts (for synthetic datasets). We omit the times of drift because there is no chance for a client to adapt to the drift yet, and we eliminate the noise from beneficial clustering mistakes if by chance a client were clustered to the model appropriate for the test data after the drift. (For completeness, Appendix B shows results averaged over all time steps including drifts.) Across all the 2-concept datasets under the staggered drift, we observe that the multiple-model algorithms FedDrift-Eager and FedDrift outperform the prior centralized solutions. In Figure <ref type="figure">5</ref>, the accuracy is broken down per time Another challenge that the 2-concept staggered drift poses for DriftSurf, KUE, AUE, and Adaptive-FedAvg is that their adaptation strategies are a function of estimators that, from the central server's perspective, are aggregated over some clients that are drifting and others that are not. It is muddy whether drift is truly occurring, and even the unsophisticated window-based algorithm performs slightly better.</p><p>The clustering algorithms IFCA and CFL with a window perform relatively well on the 2-concept staggered drifts because they can flexibly employ a model specialized for the second concept during the transition period, but are overall behind FedDrift and FedDrift-Eager. We observe IFCA's success in adapting to drift is dependent on its random parameter initialization for its clusters, and works well particularly for the sharp drift on SINE-2. 7 For CFL, we 7 The accuracy of IFCA is higher than Oracle in a few cases but observe that its iterative cluster splitting reacts quickly to drift, but creates excessive models for a concept over time without unifying clients under staggered drift. Appendix B has more details.</p><p>0 0 1 1 4 4 4 6 6 0 0 0 2 1 4 4 6 6 0 0 0 0 3 1 1 4 4 4 6 6 0 0 4 4 1 1 1 6 6 6 0 0 5 4 4 4 1 1 6 6 0 0 0 4 4 6 6 6 1 1 0 0 0 0 4 4 6 6 6 4 0 0 0 0 1 1 1 4 4 4 0 0 0 6 6 6 6 1 1 4 0 0 0 0 0 0 6 6 6 6 Regarding the 4-concept drift, Finally, we discuss the drift in the real-world FMoW dataset where we observe FedDrift has superior performance. The authors of the WILDS benchmark primarily make note of the performance loss of a globally trained model on data from Africa over time <ref type="bibr">(Koh et al., 2021)</ref>. We observe Fed-Drift successfully adapts to the local drift, switching the model applied at Africa at 2014 when there is a significant increase in single-unit residential buildings in Figure <ref type="figure">4</ref> in &#167;2.2. Instead of creating a new model at 2014, we find FedDrift joins the cluster for Oceania where a local model was previously created, and stays at that cluster for 2014 and 2015, before then splitting into a new individual cluster for 2016 and 2017. We also observe that FedDrift detects a drift at 2015 for both Europe and the Americas, creating two more local models that contribute to higher accuracy.</p><p>Meanwhile, FedDrift-Eager similarly adapts to the change in Africa yielding a performance benefit, but it does not adapt well to the simultaneous drift for Europe and the Americas. Both FedDrift and FedDrift-Eager outperform the centralized adaptation baselines which fail to adapt to the drift when viewed globally (c.f. Figure <ref type="figure">4</ref>). Finally, the low accuracy of IFCA is explained by its random initialization of model parameters for its clusters, in lieu of the pretrained ImageNet initialization under the rest of the algorithms, and the low accuracy of KUE is explained by its ineffective random subspace projections of the data for this task.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">DISCUSSION</head><p>In this work, we present FedDrift-Eager and FedDrift, the first FL solutions designed to address the challenges of distributed concept drifts staggered in time and space (across clients). We empirically confirm the proposed solutions achieve significantly higher accuracy over existing baselines. We discuss the assumptions, limitations and future direction of our work here.</p><p>Privacy considerations. The clustering algorithm of Fed-Drift shares the local model learned by a single client with all clients, which could raise privacy concerns. For privacysensitive applications, our methods could be combined with other privacy-preserving techniques, e.g., model perturbation <ref type="bibr">(Kairouz et al., 2021, &#167;4)</ref> in future work.</p><p>Drift detection methods. For simplicity, we use a basic drift detection test (Eq (3) in &#167;4) for a change in the loss that exceeds a given threshold. For production use, it would be beneficial to use a state-of-the-art detection test that is more statistically grounded and yields a quantitative statement on the assumption ( &#167;4.2) that the size of local data samples is large enough for statistical significance when creating and merging clusters. In particular, tests based on loss degradation by a proportional threshold <ref type="bibr">(Baena-Garc&#237;a et al., 2006;</ref><ref type="bibr">Barros et al., 2017)</ref> rather than an absolute threshold may be better suited for the multiple-model algorithm (FedDrift), as different models can have different loss magnitudes. We leave the exploration of combining various drift detection tests with our proposed solutions as future work.</p><p>Concept drifts and anomalies. We assume all observed concept drifts should be considered. But in the case of anomalies, it may be desirable not to react. One line of related work focuses on adapting only to "true" drifts while also exhibiting robustness in the presence of anomalies <ref type="bibr">(Togbe et al., 2021;</ref><ref type="bibr">Sankararaman et al., 2022)</ref>. Future work might investigate extending clustering algorithms like FedDrift to include anomaly detection in order to exclude outliers in isolated clusters and prevent false merges that could result in model poisoning.</p><p>Clustering algorithm alternatives. A design choice of our clustering algorithms is that we identify each client with the best-performing global model at each time step. An alternative approach is soft-clustering, previously explored by <ref type="bibr">Li et al. (2021)</ref> in the context of static clustering in FL, in which a client fractionally identifies with multiple global models and takes the average for inference. We choose to not use soft-clustering because our preliminary experiments with soft-clustering show no benefit in performance, while increasing communication costs for additional local updates.</p><p>Model averaging alternatives. In FedDrift, the initial model parameters for a cluster after merging is the average of the constituent models, weighted by the size of each model's training dataset. An alternative approach to investigate in future work is to use weights that incorporate each model's loss over a sample of the aggregate dataset (already computed with the L ij 's) so that more accurate models are weighted higher, analogous to weighted majority voting.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7">CONCLUSION</head><p>Federated learning under distributed concept drift is a largely unexplored area, posing particular challenges because drifts can arise staggered in time and space (across clients). This paper presented FedDrift-Eager and FedDrift, the first algorithms explicitly designed to mitigate these challenges. Empirical evaluation on a variety of dataset/drift combinations showed that these algorithms achieve significantly higher accuracy than existing baselines, and are comparable to an idealized algorithm with oracle knowledge of the ground-truth clustering. We hope that our solution spurs further research to this emerging problem, as well as addressing the privacy implications of clustering clients.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A DATASETS AND EXPERIMENTAL PARAMETERS</head><p>We consider synthetic distributed drifts with respect to the following datasets previously used in the concept drift and personalized FL literature <ref type="bibr">(Brzezinski and Stefanowski, 2013;</ref><ref type="bibr">Tahmasbi et al., 2021;</ref><ref type="bibr">Briggs et al., 2020;</ref><ref type="bibr">Canonaco et al., 2021;</ref><ref type="bibr">Manias et al., 2021)</ref>: SINE and CIRCLE <ref type="bibr">(Pesaranghader et al., 2016)</ref> which each have 2 defined concepts, and SEA <ref type="bibr">(Bifet et al., 2010)</ref> and <ref type="bibr">MNIST (LeCun et al., 1998)</ref>, which have up to 4 concepts. In SINE, the first concept is a decision boundary of the sine curve x 2 &lt; sin(x 1 ) for data points sampled from the unit square, and the second concept reverses the direction (swapping the labels). In CIRCLE, the two concepts are each decision boundaries of two different circles in the unit square, representing a smaller concept change than SINE. The first circle is centered at (0.2, 0.5) with radius 0.15 and the second circle is centered at (0.6, 0.5) with radius 0.25. In SEA, each concept corresponds to a shifted hyperplane. Each point in SEA has three attributes in [0, 10], where the label is determined by x 1 + x 2 &#8804; &#952; j where j corresponds to 4 concepts, &#952; A = 9, &#952; B = 8, &#952; C = 7, &#952; D = 9.5. (The third attribute x 3 is not correlated with the label.) In SEA, at every concept there is noise in the observed labels, where the label is swapped with 10% chance for each data point independently.</p><p>In MNIST, concept A corresponds to the original labeling of the hand-drawn digits, and under each other concept, the labels of two of the digits are swapped (B swaps digits 1 and 2, C swaps digits 3 and 4, and D swaps digits 5 and 6).</p><p>For each of the synthetic drift datasets in our experiments, the training data are distributed across 10 clients and arrive over 10 time steps. The partition of the data at each client and time is a constant 500 number of samples from the concept corresponding to the concept drift patterns in Figures 2 and 3 in &#167;2.2. In our experimental results, after training at each time &#964; we report the test accuracy over the data at &#964; + 1. For clarification, in reporting the accuracy at the last time step 10, we test over an 11th sample of data at each client that is from the same concept observed during training at time 10.</p><p>We also evaluate on the real-world drift in the Functional Map of the World (FMoW) dataset included in the WILDS benchmark <ref type="bibr">(Christie et al., 2018;</ref><ref type="bibr">Koh et al., 2021)</ref>. The learning task is to classify the land use or building type from satellite images, which has significant practical relevance, "aiding policy and humanitarian efforts in applications such as deforestation tracking, population density mapping, crop yield prediction, and other economic tracking applications" <ref type="bibr">(Koh et al., 2021)</ref>. Each image is RGB and square with a width of 224 pixels. The WILDS benchmark is not explicitly posed as a drift adaptation problem that we study in this paper, but instead as a drift robustness problem, and so they originally partitioned the data into train/validation/test splits. For our evaluation, we re-partition the dataset, distributing training data across 5 clients arriving over 9 time steps, using the metadata annotation of each image by region (Africas, Americas, Asia, Europe, Oceania) and year. The first 8 years from 2002-2009 have much fewer images collected, which we group into one time step, and then we treat each year from 2010-2017 as one time step each. The partition of the data at each client and time step is a subsample of up to 1000 images at the 10 classes that are the most common (counting across all regions and years). The test data evaluated for the last time step are a disjoint subsample also from the same year 2017 as the training data. Figure <ref type="figure">4</ref> in &#167;2.2 depicts how the data drifts gradually over time, where the development of new infrastructure is a result of social, political, economic, and environmental factors. Viewed globally, the drift is small. <ref type="bibr">Koh et al. (2021)</ref> write: "intriguingly, a large subpopulation shift across regions only occurs with a combination of time and region shift." Further, they call for solutions that "can leverage the structure across both space and time" and also hypothesize a benefit to "potentially transfer knowledge of other regions with similar economies and infrastructure" which we empirically confirm where FedDrift clusters Africa and Oceania together for years 2014-2015.</p><p>Across all algorithms we evaluate, the algorithms that learn a single model use FedAvg for training, and the clustering algorithms that learn multiple models use Algorithm 1 in &#167;3 for training (which reduces to FedAvg when there is one cluster).</p><p>The training parameters used in our experiments are shown in Table <ref type="table">3</ref>. For efficiency of the larger FMoW experiments, we reduce to 10 rounds and batch size 32-we observe that this suffices by convergence of the training accuracy. Regarding the learning rate selection, first we discuss all algorithms excluding Adaptive-FedAvg. We searched for learning rates of the form 10 -a for a = 1, 2, 3, 4, for each dataset, and found that &#951; = 10 -2 was the best for SINE-2, CIRCLE-2, SEA-2, and SEA-4, that &#951; = 10 -3 was best for MNIST-2 and MNIST-4, and that &#951; = 10 -4 was best for FMoW. (This held for both of the two extremes among our baselines, Oblivious and Oracle, and we apply the same learning rate across all the algorithms. For FMoW, there is no known Oracle, so we searched only using the Oblivious baseline.) Also note that for computing the LOCALUPDATE at each client, we use the implementation of Adam in PyTorch with the options weight decay = 10 -3 and amsgrad = True. We treat Adaptive-FedAvg separately, because it uses SGD with its own internal learning rate scheduler as its mechanism to react to drifts. We found that the initial learning rate of 10 -2 was the best for each dataset with the exception of SINE-2, instead using 10 -1 . (This higher learning rate explains the high standard deviation in the reported accuracy of Adaptive-FedAvg on SINE-2.)</p><p>Next, we report the selection of the drift detection threshold &#948; in the algorithms DriftSurf, FedDrift-Eager, and FedDrift. While the optimal &#948; is expected to vary across datasets, even for a fixed dataset, different algorithms can peak in performance at varying &#948;. The performance of each of these three algorithms for each dataset across &#948; in the range 0.02, 0.04, . . . , 0.20 is shown in Figure <ref type="figure">7</ref>. To not bias towards any one algorithm, the experimental results are reported for each algorithm and dataset using its best &#948;. (The &#948; used for the FedDrift-C variant discussed in Appendix B is identical to that used for FedDrift.) However, using a fixed &#948; = 0.04 for FedDrift-Eager and FedDrift makes at most a 1 pp difference in the results reported in Table <ref type="table">2</ref> (on one trial).</p><p>For all other hyperparameters of the algorithms we evaluate, we follow the parameter choices stated in the original papers, with the following exceptions: for DriftSurf we use r = 3 (which performed better than their suggested r = 4); for CFL we use &#947; = 0.1 (for which there is no default, but is shown to be a good setting from Theorem 1 and Figure <ref type="figure">3</ref> of their paper <ref type="bibr">(Sattler et al., 2020)</ref> given that the number of distinct concepts at a time is at most 5 across all evaluated datasets); and for AUE we use K = 5 as the total ensemble size (compared to the K = 10 in their paper they consider over a significantly longer time horizon). In reporting FMoW results, for training efficiency, we further restrict to a total ensemble size of 4 for AUE and KUE.</p><p>Furthermore, for the FMoW dataset, which has more than one distinct data distribution at the initial time step unlike the remaining datasets, we use a different initialization of IFCA variants and FedDrift. For IFCA variants, clients initially self-select among 5 cluster centers instead of being all assigned to a single cluster. For FedDrift, clients are initialized to a local model each, which can be merged starting at the next time step. (If we instead initialize all clients to a single model that can later be split, we observed the average test accuracy of FedDrift is 64.46%, or 0.38% worse.)</p><p>Finally, regarding the model training in Algorithm 1 at time &#964; , we apply one optimization for efficiency to only train models that are currently clustered to. (Although note that any such models are still retained by FedDrift-Eager and FedDrift in order to react to recurring drifts even if they are not actively being trained.)  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B ADDITIONAL EXPERIMENTAL RESULTS</head><p>We present additional experimental results on more baseline algorithms and on variants of our algorithms restricted to limited memory or communication.</p><p>Additional Baseline Algorithms. The additional algorithms presented in this appendix are:</p><p>&#8226; Four traditional drift adaptation algorithms. AUE-PC is a variation of the ensemble method AUE with the ensemble weights set per-client. Window-2 is a window method like Window, except that it forgets data older than two time steps instead of one. Weighted-Linear and Weighted-Exp also forget older data like window methods, but do so more gradually by down-weighting older data with either linear or exponential decay.</p><p>&#8226; The FL clustering algorithm CFL <ref type="bibr">(Sattler et al., 2020)</ref>. In extending the original static algorithm to our time-varying setting, we also consider a variant CFL-W, in which during training, each client samples only from the window of the newest data arriving at each time.</p><p>&#8226; Three variations of the IFCA clustering algorithm <ref type="bibr">(Ghosh et al., 2020)</ref> that we considered for extending the original algorithm to the time-varying setting. First, IFCA(T) is exactly Algorithm 2 in &#167;3, which defines cluster identities for each client and each time, in order to associate the data within a client that are heterogeneous over time across multiple clusters. IFCA(T) chooses the cluster identity once per time step (where time steps consist of multiple communication rounds)-this differs from the original algorithm described by <ref type="bibr">Ghosh et al. (2020)</ref>, which recomputes the cluster identity once per round. Second, IFCA does the per-round clustering; more precisely, for each time step &#964; , the cluster identity w</p><p>c,m is recomputed at every round under the same equation used at the beginning of the time step in Algorithm 2. Third, IFCA-W is a variant of IFCA that trains only over the most recent data arrivals at each time, and the cluster identities of data from previous time steps are forgotten. In general, the IFCA-based algorithms require the number of clusters as input, which we provide as oracle knowledge-either 2 or 4 depending on the total number of concepts over time in each dataset. This gives IFCA-based algorithms an advantage over all other algorithms we evaluate, which do not know the number of clusters a priori. For the initialization of all three variations, at time 1 and round 1, all clients are assigned to a single cluster, matching the assumption we made for FedDrift and FedDrift-Eager in &#167;4. The exception to this initialization strategy is on FMoW, where the total number of concepts is not known, and the concept at time 1 across clients is not identical; for this dataset, we instead initialize all IFCA-based algorithms with a total of 5 clusters (matching the number of regions), and where each client identifies with the best-performing randomly initialized model (same as the original paper).</p><p>&#8226; A more communication-efficient variant of FedDrift. FedDrift-C is the algorithm referred to in the last paragraph of &#167;4 that is restricted to introducing one new global model per time step. More details on this algorithm are described later in this section.</p><p>&#8226; Sliding window variants of FedDrift-Eager and FedDrift. FedDrift-Eager-W and FedDrift-W are restricted to using only the most recent time step of data S (t) c and cluster identities w</p><p>&#8226; A baseline sliding window variant Oracle-W, which has oracle access to the ground-truth clustering but only uses the most recent time step of data in training.</p><p>In general, we use the -W suffix in the name of an algorithm to indicate a limited memory of a window of one time step. This memory restriction reduces the number of samples used for training at a time and might reduce the accuracy achievable under ground-truth clustering (Oracle-W vs. Oracle). Yet, the window is not strictly a drawback: (i) forgetting the older data builds in a passive adaptation to drift and (ii) in our setting it also guarantees that each client's training data at a step are all drawn from the same distribution-this is why we also investigate -W variants when extending the prior static clustering algorithms CFL and IFCA to our setting when data arrive over time.</p><p>Test Accuracy Results. Table <ref type="table">4</ref> (extending Table <ref type="table">2</ref> in &#167;5) shows the test accuracy of all algorithms, averaged across all clients and time steps, but omitting the times of drifts. As noted in &#167;5, we omit the times of drift when all algorithms suffer from the performance loss. For completeness, the test accuracy averaged over all time steps including drifts is shown in Table <ref type="table">5</ref>. In this latter table, note that Oracle and Oracle-W suffer a performance loss too at the time of drift. Under the test-then-train evaluation, Oracle has access to the concept ID of the data at training time but not at test time, where at each client, the model used for inference corresponds to the observed concept in the most recently arrived training data. Note that for the real-world gradual drifts in FMoW, the ground-truth is unknown, so we omit results for Oracle. Furthermore, because drifts occur gradually and there is no oracle knowledge of their timing, we report identical test accuracy results on FMoW in Tables <ref type="table">4</ref> and<ref type="table">5</ref>, averaging across all clients and time steps.</p><p>Based on these tables, we make the following observations on the additional algorithms. The AUE-PC variant of AUE extends the model weights in the ensemble method to be individualized per-client, based on the performance of each model over each client's local data (as opposed to weights chosen based on the aggregate performance at the server). This additional flexibility leads to only a marginal accuracy improvement over AUE across all datasets. While it is generally valuable for clients at different stages of a staggered drift to use different models for inference, the more fundamental obstacle is that each global model trained by AUE-PC is updated by all clients. In the course of the 2-concept staggered drift, all of the models in the ensemble are trained either over a mixture of data from both concepts or solely from the first concept, and there is no accurate model available that is a good fit for the second concept.</p><p>The Window-2 algorithm and the weighted sampling algorithms Weighted-Linear and Weighted-Exp are techniques for forgetting older data, but less abruptly compared to Window-1, and in general they all perform similarly. On the sharp drift of SINE-2, the fastest forgetting algorithm Window performs the best of these. On the other hand, on the 4-concept drift of MNIST-4 in which the time axis does not well separate different concepts, the slowest forgetting algorithm Weighted-Linear performs best. Meanwhile, the performance of all four algorithms are close on the SEA datasets, which have greater overlap between the concepts.</p><p>The clustering algorithms CFL and CFL-W start with each client in one cluster, and recursively split clusters over rounds and over time based on the intra-cluster similarity of their local updates. We observe that the CFL-W variant is the betterperforming of the two on each dataset except MNIST-4 (which is also the only dataset where Oblivious outperforms Window), and is a consequence of the passive drift adaptation of its sliding window which forgets older data. The performance of CFL-W is relatively high on SINE-2 and CIRCLE-2. As an example, the clustering learned on SINE-2 is shown in Figure <ref type="figure">8</ref>. We observe that, for the first 6 time steps, it correctly distinguishes the two concepts by using distinct models. The disadvantage of the clustering of CFL-W is that it creates excess models for the same concept and does not take full advantage of collaborative training. At time 5, it is limited to splitting its cluster for model 0 when the green concept occurs, but cannot merge the drifted clients to the existing cluster created for the green concept at the previous time step. This limitation of only being able to subdivide existing clusters, but not merge clusters or re-assign clients to existing clusters results in poor performance on more complex drifts. 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 0 0 0 2 2 2 2 2 2 0 0 0 0 2 2 2 2 2 2 0 0 0 0 2 2 2 2 2 2 0 0 0 0 0 3 3 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 3 3 0 0 0 1 0 1 1 0 3 0 0 0 0 0 0 0 1 1 1 3 3 0 0 1 1 0 2 2 3 3 3 0 0 1 1 1 1 2 2 3 3 0 0 0 1 1 0 0 0 2 2 0 0 0 0 1 1 0 3 3 1 0 0 0 0 2 2 2 1 1 1 0 0 0 0 0 0 0 2 2 1 0 0 0 0 0 0 3 3 3 3 For IFCA, IFCA-W, and IFCA(T), the clustering is pre-initialized with a random model for each concept that can occur over time for each dataset. In general, we observe that this is not a reliable method for reacting to drift. All the IFCA variants perform well under the sharp label-swap drift of SINE-2. When the new concept occurs, the drifted clients cluster to the second model, and the learned clustering matches the ground-truth. On CIRCLE-2, we found that IFCA and IFCA(T) learned the correct clustering in 2 out of 5 trials, and otherwise used only a single model in the other 3 trials. IFCA-W learned the correct clustering in 1 out of 5 trials. (Note the high standard deviation in Table <ref type="table">4</ref>.) Across the SEA and MNIST datasets, none of the three algorithms ever used more than a single model (with one exception-on SEA-4, in 1 out of 5 trials, IFCA-W used a distinct model for the yellow concept). For the SEA and MNIST datasets, we observe that the IFCA and IFCA(T) degrade to the Oblivious algorithm, and that IFCA-W degrades to the Window algorithm. Note that despite the degenerate clustering to a single model, matching the Window algorithm, IFCA-W achieves the highest accuracy in Table <ref type="table">4</ref> on SEA-2 (but within the standard deviation of Window) due to randomness in the model initialization. In general, our experimental protocol fixes the same random seed for each trial across all all algorithms and where all created models within an algorithm use the same initialization. The IFCA variants are an exception to the rule because its initialization requires distinct random models. On the FMoW dataset, we observe again that random initialization can sometimes address drift, but unreliably: in 1 out of 5 trials each for all IFCA variants, a separate model is used for the Africa region at later time steps. (However, the IFCA variants are among the worst performing in our evaluation because their random initialization precludes the pre-trained</p><p>ImageNet initialization we use for other algorithms.) The authors of the original paper on IFCA note that the accuracy of the clustering is sensitive to the initialization of the models, and propose random restarts to address this issue, but restarts do not translate well to the time-varying setting we study. In our work, FedDrift-Eager and FedDrift address the initialization problem by using drift detection to deal with new concepts as they occur and to cultivate new clusters.</p><p>For FedDrift-Eager-W and FedDrift-W, restricting to a window has minimal impact on the accuracy for the SEA dataset.</p><p>There is a significant loss of accuracy for the MNIST dataset relative to the non-windowed versions, but note that the same significant loss occurs when going from Oracle to Oracle-W, so this loss is a result of windowing, not specific to our algorithm. Indeed, the accuracy of FedDrift-W is quite close to Oracle-W.  We quantify this accuracy-communication trade-off in Figure <ref type="figure">10</ref> where we show the average test accuracy and total number of models sent by FedDrift-Eager, FedDrift, and FedDrift-C under various selections of the drift detection threshold &#948;.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>The communication-efficient</head><p>Increasing the value of &#948; restricts cluster splitting (increases false negative detections) and promotes cluster merging, which reduces the number of models and concepts learned (at &#948; = 1, each algorithm is identical to Oblivious). Empirically, we confirm that choosing larger settings of &#948; can trade-off accuracy for efficiency. (Choosing &#948; too small for FedDrift can also negatively affect accuracy due to increased false positive detections, but to a lesser degree because the hierarchical clustering of FedDrift can correct some false positives-see below on Impact of False Positives.) We observe that, generally, using FedDrift-C over FedDrift preserves most of the accuracy improvement over Oblivious while saving communication-with one exception at the largest &#948; = 0.20 where both algorithms are susceptible to false merging, but FedDrift has more total models added to make the mistake of merging two concepts that FedDrift-C avoids. We also observe that the Pareto front is mostly configurations of FedDrift and FedDrift-C over FedDrift-Eager. Finally, we observe that all variants of FedDrift are  Random Drift Patterns. Throughout this paper, we have considered the 4-concept drift pattern in Figure <ref type="figure">3</ref> in &#167;2.2 as a specific concrete example in order to depict the challenges in distributed concept drift, motivate the design of FedDrift, and discuss the experimental performance by comparing the learned clustering matrix to the ground-truth. To examine the performance more generally, we consider a family of datasets MNIST-R with random concept changes. Using the same four concepts as in MNIST-4, MNIST-R is generated with all clients at the first concept to start, and then each client independently randomly observes one of the four concepts every two time steps (as opposed to every time step which is not possible to adapt to). Across 5 random seeds, the average accuracy is shown in Table <ref type="table">6</ref> (and in Table <ref type="table">7</ref> for all time including drifts). We generally observe the same relative performances of each algorithm as on the previously specified MNIST-4 drift.</p><p>The performance of FedDrift is close to that of Oracle, FedDrift-C is close behind, FedDrift-Eager is lower given that it is likely to have multiple new concepts occurring simultaneously in MNIST-R, and then all prior baselines follow.</p><p>Adaptation under Label Shift. In this work, we focus on the general case of concept drift as opposed to special cases like covariate shift or label shift. All of the synthetic drift datasets studied above involve a change in the decision boundary. But our solutions are also applicable under specific cases of drift. The real drift in the FMoW dataset is an example of label shift (defined in &#167;2.1). Here we consider another label shift dataset, MNIST-L-4, in which the drift is synthetically generated to follow the same distributed drift pattern as MNIST-4 in the ground-truth clustering, but differs in the concept definitions so that classes are incrementally introduced over time: concept A is only over digits 0/1, concept B is only over digits 2/3, concept C is only over digits 4/5, and concept D is only over digits 6/7.</p><p>Table <ref type="table">8</ref> shows the average accuracy omitting time steps of drift, and Table <ref type="table">9</ref> shows the average accuracy over all time including drift times. Unlike all previous datasets (including FMoW with label shift), we observe a significant difference between the two tables. On the metric omitting drifts, FedDrift-Eager and FedDrift attain 99% accuracy comparable to Oracle, then the IFCA variants attain similarly high accuracy compared to the remaining baselines. However, on the metric including drifts, we observe Adaptive-FedAvg performs best, and even the Oblivious algorithm outperforms the multiple-model algorithms like FedDrift, IFCA, and Oracle. The reason is that for the concepts in MNIST-L-4, it is possible for a single model to fit multiple concepts (different labels) accurately as long as a concept was previously seen at another client. On the other hand, the multi-model approach suffers from poor performance at the time of drift as the newly created model has not seen the labels in the test data. Under the 4-concept drift pattern, the single model learned by Adaptive-FedAvg has high test accuracy on concepts B (green) and C (yellow) after the first occurrence in the system, while Oracle has low accuracy at the time of drift by employing a specialized model trained solely on concept A (blue).</p><p>0 0 0 2 2 3 3 3 4 4 0 0 0 2 3 3 3 3 4 4 0 0 0 1 3 3 3 3 3 3 0 0 0 2 3 3 3 3 3 3 0 0 0 0 3 3 3 4 3 3 0 0 1 1 0 2 3 3 3 3 0 0 1 0 0 1 3 3 3 4 0 0 0 1 0 1 4 3 3 3 0 0 1 1 0 1 1 0 3 4 0 0 0 2 0 0 1 0  Impact of False Positives. To demonstrate the application of the hierarchical clustering in FedDrift, in &#167;5 we discussed the example of the learned clustering for MNIST-4 in Figure <ref type="figure">6</ref>. Here in Figure <ref type="figure">11</ref> we present another example on SINE-2 at a small &#948; = 0.01 (corresponding to more aggressive detection) to demonstrate an example of how hierarchical clustering can be beneficial even in the case of a 2-concept drift in mitigating false positives. At time 3, in both FedDrift-Eager and FedDrift there are three false positives, where in FedDrift-Eager, the new model 1 is retained but its underlying data forgotten, while in FedDrift, although initially 3 redundant models are created, they are all merged back with model 0 within 2 time steps, averaging their parameters and reincorporating their clustered data. The advantage of hierarchical clustering is also evident at time 4 when 2 false positives and 2 true positives occur together. In FedDrift-Eager, one new model is created for all the clients, but this new model is "poisoned" by contributions from the blue concept and does not work well at time 5, resulting in another drift detection to create model 3 (and forgetting about the data associated with model 2). FedDrift, on the other hand, creates models solely trained over either the blue and green concepts, and eventually merges all models of an identical concept, recovering all of the data. While the false positive mitigation demonstrated in this example is not a significant contributor to the observed higher accuracy of FedDrift in our evaluation because we use higher &#948; values as noted in Appendix A, it is relevant when there is greater uncertainty in selecting the threshold hyperparameter.</p><p>Test Accuracy Over Time. Finally, in Figure <ref type="figure">12</ref>, we include plots that we omit from the main paper due to space constraints. The figure shows the accuracy over time for FedDrift-Eager, FedDrift, and selected baselines representing drift detection, ensembles, and clustered FL, supplementing Figure <ref type="figure">5</ref> in &#167;5. (Note the varying scales of the y-axes.) We observe the same general trends: (i) the centralized drift adaptation algorithms suffer in performance, particularly during the transition period when no one model works well across all clients; (ii) CFL can react to the drift early on SINE-2 as with CIRCLE-2 before, but its performance degrades with excessive further splits; (iii) for the 4-concept drift in SEA-4 and MNIST-4 centralized baselines and CFL never recover in performance with multiple concepts present; and (iv) on SEA-4 and MNIST-4, FedDrift is close to Oracle except for a gap at time 3 when it uses local models prior to merging, while FedDrift-Eager lags behind FedDrift when it creates a single model for the 2 simultaneously arising concepts but can slowly recover with further detections. </p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>This work was done when Jianyu Wang was at CMU. He is now with Apple.Proceedings of the</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="26" xml:id="foot_1"><p>th International Conference on Artificial Intelligence and Statistics (AISTATS) 2023, Valencia, Spain. PMLR: Volume 206. Copyright 2023 by the author(s).</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_2"><p>If there are no new data at a particular client, then we say its cluster identity is carried over from the previous time step so the model used for inference is well-defined.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="6" xml:id="foot_3"><p>By comparing against ensemble methods, we also account for the factor that multiple-model algorithms have higher capacity than single-model algorithms. AUE and KUE make predictions using a weighted vote over 5 and 10 models, respectively.</p></note>
		</body>
		</text>
</TEI>
