# An Interpretable Deep Learning Approach for Detecting Marine Heatwaves Patterns
## 2 Methods
### Expected Gradients for Feature Importance  
To enhance the interpretability of decision-making by data-driven models, the Expected Gradients (EG) method is employed for the attribution explanation. The EG method is derived to address some issues with integrated gradients (IG) as described by [PERSON] et al. [35]. EG aims to assign an importance score to specific inputs. Large positive or negative scores \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Exp**} & \multirow{2}{*}{**Metric**} & \multicolumn{8}{c}{**Station**} \\ \cline{3-13}  & & **BBG** & **BSG** & **DCN** & **DSN** & **LHT** & **LSI** & **LYG** & **NJI** & **NSI** & **SSN** & **XCS** & **ZFD** & **ZLG** \\ \hline \multirow{2}{*}{No. 1} & MSE & 0.082 & 0.053 & 0.046 & 0.060 & 0.037 & 0.042 & 0.039 & 0.053 & 0.229 & 0.038 & 0.034 & 0.034 & 0.075 \\  & RMSE & 0.286 & 0.231 & 0.215 & 0.245 & 0.193 & 0.202 & 0.195 & 0.230 & 0.478 & 0.194 & 0.184 & 0.182 & 0.274 \\  & MSE & 0.079 & 0.055 & 0.053 & 0.065 & 0.040 & 0.045 & 0.041 & 0.051 & 0.208 & 0.039 & 0.064 & 0.032 & 0.082 \\  & RMSE & 0.281 & 0.233 & 0.229 & 0.254 & 0.197 & 0.206 & 0.199 & 0.226 & 0.456 & 0.197 & 0.248 & 0.178 & 0.287 \\  & MSE & 0.073 & 0.047 & 0.056 & 0.061 & 0.038 & 0.034 & 0.051 & 0.054 & 0.233 & 0.048 & 0.038 & 0.051 & 0.083 \\  & RMSE & 0.270 & 0.217 & 0.234 & 0.246 & 0.192 & 0.181 & 0.219 & 0.230 & 0.483 & 0.217 & 0.190 & 0.217 & 0.288 \\  & MSE & 0.074 & 0.047 & 0.044 & 0.063 & 0.042 & 0.051 & 0.039 & 0.050 & 0.222 & 0.039 & 0.034 & 0.024 & 0.080 \\  & RMSE & 0.271 & 0.217 & 0.209 & 0.250 & 0.201 & 0.222 & 0.191 & 0.224 & 0.471 & 0.198 & 0.182 & 0.155 & 0.283 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Perform four independent experiments at 13 stations, with the Mean Squared Error (MSE) and Root Mean Squared Error (RMSE) results for each experiment. \begin{table}
\begin{tabular}{c c} \hline \hline
**Index** & **Symbol or Formula** & **Unit** \\ \hline Climatology & \(T_{m}(j)=\sum_{j=y-y_{e}}^{y_{e}}\sum_{d=j-5}^{t+5}\frac{T(y,d)}{\Pi(y-y_{e}+1)}\) & \({}^{\circ}\)C \\ Threshold & \(T_{90}(j)=P_{90}(X)\) & \({}^{\circ}\)C \\ Start and end of MHWs & \(t_{s},t_{e}\) & days \\ Duration & \(D=t_{e}-t_{s}\) & days \\ Intensity(max/mean/variance) & \(i_{\text{max}}=max(T(t)-T_{m}(j))\) & \({}^{\circ}\)C \\  & \(i_{\text{mean}}=\overline{T(t)-T_{m}(j)}\) & \\  & \(i_{\text{var}}=\sigma_{T(t)}\) & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Indicators characterizing marine heatwaves (MHWs). In the formula, \(j\) represents a specific day within a year, \(y_{s}\) and \(y_{e}\) denote the start and end of the climatological baseline period, respectively, and \(T\) is the daily Sea Surface Temperature (SST) for day \(d\) of year \(y\). \(T_{90}=P_{90}\) represents the 90 th percentile, where \(P_{90}(X)\) pertains to the set \(X=\{T(y,d)|y_{s}\leq y\leq y_{e},j-5\leq d\leq j+5\}\). The term \(\sigma\) denotes the standard deviation, and the time period is defined from \(t_{s}\) to \(t_{e}\), with the day \(j\) falling within the window \(j(t_{s})\leq j\leq j(t_{e})\). indicate that the corresponding feature strongly increases or decreases the network's output, while importance scores close to zero suggest that the feature has little impact on the output. Due to the high nonlinearity of data-driven models, local gradients of input features typically have a small magnitude around the sample, even if the network relies heavily on these features. EG is computed by integrating the local gradients along a path from a selected baseline input \(x\) to a target input \(x^{{}^{\prime}}\), which can be simplified as a path \(x^{{}^{\prime}}+\alpha(x-x^{{}^{\prime}})\) from the baseline input (\(\alpha=0\)) to the target input (\(\alpha=1\)). This method assumes that the baseline inputs follow a distribution \(D\) sampled from a background dataset.