# Interpretability Study of Gradient Information in Individual Travel Prediction
## 3 Methods
### Individual Travel Prediction and the Concept of Interpretability  
Individual travel prediction is based on the regularity of travel behavior, meaning that people's travel patterns at specific times, locations, and contexts often exhibit repetition. By identifying and analyzing these regularities, models can be built to predict one or more future travel behaviors. These predictions may include forecasting the next travel destination or the specific time of travel [35]. The input to a travel prediction model corresponds to the historical travel record set of a single individual (passenger), and the output represents the specific details of the passenger's next trip. The model needs to accurately predict the next travel location from a range of possible locations or forecast the specific time of travel from a series of potential time points [36].  
To elaborate, we define a representation method for a travel event to capture an individual's travel activity at a specific time and location:  
\[e=(r,\sigma) \tag{9}\]  
In the formula, \(r\) represents the temporal features of travel, such as the exact time of travel, the specific week of travel, or the duration of the journey; \(\sigma\) represents the spatial features of travel, which in this study refers to the identifiers of the origin and destination stations.  
Based on the description of a single travel event, the concept of a travel sequence can be further constructed to represent an individual's continuous travel activities over a certain period:  
\[E_{N}=\{e_{1},e_{2},e_{3},\ldots,e_{N}\} \tag{10}\]  
In this formula, \(E_{N}\) represents a sequence containing \(N\) travel events, where each \(e_{N}\) is a travel instance with temporal and spatial attributes.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Dimension** & **Interpretation Granularity** & **Computational Efficiency** \\ \hline Decision tree & Static & O(N) \\ KernelSHAP & Static & O(2N) \\ TimeSHAP & Static and Temporal & O(2N-1) \\ LIME & Static & O(N) \\ Gradient (ours) & Static and Temporal & O(N) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of interpretability solutions in terms of explanation granularity and computational efficiency. Our method can be used for static feature and temporal feature interpretation and has linear computational efficiency O(N).  
Based on the definitions of travel events and travel sequences, the task of individual travel prediction can be defined as finding a function \(P\) that can predict an individual's next travel event based on their historical travel sequence. The formula for this is as follows:  
\[e_{N+1}=P(E_{N}) \tag{11}\]  
Interpretability refers to the transparency and traceability of a machine learning model's decision-making logic to humans. Its core is to establish an explicit mapping relationship between the input features and the prediction results, allowing the model to answer critical questions such as \"Why was this result predicted?\" and \"Which features dominated the decision?\" [37]. On a mathematical level, interpretability can be defined as a mapping function from the original feature space to the interpretable space, as shown in Figure 3, so that the contribution of each feature is positively correlated with its value in the interpretable space [38].  
Specifically, given an input feature set \(X=\{x_{1},x_{2},x_{3},\ldots,x_{n}\}\) and a prediction target \(y\), interpretability requires the existence of a mapping \(E:X\to R^{n}\), such that:  
\[E(x_{i})\propto\frac{\partial P(y|X)}{\partial x_{i}} \tag{12}\]  
In the formula, \(E(x_{i})\) represents the quantized value of feature \(x_{i}\) in the interpretability space. The larger the absolute value, the higher the contribution of the feature to the prediction results.