When data resides at distributed ends, soliciting them to a single server to perform centralized learning might compromise users' privacy. Among all solutions, federated learning (FL) [1, 2] arises as a promising paradigm, where massive users are allowed to collaboratively train a model while keeping the training data decentralized at local. In this paper, we introduce federated bandit with fully decentralized users/decision-makers and heterogeneous rewards. Our aim is to provide a solution to enable collaborative learning among decentralized sequential decision-makers in the classical multi-armed bandit (MAB) setting, but with strong (i) regret guarantee even with heterogeneous reward observations, and (ii) privacy guarantees of each user's local data.
Motivation: We are motivated by a federated learning scenario where multiple agents hold different and heterogeneous datasets for the same task. This heterogeneity exists in practice for multi-fold of reasons: it could be because of local observation and data collection errors, or it could be due to sampling biases, but the goal of each agent is to cooperatively smooth out these local biases and learn the true optimal action while protecting its private information. Collaborative research among countries is vital when facing global health emergencies, like COVID-19. The collected observations of the effectiveness of treatments might encode local biases due to the difference in the training of medical staff, in following the protocols and equipment, and the difference in the underlying diseases of patients, etc. Therefore, the observed effect buries noise and local biases. In this case, sharing local models or estimates helps average out or smooth out the biases to obtain a more accurate model for diagnosis. Moreover, as mentioned in federated learning literature [1] [2] [3] and due to policy regulations, a centralized effort for data sharing and coordination is often challenging and sometimes prohibited. Therefore, the design of a decentralized federated learning system is both necessary and technically challenging.
Example: Specifically, consider the following running example. Suppose that multiple hospitals decide to test the effectiveness of different treatment plans (arms). Due to the limitations such as data size, health condition and demographics of the patient population, and the details of how a treatment is used [3] , each individual hospital may not be able to fully and truthfully observe the effect of treatments. In other words, individual hospitals will only observe locally biased feedback on the deployed treatment (heterogeneous rewards). Sharing observations across institutes is therefore helpful to improve the decision-making process to make sure each local hospital will not converge to a biased and sub-optimal decision. However, due to privacy regulation, it is hard and expensive to call for centralized efforts to coordinate a transportation of data among hospitals. On the other hand, it is relatively easier for individual hospitals to reach agreements to share their observed treatment plan and effects with several others in an ad hoc way.
The hospital treatment selection problem mentioned above is effectively a sequential decision-making problem which can be abstracted as a MAB one. Formally, there is a group of N decision-makers facing a common set of arms. At each step t = 1, 2, . . . , T , each decision-maker selects one arm in parallel. Decision-makers only have access to local biased rewards. Therefore, the agents' individually observed rewards do not fully reflect the true quality of each arm. Instead, the arms' true rewards are collectively decided by all decision-makers' local observations. In our heterogeneous setting, we consider a tractable scenario where the true quality of each treatment (arm) is the average of all hospitals' (agents') locally observed quality (in expectation). Each user aims to select the best arm via exchanging information only with their neighbors privately.
The key technical challenge of the above learning problem lies in the fully-decentralized information sharing and privacy protection with sequential observations. Firstly, to reduce the communication overhead and privacy leakage during decentralized information sharing, we desire a solution with agents only sharing the information over the adjacency matrix (graph) of neighbor agents in a gossiping way. Note classical gossiping methods [4] do not incorporate individual decision-maker's newly observed reward information. Accordingly, the resulting information at all other agents may not converge and reflect the true statistics of each arm adaptively, which is especially true in the fully-decentralized and heterogeneous settings. Tacking the coupling effects of gossiping and bandit learning is challenging. Secondly, even though the gossiping update is better than directly sharing data in terms of privacy, we still need a mechanism to ensure a specific privacy level in the worst case by assuming a powerful adversary. We adopt the solution concept differential privacy (DP) [5] [6] [7] [8] and extend our gossiping bandit solution to a differentially private one.
Contributions: In this paper, we attempt to solve the above federated bandit learning problem: (1) We introduce a novel extension of the classical MAB problem to a fully-decentralized federated learning setting with gossiping, where an individual decision-maker only has access to biased rewards, and agents have limited communication capacity and can only exchange their beliefs of rewards with neighbors; (2) We propose Gossip_UCB to solve the challenges for combining gossiping with bandit learning processes, and develop novel proof techniques to tackle the coupling effects of such combi-nation and guarantee its regret. In particular, we provide a concentration bound for local estimates of arm's reward using gossiping. (3) To ensure the differential privacy for each agent, we extend the proposed gossiping bandit algorithm to Fed_UCB, and prove agents preserve -differential privacy of their local data while achieving O(max{ poly(N,M ) log 2.5 T, poly(N, M )(log λ −1 2 N + log T )}) regret. Fed_UCB is also tested using real medical dataset [9] . (4) To the best of our knowledge, Fed_UCB is the first fully decentralized bandit learning framework that handles heterogeneous data sources with a privacy guarantee. The results lay the foundation to study more sophisticated and probably more practical settings (e.g., contextual bandit setting to further handle population biases at each local agent).
Most relevant to us are three lines of works: Distributed MAB: Recently, MAB problems have been studied within a multi-agent setting [10] [11] [12] [13] [14] [15] [16] [17] . But these works mostly either do not consider a consensus reaching in cheap communication setting (gossiping), or do not target on heterogeneous rewards where agents' observations incorporate local bias. For example, instead of reaching consensus among agents, [11] [12] [13] [14] [15] focused on avoiding the collision in wireless communication or cognitive radio. The homogeneous rewards were assumed in [17] [18] [19] [20] [21] . However, the rewards in federated learning setting should be heterogeneous due to various limitations [3] .
Information propagation and gossiping: The idea of gossiping was originally proposed to solve the consensus reaching problem in distributed computation [18, [22] [23] [24] [25] , and questions about gossiping convergence rate were studied in [4, 26, 27] . It has also been used to solve distributed problems, such as convex optimization, ranking, and voting problems; and more recently to computing machine learning related statistics. Notable examples include [28] for calculating PCA, [29, 30] for computing U-Statistics, [31, 32] for computing gradients, [33] for federated learning, and [34] for reinforcement learning.
Federated learning and privacy preserving bandit: Due to the high demand for privacy protection across different sectors such as financial, medical, and government systems, federated learning is becoming a trending solution that has been widely discussed [1, 2, 9, [35] [36] [37] . Recently, differential privacy has also been adopted in solving MAB problems while ensuring privacy [38] [39] [40] [41] , but they either consider a single agent problem or use a homogeneous reward setting. We will follow the idea of DP in our work and offer a theoretically rigorous treatment for our federated bandit problem.
Consider a network consisting of N agents, we assume N ≥ 3, since when N = 2, it is equivalent to a centralized model thus solution is trivial. For ease of presentation, we label the agents from 1 through N . The agents are not aware of such a global labeling, but can differentiate between their neighbors. The set of agents is denoted by When agent i selects an arm k ∈ [M ], the agent collects a reward which is generated according to a random variable X k (t). 1 But the agent cannot observe its exact reward; instead, it observes a locally biased "noisy" copy of the reward, which is generated according to another random variable X i,k (t). The unobservability of X k (t) can be due to local observational bias caused by the biased local data or low-quality (irresponsible or even malicious) agents [42] . We assume that {X k (t)} T t=1 and {X i,k (t)} T t=1 are i.i.d. random processes. For simplicity of analysis, we also assume that all X k 's and X i,k 's have bounded support [0, 1]. Besides, the feedback X i,k for agent i is assumed to be obtained without delays since the delayed feedback itself is challenging [43, 44] and we focus on the delayed impact during gossiping. The relationship between X k (t) and X i,k (t) is as follows. Let µ k and µ i,k be the mean of X k (t) and X i,k (t), respectively. For each k ∈ [M ], the mean of arm k's reward equals the average 2 of the means of all agents' observed rewards, i.e.,
which implies that the true reward can be obtained by averaging and thus cancelling out local biases. Note the heterogeneous reward can model the systematic observation bias or the bias of datasets, which is more general and meaningful than the homogeneous reward, especially in FL settings [1] where each agent's systematic observation bias makes the locally optimal solution does not correspond to the real optimal action. Although the bias of datasets is probably more suitable to be modeled as contextual bandits in practice, we currently focus on the classical bandit setting for a theoretically sound solution, which is also an essential foundation for future practically feasible extensions. Without loss of generality, suppose µ 1 ≥ µ 2 ≥ · · · ≥ µ M , which implies that arm 1 is the best option. The difference of each arm's mean reward is denoted by ∆ k = µ 1 − µ k . The federated bandit problem is for each agent i to minimize the following (weak) regret:
with the goal of achieving R i (T ) = o(T ) (i.e., R i (T )/T → 0 as T → ∞) for all i ∈ [N ]. It is worth noting that each agent i only observes X i,k , k ∈ [M ], and µ i,1 is not necessarily the largest among µ i,1 , µ i,2 , . . . , µ i,M . A naive agent, which uses a standard centralized bandit algorithm, may not solve the problem without exchanging information with other agents. The heterogeneous reward structure is ready for extension to a contextual case [46] by considering the feature or local feature v [47, 48] of each sample, where the regret could be
In federated bandits, for a given T , each agent would like to preserve the privacy of their observations of the selected arms, i.e. the sequential observations {X i,k (t)} T t=1 . Differential privacy (DP) is one popular measure to quantify the privacy level of an algorithm B [5] . A DP mechanism can make the adversary hard to distinguish two adjacent streams {X i,k (t)} T t=1 and {X i,k (t)} T t=1 , which differ at a particular t. Let C be the space of all possible outputs by Algorithm B. DP is defined as: Definition 1. (Differential privacy [5] ) A (randomized) algorithm B is -differentially private if for any adjacent streams {X i,k (t)} T t=1 and {X i,k (t)} T t=1 , and for all sets O ∈ C,
Moreover, in the online settings, the length of sequential observations, i.e. T , changes over time.
Thus the differential privacy in federated bandits should be guaranteed on every T .
The neighbor relationships among the agents is described by a simple, undirected, connected graph G = (V, E), whose vertices correspond to agents and edges characterize neighborhood relationships. Denote N i as the set of nodes that are directly connected to agent i. Then, N i is also the set of agent i's neighbors. We follow the setting in the classical gossiping setting [4] that at each time t, exactly one pair of two neighboring agents on an edge in E are activated and exchange information.
Before we offer the privacy-preserving solution, we first introduce an extension of the classical Upper Confidence Bound algorithm to a gossiping setting. As may be noticed, in the classical gossiping setting [4] , the consensus is defined over initial data only. While in our setting, not only is the gossiping process required to incorporate with newly arrived data from each agent, but also the gossiped information will affect the arm to be selected and thus the observed data of an agent in the future. We present an algorithm, called Gossip_UCB, to solve the gossiping bandit problem. The algorithm hinges on combining and extending the classical gossiping algorithm and the celebrated UCB1 index policy [49] ; yet our algorithm requires substantial changes for both the gossiping and bandit learning steps. While we will present the algorithm and analysis in detail, we outline here several crucial steps:
(1) Different from the classical gossiping algorithm, the gossiping procedure will incorporate new information from each agent's local sampling and observations at each step t. We modify the classical gossip algorithm by adding the "gradient" information at each step, which capture the newly arrival information.
(2) The coupling effects: compared to standard bandit learning with only one decision maker where the traditional sample complexity bound can be employed, we need to cope with various uncertainties during gossiping data exchange. These uncertainties lead to further errors in each local agents' decisions, and then will again disrupt the gossiping process.
(3) A fully-decentralized structure requires designing a local information sharing mechanism. In addition, the delayed impact of local information sharing should be bounded analytically for computing the confidence bound locally.
We define several quantities that will help us present our algorithm and analysis smoothly.
Sample counts: Each agent i maintains two sets of counters:
• n i,k (t): the number of times agent i has sampled arm k by time t;
•ñ i,k (t): agent i's local estimate of global maximum of pulls on arm k and is updated as:
The initial valueñ i,k (t) is defined asñ i,k (0) = n i,k (0). We assume agent i can observeñ j,k (t), j ∈ N i , thus is able to updateñ i,k (t) at each time.
Sample mean: Let 1(·) be an indicator function that returns 1 when the specific condition holds and 0 otherwise. Sample meanX i,k (t) is the average observation of agent i on arm k at time t:
(2)
Estimate of rewards: Each agent i maintains an estimate of the reward of arm k at time t, which is supposed to be unbiased and denoted by ϑ i,k (t). The agents' goal is to narrow the gap between ϑ i,k (t) and µ k with sequential observations and gossiping.
Upper confidence bound: In the UCB algorithm, agent i's belief on each arm k relies on two terms: the estimate ϑ i,k (t) and the upper confidence bound C i,k (t). The latter term denotes the uncertainty of belief. The arm to be pulled is selected as
Gossiping matrix: Denote the gossiping matrix over G as
which is a positive semi-definite matrix whose largest eigenvalue equals 1, and its second largest eigenvalue is denoted by λ 2 (W ) and short-handed as λ 2 without ambiguity. Note λ 2 < 1 whenever G is connected [4] .
Gossip_UCB is detailed in Algorithm 1. Each agent runs this algorithm in parallel. Note all the information is shared in a fully distributed fashion and the bandit estimate is updated in a gossiping way. There are two points worth noting.
Local information sharing: Throughout the algorithm, agents need to share two local variables with their neighbors: the number of observations n i,k (t) and the estimate ϑ i,k (t). The sample count n i,k (t) is shared to keep all the agents "on the same page". Note the bottleneck of a bandit problem is insufficient observations of a particular arm k, and the essential of UCB algorithms is encouraging the exploration of these "undersampled" arms. In the multi-agent scenario, we can take the advantage of neighboring agents and require some local consistency in sample counts. Particularly, we want to keep all agents' knowledge of arm k progressing by encouraging n i,
is agent i's local estimate of global maximum number of pulls, and is updated by local observations only as is defined in the previous section. Moreover, we will prove that, this requirement helps get rid of relying on any global sample count thus C i,k (t) can be computed by each agent locally. The estimate ϑ i,k (t) is updated in a gossiping way.
Gossip bandit update: The gossip updates are defined in line 20 and line 22. In traditional bandit problems, it is enough for each agent to maintainX i,k (t). However, in our concerned gossiping setting, solely relying onX i,k (t) may induce a biased estimate. The gossiping mechanism follows [32] , where the differenceX i,k (t)−X i,k (t−1) can be seen as a gradient. Later we will show the effectiveness of the proposed gossip bandit update.
Note the arm selection in Algorithm 1 relies on the upper confidence bound C i,k (t). A UCB-based solution requires us to find an appropriate choice of C i,k (t) that allows us to provide guaranteed
1 Initialization: Each agent pulls each arm once, and receives a reward The main technical challenge is tackling the coupling effects of gossiping and bandit learning. On a high level, classical technical results in gossiping assumed a static piece of information that would not change much during the entire gossiping phase. The literature [50] often adopted a phased-based learning strategy (by caching the gossiped information) to avoid changes, which effectively delays the update of learned policy (the learning needs to wait for the gossiping to converge). Since agents only share information with their neighbors, globally, there is latency in receiving this data at the non-directly connected agents. Additionally, with the existence of multiple agents, ensuring local consistency as lines 6 and 13 will incur extra delay impacts when |A i | > 1. The delayed impact affects the immediate decisions taken by other agents and further affects the gossiping process in the near future. This is a salient challenge when the agents make heterogeneous observation, as compared to the homogeneous setting [18] . From the bandit learning's perspective, this delay might lead to inaccurate computation of the index policies. A poorly made decision will further have cascading effects to other receiving agents, which is especially challenging in heterogeneous settings.
The key step to tackle this challenge is to firstly characterize the consistency among agents and then find an concentration bound for ϑ i,k (t), the local estimate.
Intuitively speaking, the minimum number of selection over agents controls the quality of the average statistics. Recallñ i,k (t) denotes agent i's local estimate of global maximum of pulls on arm k. In line 6, we encourage n i,k (t) ≥ñ i,k (t) − N to make sure all agents' knowledge of arm k is "on the same page", i.e. locally consistent. This consistency requirement is essential in multi-agent scenarios with heterogeneous rewards to make sure that local "estimates" of the number of arm selections are boundedly consistent across the network. Particularly, with local consistency, the gap of sample counts among neighboring agents, i.e. n j,k (t), j ∈ N i could be bounded. Moreover, the local consistency implies global consistency, i.e., the number of arm selections performed by each agent should be consistent globally, such that the local estimates of each agent should be precise enough to derive a confidence bound without global information. This further enables a proof of a concentration bound for ϑ i,k (t) in Section 3.5.
However, due to the limitation of the bandit feedback (one arm each time) as shown in line 13, extra delays will occur thus n i,
These extra delays will be further amplified due to the delay of information propagation via G. In the following of this subsection, we will analyze the local consistency and show how agents' knowledge of n i,k s will remain "consistent". The analyses are based on the information propagation on the neighbor graph G, where we use d i,j to characterize the distance (the number of directed edges in the shortest
The analyses can be summarized into three steps: modeling the information propagation (Step 1), bounding the actually achieved local consistency (Step 2), and characterizing the relationship of knowledge among agents in the fully-decentralized setting (Step 3).
Step I: Information propagation:
As in (1),ñ i,k (t + 1) := max{n i,k (t),ñ j,k (t), j ∈ N i } is defined recursively. Considering the fact that each agent i can observeñ j,k (t), j ∈ N i and updateñ i,k (t) at each time t, we know the information n i,k (t) propagates distance 1 when time goes from t to t + 1. Thus it is possible to model the information propagation with distance d i,j . We use Lemma 1 to characterize the delayed impact of information propagation. 
Proof. We will prove the lemma by induction on t. For the basis step, suppose that t = 0. In this case,
Thus, (3) holds when t = 0.
For the inductive step, assume (3) holds at time t, and now consider time t + 1. Note that
Noting d h,i is the distance from vertex h to vertex i, the following inequality holds: d h,i ≤ d j,i +d h,j = 1 + d h,j . Since n i,k (t) is a non-decreasing function of t by its definition, we havẽ
Fix any vertex j ∈ [N ] and let p = (j, v d j,i , . . . , v 2 , i) be a shortest directed path from j to i in G.
From (1),
Since j is arbitrarily chosen from [N ], we haveñ i,
Therefore, equation (3) also holds at t + 1, which completes the induction.
Step II: Actual local consistency:
With explicit formulation of information propagation in Lemma 1, we are ready to present Lemma 2, showing the actual local consistency achieved by Algorithm 1. This lemma implies that the local selection of an arm k by agent i is not too far away from his/her neighbors' selections. It makes sure agents' selections of a particular arm are consistent so that the error bound in the joint estimation will not be throttled by one particular agent. Proof. We will prove the lemma by contradiction. Suppose that, to the contrary, ∃ i, k 1 such that n i,k 1 (t) ≤ñ i,k 1 (t + 1) − 3M N. Let t denote the first time at which the equality holds, i.e.,
The critical value t must exist. On one hand, when t = 0, we have n i,k (0) >ñ i,k (1) − 3M N . On the other hand, since both n i,k (t) andñ i,k (t) increase by 0 and 1 at each time instance, if there exists some t such that n i,k 1 (t) <ñ i,k 1 (t + 1) − 3M N, there must exist a t between 0 and t, such
Then,
and t is the earliest time instant at which n j,k 1 (t − d i,j ) − n i,k 1 (t ) ≥ 3M N holds. This implies that at time t − d i,j , agent j pulls arm k 1 .
Since each agent must pull an arm at each time, we have k n i,k (t) = t, ∀i ∈ [N ]. Then,
Applying the Pigeonhole principle, ∃ k 2 ∈ [M ] such that
According to the definition of n i,k (t), it is non-decreasing and n i,k (t + 1) ≤ n i,k (t) + 1. Thus,
Using (5), we haveñ j,
From the above analysis, agent j must pull arm k 1 at time t − d j,i . According to the decision making step of the algorithm, there holds
Note that from (5),ñ
Combining (6) - (8) together, we have
which is a contradiction. Therefore, the statement of the lemma is true.
Step III: Global consistency:
The propagation model in Lemma 1 and the local consistency guaranteed in Lemma 2 jointly imply the global consistency among agents. Mathematically, we quantify the global consistency among agents in Lemma 3. This lemma effectively shows that any agent will not pull one arm more than twice of other agents. Moreover, this result enables a fully-decentralized gossiping structure where no global information of n i,k (t) is needed for local arm selections in lines 9-10. This is due to the fact that the UCB-based algorithms rely on n i,k (t) for computing the confidence bound, especially for the multi-agent case with heterogeneous rewards where knowledge of n i,k (t), ∀i ∈ [N ] are necessary for each agent if their global consistency cannot be properly guaranteed. 
Proof. From Lemma 1, we knowñ i,
With the inequality n i,k (t) >ñ i,k (t + 1) − 3M N from Lemma 2, we further have
Since h is arbitrarily chosen and n i,k (t) ≥ (3M + 1)N , we have max j∈ [N ] n j,k (t) ≤ n i,k (t) + (3M + 1)N ≤ 2n i,k (t), which completes the proof.
With the global consistency elaborated in Lemma 3, the concentration bound for local estimates ϑ i,k (t) could be derived locally. Different from the settings with homogeneous rewards where the gossiping procedures always speedup the convergence, in the concerned heterogeneous reward scenarios, the gossiped information may induce selecting a non-optimal arm when it comes from an agent with "sufficiently biased" reward expectation. Therefore, we need to carefully analyze the coupling effect of gossiping and bandit learning on ϑ i,k (t).
We study how ϑ i,k (t) converges to µ k as time increases in the remaining of this section. Mathematically, we need to find an small enough C i,k (t) such that P(|ϑ i,k (t) − µ k | ≥ C i,k (t)) could be bounded in a sufficiently small order, e.g. O( 1 t 2 ). Note
We next bound |ϑ i,k (t) − E(ϑ i,k (t))| and |E(ϑ i,k (t)) − µ k |, respectively.
Step I: Bound for |ϑ i,k (t) − E(ϑ i,k (t))|:
Lemma 4 summarizes this bound. We provide the main idea in the following sketched proof and leave the full proof in Appendix B.1. Note p 0 in Lemma 4 is effectively a function of i, k, t. We use the notation p 0 for a clean presentation when there is no confusion.
)| bounds as follows:
where p 0 = Proof. (Sketch) Note ϑ i,k (t) is a sub-Gaussian random variable. Preliminaries of sub-Gaussian random variables can be found in Appendix A. We analyze the coupling effect of gossiping and bandit learning with the variance proxy of ϑ i,k (t). Each ϑ i,k (t) is a linear combination of X j,k (τ ), for all j ∈ [N ], τ ∈ {0, . . . , t}. Define c (τ )
i,k,j as the corresponding coefficient of such X j,k (τ ) in ϑ i,k (t). To find the variance proxy of ϑ i,k (t), which is 1
i,k,j | 2 according to Property 2 and Property 3 in Appendix A, we will estimate the value of c (τ ) i,k,j in the following three steps and derive the bound for |ϑ i,k (t) − E(ϑ i,k (t))| using the property of sub-Gaussian random variables.
Step I-1: Preparing a particular c (0) i,k,j : Note the vector form of the iterative process is:
for all k ∈ [M ], where W (t) = I − 1 2 (e i − e j )(e i − e j ) is the gossip updating matrix when agent i and j are selected to exchange information at time t. With this recursion formula, we can expand ϑ k (t) and extract the corresponding coefficients as
where τ 1 , . . . , τ n j,k (t) denote the time instance before t when agent j pulls arm k, and τ 1 = 0.
Step I-2: Upper bound for c
i,k,j : We need to understand W (t) · · · W (τ h + 1) to derive the upper bound and the lower bound. One important tool is the convergence bound of randomized gossip algorithms in [4] , with which we have
where λ 2 ∈ (0, 1) is the second largest eigenvalue of the expected gossip matrix W . Let p 0 = λ n i,k (t)/12 2
. With probability at least 1 − p 0 , we can get the following upper bound:
Step I-3: Lower bound for c (0)
i,k,j : Accordingly, with probability at least 1 − p 0 , the lower bound is
.
Step I-4: Generalization: Let L be the smallest value that makes λ i,k,j | < 1/n j,k (t) when n j,k (t) ≥ L. We can prove the other terms c (τ h ) i,k,j , ∀h ≤ n j,k (t) also have this property. Thus when n i,k (t) ≥ max{L, (3M + 1)N }, ∀i, with probability at least 1 − p 0 , we have
.
Note the last inequality holds due to Lemma 3, which bounds the gap of trials among agents and removes the dependency on global information. Therefore, the variance proxy (parameter in sub-Gaussian random variable) is bounded by:
According to the Hoeffding's inequality for sub-Gaussian random variables (specified in Property 1 of Appendix A), the bound for |ϑ i,k (t) − E(ϑ i,k (t))| is (with probability at least 1 − p 0 )
Step II: Bound for |E(ϑ i,k (t)) − µ k |:
In traditional homogeneous reward settings, each agent's estimate is unbiased. However, in the challenging heterogeneous reward settings, the local estimate of agent i toward arm k at time t, i.e. ϑ i,k (t), may be biased. This bias needs to be bounded in analyzing the regret upper bound for Gossip_UCB. We summarize the upper bound for this bias in Lemma 5.
Proof. (Sketch) Taking expectation on both sides of (9) yields E(ϑ k (t)) = W t E(ϑ k (0)). Noting 1 is an eigenvector of W and µ k = 1 N 1 · E(ϑ k (0)), the proof can be accomplished by splitting the effect of gossiping and µ k with Hölder's inequality.
Wrapping up: concentration bound for local gossiping estimates
According to Lemma 4 and Lemma 5, set
then with probability at least 1 − p 0 , the concentration bound for ϑ i,k (t) is
The concentration bound in (10) 
the regret of each agent i until time T satisfies
where α 1 = 64 N 17 , α 2 = (3M − 1)N + 2π 2 3 + 2λ 1/12 2
Proof. With Section 3.4 and Section 3.5 as building blocks, we are ready to present the regret analyses. Following the concentration bound for ϑ i,k (t), we set C i,k (t) as the confidence bound. According to the standard analyses for UCB algorithm [49] , we know
If agent i chooses arm k instead of arm 1 at time t, there are only four possible cases:
Define t as the time when n i,k (t ) is large enough such that Case 4 does not hold. Specifically, we have
Next, we need to bound the non-optimal selections after a sufficiently large time. Case 2 has two settings: ϑ i,k (t) is in the concentration bound (Case 2A) and ϑ i,k (t) is out of the concentration bound (Case 2B). For Case 2A, we have
For Case 2B, since the term 1{a i (t) = k, n i,k (t) ≥ n i,k (t )} = 1 only when n i,k (t) = n i,k (t − 1) + 1, we directly count one non-optimal selection when it happens, i.e.
. Accordingly, we have Case 3A when ϑ i,1 (t) is concentrated and Case 3B when ϑ i,1 (t) is not. The corresponding expectation is bounded as follows.
.
Considering the gap between the actual local consistency (n i,k (t) >ñ i,k (t + 1) − 3M N ) and the required local consistency (n i,k (t) ≥ñ i,k (t) − N ), the additional non-optimal selections caused by Case 1 is no larger than π 2 3 + (3M − 1)N .
Note n i (t ) > 1 holds trivially. Therefore, the regret of agent until time T satisfies
Case 1 + π 2 3 + 2λ 1/12 2
, we have
We have Remark 1 for the order of regret R i (T ).
There are two important terms affecting the order of regret:
The order of the former term is O (N log T ) , and the order of the latter term does not depend on T since L is determined by λ 2 and N . Recall that L is the value which makes λ t/6
There always exists a positive γ such that the above inequality holds. Thus the order of
As for the lower bound of the regret, consider a trivial case where the graph G is fully connected. Then easily we can show the regret of our algorithm will be lower bounded by an ideal setting where all agents will receive the reward information from everyone else simultaneously with no delay. This setting reduces to a centralized bandit setting and by calling the classical results we know the regret is lower bounded by Ω(log T ). It remains a challenging and interesting question to understand the tightness of our bound in terms of the number of agents N and the graph G.
Prior literature has shown that directly leaking some information that might appear to be "anonymized" can in fact be used to cross-reference with other datasets to breach privacy [51] . In this section, we seek for a federated bandit solution with worst-case privacy guarantees (even with arbitrarily powerful adversary). When guaranteeing an -differential privacy in a one-shot setting, adding Laplacian noise γ ∼ Lap( 1 ) to the observation often suffices, where a larger indicate a lower privacy level. However, preserving privacy in a sequential setting is in general hard due to the continual and sequential revelation of observations. That is, in addition to preserving the privacy of X i,k (t), we also need to protect it in each τ = t, t + 1, ..., T steps.
To preserve at least -DP in T time slots, a naive extension of the Laplace mechanism [5] is adding Laplacian noise Lap( T ) to each observation X i,k (t). The noise introduced in each time step grows linearly w.r.t. T , i.e. O( T ). To add a mild noise and maintain the same privacy level at the same time, we apply the partial sums idea [52] toX i,k (t). Since both the gossiping information θ i,k (t) and the selection information n i,k (t) are functions of X i,k (t), this approach also preserves the privacy for Gossip_UCB by data processing inequality.
Input: Observations {X(τ )} t τ =1 , q(t) = t, p = 0 Output: P partial sums: { X ps 1 , X ps 2 , · · · , X ps P } 1 while t = 0 do 2 d = max{i : bin(t)[i] = 1} // convert t as a binary string and find the rightmost digit that is 1 3 bin(t)[d] = 0, q(t) = int(bin(t)) // flip that digit to 0, convert is back to decimal and get q(t) 4 X ps p = t τ =q(t)+1 X i,k (τ ) // get a partial sum 5 t = q(t), p = p + 1 6 end Algorithm 3: Add Laplacian Noise to Partial Sums Input: Observations {X(τ )} t τ =1 , mapping from partial sums to noise: P, privacy level 1 Get a list with P partial sums: { X ps 1 , X ps 2 , · · · , X ps P } using Algorithm 2,X = 0 2 for p = 1, . . . , P do 3 1 p = 1( X ps p is defined in P) // set as 1 when Laplacian noise is already added to X ps p 4 /* add i.i.d Laplacian noise to partial sum X ps p if it appears for the first time */
Denote by X i,k (τ ) := 1(a i (τ ) = k)X i,a i (τ ) (τ ). The partial sum is constructed as in Algorithm 2. As a result,X i,k (t) can be written as the summation of no more than log t partial sums:
Independent Laplacian noise γ ∼ Lap(1/ ) is added to each partial sum if there exists observations in that partial sum. Thus the total privacy guarantee is given by log t . Set := 1 log T , where is a pre-set privacy level we want to achieve. Then we will achieve at least a total 1 log T log t ≤ differential privacy. The algorithm for adding Laplacian noise to partial sums is shown in Algorithm 3. To make the algorithm preserve -DP, we need to modify the observation procedure in line 14 of Algorithm 1. Specifically, instead of directly getting X i,a i (t) (t), Algorithm 3 is implemented with observations { X i,k (τ )} t τ =1 , the mapping P recording the noise added to the previous partial sums, and the privacy level . Besides, the confidence bound is set following (12) . Note Gossip_UCB is a special case of Fed_UCB when is infinity. We summarize Fed_UCB in Algorithm 4. Note the time complexity of line 16 is O(log t).
Compared with Gossip_UCB, the variance proxy forθ i,k (t) consists of two parts: the variance proxy for observations and the variance proxy for Laplacian noise. The former one is the same as that in Gossip_UCB. We bound the latter one in Lemma 6.
Input: G, T, C i,k (t)
1 Initialization: Each agent pulls each arm exactly once, and receives a reward Get noisy observationX i,a i (t) (t) following Algorithm 3, update P
if agent i is selected to gossip with agent j then 19 agent i sendsθ i,k (t − 1) to agent j, at the same time, receivesθ j,k (t − 1) from agent j 
Note is the privacy level and parameters L, p 0 , α 1 are the same as Lemma 4.
Proof. (Sketch) Recall := 1 log T . Up to each time t, there are at most log t noise terms added to eachX i,k (t). Let γ τ ∼ Lap(1/ ) and Γ := log t τ =1 γ τ . Set λ := 4 log T · log t · log n i,k (t) .
The sum of these Laplace noise terms satisfy the following inequality [5] :
Thus with probability at most n −2 i,k (t), the noise term added to each empirical meanX is larger than λ n i,k (t) . Now we want to figure out how the added noise would affect the regret, more specifically, the ϑ i,k (t). According to (14) , ϑ i,k (t) is a linear combination ofX i,k (t), denote ∆ϑ i,k (t) as the total noise added inθ i,k (t), S i,k (t) as the cumulative noise added in t τ =1θ (τ ). Then ∆ϑ i,k (t) is a linear combination of S i,k (t) and we have with probability at least 1 − p 1 ,
Defineσ 2 i,k (t) as the variance proxy ofθ i,k (t). According to Algorithm 3, each new observation comes with an additional independent Laplacian noise term. Noting the linear combination derived from gossiping procedures will not change the independence, the gossiped noise ∆ϑ i,k (t) is independent of each X j,k (τ ), for all j ∈ [N ], τ ∈ {0, . . . , t}. According to the definition of the variance proxy, we know σ 2 ∆ = |∆ϑ i,k (t)| 2 . Summing two variance proxies, i.e. σ 2 i,k (t) + σ 2 ∆ returnsσ 2 i,k (t). Following the corresponding procedures as Section 3.5, we can prove this lemma.
With the existence of Laplacian noise, Theorem 1 can be extended for Fed_UCB as follows. 
where α 3 := (3M − 1)N + 2π 2 3 + 2λ 1/12 2
Proof. Following the concentration bound forθ i,k (t), we setC i,k (t) in (12) as the upper confidence bound. NoticeC
following the similar steps in the analyses of Gossip_UCB, we get with probability at least 1 − p 1 , after time t which satisfies:
the expected error resulting from agent i selecting arm k is bounded by (3M − 1)N + 2π 2 3 . The remaining part (similar to Case 2B and Case 3B in Section 3.6) is bounded by 4N (log T + 1). Define α 3 = α 2 + 4N . Therefore, the expected number of non-optimal arms is bounded as
Using the union bound, the regret of agent i until time T is bounded as:
, L, (3M + 1)N + 4N log T + α 3 .
Similar to Remark 1, we have the following remark for the order of regret R i (T ) while protecting at least -DP with Fed_UCB.
In addition to the theoretical guarantees, we test the performance of Fed_UCB in multi-agent stochastic multi-arm bandits problems on both synthetic datasets and real datasets. Each experiment is run for 100 times with i.i.d. noise and the regret is averaged over 100 trials and N agents. Shadow areas indicate the range of realized regret (minimum and maximum in 100 trials). When = ∞, there is no extra privacy preservation step added as discussed in Gossip_UCB. To show the effect of -DP preservation on the regret of Fed_UCB, we add Laplacian noise following Algorithm 3. The total privacy levels are set as = 1, 2, 5, respectively.
In the synthetic data, the expected belief of agent i toward arm k, i.e. µ i,k , is generated randomly in [0, 1]. The rank of arms from each agent's perspective is different. Zero-mean Gaussian noise with variance 1 is added to each observation. Figure 1 (a) and Figure 1 (b) show the simulation results in different settings. When the increase of regret is stable, e.g. t =6e5, in both figures, the ratios of regret with i ∈ {1, 2, 5} are approximately 1 : 1/2 : 1/5 = 1/ 1 : 1/ 2 : 1/ 3 , which is consistent with our bound on the regret of Fed_UCB.
We use the UCI diabetes dataset [9] , which is a medical dataset including 101, 766 inpatient records in US hospitals. There are over 50 features representing patient and hospital outcomes, e.g., results of some laboratory tests, personal information of patients, and the specific medications administered during the encounter. The label encodes three readmission states of patients: no record, readmitted in more than 30 days, and readmitted in less than 30 days. Construction of rewards: There are 3 readmission states: no record, readmitted in more than 30 days, and readmitted in less than 30 days. If the patient is readmitted in less than 30 days, we can infer the treatment (medication) does not work. On the contrary, if the patient is readmitted in more than 30 days, we can infer the treatment (medication) works in some sense. If there is no record for this patient, it may because the patient chooses other hospitals or is cured, which makes it difficult to determine the effectiveness of the treatment. Additionally, we cannot simply discard these samples since they account for a large population. In our experiments, we assume no record means the treatment does not work well. There are several evidences:
• Evidence 1 : Diabetes are chronic diseases, it is hard to be cured in one hospital stay;
• Evidence 2 : By simple logistic regression, we can find the readmission states are highly-related to the discharge disposition, including transferring other hospitals or medical institutions. This phenomenon supports our speculation that no record mainly shows bad treatments; • Evidence 3 : From our numerical results, assuming no record indicating the positive effect of treatments leads to a unreasonable result: nearly all steady medications have negative effects.
Therefore, we map no record and readmitted in less than 30 days to reward 0, and map readmitted in more than 30 days to reward 1.
In this experiment, we focus on the relationship between medications and readmission states. Noting no one wants to be known about their readmission status, we consider a federated bandit setting where hospitals (agents) do not directly share their rewards (readmission states) due to privacy concerns. On one hand, the privacy can be protected in some sense the gossiping procedure since the variable for gossiping is a weighted combination of the protected data with complicated (and possibly unknown) weights. On the other hand, the hospital can only use a noisy copy of readmission states in the DP setting. Each hospital protects their patient's privacy in this mechanism 3 . We map 23 types of medications into 5 arms, and randomly divide the samples into 3 equal-sized set belonging to three hospitals (agents). From our numerical results, local biased indeed occurs when the dataset is separated into several parts according to the order in which the samples appear. We leave detailed data processing procedures in supplementary materials. The feasibility of federated bandit in a real hospital dataset is testified in Figure 1 (c).
In this paper, we have proposed Gossip_UCB for solving a gossiping bandit learning problem, where a network of agents aim to learn to converge to selecting the best arm both locally and globally through gossiping, and its differentially private variant, Fed_UCB, for preserving -differential privacy of the agents' local data. We have shown that both Gossip_UCB and Fed_UCB achieve weak regret at an order depending on the size of agents, the number of arms, time horizon, and connectivity of the graph. In addition to the theoretical bounds on regret, experiments on both synthetic data and real data also verify the feasibility of the proposed gossiping approach of federated bandit. Future work may include extending this framework to contextual bandits [46] with local features or bandits with continuous arms [53] .
And further we can get
According to the Hoeffding's inequality for sub-Gaussian random variables (specified in Property 1 of Appendix A), the bound for |ϑ i,k (t) − E(ϑ i,k (t))| is (with probability at least 1 − p 0 )
B.2 Proof for Lemma 5 Lemma 5. With probability 1,
Proof. Taking expectation on both sides of (13) yields:
denoting 1 i by the N × 1 column vector with the i-th element being 1 and others being 0, we have
holds for all i ∈ [N ], k ∈ [M ].
where p 1 = 2N n i,k (t) · 1 n i,k (t) 2 + p 0 = 2N n i,k (t) + p 0 .
Defineσ 2 i,k (t) as the variance proxy ofθ i,k (t). According to Algorithm 3, each new observation comes with an additional independent Laplacian noise term. Noting the linear combination derived from gossiping procedures will not change the independence, the gossiped noise ∆ϑ i,k (t) is independent of each X j,k (τ ), for all j ∈ [N ], τ ∈ {0, . . . , t}. Thus when n i,k (t) ≥ max{L, (3M + 1)N }, ∀i ∈ [N ] :
.
Following the corresponding procedures as Section 3.5, we can prove this lemma.