# Towards Explainable Artificial Intelligence for GNSS Multipath LSTM Training Models
## 3 Methodology: LRP for LSTM-Based GNSS Multipath Detection  
### Brief Introduction to LRP  
LRP represents a significant advancement in making deep neural networks more interpretable and transparent. Originally proposed by [PERSON] et al. [14] in 2015, LRP is a technique designed to decompose the predictions of deep neural networks by calculating the contributions of individual input features to the final output, effectively tracing back the network's decision-making process layer by layer. The fundamental principle of LRP is based on a conservation law where the total relevance score distributed to one layer must equal the total relevance distributed in the previous layer. Mathematically, this can be expressed as:  
\[\sum_{i}R_{i}(m)=\sum_{j}R_{j}(n)=f(x)\]  
where \(R_{i}(m)\) and \(R_{j}(n)\) are the relevance scores of individual neurons \(i,j\) in layers \(m\) and \(n\), respectively. The form of \(f(x)\) will be defined later on. LRP implements several rules to govern how relevance scores propagate between layers in order to fit the characteristics of different neural networks architecture:  
1. Basic Rule (LRP-0):  
\[R_{i}(m)=\sum_{j}\left(\frac{z_{ij}}{\sum\limits_{k}z_{kj}}\right)R_{j}(n)\]  
where \(z_{ij}\) is the amount of input contributed by activated neuron \(i\) in layer \(m\) to neuron \(j\) in layer \(n\); \(\sum_{k}z_{kj}\) is the total amount of contribution sent to neuron \(j\) from all connected neurons in layer \(m\) before a non-linear activation function is applied. This rule redistributes relevance based on the proportional contributions of each neuron. 2. Epsilon Rule (LRP-\(\varepsilon\)):  
\[R_{i}(m)=\sum_{j}\left(\frac{z_{ij}}{\varepsilon+\sum\limits_{k}z_{kj}}\right) R_{j}(n)\]  
This variant introduces a small stabilizing term \(\varepsilon\) to handle numerical instabilities and small contributions. 3. Gamma Rule (LRP-\(\gamma\)):  
LRP-\(\gamma\) is a variant of the Layer-wise Relevance Propagation algorithm specifically designed to handle neural networks with strong nonlinearities. In the gamma rule, relevance \begin{table}
\begin{tabular}{c c c c c c} \hline
**Architecture** & **Hidden Units** & **Parameters** & **Val. MSE (\(\times\)10\({}^{-3}\))** & **Training Time (s)** & **Memory (MB)** \\ \hline Small & 128 & 82,944 & 3.45 & 156 & 245 \\ \hline Selected & 256 & 329,728 & 2.87 & 234 & 312 \\ \hline Large & 512 & 1,313,792 & 2.83 & 465 & 486 \\ \hline Multi-layer & 256 \(\times\) 2 & 659,456 & 2.89 & 398 & 428 \\ \hline \end{tabular}
\end{table} 
Table 1: Architecture comparison results. distribution is modulated by a parameter \(\gamma\) that controls the emphasis placed on positive contributions in the network. The rule is formulated as:  
\[R_{i}(m)=\sum_{j}\left(\frac{z_{ij}+\gamma z_{ij}^{+}}{\sum_{k}\left(z_{kj}+ \gamma z_{kj}^{+}\right)}\right)R_{j}(n)\]  
where \(z_{ij}^{+}\) refer to the amount of positive inputs that neuron \(j\) contributed from the higher layer \(m\), and \(\gamma\) is a parameter to control the weights of positive contribution. This approach helps stabilize the relevance propagation by emphasizing positive contributions while suppressing negative ones, thereby producing more interpretable results. The gamma rule is particularly useful in deep architectures like LSTM-based RNNs where the traditional LRP rules might struggle with vanishing or exploding relevance scores. When applied to complex architectures like LSTM-based RNNs, LRP requires special handling for multiplicative interactions and gated structures. For such cases, the \"signal-take-all\" strategy is often employed, where relevance flows through the signal path while gates control but do not carry relevance themselves. The significance of LRP lies in its ability to:  
* Provide detailed insights into neural network decision-making;
* Identify key features contributing to specific predictions;
* Enable validation of model behavior;
* Support model improvement and optimization;
* Enhance trust in AI systems through transparency.