## 3 Causality Inference Using Imess
### Improved Multivariate Effective Source Selection (IMESS)  
MESS has low computational complexity and can quickly determine causality in multivariate time series. The basis of the MESS is calculating the TE, but TE has two defects when it is used for causal inference:1. The calculation of TE depends on the probability distribution of time series, which is affected by the non-stationarity and the noise of the data, and the limited sample effect can also easily lead to error of Shannon entropy estimation [19];
2. TE is affected by the amount of information of the variable, but the dimensions among different variables are not uniform, so that TE is not comparable. Even if there is no effective causal relationship between variables with large self-information, there might also be abundant information flow between them. Therefore, if the self-information gap of variables is too large, the accuracy of the causal inference algorithm based on TE will drop significantly. Due to the two defects of TE above, causal inference based on MESS may lead to lots of false causalities. To overcome the defects of TE, we propose Normalized Effective Transfer Entropy (NETE). Before giving the definition of NETE, the definitions of Random Transfer Entropy (RTE) and Effective Transfer Entropy (ETE) are given below. **Definition 1** (Random Transfer Entropy (RTE)). : _Randomly shuffle the time series of source variable for \(K\) times to break any causal relationship between variables, but keep the probability distribution of each time series unchanged, then calculate TE for each shuffling and take the average, which is the RTE._  
\[RTE_{X\to Y}=\frac{1}{K}\sum_{k=1}^{K}T_{X_{shuffle}[k]\to Y} \tag{6}\]  
\(X_{shuffle[k]}\) _denotes the sequence obtained by randomly shuffling \(X\) for the \(k\)-th time. RTE reflects the noise (error) caused by the non-timing of TE calculation, the non-stationarity of the data, and the finiteness of the scale of data. The value of \(K\) is generally set to be greater than 1000._  
**Definition 2** (Effective Transfer Entropy (ETE)). : _ETE is the value that TE calculated by actual order of the data minus RTE, which reflects the \"net\" information transfer after eliminating the noise (error) caused by non-timing and non-stationarity of the data._  
\[ETE_{X\to Y}=T_{X\to Y}-RTE_{X\to Y} \tag{7}\]  
**Definition 3** (Normalized Effective Transfer Entropy (NETE)). : _NETE is the ratio of ETE to the Shannon entropy of the target variable. NETE considers the self-information of the target variable, and can unify the dimensions to a certain extent, so that it can measure the strength of causality more accurately._  
\[NETE_{X\to Y}=\frac{ETE_{X\to Y}}{H(Y)} \tag{8}\]  
Then we use NETE instead of TE as the basic metric for MESS to infer causality in multivariate time series. MESS based on NETE is called Improved MESS (IMESS) in our paper. Algorithm 2 shows the detailed steps of IMESS. It should be noted that there might be bidirectional causalities of the network inferred by MESS and IMESS. They are logically unreasonable, but since we cannot observe all the variables in the system during causal inference, confusion bias is inevitable [28]. Bidirectional causality implies that there may be confusion bias caused by a hidden common cause (see Figure 5). Hence, in our study, bidirectional causality is considered to be reasonable.