# An Interpretable Deep Learning Approach for Detecting Marine Heatwaves Patterns
## 3 Results
### Decomposing Internal Signals of LSTM with AD  
The previously introduced AD method was used for exploring the internal behavior of the LSTM model. As an illustrative example, Figure 14 and Figure 15 respectively plot the internal signals in the LSTM model when predicting the marine heat wave events at the NJI station on 3 June 1991, and at the ZLG station on 21 April 2019. In these figures, the first column visualizes the sea surface pressure and wind speed 180 days prior, which are used to predict the sea surface temperature. The second column visualizes the evolution of six internal variables within the corresponding LSTM model, including the input gate, candidate vectors, forget gate, output gate, cell state, and hidden state. However, the visualization of these hidden signals is quite chaotic, making it difficult to obtain effective information. The third column shows the information extracted from the second column using the AD method, providing clearer clues to the behavior of the LSTM model.  
Figure 14: Performed AD analysis on the marine heatwave event that occurred at the NJI station on 3 June 1991.  
Figure 13: The marine heatwave event that occurred at ZLG station on 21 April 2019, and its corresponding feature importance. The first and second row plots represent the historical data of different points in the 180 days before the marine heatwave event, with colors indicating the feature importance at different time points. The third row plot represents the predicted and observed sea surface temperature values. The fourth and fifth row plots represent the feature importance of pressure and 10m wind speed, respectively.  
The first two images in the third column of Figures 14 and 15 show the breakdown of the information contributing to the final model decision at each timestep, that is, the original information obtained at each step and the proportion to be retained towards the final step. The zero values in the middle image mean that the initial information obtained by the unit at the corresponding timestep will be completely forgotten. The image below represents the weighted sum of the element-wise multiplication of the above two items, indicating the information ultimately contributed at each timestep. The total contribution of information across all timesteps is the final output (i.e., sea surface temperature prediction).  
The analysis of internal signals shown in Figure 14 reveals that for the sea surface temperature prediction at the NJI station, the long-term memory in several hidden units is activated. As a result, previous sea surface pressure is partially retained to assist the prediction.  
Furthermore, as shown in Figure 15, previous inputs can have a relatively long-term impact, principally due to memory retained in a hidden unit, the degree of which partly depends on the magnitude of the sea surface pressure. In contrast, the contribution of the recent wind speed to the output may be triggered by information obtained near the final timestep, as evidenced by the last segment of the line representing temperature observations in the first image of the third column of Figure 15.