{'fraction_non_alphanumeric': 0.037723139104075445, 'fraction_numerical': 0.011018620988307751, 'mean_word_length': 4.261772151898734, 'pattern_counts': {'":': 0, '<': 1, '<?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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Towards Distributed Accommodation of Covert Attacks in Interconnected Systems

The problem of mitigating maliciously injected signals in interconnected systems is dealt with in this paper. We consider the class of covert attacks, as they are stealthy and cannot be detected by conventional means in centralized settings. Distributed architectures can be leveraged for revealing such stealthy attacks by exploiting communication and local model knowledge. We show how such detection schemes can be improved to estimate the action of an attacker and we propose an accommodation scheme in order to mitigate or neutralize abnormal behavior of a system under attack.


Introduction
Many systems of critical importance consist nowadays of tightly integrated physical and computational components, which may perform control and safety-critical tasks with high reliability requirements. Additionally, such systems are often composed of several physically interconnected subsystems that exchange information over a network for a number of reasons, ranging from data analysis to design convenience, or simply because the physical system is itself geographically spread over a large area. As a downside, however, these systems are potentially vulnerable to cyber-attacks which may entail tangible consequences on the physical layer, if not disruption of the system itself. As observed recently Lee et al. (2016); Sobczak (2019), attacks constitute a realistic threat, and being able to detect and counteract them to preserve some level of functionality is then of great importance. In fact, this problem has attracted the interest of the control community over the last decade; see for instance Cheng et al. (2017) and Dibaji et al. (2019) for recent surveys. However, in the majority of cases, the centralized scenario is considered, with only a few works tackling the issue from a distributed perspective Anguluri et al. (2019); Gallo et al. (2020).
Compared to other types of attacks, covert attacks are a class of particularly dangerous attacks, which are undetectable by design in the centralized case Smith (2015). In Barboni et al. (2019), it was shown that a specific residual generation scheme allows to detect such attacks, while they remain stealthy within the attacked subsystem. The distributed detection strategy is inspired by model-based fault detection (see Shames et al. (2011) and Boem et al. (2017) for instance), with a novel design that accounts for the stealthiness of the attacks (which is not an issue for faults in general).
In this paper, we extend the detection architecture in Barboni et al. (2019) with the objective of neutralizing (or at least mitigating) the attacker's malicious effect on the system, that is to say we aim to design a control law that steers the system as close as possible to the desired equilibrium regardless of how the attacker manipulates the control actions (input injection). To the best of the authors' knowledge, this is the first time that an active countermeasure methodology is proposed in the area of control security, and even more in relation with distributed systems. However, accommodation of faults has received considerable attention from the control community (see Zhang and Jiang (2008) for a comprehensive review on the topic). One way to accomplish this relies on fault estimation in order to cancel their unwanted effect on the system's dynamics via a suitable change of the control action Polycarpou and Vemuri (1995); Blanke et al. (2006). This is effective in case of actuator or matching faults, and since input-injection attacks satisfy these same conditions, we gather from this idea in order to compensate the attacks in an additive way. In dealing with this task from a distributed perspective, a number of issues may arise in case of sparse interconnections between subsystems. This fundamentally ties with the problem of (partial) input reconstruction Bejarano (2011), as discussed later in the paper. Additionally, results are hereby presented in discrete time, as opposed to the continuous-time case of Barboni et al. (2019).
The paper is structured as follows: in Section 2, the problem is formulated and the attack model is presented; Section 3 provides a short recap of useful results and equations for the detection strategy; in Section 4, the accommodation strategy is presented. Finally, in Section 5 an academic example is given to show the effectiveness of the proposed distributed accommodation strategy.

Notation
For an ordered index set I, and a family of matrices {M i ∈ R n×m , i ∈ I}, col i∈I (M i ) denotes the vertical concatenation of said matrices. For brevity, if x(k) is the value of a vector signal x at time k, x + . = x(k + 1) denotes the value at the next time step. Similarly, x − . = x(k − 1) denotes the value at the previous time step. For a vector v ∈ R n , v [m] denotes its m-th component. For a matrix M ∈ R n×m , M † is its pseudo-inverse. Let R ⊂ X be vector spaces, then X /R denotes the quotient space of X by R.

Problem Statement
We consider a linear time-invariant (LTI) system that can be partitioned into N subsystems, each denoted as SS i , i ∈ {1, . . . , N }. For each subsystem, let N i denote the index set of neighbors of SS i . We model each subsystem as a discrete-time LTI system: where x i ∈ R ni ,ũ i ∈ R mi , and y i ∈ R pi are the local states, inputs, and outputs, respectively.
x j , j ∈ N i are the neighbors' states which enter the dynamics of SS i through the interconnection matrix A ij ∈ R ni×nj . Each subsystem is managed by a local unit LU i which contains a diagnoser implementing the proposed attack-detection strategy and a given controller C i . Additionally, these units are interconnected along the same topology of the physical interconnections. As shown on the left-hand side of Fig. 1, the attacker is represented by an interconnection block A i , which injects signals η i and γ i in the control and measurement channels, respectively, according to: Hence, LU i receives possibly attacked measurementsỹ i , and yields a control action u i computed accordingly; on the other hand, the plant SS i receives the counterfeit control actionũ i to which corresponds an actual output response y i .
The attacker's objective is to remain undetected while steering the system's state to a trajectory different from the nominal one, to its own advantage. A particular instance of attacks that are stealthy by design are covert attacks, firstly introduced in Smith (2015) and investigated in the distributed case in the time domain in Barboni et al. (2019).
To perform a covert attack, the attacker implements a modelSS i given bỹ which is used to compute a "canceling" signal γ i , for a prescribed input injection η i . Let k a be the attack onset instant and let the following assumption hold.
Assumption 1. The attacker has perfect knowledge of the subsystem model, i.e.
It is shown in (Barboni et al., 2019, Proposition 1) that under Assumption 1, ifx i (k a ) = 0, the attacker A i is covert at all times. Therefore, any residual generator exploiting only u i andỹ i cannot be used for detection.
We point out that Assumption 1, while being difficult to achieve, represents the worst-case scenario of an omniscient attacker who is perfectly stealthy. Such a condition frames the detection problem as the most difficult, hence the derived results will also hold for easier cases.
For the scope of the present work, the problem is not limited to attack detection -which has been already covered in the referenced works -but rather it focuses on the design of a control input u i which attenuates the attack's effects. To the best of the authors' knowledge, this is the first time that a solution to this problem in this distributed flavor is proposed. Due to the early stage nature of this branch of research, we consider the ideal case in order to obtain basic conditions under which the proposed strategy is effective, and ignore hereby other issues such as robustness to noise.

Detection Architecture
For sake of completeness, we recap the detection architecture presented 1 in Barboni et al. (2019), as well as some important results that are needed for presentation.
At a glance, the detection architecture comprises two observers -O d i and O c i -and an alarm mechanism that compares a specially constructed residual to a threshold. Observer O d i is decentralized and computes an estimatex d i of x i insensitive to the neighboring states x j , j ∈ N i ; O c i instead is distributed and accounts for the neighboring coupling by including communicated estimateŝ x d j , j ∈ N i . Let us define the estimation errors, where we distinguish between the actual errors and the received (or attacked) ones as follows: Note that the attacked errors are in fact those that a diagnoser can compute, asỹ i are the available measurements. In fact, the actual errors are not available in any way, but they are still useful for analysis and to quantify the attacker's impact.
By construction, the signalr c i = C iǫ c i is sensitive to attacks in neighboring systems. Suppose that Subsystem i is under attack, the detection logic is as follows.
• Each LU j , j ∈ N i computesr c i and compares it to a thresholdr i . An alarm δ j = 0 is raised if r c i >r i . • δ i is broadcast to each neighbor; conversely, SS i receives δ j from all its neighbors.
Remark 1. In Barboni et al. (2019), the alarm variable δ i was binary. In the present work, instead, δ i ∈ R ni , as it will take part into the attack accommodation algorithm, as shown in Section 4. ⊳

Decentralized Observer O d
The decentralized observer consists of a discrete-time Unknown Input Observer (UIO): If the existence conditions in Chen et al. (1996) hold, (4) is an UIO for subsystem (1). As such, the error dynamics is described by: Barboni et al. (2019)). Let S i be under attack, if the UIO conditions and Assumption 1 are satisfied, the following equations hold. The error dynamic of the observer (4) is while the attacked estimation error defined in (3) is given bỹ A consequence of (7) is that the estimate does not converge to the actual state of the system, but rather to the difference x i −x i , as can be seen from (3).

Distributed Observer O c
The distributed observer O c i relies on decentralized estimates received over a communication network, and its dynamics is defined as: Let F c i = A i − L i C i , if both F i and F c i are stable, then the estimatex c i converges to the subsystem's state in attack-free conditions. In particular, the following result holds.
Result 2 ( Barboni et al. (2019)). Let S i be under attack, if Assumption 1 is satisfied. The error dynamics of the observer (8) is where ǫ d j is given by (5), (6). Conversely, the attacked estimation error is given bỹ Eq. (9) holds also when the system is not under attack. It can be seen that the received error (and hence the residual) depends on the actual neighbors' decentralized errors ǫ d j . Since under attack ǫ d j evolves according to (6), it follows that under reachability conditions of the pairs (F c i , A ij ), for all i ∈ N j , the errorǫ c i does not converge to 0.

Attack Accommodation
This section is devoted to the design of a control action u i , which compensates for the effect of the attacker in an attacked subsystem SS i . This strategy is triggered after the attack has been successfully detected and isolated. The accommodation strategy is based on the following observations: • Since the estimation errors converge in nominal conditions, the errorǫ c j , j ∈ N i can be used to define which we have written in forward form for the sake of convenience. The variable d j represents the aggregate actual error of neighboring systems. • From (3) we have that: ǫ d i =ǫ d i +x i . Given thatǫ d i converges to 0, the actual error ǫ d i depends directly on the state of the attacker's statex i , which can be seen as superimposed to the nominal system state x n i . Indeed, with initial conditionx i (k a ) = 0, the dynamics of SS i can be decomposed as In view of these observations, the developed strategy aims at constructing an estimate of the attacker's state using neighboring errors. For this purpose, we redefine the alarm signal introduced in Section 3 using (10) as: otherwise, for some suitable threshold θ j . Suppose that SS i is under attack; if d j = 0, ∀j ∈ N i , then the attack is detected in the same way as previously presented.
A one-step lag estimate ofx − i ofx i can be obtained by solving the following Least Squares (LS) problem: The solution to (11) is given by:

Remark 2. With respect to just performing attack detection, the designed accommodation strategy requires that the local diagnoser also knows the outbound interconnection matrices A ji . ⊳
Remark 3. Let δ i . = col j∈Ni (δ j ) and A i . = col j∈Ni (A ji ). Then problem (11) can be equivalently reformulated in matrix form as: for which standard solution techniques can be applied. ⊳ Uniqueness of the estimate depends on well-known rank conditions on A i , which we refer to as the aggregate interconnection matrix. We defer discussion to the respective subsections.
To further develop our analysis, consider (1) and a control action of the form Matrices K ij can be optimally chosenŠiljak (1978) to minimize the effects of neighbors on the local dynamics. Without loss of generality, since our analysis focuses on attack compensation on SS i , we can assume exact "cancellation" of neighboring states. Let ǫ a i .
In (13), K i can be designed to achieve asymptotic closed-loop stability, and, with proper design of the UIOs, the respective error terms are asymptotically vanishing. In this case, the attacked subsystem is still driven not only by the attacker's internal state, but also by the injected input η i . This entails the necessity of reconstructing such an input from the estimatex − i that has been computed.
Remark 4. Although no assumptions are made on the controller, (12) is presented to simplify the analysis in the case of linear control. In fact, the proposed accommodation strategy consists of an additive inputη i and an additive estimate compensationx i , which can in principle be used in several control designs. ⊳

Full-rank Aggregate Interconnection
If rank A i = n i , then the solution to (11) is unique, and we have that As a result, the error term ǫ a i obeys the dynamics ǫ a+ i . It is possible to obtain an estimateη i which solves the input reconstruction problem relative to the dynamics (2) for a knownx − i .
Definition 2 (Relative degree). Consider a linear system of the form (1). Let c l be the l-th row of matrix C i ; if there exist integers r l such that then r = [r 1 , . . . , r pi ] is called the relative degree of system (1). ⊳ Let us define the stacked vector of the attacker's state and inject input estimateŝ respectively, and the input-to-state dynamic matrix Ψ i Edelmayer et al. (2004): where r ≥ n i . Then, we can state the following.

Proposition 1. The injected signal η i (k) can be estimated in finite time if and only if system
Proof. If system (2) is left-invertible, thenx i = Ψ iηi admits a unique solution, given by (14). The delay in the input estimate (15) follows by Definition 2, with c i taken as the canonical euclidean basis vectors. In this, r 0 is the largest component of the vector relative degree, i.e.
The additional lag step is given by the intrinsic delay in the estimatex i .
Remark 5. The left-invertibility condition necessary to obtainη i is implied by existence conditions for the UIO O d i Hou and Patton (1998), hence no further assumptions are made on the problem setting. ⊳ In this case, from an analytical point of view, the compensation mismatch depends on differences of the attacker's input signal because of the intrinsic delay of the estimation procedure. For constant injected inputs, e.g. steady offsets, it follows that attack compensation is exact.
Remark 6. Notice that rank A ji = n i , ∀j ∈ N i ⇒ rank A i = n i , but the converse is not true in general. ⊳

Low-rank Aggregate Interconnection
In this subsection, we consider the case rank A i < n i . This is attained when a subset of the components of x i does not influence the neighbors. More formally, the aggregate interconnection is We can introduce a decomposition of the state space R ni into a non-interacting subspace X ⊥ i . = ker A i and an interacting one X || i . = R ni /X ⊥ i . Clearly, we have that dim X || = n i − g i . Consequently, we can define respective canonical projections of R ni onto these subspaces, and in particular we consider P i : R ni → X || i . With this projection, the solution of the LS problem will be exact only on the interacting subspace. In particular, we have thatx By means of this projection, it is possible to reframe the problem as the input reconstruction for the systemS where the second equation is considered as the system output. The input-output matrix can be rewritten as where r ≥ n i and r 0 = max l∈{1,...,rp i } (r l ) is the maximum relative degree of (16).
Proof. Using (Bejarano et al., 2009, Theorem 4.10), we ensure that (16) is left invertible. In that case, (17) admits a unique solution. The remaining considerations follow those in Proposition 1.
Finally, reusingη i in (16) allows for a forward estimation ofx ⊥ i . In fact, by definition, such part of the state does not directly affect the neighboring dynamics and hence the communicated errors. As a result, the only way of reconstructing the entirex i is via the state update equation of the local attacker's model (2).
Remark 7. The decomposition method presented in this subsection can be related to Bejarano (2011), where however the problem statement is different. Despite the differences in the setting, in the cited work, the input matrix (in the present case, the outbound interconnection) is decomposed onto orthogonal subspaces, and partial left-invertibility conditions are developed for the decomposed system. ⊳

Simulation Example
We show the effectiveness of the proposed method on a simple numerical example on regulation. This example is meant to illustrate the practicality of the proposed procedure. The overall system comprises N = 5 subsystems and the topology is described the following neighbors sets: We consider the full and low rank interconnection cases, and for both we use the following subsystem's dynamics. ∀i ∈ {1, . . . , N }: Choice of A ij will be presented in two separate examples in the following subsections. Individual pairs of observers are designed for the two systems, as presented in Section 3. Each system implements a control law of the form (12), which optimally decouples the neighboring dynamics and achieves a prescribed rate of convergence.
For simplicity and without loss of generality, all subsystems implement the same dynamics and the same interconnection. At time k a = 20, SS 3 is covertly attacked according to the model presented in Section 2. The attacker's objective is to introduce a steady-state error into the regulator.

Full Rank Interconnections
For this case, the interconnection matrix is chosen as Results for this example can be seen in Fig. 2 and 3. In the former, components of the true state are shown, and it is possible to see that the effect of the attack is compensated according to the controller's dynamics with a certain delay. This delay is particularly evident in Fig. 3: in the lefthand side figure, the one-step delay intrinsic in the computation ofx 3 is shown. This translates into an r 0 + 1 delay for the computation ofη 3 , as depicted on the right-hand side of Fig. 2.

Low Rank Interconnections
In this case, the interconnection matrix is chosen as A ij = 0.1 0 −0.1 0 .
As in the previous subsection, the results can be seen in Fig. 4 and 5. It can be noticed how the performance of the accommodated system is not particularly different from that obtained in the full  rank case. On the other hand, the estimation of the attacker's statex 3 is affected by a longer delay, as shown in the left-hand side of Fig. 5. These estimates are obtained using the reconstructed input as computed by (18), and which are shown in the right-hand side of the picture.

Conclusions and Future Work
In this paper, a novel distributed methodology for accommodation of stealthy local attacks in interconnected systems is presented. To the best of the authors' knowledge, this is the first time a step is done in this direction, and the approach can be in principle applied to other cases where locally unobservable states have no effects on residuals. Given the early stage nature of the presented methodology, additional work is being done on characterizing robustness and the impact of noise and disturbances on the estimates.