# Locating the Source of Diffusion in Complex Networks via Gaussian-Based Localization and Deduction
## 2 Methods
### Source Localization on Arbitrary Trees
To better describe the optimization procedure, we created an auxiliary variable  
\[\hat{z}_{s}=(w_{s}-\hat{t_{0}}I)^{T}\Lambda_{ps}^{-1}(w_{s}-\hat{t_{0}}I). \tag{7}\]  
Substituting Equation (6) into Equation (1) and following a similar procedure by maximizing \(P(T_{O}|s,\hat{t_{0}},\sigma)\) with respect to \(\sigma\), the MLE of \(\sigma\) had the following form  
\[\hat{\sigma} =argmax_{\sigma}P(T_{O}|s,\hat{t_{0}},\sigma) \tag{8}\] \[[\mu_{s}]_{k}=t_{0}+d_{sk}\cdot\mu \tag{2}\]0 \[[\mu_{s}]_{k}=t_{0}+d_{sk}\cdot\mu \tag{2}\]1  
Finally, the optimal estimator for the source node \(s\) is  
\[[\mu_{s}]_{k}=t_{0}+d_{sk}\cdot\mu \tag{2}\]2 \[[\mu_{s}]_{k}=t_{0}+d_{sk}\cdot\mu \tag{2}\]3 \[[\mu_{s}]_{k}=t_{0}+d_{sk}\cdot\mu \tag{2}\]4  
The equations above constituted the core of our source localization algorithm in arbitrary trees. Since our optimizations were based on the assumption of Gaussian distribution on edge delays, and the diffusion parameters were deduced from observers, we named our method Gaussian-based localization and deduction (GLAD). Figure 1 demonstrates a diffusion process on a toy tree with 11 nodes and 10 edges. In this model, the diffusion delay along edges were sampled from a Gaussian distribution \(\mathcal{N}(1,0.25)\). We assumed that one node \(s\) was the diffusion source and three nodes \(O=\{o_{1},o_{2},o_{3}\}\) were observers. Only the  
network topology, the mean diffusion delay, and the informed times of observers were accessible to us, where the informed time of observers was \(T_{0}=[2.319,0.662,2.488]\). Now, we introduce the calculation process of a GLAD algorithm, taking node \(B\) for example. From Figure 1, it is easy to know the path from node \(B\) to three observers \(A,J,F\):  
\[ \begin{cases}\mathcal{P}(B,A)=\{\overline{BA}\},\\ \mathcal{P}(B,I)=\{\overline{BD},\overline{DI},\overline{IJ}\},\\ \mathcal{P}(B,F)=\{\overline{BD},\overline{DG},\overline{GF}\}.\end{cases}  \tag{10}\]  
Thus, mean arrival time is \(d_{s}=[1,3,3]^{T}\) and then the corresponding time difference vector is \(w_{s}=T_{o}-d_{s}=[1.319,-2.378,-0.512]^{T}\). According to the definition of path intersection matrix \([\Lambda_{ps}]_{i,j}=|\mathcal{P}(s,o_{i})\cap\mathcal{P}(s,o_{j})|\), we have  
\[\Lambda_{ps}=\left( \begin{array}{ccc}1&0&0\\ 0&3&1\\ 0&1&3\end{array} \right),\Lambda_{ps}^{-1}=\left( \begin{array}{ccc}1&0&0\\ 0&0.375&-0.125\\ 0&-0.125&0.375\end{array} \right). \tag{11}\]  
Combining Equation (6) and Equation (8), the MLE of \(t_{0}\) and \(\sigma\) is represented as  
\[ \begin{cases}\hat{t_{0}}=I^{T}\Lambda_{ps}^{-1}w_{s}/I^{T}\Lambda_{ps}^{-1}I=0.404,\\ \hat{z_{s}}=(w_{s}-\hat{t_{0}})^{T}\Lambda_{ps}^{-1}(w_{s}-\hat{t_{0}}I)=3.343,\\ \hat{\sigma}=(\hat{z_{s}}/K)^{1/2}=1.056.\end{cases}  \tag{12}\]  
Finally, the objective function of node \(s\) in Equation (9) is calculated:  
\[OBJ_{s}=K\log\hat{z_{s}}+\log|\Lambda_{ps}|=5.700. \tag{13}\]  
Following the optimization process in GLAD, the diffusion parameters \((t_{0},\sigma)\) estimated by Equations (6) and (8) and the corresponding objective function value in Equation (9) for each candidate source \(s\in V\backslash O\) are illustrated in Table 1. From the table, we can see that the real source \(I\) has been successfully identified, and the estimation errors for \(t_{0}\) and \(\sigma\) are fairly acceptable. Figure 1: Illustration of the diffusion process on a representative tree. (**a**) topology of the tree and the underlying edge diffusion delay sampled from a Gaussian distribution \(\theta_{uv}\sim\mathcal{N}(1,0.25)\); (**b**) diffusion process from one source node \(s\) with initial time \(t_{0}=0\), where \(\{o_{1},o_{2},o_{3}\}\) denote three observers.