{'fraction_non_alphanumeric': 0.036015641078411195, 'fraction_numerical': 0.010161555875694587, 'mean_word_length': 4.459691011235955, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Consensus based Detection in the Presence of Data Falsification Attacks

This paper considers the problem of detection in distributed networks in the presence of data falsification (Byzantine) attacks. Detection approaches considered in the paper are based on fully distributed consensus algorithms, where all of the nodes exchange information only with their neighbors in the absence of a fusion center. In such networks, we characterize the negative effect of Byzantines on the steady-state and transient detection performance of the conventional consensus based detection algorithms. To address this issue, we study the problem from the network designer's perspective. More specifically, we first propose a distributed weighted average consensus algorithm that is robust to Byzantine attacks. We show that, under reasonable assumptions, the global test statistic for detection can be computed locally at each node using our proposed consensus algorithm. We exploit the statistical distribution of the nodes' data to devise techniques for mitigating the influence of data falsifying Byzantines on the distributed detection system. Since some parameters of the statistical distribution of the nodes' data might not be known a priori, we propose learning based techniques to enable an adaptive design of the local fusion or update rules.


I. INTRODUCTION
Distributed detection is a well studied topic in the detection theory literature [1]- [3]. The traditional distributed detection framework comprises of a group of spatially distributed nodes which acquire the observations regarding the phenomenon of interest and send them to the fusion center (FC) where a global decision is made. However, in many scenarios a centralized FC may not be available or in large networks, the FC can become an information bottleneck that may cause degradation of system performance, and may even lead to system failure. Also, due to the distributed nature of future communication networks, and various practical constraints, e.g., absence of the FC, transmit power or hardware constraints and dynamic characteristic of wireless medium, it may be desirable to employ alternate peer-to-peer local information exchange in order to reach a global decision. One such distributed approach for peer-to-peer local information exchange and inference is the use of a consensus algorithm [27].
In consensus based detection approaches, each node communicates only with its neighbors and updates its local state information about the phenomenon (summary statistic) by a local fusion rule that employs a weighted combination of its own value and those received from its neighbors.
Nodes continue with this consensus iteration until the whole network converges to a steady-state value which is the global test statistic. In particular, the authors in [5], [6] considered average consensus based distributed detection and emphasized network designs based on the small world phenomenon for faster convergence [7]. A bio-inspired consensus scheme was introduced for spectrum sensing in [8]. However, these consensus-based fusion algorithms only ensure equal gain combining of local measurements. The authors in [9] proposed to use distributed weighted fusion algorithms for cognitive radio spectrum sensing. They showed that weighted average consensus based schemes outperform average consensus based schemes and achieve much better detection performance than the equal gain combining based schemes. However, the weighted average consensus based detection schemes are quite vulnerable to different types of attacks.
One typical attack on such networks is a Byzantine attack. While Byzantine attacks (originally proposed in [10]) may, in general, refer to many types of malicious behavior, our focus in this paper is on data-falsification attacks [11]- [18]. Thus far, research on detection in the presence of Byzantine attacks has predominantly focused on addressing these attacks under the centralized April 15, 2015 DRAFT model [13], [14], [18], [19]. A few attempts have been made to address the security threats in the distributed or consensus based schemes in recent research [20]- [25]. Most of these existing works on countering Byzantine or data falsification attacks in distributed networks rely on a threshold for detecting Byzantines. The main idea is to exclude nodes from neighbors list whose state information deviates significantly from the mean value. In [22] and [25], two different defense schemes against data falsification attacks for distributed consensus-based detection were proposed. In [22], the scheme eliminates the state value with the largest deviation from the local mean at each iteration step and, therefore, it can only deal with the situation in which only one Byzantine node exists. It excludes one state value even if there is no Byzantine node. In [25], the vulnerability of distributed consensus-based spectrum sensing was analyzed and an outlier detection algorithm with an adaptive threshold was proposed. The authors in [24] proposed a Byzantine mitigation technique based on adaptive local thresholds. This scheme mitigates the misbehavior of Byzantine nodes and tolerates the occasional large deviation introduced by honest users. It adaptively reduces the corresponding coefficients so that the Byzantines will eventually be isolated from the network.
Excluding the Byzantine nodes from the fusion process may not be the best strategy from the network designer's perspective. As shown in our earlier work [18] in the context of distributed detection with one-bit measurements under a centralized model, an intelligent way to improve the performance of the network is to use the information of the identified Byzantines to the network's benefit. More specifically, learning based techniques have the potential to outperform the existing exclusion based techniques. In this paper, we pursue such a design philosophy in the context of raw data based fusion in decentralized networks.

A. Main Contributions
In this paper, we focus on the susceptibility and protection of consensus based detection algorithms. Our main contributions are summarized as follows: • We characterize the effect of Byzantines on the steady-state performance of the conventional consensus based detection algorithms. More specifically, we quantify the minimum fraction of Byzantines needed to make the deflection coefficient of the global statistic equal to zero.
• Using probability of detection and probability of false alarm as measures of detection performance, we investigate the degradation of transient detection performance of the conventional consensus algorithms with Byzantines.
• We propose a robust distributed weighted average consensus algorithm and obtain closedform expressions for optimal weights to mitigate the effect of data falsification attacks.
• Finally, we propose a technique based on the expectation-maximization algorithm and maximum likelihood estimation to learn the operating parameters (or weights) of the nodes in the network to enable an adaptive design of the local fusion or update rules.
The rest of the paper is organized as follows. In Sections II and III, we introduce our system model and Byzantine attack model, respectively. In Section IV, we study the security performance of weighted average consensus based detection schemes. In Section V, we propose a protection mechanism to mitigate the effect of data falsification attacks on consensus based detection schemes. Finally, Section VI concludes the paper.

II. SYSTEM MODEL
First, we define the network model used in this paper.

A. Network Model
We model the network topology as an undirected graph represents the set of nodes in the network with |V | = N.  The neighborhood of a node i is defined as The degree of a node v i in a graph G, denoted by d i , is the number of edges in E which include v i as an endpoint, i.e., d i = N j=1 a ij . The degree matrix D is defined as a diagonal matrix with diag(d 1 , · · · , d N ) and the Laplacian matrix L is defined as or, in other words, L = D − A. For example, consider a network with six nodes trying to reach consensus (see Figure 1). The Laplacian matrix L for this network is given by The consensus based distributed detection scheme usually contains three phases: sensing, information fusion, and decision making. In the sensing phase, each node acquires the summary statistic about the phenomenon of interest. In this paper, we adopt the energy detection method so that the local summary statistic is the received signal energy. Next, in the information fusion Step 1: All nodes establish communication links with their neighbors, and broadcast their information state x i (0) = Y i .
Step 2: Each node updates its local state information by a local fusion rule (weighted combination of its own value and those received from its neighbors). We denote node i's updated information at iteration k by x i (k). Node i continues to broadcast information x i (k) and update its local information state until consensus is reached. This information state updating process can be written in a compact form as where ǫ is the time step and w i is the weight assigned to node i's information. Using the notation T , network dynamics in the matrix form can be represented as, where, W = I − ǫ diag(1/w 1 , · · · , 1/w N )L is referred to as a Perron matrix. The consensus algorithm is nothing but a local fusion or update rule that fuses the nodes' local information state with information coming from neighbor nodes and every node asymptotically reaches the same information state for arbitrary initial values.

D. Decision Making Phase
The final information state after reaching consensus for the above consensus algorithm will be the weighted average of the initial states of all the nodes [27] or Average consensus can be seen as a special case of weighted average consensus with w i = w, ∀i.
After the whole network reaches a consensus, each node makes its own decision about the hypothesis using a predefined threshold λ 1 where weights are given by [9] (2) Note that, after reaching consensus x * i = Λ, ∀i. Thus, in rest the of the paper, Λ is referred to as the final test statistic.
Next, we discuss Byzantine attacks on consensus based detection schemes and analyze the performance degradation of the weighted average consensus based detection algorithm due to these attacks.

III. ATTACKS ON CONSENSUS BASED DETECTION ALGORITHMS
When there are no adversaries in the network, we noted in the last section that consensus can be accomplished to the weighted average of arbitrary initial values by having the nodes use the update strategy x(k + 1) = W x(k) with an appropriate weight matrix W . Suppose, however, that instead of broadcasting the true sensing statistic Y i and applying the update strategy (1), some nodes (referred to as Byzantines) deviate from the prescribed strategies. Accordingly, Byzantines can attack in two ways: data falsification (nodes falsify their initial data or weight values) and consensus disruption (nodes do not follow update rule given by (1)). More specifically, Byzantine node i can do the following Data falsification: where (∆ i ,w i ) and u i (k) are introduced at the initialization step and at the update step k, respectively. The attack model considered above is extremely general, and allows Byzantine node i to update its value in a completely arbitrary manner (via appropriate choices of (∆ i ,w i ), and u i (k), at each time step). An adversary performing consensus disruption attack has the objective to disrupt the consensus operation. However, consensus disruption attacks can be easily detected because of the nature of the attack. The identification of consensus disruption attackers has been investigated in the past literature (e.g., see [7], [28]) where control theoretic techniques were developed to identify disruption attackers in a single consensus iteration. Knowing the existence of such an identification mechanism, a smart adversary will aim to disguise itself while degrading the detection performance. In contrast to disruption attackers, data falsification attackers are more capable and can manage to disguise themselves while degrading the detection performance of the network by falsifying their data. Susceptibility and protection of consensus strategies to data falsification attacks has received scant attention, and this is the focus of our work. In this paper, we assume that an attacker performs only a data falsification attack by introducing (∆ i ,w i ) during initialization. We exploit the statistical distribution of the initial values and devise techniques to mitigate the influence of Byzantines on the distributed detection system.

A. Data Falsification Attack
In data falsification attacks, attackers try to manipulate the final test statistic (i.e., Λ = ) in a way that the detection performance is degraded. We consider a network with N nodes that uses Algorithm (1) for reaching consensus. Algorithm (1) can be interpreted as, weight w i , given to node i's data Y i in the final test statistic, is assigned by node i itself. So by falsifying initial values Y i or weights w i , the attackers can manipulate the final test statistic. Detection performance will be degraded because Byzantine nodes can always set a higher weight to their manipulated information. Thus, the final statistic's value across the whole network will be dominated by the Byzantine node's local statistic that will lead to degraded detection performance.
Next, we define a mathematical model for data falsification attackers. We analyze the degradation in detection performance of the network when Byzantines falsify their initial values Y i for fixed arbitrary weightsw i .

B. Attack Model
The objective of Byzantines is to degrade the detection performance of the network by falsifying their data (Y i , w i ). By assuming that Byzantines are intelligent and know the true hypothesis, we analyze the worst case detection performance of the data fusion schemes. We consider the case when weights of the Byzantines have already been tampered tow i and analyze the effect of falsifying the initial values Y i . This analysis provides the most favorable case from the point of view of Byzantines and yields the maximum performance degradation that the Byzantines can cause. Now a mathematical model for a Byzantine attack is presented. Byzantines tamper with their initial values Y i and sendỸ i such that the detection performance is degraded. April 15, 2015 DRAFT where P i is the attack probability and ∆ i is a constant value which represents the attack strength, which is zero for honest nodes. As we show later, Byzantine nodes will use a large value of ∆ i so that the final statistic's value is dominated by the Byzantine node's local statistic that will lead to a degraded detection performance. We use deflection coefficient [29] to characterize the security performance of the detection scheme due to its simplicity and its strong relationship with the global detection performance. Deflection coefficient of the global test statistic is defined as: is the conditional variance. The deflection coefficient is also closely related to other performance measures, e.g., the Receiver Operating Characteristics (ROC) curve. In general, the detection performance monotonically increases with an increasing value of the deflection coefficient. We define the critical point of the distributed detection network as the minimum fraction of Byzantine nodes needed to make the deflection coefficient of global test statistic equal to zero (in which case, we say that the network becomes blind) and denote it by α blind . We assume that the communication between nodes is error-free and our network topology is fixed during the whole consensus process and, therefore, consensus can be reached without disruption.
In the next section, we analyze the security performance of consensus based detection schemes in the presence of data falsifying Byzantines.

IV. PERFORMANCE ANALYSIS OF CONSENSUS BASED DETECTION ALGORITHMS
In this section, we analyze the effect of data falsification attacks on conventional consensus based detection algorithms.
First, in Section IV-A, we characterize the effect of Byzantines on the steady-state performance of the consensus based detection algorithms and determine α blind . Next, in Section IV-B, using probability of detection and probability of false alarm as measures of detection performance, we April 15, 2015 DRAFT investigate the degradation of transient detection performance of the consensus algorithms with Byzantines.

A. Steady-State Performance Analysis with Byzantines
Without loss of generality, we assume that the nodes corresponding to the first N 1 indices i = 1, · · · , N 1 are Byzantines and the rest corresponding to indices i = N 1 +1, · · · , N are honest nodes. Let us define w = [w 1 , · · · ,w N 1 , w N 1 +1 · · · , w N ] T and sum(w)

Lemma 1.
For data fusion schemes, the condition to blind the network or to make the deflection coefficient zero is given by Proof: The local test statistic Y i has the mean The goal of Byzantine nodes is to make the deflection coefficient as small as possible.
Since the Deflection Coefficient is always non-negative; the Byzantines seek to make , can be computed and are given by (3), (4) and (5), respectively. After substituting values from (3), (4) and (5), the condition to make D(Λ) = 0 becomes . This condition indicates that by appropriately choosing attack parameters (P, D), an adversary needs less than 50% of sensing data falsifying Byzantines to make the deflection coefficient zero.
Next, to gain insights into the solution, we present some numerical results in Figure 2. We plot the deflection coefficient of global test statistic as a function of attack parameters P i = P, ∆ i = D, ∀i. We consider a 6-node network with the topology given by the undirected graph April 15, 2015 DRAFT shown in Figure 1 to detect a phenomenon. Nodes 1 and 2 are considered to be Byzantines.
Channel gains of the nodes are assumed to be h = [0.8, 0.7, 0.72, 0.61, 0.69, 0.9] and weights are given by (2). We also assume that M = 12, E s = 5 and σ 2 i = 1. Notice that, the deflection coefficient is zero when the condition in Lemma 1 is satisfied. Another observation to make is that the deflection coefficient can be made zero even when only two out of six nodes are Byzantines. Thus, by appropriately choosing attack parameters (P, D), less than 50% of data falsifying Byzantines are needed to blind the network.

B. Transient Performance Analysis with Byzantines
Next, we analyze the detection performance of the data fusion schemes, denoted as x(t + 1) = W t x(0), as a function of consensus iteration t in the presence of Byzantines. For analytical tractability, we assume that P i = P, ∀i. We denote by w t ji the element of matrix W t in the jth row and ith column. Using these notations, we calculate the probability of detection and the probability of false alarm at the jth node at consensus iteration t.
For sufficiently large M, the distribution of Byzantine's dataỸ i given H k is a Gaussian mixture Now, the probability density function (PDF) of x t ji = w t jiỸ i conditioned on H k can be derived as where φ(x|µ, σ 2 ) (for notational convenience denoted as φ(µ, σ 2 )) is the PDF of X ∼ N (µ, σ 2 ) and φ(x|µ, σ 2 ) = 1 σ √ 2π e −(x−µ) 2 /2σ 2 . Next, for clarity of exposition, we first derive our results for a small network with two Byzantine nodes and one honest node. Later we generalize our results for an arbitrary number of nodes, N.
Notice that, for the three node case, the transient test statisticΛ t j = w t j1Ỹ 1 +w t j2Ỹ 2 +w t j3 Y 3 , is a summation of independent random variables. The conditional PDF of X t ji = w t jiỸ i is given in (6). Notice that, PDF ofΛ t j is the convolution Now, using the fact that convolution of two normal PDFs φ(µ i , σ 2 i ) and φ(µ j , σ 2 j ) is again normally distributed with mean (µ i + µ j ) and variance (σ 2 i + σ 2 j ), we can derive the results below.
Due to the probabilistic nature of the Byzantine's behavior, it may behave as an honest node with a probability (1−P i ). Let S denote the set of all combinations of such Byzantine strategies: where by b i we mean that Byzantine node i behaves as a Byzantine and by h i we mean that Byzantine node i behaves as an honest node. Let A s ∈ U denote the indices of honest nodes in the strategy combination s, then, from (7) we have where {} is used to denote the null set and m s to denote the cardinality of subset A s ∈ U. Using these notations, we generalize our results for any arbitrary N.

Lemma 2.
The test statistic of node j at consensus iteration t, i.e.,Λ t j = The performance of the detection scheme in the presence of Byzantines can be represented in terms of the probability of detection and the probability of false alarm of the network.

Proposition 1.
The probability of detection and the probability of false alarm of node j at consensus iteration t in the presence of Byzantines can be represented as

Remark 1.
Notice that, the expressions of probability of detection P t d (j) and probability of false alarm P t f (j) for the N 1 Byzantine node case involves 2 N 1 combinations (cardinality of U is 2 N 1 ). It, however, can be represented compactly by vectorizing the expressions, i.e., where boldface letters represent vectors, ⊗ symbol represents element-wise multiplication, Q(·) represents element wise Q function operation, i.e., Q(x 1 , · · · , x N 1 ) = [Q(x 1 ), · · · , Q(x N 1 )] T , is the binary representation of decimal numbers from 0 to N 1 − 1 and A c is the matrix after interchanging 1 and 0 in matrix A.
Similarly, the expression for the probability of false alarm P t f (j) can be vectorized into a compact form.
Next, to gain insights into the results given in Proposition 1, we present some numerical results in Figures 3 and 4. We consider the 6-node network shown in Figure 1 where the nodes employ the consensus algorithm 1 with ǫ = 0.6897 to detect a phenomenon. Nodes 1 and 2 are considered to be Byzantines. We also assume that η i = 10, σ 2 i = 2, λ = 33 and w i = 1. Attack parameters are assumed to be (P i , ∆ i ) = (0.5, 6) andw i = 1.1. To characterize the transient performance of the weighted average consensus algorithm, in Figure 3 From the discussion in this section, we can see that Byzantines can severely degrade both the steady-state and the transient detection performance of conventional consensus based detection algorithms. As mentioned earlier, a data falsifying Byzantine i can tamper its weight w i as well as its sensing data Y i to degrade detection performance. One approach to mitigate the effect of sensing data falsification is to assign weights based on the quality of the data. In other words, lower weight is assigned to the data of the node identified as a Byzantine. However, to implement this approach one has to address the following two issues. April    First, in the conventional weighted average consensus algorithm, weight w i given to node i's data is assigned by the node itself. Thus, a Byzantine node can always set a higher weight to its manipulated information and the final statistics will be dominated by the Byzantine nodes' local statistic that will lead to degraded detection performance. It will be impossible for any algorithm to detect this type of malicious behavior, since any weight that a Byzantine chooses for itself is a legitimate value that could also have been chosen by a node that is functioning correctly.
Thus, the conventional consensus algorithm cannot be used in the presence of an attacker.
Second, as will be seen later, the optimal weights assigned to nodes' sensing data depend on the following unknown parameters: identity of the nodes (i.e., honest or Byzantine) and underlying statistical distribution of the nodes' data.
In the next section, we address these concerns by proposing a learning based robust weighted April 15, 2015 DRAFT average consensus algorithm.

V. A ROBUST CONSENSUS BASED DETECTION ALGORITHM
In order to address the first issue, we propose a consensus algorithm in which the weight for node i's information is assigned (or updated) by neighbors of the node i rather than by node i itself. Note that, networks deploying such an algorithm is more robust to weight manipulation because if a Byzantine node j wants to lower the weight assigned to the data of its honest neighbor i in the global test statistic, it has to make sure that a majority of the neighbors of i put the same lower weight as j. In other words, every honest node should have majority of its neighbors that are Byzantines, otherwise, it can be treated as a consensus disruption attack and Byzantines can be easily identified detected by techniques such as those given in [7], [28].

A. Distributed Algorithm for Weighted Average Consensus
In this section, we address the following questions: does there exist a distributed algorithm that solves the weighted average consensus problem while satisfying the condition that weights must be assigned or updated by neighbors N i of the node i rather than by the node i itself? If it exists, then, under what conditions or constraints does the algorithm converge?
We consider a network with N nodes with a fixed and connected topology G(V, E). Next, we state Perron-Frobenius theorem [30], which will be used later for the design and analysis of our robust weighted average consensus algorithm.

Theorem 1 ( [30]). Let W be a primitive nonnegative matrix with left and right eigenvectors u
and v, respectively, satisfying W v = v and u T W = u T . Then, Using the above theorem, we take a reverse-engineering approach to design a modified Perron matrixŴ which has the weight vector w = [w 1 , w 2 , · · · , w N ] T , w i > 0, ∀i as its left eigenvector and 1 as its right eigenvector corresponding to eigenvalue 1. From the above theorem, if the modified Perron matrixŴ is primitive and nonnegative, then, a weighted average consensus can be achieved. Now, the problem boils down to designing such aŴ which meets our requirement that weights are assigned or updated by the neighbors N i of node i rather than by node i itself. April 15, 2015 DRAFT Next, we propose a modified Perron matrixŴ = I − ǫ(T ⊗ L) where L is the original graph Laplacian, ⊗ is element-wise matrix multiplication operator, and T is a transformation given by Observe that, the above transformation T satisfies the condition that weights are assigned or updated by neighbors N i of node i rather than by node i itself. Based on the above transformation T , we propose our distributed consensus algorithm: Let us denote the modified Perron matrix byŴ = I − ǫL.
Next, we explore the properties of the modified Perron matrixŴ and show that it satisfies the requirements of the Perron-Frobenius theorem [30]. These properties will later be utilized to prove the convergence of our proposed consensus algorithm.
2 A matrix is primitive if it is non-negative and its mth power is positive for some natural number m.
To prove part 2), notice that all the eigenvectors ofŴ andL are the same. Let γ j be the jth eigenvalue ofL, then, the jth eigenvalue ofŴ is λ j = 1 − ǫγ j . Now, part 2) can be proved by applying Gershgorin theorem [30] to the modified Laplacian matrixL.
To prove part 3), note that G is strongly connected and, therefore,Ŵ is an irreducible matrix [30]. Thus, to prove thatŴ is a primitive matrix, it is sufficient 3 to show thatŴ has a single eigenvalue with maximum modulus of 1. In [27], the authors showed that when , the original Perron matrix W has only one eigenvalue with maximum modulus 1 at its spectral radius. Using a similar logic,Ŵ is a primitive matrix if .

Theorem 2. Consider a network with fixed and strongly connected undirected topology G(V, E)
that employs the distributed consensus algorithm Then, consensus with Proof: A consensus is reached asymptotically, if the limit lim k→∞Ŵ k exists. According to Perron-Frobenius theorem [30], this limit exists for primitive matrices. Note that, 1 = [1, · · · , 1] T and w are right and left eigenvectors of the primitive nonnegative matrixŴ respectively. Thus, from [30] lim k→∞ Next, to gain insights into the convergence property of the proposed algorithm, we present some numerical results in Figure 5. We consider the 6-node network shown in Figure 1 where the nodes employ the proposed algorithm (with ǫ = 0.3) to reach a consensus. Next, we plot the updated state values at each node as a function of consensus iterations. We assume that the initial Note that, the parameter ǫ satisfies the condition mentioned in Theorem 2. Figure 5 shows the convergence of the proposed algorithm iterations for a fixed communication graph. It is observed that within 20 iterations consensus has been reached on the global decision statistics or weighted average of the initial values (states).
In the proposed consensus algorithm, weights assigned to node i's data are updated by neighbors of the node i rather than by node i itself which addresses the first issue.

B. Adaptive Design of the Update Rules based on Learning of Nodes' Behavior
Next, to address the second issue, we exploit the statistical distribution of the sensing data and devise techniques to mitigate the influence of Byzantines on the distributed detection system.
We propose a three-tier mitigation scheme where the following three steps are performed at each node: 1) identification of Byzantine neighbors, 2) estimation of parameters of identified Byzantine neighbors, and 3) adaptation of consensus algorithm (or update weights) using estimated parameters.
We first present the design of distributed optimal weights for the honest/Byzantine nodes assuming that the identities of the nodes are known. Later we will explain how the identity of nodes (i.e., honest/Byzantine) can be determined.

1) Design of Distributed Optimal Weights in the Presence of Byzantines:
In this subsection, we derive closed form expressions for the distributed optimal weights which maximize the deflection coefficient. First, we consider the global test statistic Λ = and obtain a closed form solution for optimal centralized weights. Then, we extend our analysis to the distributed scenario. Let us denote by δ B i , the centralized weight given to the Byzantine node and by δ H i , the centralized weight given to the Honest node. By considering w H i , the optimal weight design problem can be stated formally as: where µ 1 , µ 0 and σ 2 (0) are given as in (3), (4) and (5), respectively. The solution of the above problem is presented in the next lemma.    Next, to gain insights into the solution, we present some numerical results in Figure 6 that corroborate our theoretical results. We assume that M = 12, η i = 3, σ 2 i = 0.5 and the attack 4 Note that, weights w B i can be negative and in that case convergence of the proposed algorithm is not guaranteed. However, this situation can be dealt off-line by adding a constant value to make w B i ≥ 0 and changing the threshold λ accordingly. More specifically, by choosing a constant c such that w B i + c ≥ 0, ∀i and λ ← λ + βc where β is number of nodes with parameters are (P i , ∆ i ) = (0. 5,9). In Figure 6, we compare our proposed weighted average consensus based detection scheme with the equal gain combining scheme 5 and the scheme where Byzantines are cut off or removed from the fusion process.
It can be clearly seen from the figure that our proposed scheme performs better than the rest of the schemes.
Notice that, the optimal weights for the Byzantines are functions of the attack parameters (P i , ∆ i ), which may not be known to the neighboring nodes in practice. In addition, the parameters of the honest nodes might also not be known. Thus, we propose a technique to learn or estimate these parameters. We then use these estimates to adaptively design the local fusion rule which are updated after each learning iteration.

2) Identification, Estimation, and Adaptive Fusion Rule:
The first step at each node m is to determine the identity (I i ∈ {H, B}) of its neighboring nodes i ∈ N m . Notice that, if node i is an honest node, its data under hypothesis H k is normally distributed On the other hand, if node i is a Byzantine node, its data under hypothesis H k is a Gaussian mixture Node classification can then be achieved using the maximum likelihood decision rule: where f (·| I l ) is the probability density function (PDF) under each hypothesis I l . However, the parameters of the distribution are not known. Next, we propose a technique to learn these parameters. For an honest node i, the parameters to be estimated are ((µ 1k ) i , (σ 1k ) 2 i ) and for Byzantines the unknown parameter set to be estimated is θ = {α i j , (µ jk ) i , (σ jk ) 2 i }, where k = {0, 1}, j = {1, 2} and i = 1, · · · , N m , for N m neighbor nodes. These parameters are estimated by observing the data over multiple learning iterations. In each iteration t, every node in the 5 In equal gain combining scheme, all the nodes (including Byzantines) are assigned the same weight.
network observes the data coming from their neighbors for D detection intervals to learn their respective parameters. It is assumed that each node has the knowledge of the true hypothesis for D detection intervals (or history) through a feedback mechanism.
First, we explain how the unknown parameter set for the distribution under the null hypothesis (I 0 ) can be estimated. Let us denote the data coming from an honest neighbor node i as Y i (t) = where D 1 (t) denotes the number of times H 0 occurred in learning iteration t and y k i denotes the data of node i when the true hypothesis was H k . To estimate the parameter set, ((µ 1k ) i , (σ 1k ) 2 i ), of an honest neighboring node, one can employ a maximum likelihood based estimator (MLE). We use ((μ 1k ) i (t), (σ 1k ) 2 i (t)) to denote the estimates at learning iteration t, where each learning iteration consists of D detection intervals.
The ML estimate of ((µ 1k ) i , (σ 1k ) 2 i ) can be written in a recursive form as following: where expressions for (σ 10 ) 2 i and (σ 11 ) 2 i are given in (9) and (10). Observe that, by writing these expressions in a recursive manner, we need to store only D data samples at any given learning iteration t, but effectively use all tD data samples to determine the estimates.
Next, we explain how the unknown parameter set for the distribution under the alternate hypothesis (I 1 ) can be estimated. Since the data is distributed as a Gaussian mixture, we employ the expectation-maximization (EM) algorithm to estimate the unknown parameter set for Byzantines.
Let us denote the data coming from a Byzantine neighbor i asỸ i (t) = [ỹ 0 i (1), · · · ,ỹ 0 i (D 1 (t)),ỹ 1 i (D 1 (t)+ 1), · · · ,ỹ 1 i (D)] where D 1 (t) denotes the number of times H 0 occurred in learning iteration t and y k i denotes the data of node i when the true hypothesis was H k . Let us denote the hidden variable as z j with j = {1, 2} or (Z = [z 1 , z 2 ]). Now, the joint conditional PDF ofỹ k i and z j , given the parameter set, can be calculated to be In the expectation step of EM, we compute the expectation of the log-likelihood function with respect to the hidden variables z j , given the measurementsỸ i , and the current estimate of the parameter set θ l . This is given by In the maximization step of EM algorithm, we maximize Q(θ, θ l ) with respect to the parameter set θ so as to compute the next parameter set: April 15, 2015 DRAFT First, we maximize Q(θ, θ l ) subject to the constraint 2 j=1 α i j = 1 . We define the Lagrangian L as Now, we equate the derivative of L to zero: Multiplying both sides by α i j and summing over j gives λ = −D. Similarly, we equate the derivative of Q(θ, θ l ) with respect to (µ jk ) i and (σ k ) 2 i to zero. Now, an iterative algorithm for all the parameters is (µ j0 ) i (l + 1) = In the learning iteration t, let the estimates after the convergence of the above algorithm be denoted byθ(t) = {α i j (t), (μ jk ) i (t), (σ jk ) 2 i (t)}. These estimates are then used as the initial values  for the next learning iteration t + 1 that uses a new set of D data samples.
After learning the unknown parameter set under I 0 and I 1 , node classification can be achieved using the following maximum likelihood decision rule: wheref (·) is the PDF based on estimated parameters.
Using the above estimates and node classification, the optimal distributed weights for honest nodes after learning iteration t can be written as Similarly, the optimal distributed weights for Byzantines after learning iteration t can be written as α i 1 (t)α i 2 (t) ((μ 10 (t)) i − (μ 20 (t)) i ) 2 + α i 1 (t) (σ 10 ) 2 i (t) +α i 2 (t) (σ 20 ) 2 i (t) Next, we present some numerical results in Figure 7 to evaluate the performance of our proposed scheme. Consider the scenario where 6 nodes organized in an undirected graph (as shown in Figure 1) are trying to detect a phenomenon. Node 1 and node 2 are considered to be Byzantines. We assume that ((µ 10 ) i , (σ 10 ) 2 i ) = (3, 1.5), ((µ 11 ) i , (σ 11 ) 2 i ) = (4, 2) and the attack parameters are (P i , ∆ i ) = (0. 5,9). In Figure 7, we plot ROC curves for different learning iterations. For every learning iteration, we assume that D 1 = 10 and D = 20. It can be seen from Figure 7 that within 4 learning iterations, detection performance of the learning based weighted gain combining scheme approaches the detection performance of weighted gain combining with known optimal weight based scheme.
Note that, the above learning based scheme can be used in conjunction with the proposed weighted average consensus based algorithm to mitigate the effect of Byzantines.

VI. CONCLUSION AND FUTURE WORK
In this paper, we analyzed the security performance of conventional consensus based algorithms in the presence of data falsification attacks. We showed that above a certain fraction of Byzantine attackers in the network, existing consensus based detection algorithm are ineffective.
Next, we proposed a robust distributed weighted average consensus algorithm and devised a learning technique to estimate the operating parameters (or weights) of the nodes. This enables an adaptive design of the local fusion or update rules to mitigate the effect of data falsification attacks. There are still many interesting questions that remain to be explored in the future work such as an analysis of the problem for time varying topologies. Note that, some analytical methodologies used in this paper are certainly exploitable for studying the attacks in time varying topologies. Other questions such as the optimal topology which incurs the fastest convergence rate can also be investigated.