DeepAI

# Learning Wireless Networks' Topologies Using Asymmetric Granger Causality

Sharing spectrum with a communicating incumbent user (IU) network requires avoiding interference to IU receivers. But since receivers are passive when in the receive mode and cannot be detected, the network topology can be used to predict the potential receivers of a currently active transmitter. For this purpose, this paper proposes a method to detect the directed links between IUs of time multiplexing communication networks from their transmission start and end times. It models the response mechanism of commonly used communication protocols using Granger causality: the probability of an IU starting a transmission after another IU's transmission ends increases if the former is a receiver of the latter. This paper proposes a non-parametric test statistic for detecting such behavior. To help differentiate between a response and the opportunistic access of available spectrum, the same test statistic is used to estimate the response time of each link. The causal structure of the response is studied through a discrete time Markov chain that abstracts the IUs' medium access protocol and focuses on the response time and response probability of 2 IUs. Through NS-3 simulations, it is shown that the proposed algorithm outperforms existing methods in accurately learning the topologies of infrastructure-based networks and that it can infer the directed data flow in ad hoc networks with finer time resolution than an existing method.

• 1 publication
• 18 publications
02/04/2018

### Sense-and-Predict: Harnessing Spatial Interference Correlation for Opportunistic Access in Cognitive Radio Networks

Cognitive radio (CR) is a key enabler realizing 5G networks to achieve h...
10/25/2021

### Medium Access Control protocol for Collaborative Spectrum Learning in Wireless Networks

In recent years there is a growing effort to provide learning algorithms...
09/04/2020

### Secure Millimeter-Wave Ad Hoc Communications Using Physical Layer Security

Millimeter-wave (mmWave) communications are highly promising to improve ...
03/16/2022

### Levenberg-Marquardt Method Based Cooperative Source Localization in SIMO Molecular Communication via Diffusion Systems

Molecular communication underpins nano-scale communications in nanotechn...
10/29/2021

09/12/2018

### Efficiency and detectability of random reactive jamming in carrier sense wireless networks

A natural basis for the detection of a wireless random reactive jammer (...
04/29/2018

### Transmission Capacity of Full-Duplex MIMO Ad-Hoc Network with Limited Self-Interference Cancellation

In this paper, we propose a joint transceiver beamforming design to miti...

## I Introduction

Consider the scenario where a cognitive network is sharing spectrum with one or more incumbent networks. Spectrum sharing by opportunistic spectrum access requires that the cognitive network avoid interference to the receivers in the incumbent networks. At present, there is extensive work on the detection of transmitters in the field of spectrum sensing [1] but significantly less on identifying receivers. In particular, existing methods for coexistence in TV white space [2] and the Spectrum Access System (SAS) of the Citizen’s Broadband Radio Service (CBRS) [3] detect transmissions and enforce a protection region around the transmitters where CRs are not allowed to transmit. The size of this protection region is designed such that the CRs outside the protection region do not cause harmful interference to any incumbent receivers located on the border of the incumbent transmitter’s service area. On the other hand, if we can identify the potential receivers, we can enforce a smaller protection region around the receivers rather than the transmitters.

Identifying the current receivers in a network of communicating IUs is difficult because receivers are inherently passive when they are in receiving mode and because it is costly for the cognitive network to decode the packets in the incumbent network. Instead, we can use the IUs’ network topology to identify the potential receivers of currently active transmitters. This observation motivates us to learn the IUs’ network topology, i.e., the directed links between IUs. Similar to existing work, we will focus on learning the network topology of time multiplexing incumbent networks.

### I-a Existing Work

In literature, the temporal patterns in IU transmissions have been used to learn network topology. The features used include transmission start and end times, frame durations, and inter-arrival times. We shall base our work on a similar input. As has been shown in [4], we do not need prior knowledge of the IUs’ communication protocols to distinguish IUs and detect the transmission activities of each IU. Hence, we do not require knowledge of the IUs’ communication protocol to obtain these inputs. Note that the location of the IUs is not useful in learning their network topology because the networks need not be geographically separated.

One set of existing methods to learn network topology are based on the causal nature of time multiplexing communication protocols: A transmission by an IU is likely to cause a response, say in the form of an acknowledgement, by its intended receiver after a fixed but unknown delay. Examples of such networks include the 802.11 family of protocols, Bluetooth, and TDD-LTE. Fig. 1 shows an example of the transmit-response pairs in activity sequences of 802.11n networks simulated in NS-3. Using this observation, [5, 6] model the responses as a causal structure in the IUs’ transmission activity time series. They propose methods to identify pairs of communicating IUs by detecting IUs that have a higher probability of transmitting after another. This paper is also based on the same idea.

Another approach to this problem recognizes that the directed links in an ad hoc network correspond to the end-to-end routes and learns those routes directly [7]. The authors propose an algorithm that clusters IUs that have similar distributions of packet lengths and inter-arrival times to infer that these IUs participate in the same data flow. Since they do not infer the ordering of the IUs in the route, we need additional information, e.g., locations, to identify potential receivers of each IU along the route. Their method also requires the network to have the same data rates on all links. In addition, in infrastructure-based networks, receiving IUs typically do not repeat the transmission and are unlikely to have the same packet lengths as the transmitting IU.

### I-B Challenges and Contributions

The primary challenge with using causality to detect responses is that if two IUs are not communicating with each other but are located close enough to interfere with each other, then their collision avoidance mechanisms will ensure that their transmission activities are not independent. This implies that, unlike typical Granger causality literature, the causality between two IUs is non-zero even if they are not communicating with each other.

The second challenge is the time varying nature of network topology: the inferences of our algorithm are only useful if they are valid for some period of time. We will show that the proposed algorithm learns network topology in the order of 100ms. Since network topology does not change that frequently, cognitive radios can use the learned topology for making inferences for some period of time in the future.

Thirdly, it can be argued that inferences on the entire network should be made simultaneously through a multivariate method (such as graphical LASSO) since there will be multiple causal relationships in the incumbent network. Instead, we will use a common feature of communication protocols to argue that testing each pair of IUs independently is sufficient for learning the network topology rather than making an inference for the entire network simultaneously. Note that [5] also tests pairs of IUs independently.

To help ensure that we detect responses, we choose to detect the causality from the transmission end times of transmitter IU to the transmission start times of the receiver IU. Hence, we propose a binary hypothesis test for each ordered pair of IUs based on the asymmetric form of Granger causality as compared to the symmetric form used in

[5, 6]. For this test, we propose a non-parametric test statistic that does not assume a linear model between the transmission start and end times of the pair of IUs being tested.

Since such a test may confuse frequent opportunistic spectrum access as responses, we study the response time in existing time multiplexing communication protocols to note that the response time is shorter than the idle time and is required to be roughly constant. Based on these observations and verification from NS-3 simulations, we propose an algorithm to estimate the response time from the same test statistic mentioned above. We call the combination of the test statistic and this estimation algorithm as the Asymmetric Transfer Entropy to Learn Network Topology (ATELNeT) algorithm.

To study the effects of dependent transmission activities, we propose a Markov chain model that abstracts the IUs’ medium access protocol and focuses on the response time and retransmission times of a pair of IUs. From this model, we verify that the response time will be estimated correctly and show that both false alarm as well as detection probability increase as the frames become shorter and more frequent.

The rest of this paper is organized as follows. Section II describes our system model and assumptions. Section III defines Granger causality, relates different tests from literature to existing work on topology learning, and proposes a non-parametric test statistic for asymmetric Granger causality. Section IV motivates and proposes our ATELNeT algorithm. The Markov chain model for 2 IUs is discussed in Section V. NS-3 simulations of infrastructure-based and ad hoc networks are presented in Section VI. The paper is concluded in Section VII.

## Ii System Model

We consider a scenario with IUs indexed as . We assume that these IUs have been identified by a system such as that proposed in [4], by decoding physical layer headers, localization, or fingerprinting their radios. In addition, we assume that this system provides a time sequence of the activity of each IU, sampled periodically at intervals, such that the activity of the ’th IU is denoted by if it is transmitting at time and 0 otherwise. For the purpose of this work, we shall assume that these sequences are error-free and that each sequence is of length samples.

We denote the pair-wise links between these IUs by a binary matrix such that if there is a link from IU to IU .

For a time series and positive integer , we use to denote . We use to denote an indicator variable. For developing our algorithm, we will denote the sampled time series of transmission start time indicators of the ’th IU by . We denote the sampled indicator time series of the end of transmissions of the ’th IU by .

### Ii-a Assumptions about IUs’ Medium Access Protocol

We define a transmit-receive link by the receiver’s act of responding to a signal by the transmitter. Consider a link from IU to IU . Assuming a half duplex communication link, the receiver has to wait for the transmitter to finish transmitting before can respond. Thus, the end of a transmission by IU causes the start of a transmission by IU after a short time interval. We call this time interval as the response time or causal lag and denote it by . It consists of both processing times as well as hardware delays such as the Rx-to-Tx turnaround time. For example, this is defined in the IEEE 802.11 standard [8, §10.3.7] as the Short Inter-Frame Space (SIFS) which is computed as

 aSIFSTime= aRxPHYDelay+aMACProcessingDelay +aRxTxTurnaroundTime.

Similarly, LTE-TDD has a fixed length guard period between downlink and uplink pilots as part of a special subframe [9, §4.2]. Bluetooth [10] has a fixed interframe space T_IFS between every Master to Slave and Slave to Master transmission. Finally, each of these standards define a maximum allowed variation in the response time. It is to be expected that such a response time will feature in future time division multiplexing communication protocols. Hence, we incorporate the response time in our system model and say that there is link if causes where is the response time of that link. Note that we do not mean to assume that transmits a response to every transmission by , but if does respond to ’s transmission, then it will do so time after ’s transmission ends. We also assume that the variation in response times on a link is significantly smaller than .

Our second assumption is that the time interval between two successive transmissions by an IU is longer than the response time for any link originating from that IU. Mathematically,

 P(ai[n+t]=1|ai[n−1]=1,ai[n]=0)=0

if . This assumption is based on the fact that communication protocols are designed to avoid interference to the response. For example, the 802.11 standard specifically sets the NAV field to include the acknowledgement frame’s duration [8].

Finally, we assume that we know an upper bound on for all such that .

## Iii Granger Causality

Similar to existing work, we are going to base our work on the idea of Granger causality. In this section, we briefly introduce the concept, theoretical models, and tests used in existing literature. We relate these methods to the existing works on learning network topology and then propose a new test statistic for testing asymmetric Granger causality.

The concept of Granger causality was first proposed for macroeconomic analysis [11]. As defined in [11], a time series is said to Granger cause a time series if the minimum mean square error (MMSE) estimator of given and has lower error than the MMSE estimator of given only . Since the MMSE estimator of given and is  [12], we can say that Granger causes if is not conditionally independent of given . The causal lag defined in [11] corresponds to the sampled response time in our system model. Since the causal lag is unknown, it is usually estimated from the input data by either the Akaike Information Criterion (AIC) or Bayesian Information Criterion (BIC) [13]. Thus, the problem of testing Granger causality between a pair of time series and

is a binary hypothesis problem where the null hypothesis (

) is that does not Granger cause .

### Iii-a Models and Tests

Most methods in literature for testing Granger causality are based on regression but are modified with domain knowledge specific to the problem under consideration [13]. Specifically, a causal link from to

is modeled as a vector autoregressive model such as

[11, 13]

 Y[t]=τmax∑τ=1α1,τX[t−τ]+τmax∑τ=1β1,τY[t−τ]+ξ1[t] (1)

where and are the parameters of the regression and is the residual noise. Similarly, the null hypothesis is modeled as

 Y[t]=τmax∑τ=1β0,τY[t−τ]+ξ0[t] (2)

with being the regression parameters and the residual noise. Therefore, the null hypothesis is modeled by the coefficients in this model being zero.

In [5], the authors use this linear model for testing causality between every pair of IUs on disjoint observation windows. Their hard fusion algorithm then fuses the topologies learned in each window using the majority rule. For individual windows, the hard fusion algorithm proposed in [5] uses the test statistic

 gi→j ≜(∑N−τt=1|^ξ0[t]|2−∑N−τt=1|^ξ1[t]|2∑N−τt=1|^ξ1[t]|2)N−3τ−1τ (3) ∼F(τ,N−3τ−1) (4)

where and are the estimates of and respectively and the authors assume that both and

have zero-mean Gaussian distributions and equal variances. The threshold is chosen using (

4) to satisfy a given false alarm probability. In their soft fusion algorithm, the authors compute the average causality magnitude [14] of a link

 Fi→j=ln⎛⎜ ⎜⎝E[|ξ1[t]|2]E[|ξ0[t]|2]⎞⎟ ⎟⎠. (5)

for each window. The network topology is inferred as those links with average causality magnitude greater than the average of all pairs of IUs.

Transmission start times have been considered as continuous time point processes and modeled as multivariate Hawkes processes in [6]. In the Hawkes process model, an event in one time series increases the probability of an event occurring on other time series for a short period of time. The support of these impact functions were recently shown to be equivalent to Granger causality [15]. There is a rich body of literature learning Hawkes point processes and might be useful for learning Granger causality in multivariate systems as done in [16]. With respect to our system model, we are using sampled activity sequences as input and not point processes.

Finally, an information theoretic non-parametric test for Granger causality has been proposed in [17]. The author of [17] proposed the conditional mutual information of and given :

 TX→Y≜∑ [P(Y[t],X(τ)[t],Y(τ)[t]) ×logP(Y[t]|X(τ)[t],Y(τ)[t])P(Y[t]|Y(τ)[t])] (6)

as a test statistic called transfer entropy for testing whether Granger causes . In (6), the summation is over all possible values of ,, and . The author proposes a binary hypothesis test with as the null hypothesis for no causality and as the alternate hypothesis denoting a causal relationship. We shall base our proposed method on a similar test statistic described below.

### Iii-B Asymmetric Granger Causality

In this work, we are going to use an asymmetric form of Granger causality loosely based on that proposed in [18]111[18] separates events occurring on the time series as we do, but tests for conventional Granger causality between the generated time series. We propose incorporating a third time series to model a common cause for both hypotheses. Consider three time series , , and . We will say that asymmetrically Granger causes given if and are not conditionally independent given . Note the absence of in this definition. Thus, we can think of and as events representing potential causes while denotes the events representing effects.

Here, and typically describe different events on an underlying common sequence while describes events on a second time sequence. For example, in our proposed algorithm, and will correspond to the end and start transmission events respectively of one IU while will denote the end transmission events of another IU.

Similar to Granger causality, we use a finite history while testing asymmetric Granger causality. We propose an asymmetric transfer entropy as our test statistic

 AX→Y2|Y1(τ)≜∑ [P(Y2[t],X(τ)[t],Y(τ)1[t]) ×logP(Y2[t]|X(τ)[t],Y(τ)1[t])P(Y2[t]|Y(τ)1[t])⎤⎥ ⎥⎦ (7)

where the summation is over all values taken by , , and . The test statistic shall compare between the same hypotheses as described above for [17]. The motivation and use of this test statistic for learning network topology is described in the next section.

## Iv Proposed Method: Asymmetric Transfer Entropy to Learn Network Topology (ATELNeT)

In this section, we will be proposing a test for detecting causal links between ordered pairs of IUs at a time. In general, it is true that there may be a performance benefit in detecting all links simultaneously through a multivariate test. However, as mentioned earlier in Section II-A

, communicating protocols are usually designed to avoid interfering with the response of the receiver. Hence, by focusing on the response time of each link, we expect that other IUs’ transmissions will not interfere with the testing of a given link. Hence, we also propose a method for estimating the response time from the test statistic. We will also be proposing an additional linear regression based test similar to that of

[5] for comparing the performance gain from the choice of nonlinear model against the linear model.

### Iv-a Proposed Test Statistic for Transmit-Receive Pair

As mentioned above, we propose testing every ordered pair , of IUs independently. Similar to [17], we consider two hypotheses: the null hypothesis represents and the alternate hypothesis represents . To specifically detect the responses transmitted by IU to transmissions of IU , we test whether asymmetrically Granger causes given . Fig. 2 shows the inputs that we use for testing this asymmetric causality. Since there is no reason to assume a linear model for , , and , we use the non-parametric asymmetric transfer entropy (7) that we proposed in Section III-B:

 ^AEi→Sj|Ej(N,^τi,j)H1(i,j)≷H0(i,j)λ(^τi,j) (8)

where is the empirical estimate of computed from activity samples with a response time of , is a threshold that depends on the response time. The response time will need to be estimated from the data and the threshold will be computed from the distribution of as described next.

We derive the asymptotic distribution of in Appendix A. Our derivation is similar to that of the asymptotic distribution of in [19]. We show that for large and a given causal lag , has distribution under the null hypothesis and distribution under the alternate hypothesis where is a central distribution with degrees of freedom and is a non-central distribution with degrees of freedom and non-centrality parameter .

We choose the threshold such that the probability of false alarm is asymptotically bounded above by a parameter :

 λ(τ)≜χ−2di,j(1−PFA) (9)

where

is the inverse cumulative distribution function of a central

random variable with degrees of freedom.

Note that we have assumed that under the null hypothesis. Though this is a common hypothesis in the Granger causality literature as well as [5, 6], we will show below that even if . Since this value is unknown a priori, we choose to define the null hypothesis. Fortunately, both the model analyzed in Section V and simulations in Section VI show that is sufficiently small that we can still use this typical null hypothesis of .

Next, we need to estimate the degrees of freedom . As per the derivation in Appendix A, is the difference in the number of parameters for models under the alternate hypothesis and the null hypothesis . Since , the number of parameters in either model is simply the number of independent values in the appropriate joint probability mass function. Next, our assumption that the retransmission time is longer than the response time means that if for some then . It also means that and . Hence, the number of parameters under null hypothesis is and under the alternate hypothesis is . Hence, the degrees of freedom are

 di,j=^τi,j(^τi,j+1). (10)

### Iv-B Proposed Algorithm to Estimate Response Time of a Link

Estimating the response time depends on its invariance. In particular, if the variance in response time is significantly smaller than the sampling time of the link, then the response is likely to be received at either or with high probability. Hence, will be significantly higher than . This intuition will be revisited analytically in Section V. From NS-3 data of 3 pairs of 802.11n IUs, Fig. 3 shows that increases sharply at , i.e., after SIFS of s, if there is a link but not if the pair do not have a link. For the pair of IUs that do not have a link but are close to each other, Fig. 3 also shows a slight increase in at the lags after the minimum retransmission time, i.e., after DIFS of 34s.

Based on this discussion, we estimate such that

 ^AEi→Sj|Ej(N,^τi,j)>α^AEi→Sj|Ej(N,^τi,j−1) (11)

for a parameter . Pseudocode for estimating is provided in Algorithm 1. Starting from the maximum response time , we keep reducing the estimated response time until the asymmetric transfer entropy reduces by the factor . For the alternate hypothesis, this finds the correct response time as will be seen from the simulations. On the other hand, the test statistic does not change rapidly under the null hypothesis and the algorithm stops at . As we will discuss in Section V, under the null hypothesis, the asymmetric transfer entropy is minimum at . Hence, this estimate of the response time ensures the best match with the null hypothesis assumption that .

### Iv-C Linear Test for Asymmetric Causality

The ATELNeT algorithm proposed above is different from the existing work in two aspects: the choice of testing the asymmetric rather than symmetric Granger causality and the transfer entropy test statistic as opposed to the regression based approaches. In order to understand the performance gain of the two aspects separately, we propose a second test statistic based on linear regression.

Similar to the approach of [5] and with notation analogous to that of (1)-(2), we model the null hypothesis as

 Sj[t]=τi,j∑τ=1β0,τEj[t−τ]+ξ0[t]. (12)

and the alternate hypothesis as

 Sj[t]=τi,j∑τ=1α1,τEi[t−τ]+τi,j∑τ=1β1,τEj[t−τ]+ξ1[t]. (13)

We use the test statistic of (3) and threshold based on (4) as per the false alarm constraint : where is the inverse cumulative distribution with parameters and . Unlike [5], we do not split the input into windows.

Note that this approach requires separate estimation of the response time .

## V Analysis of Asymmetric Transfer Entropy in Shared Channel

In this section, we propose a Markov chain model of 2 IUs and for studying the behavior of as we vary the causal lag , the frame lengths, inter-arrival times, and the probability of one IU responding to another. Ideally, this requires modeling the MAC protocol of the incumbent network. But to avoid restricting our study to a single MAC protocol and for analytical tractability, we re-use the observation in Section II-A that IUs will not interfere with each others’ responses to construct a simplified discrete time Markov chain model of only 2 IUs. The Markov chain’s state transitions occur every seconds. We make the following assumptions:

1. No collisions between IUs and

2. Response time for each link

3. Transmissions and responses are at least 2 samples long

4. Packet sources have stationary distributions for arrival times and packet lengths

5. (Frame length - 1) for IU is a geometric random variable with parameter

6. No retransmissions within or .

7. A response does not cause the source to send a response.

Note that assumption 5 is justified in the system model described in Section II.

We will describe the model from the point of view of IU transmitting a new frame and IU responding (or not). The model is symmetric in and . The states of the model are chosen such that in each state, the indicator variables , , , and take exactly one value each.

The model begins in the central state that represents the unoccupied channel with no active transmissions or responses. From this state, either IU may start transmitting a new frame with probability or respectively. These parameters are related to the frame duration and idle time (in seconds) of the IUs as follows.

 pi=TsE[Ti,frame]+E[Ti,idle], pj=TsE[Tj,frame]+E[Tj,idle] (14)

Without loss of generality, assume IU starts transmitting. The continued transmission of IU is modeled by the state which has a self loop of probability to model the frame length as 1 + where is a geometric random variable. The parameter is related to the expected frame duration (in seconds) by

 pdi=1−TsE[Ti,frame]−Ts. (15)

When the frame ends, the channel is modeled to be vacant for two time samples in states and . Since we have assumed that the response time is 3 samples for both links, the model can transition from state to a response state with a response probability or continue to a state of unoccupied channel with probability . If the latter transition occurs, then the system will simply transition back to the initial unoccupied channel state .

Instead, if IU begins transmitting a response, then we model the response length by the state that has a self loop of probability :

 pdrj=1−TsE[Tj,response]−Ts. (16)

When the response ends, the channel is modeled as being unoccupied for at least two more time instants because of our fifth and sixth assumption above. From state , either IU may start transmitting with the original probabilities and . If neither begins transmitting, then the channel is unoccupied and the system returns to the state .

The model for IU transmitting is identical.

It should be noted that the model in Fig. 4 defines a scenario where two users sharing the same channel always detect each other’s transmissions and never collide. Hence, the causality in this model is slightly higher than a more practical scenario.

For the purposes of the following discussion, we consider the null hypothesis to be as defined earlier. Since the model is symmetric in and , without loss of generality, we consider only the alternate hypothesis of . Unless mentioned otherwise, we set , i.e., never responds to ’s transmissions.

### V-a Computing Asymmetric Transfer Entropy from the Model

To compute in this model, we first need to compute the joint probability mass function of , , and . As mentioned above, the states of the model were designed such that each state had exactly one value for these three time series. This correspondence is listed in Table I. Here, is listed in the order . Similarly for . Using this correspondence, we can write the joint probability mass function of , , and in terms of the steady state probabilities of this Markov chain model. The joint probability mass function is listed in Table II.

The steady state probabilities have been derived in Appendix B by solving the appropriate simultaneous equations. The asymmetric transfer entropy for various lags can then be expressed in terms of our model’s parameters by using Table II to compute individual terms in the summation of (7). These expressions for causal lags up to 3 are derived in Appendix C. Unfortunately, the algebraic expressions themselves do not provide much insight into the behavior of the test statistic due to the large number of terms involved. Therefore, we study the behavior of the test statistic numerically by varying its various parameters, viz., the probability of starting a new transmission and , the frame lengths through and , the probability of IUs responding to each other and , and the length of the response frames through and .

### V-B Effect of increasing causal lag

We begin by studying the increase of asymmetric transfer entropy for the link with increasing causal lag. As Fig. 5 shows, increases with for all response probabilities , but the rate of increase also increases with . Most importantly, increases significantly at . This matches our intuition in Section IV-B where we expected this sudden increase due to the fact that a response is likely to occur with high probability at lag 3. We can also use Fig. 5 to choose the parameter in Algorithm 1. Fig. 5 shows that is at least 10 times larger than for even . Hence, we suggest is an appropriate choice for the parameter.

### V-C Effect of frame durations and idle time

One reason for studying this model is to understand how behaves under the null hypothesis. For this purpose, we set . As discussed above, the estimated response time for a null hypothesis link will be 1. From Appendix C, we can express as

 AEi→Sj|Ej(1)= ρ0−2pj−piρ0log(1−piρ0−2pj) +ρ0−pjρ0log(ρ0−pjρ0−pj−pi) (17)

where . Now, for the purposes of this study, let us set and rewrite and using (15) in the form of a duty cycle percentage. Then, Fig. 6 shows that increases as the frames become shorter and more frequent. It also shows that reducing the sampling interval reduces . Intuitively, this makes sense because a shorter implies more samples in the interval between transmissions. We shall revisit (17) and Fig. 6 in Section VI for understanding the effect of increasing .

### V-D Effect of increasing response probability

As is to be expected, the asymmetric transfer entropy increases with the probability of IU responding to IU . Fig. 7 shows that this is true only for a sufficiently large response probability depending on the frame length when a constant idle time is maintained. Together with the discussion for Fig. 6, we infer that for short and frequent transmissions, the asymmetric transfer entropy under the null hypothesis is equivalent to that for a small response probability. Hence, Fig. 7 further highlights the difficulty of detecting causality for IUs with short frequent transmissions.

## Vi Simulation Results

In this section, we study the performance of learning the topology of 802.11n networks through NS-3 simulations222We used commit 578f6c0 from the ns-3-dev Git repository (https://github.com/nsnam/ns-3-dev-git) in order to use the latest SpectrumWifiPhy implementation. The MonitorSnifferTx trace was modified to obtain the physical layer transmit duration for each packet.. Note that 802.11n uses time division multiplexing opportunistic spectrum access through its Distributed Coordination Function (DCF). The simulation uses a 20MHz wide channel in the 5GHz band with a datarate of 19.5Mbps. The response time (called SIFS) for this setting is 16s while the minimum interval (called DIFS) between the end of one transmission and the start of another is 34

s. We use this set up for studying infrastructure-based networks of 2 access points (APs) located 40m apart and stations (STAs) uniformly distributed in a disc of radius 15m. NS-3’s OnOffApplications are set up for both uplink and downlink flows at all STAs and APs. These applications have exponentially distributed on and off times. The parameters used for the NS-3 simulations of each of the following simulations are listed in Table

III.

For our Monte Carlo simulations, we present results for different infrastructure-based topologies after averaging over time. That is, each topology is simulated for up to 1000 seconds and each of the topology learning algorithms are run on non-overlapping time windows of the obtained activity sequences. The length of these windows is described for each of the scenarios below. The learning algorithms were implemented in MATLAB for ease of development. We measure the performance of the algorithms as the average fraction of links detected and the average number of extra links, i.e., pairs of IUs erroneously detected as being linked. We consider links without direction.

In this section, we will use the Monte Carlo simulations to compare our proposed ATELNeT algorithm with the hard and soft fusion algorithms proposed in [5], the Hawkes process based method proposed in [6]333The code for [6] was obtained from the authors’ website: http://mdav.ece.gatech.edu/software/, and the linear asymmetric test proposed in Section IV-C. Then, we will present a comparison to the algorithm proposed in [7] for learning end-to-end routes in ad hoc networks. Finally, we will compare the computational complexity of the different algorithms.

### Vi-a Comparison of Parameters

Though the input for each of the algorithms mentioned above are the same binary activity sequences , each of these methods uses a different sampling interval and causal lag. For the hard and soft fusion algorithms of [5], we input the activity sequences sampled at s, used a window size of 60ms, and set the causal lag to 8 samples, i.e., 160s as per the authors recommendations. Since [6] studies the continuous time point process of the transmission start times, we input the absolute start times of each transmission. A causal lag of 160s was used via an exponentially decaying kernel.

For ATELNeT, we ensure is greater than the minimum idle time for any IU. In general, we want to be shorter than the minimum response time for any pair of IUs and, as Fig. 6 indicates, should be as small as possible. For the 802.11 family, the minimum idle time varies from 34s to 50s. Hence, we choose s and , i.e., maximum causal lag of 50s.

For the linear test for asymmetric Granger causality, we choose the same sampling interval s, but set the causal lag as 3 samples to match the response time of the 802.11n system being simulated.

### Vi-B Comparison of Test Statistics

We begin by studying the receiver operating characteristics (ROC) for the test statistics proposed in [5, 6] and Section IV. For the hard fusion algorithm proposed in [5], we used from (3) as the test statistic. For the soft fusion algorithm also proposed in [5], we used the causality magnitude from (5). For the algorithm proposed in [6], we used their influence matrix as the test statistic.

First, we used 60ms long observation periods to plot the ROC in Fig. LABEL:sub@fig:topology_roc_best_60ms. We note that both test statistics proposed in [5] have almost identical curves. On the other hand, the algorithm proposed in [6] appears to have an upper limit on the achievable detection probability. Furthermore, since the authors do not propose a minimum strength required for detecting the causal connection, their threshold is chosen to be zero, i.e., they operate at the upper limit of the detection probability as seen in Fig. LABEL:sub@fig:topology_roc_best_60ms. Hence, their proposed method suffers from a large false alarm rate as will be seen in the later results as well. Finally, test statistics of both ATELNeT, i.e., , and linear asymmetric test, i.e., (3), have approximately the same ROC.

Next, Fig. LABEL:sub@fig:topology_roc_best_600ms shows the ROC for observation periods of 600ms. Since both algorithms proposed in [5] use windows of length 60ms, the ROC for their test statistics do not change with increasing observation periods. However, the algorithm proposed in [6] does improve its ROC making it a viable candidate for testing the binary hypotheses. The linear asymmetric test as well as ATELNeT have almost identical and perfect ROC curves.

The perfect nature of the ROC curves in Fig. LABEL:sub@fig:topology_roc_best_600ms indicates that any of the three methods – that proposed in [6] and those we propose in Section IV – should be able to achieve almost perfect detection of the network topology by an appropriate choice of thresholds. However, the simulation results below will show that the thresholds chosen for each algorithm are suboptimal. We believe this is due to two facts: the threshold is chosen to have constant false alarm and the null hypothesis in all these works models zero causality.

### Vi-C Performance vs. Observation Duration

Increasing the observation period or, equivalently, the number of samples has multiple effects. First, the non-stationary nature of the communication protocols means that more responses are observed on each link. Secondly, with increasing number of samples, each of the methods is able to detect weaker causal relationships. Hence, the false alarm rate of each of the methods, including ATELNeT, increases with increasing observation period or number of samples.

Fig. 13 shows the performance of each of these algorithm in learning the topology of the system with 2 APs and 3 STAs associated with each AP. As expected, the fraction of links detected correctly increases with the observation period. The higher detection rate of the linear tests is also associated with a higher number of extra links as seen in Fig. LABEL:sub@fig:topology_sim_duration_extra. Both algorithms proposed in [5] attempt to reduce the number of extra links by splitting the observed period into windows of equal duration and fusing the topologies inferred on each window. As seen in Fig. LABEL:sub@fig:topology_sim_duration_extra, the hard fusion algorithm of [5] is more effective at reducing the number of extra links detected than the soft fusion algorithm. Note that the maximum number of extra links detected by the hard fusion algorithm is at about 60ms, i.e., the duration of a single window.

The proposed ATELNeT algorithm detects the least number of extra links. Since the linear asymmetric test also detects significantly fewer extra links than the methods of [5], we believe this performance gain is due to testing asymmetric Granger causality instead of symmetric Granger causality. Note that the linear asymmetric test does not use windowing or fusion.

We can also see this rise from our model using (17). By the non-central distribution of , we can write the false alarm probability as

 PFA=Q1(√2(N−1)AEi→Sj|Ej(1),√λ(1)) (18)

where is Marcum’s Q function. Hence, increases with due to the monotonic nature of the Marcum’s Q function. Now, our Markov chain model has more dependencies than the actual system due to assumptions such as lack of collisions. Therefore, (18) provides an upper bound for rather than an equality. For example, the system considered in Fig. 13 has of the order of under the null hypothesis as per Fig. 6. For a 5s observation period, i.e., , (18) tells us that the false alarm probability is bounded above by 0.0653 while the simulation resulted in a false alarm probability of 0.0083.

### Vi-D Performance as Network Size Increases

In Fig. 16, we compare the performance of learning the network topology as the number of STAs associated with each AP increase. The trends are similar to that seen in Fig. 13. The linear asymmetric test detects the highest fraction of links with a slightly higher number of extra links as compared to ATELNeT. The algorithm of [6] and the soft fusion algorithm of [5] detect a high number of extra links. The hard fusion algorithm of [5] detects a large fraction of links correctly while detecting relatively fewer extra links. In summary, the ATELNeT learns the topology of varying network sizes with high probability and with almost no extra links.

In ad hoc networks, the topology also corresponds to the routes of the data flow. Hence, the authors of [7]

learn the end-to-end routes in ad hoc networks. For each IU, they propose a hidden semi-Markov model such that it has super states reflecting data flows that it participates in. Their proposed algorithm learns the super state dependent distributions of the frame lengths and inter-arrival times for each IU using a hierarchical Dirichlet process as a prior for their super state model. IUs that have learned similar distributions are clustered together as part of the same end-to-end route.

In this section, we describe the directed links detected by our algorithm from the same data used in [7]444Permission to use their data provided by the lead author of [7]. They simulated an ad hoc 802.11 network of 25 IUs located on a rectangular grid such that only neighbouring IUs can communicate with each other. Constant bit rate UDP packets are used for data flows routed using OLSR. From time 30s to 80s, 5 packets per second are sent from IU 25 to IU 1. From time 110s to 140s, 5 packets per second are sent from IU 21 to IU 5.

From the results of ATELNeT shown in Fig. 23, we can infer that there were two routes for the data flow from IU 25 to IU 1. At time 41s, we detect the route renegotiation and note that the new route remains in service for at most 2 seconds since the original route is active from 43s onwards. Fig. LABEL:sub@fig:topology_adhoc4 shows the links detected for the data flow from IU 21 to IU 5. Interestingly, ATELNeT also detects links corresponding to a data flow from IU 5 to IU 21 along a separate route that [7] had missed.

In comparison, Fig. LABEL:sub@fig:topology_adhoc_op shows that the end-to-end routing algorithm proposed in [7] learns 3 routes (shown by distinct colors): one between IU 25 and IU 1 and two between IU 21 and IU 5. It does not detect the short lived route of Fig. LABEL:sub@fig:topology_adhoc2 nor does it detect the direction of the routes. Hence, our algorithm infers the directed links between pairs of IUs at a finer time resolution than [7] and can detect network changes faster.

### Vi-F Comparison of Computational Complexity

For a single link, ATELNeT begins by estimating the joint probability mass function of () which requires computations for samples. The joint probabilities for smaller lags can be computed with operations. Next, computing requires operations. Hence, computing the asymmetric transfer entropy for lags requires operations. In summary, the computational complexity of ATELNeT for a single link is . Testing all IU pairs requires computations. The exponential rise in complexity due to further reinforces the need for a better estimation of the maximum lag (in seconds) and the sampling period .

In comparison, computing the linear MMSE estimator from samples for the parameters in a linear regression with causal lag requires computations. Hence, both fusion methods proposed in [5] have computational complexity . Similarly, the proposed linear asymmetric test has the same computational complexity. For testing all pairs of IUs, the computational complexity of each algorithm is . Note that these algorithms need an a priori accurate estimate of which will increase the total computational complexity.

The method proposed in [6] solves convex optimization problems with a quasi-Newton descent algorithm. Each of these problems has parameters and requires operations for evaluating their likelihood function. Therefore, each problem has computations. For solving all problems, the computational complexity is since typically.

In summary, the computational complexity of ATELNeT can be greater than those of algorithms proposed in [5] and [6] for large .

## Vii Conclusion and Future Work

In this paper, we have proposed a method to learn the network topology of time multiplexing communicating IUs by detecting the causal relationship of two IUs’ transmissions due to their response time, i.e., the time between the end of a transmitted frame and the start of the response signal. This response time is widely used in communication protocols today and is relatively invariant over time for a given link. For detecting this response, we have proposed a non-parametric test statistic called asymmetric transfer entropy that differs from existing methods in two ways: it tests asymmetric Granger causality and does not require a linear model. We have shown that the shared channel causes IUs to have non-zero causality irrespective of whether they are communicating with each other. Since this results in detecting extra links, we minimized this effect by an algorithm that estimates the response time of the link.

We also proposed a Markov chain model to analyze the behaviour of the proposed test statistic under both hypotheses for the transmissions of a pair of IUs. The model shows that both the false alarm and detection probability increase with shorter more frequent transmissions. Using NS-3 simulations of 802.11n networks, we showed that, in comparison to existing methods in literature, our proposed algorithm significantly reduces the number of extra links detected in the network while achieving comparable link detection performance. Finally, we showed that the topology learned from an ad hoc network actually consists of the directed links in the network.

This is an interesting problem that may be amenable to many approaches. Forward-backward iterative algorithms, graphical approaches to inferring the entire network simultaneously, as well as supervised learning based approaches may be of interest for future study. It would also be beneficial to study the incorporation of the learned topology into channel access protocols for cognitive radios.

## Viii Acknowledgement

The authors would like to thank Silvija Kokalj-Filipovic for sharing data from [7] and interesting discussions.

## Appendix A Asymptotic Distribution of Empirically Estimated Asymmetric Transfer Entropy

We now derive the distribution of the empirical estimate using the same logic as the derivation of the distribution of the empirical estimate transfer entropy in [19]. In short, is reinterpreted as a log likelihood ratio and then large sample theory is used to show that the empirical estimator has a known distribution.

Since we do not have a specific model for the time series , , and , the non-parametric estimator of is computed from the empirically estimated probability mass functions , , , and :

 ^AEi→Sj|Ej