## 2 Materials and Methods
### Research Methodology and Model Construction
#### 2.3.4 Improved MAML-RF-SHAP Model  
Based on the MAML meta-learning framework, this study improves the application of MAML in RF algorithm hyperparameter optimization to enhance coordination and rapid adaptability between trees, thus constructing the MAML-RF model. Additionally, the sample data from the heavy rain disaster dataset are divided into 70% training and 30% testing sets, serving as input data for the MAML-RF model. The MAML hyperparameter optimization process consists of an inner and outer loop. In the inner loop, multiple tasks are randomly sampled, with 10 samples randomly selected for each task. During the inner loop, initial hyperparameters \(\theta\) and a single task \(T_{i}\) are set, and the accuracy of each task is calculated. The gradient descent of the loss function is modified to linearly decrease based on the accuracy of a single task, with \(\alpha\) as the learning rate, resulting in new hyperparameters:  
\[\theta_{i}=\theta-\alpha*Accuracy, \tag{1}\]  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Index** & **Year** & **Month** & **Day** & **RD** & **RA** & **AI** & **RJ** & **RS** & **FD** \\ \hline
1 & 2018 & 8 & 7 & 2 & 3 & 0 & 0 & 0 & 1 \\
2 & 2018 & 7 & 24 & 1 & 1 & 0 & 0 & 0 & 1 \\
3 & 2017 & 8 & 23 & 1 & 2 & 0 & 0 & 0  
In the equation, \(\theta\) represents the initial hyperparameters, _Accuracy_ denotes the accuracy of a single task, \(\alpha\) is the learning rate, and \(\theta_{i}\) is the new hyperparameters obtained for a single task after the inner loop.  
During the outer loop, the global initialization hyperparameters are updated based on the meta-learning rate \(\beta\). The accuracy is calculated as the average accuracy of all tasks in the training set during the inner loop, and the hyperparameters \(\theta\) are updated in reverse until the highest accuracy is achieved in the outer loop. The relevant calculation process is as follows:  
\[\theta\leftarrow\theta-\beta*\
abla_{\theta}\ \overline{Accuracy}, \tag{2}\]  
In the equation, \(\theta\) represents the initial hyperparameters, and \(\beta\) is the meta-learning rate in the outer loop.  
In the heavy rain disaster risk assessment task, there is a high correlation between several risk factors, such as the number of heavy rain days and total rainfall, and elevation and the proportion of construction land [32]. Using the algorithm's built-in importance evaluation methods can lead to bias issues. Disaster spatial differentiation results from the synergistic effects of multiple influencing factors [33]. To delve deeper into the decision-making mechanisms of the optimal algorithm and enhance model interpretability, this study employs the SHAP interpretability algorithm. This algorithm calculates the Shapley value for each risk factor to explain the impact of each factor on the simulation results within the model. The SHAP algorithm, proposed by [PERSON] and others [34], is an attribution explanation method based on game theory [35] and local interpretation. By using the SHAP algorithm, the importance of each risk factor in the machine learning model's simulations can be more intuitively reflected, and it indirectly addresses the correlation between features, reducing errors in the importance calculations of highly correlated features inherent in the RF algorithm.  
The technical roadmap of the MAML-RF-SHAP heavy rain disaster risk assessment model is shown in Figure 2. Initial hyperparameters are set, and through the inner and outer loop processes of the MAML meta-learning framework, the model hyperparameters are updated in reverse using linear descent in both loops. The hyperparameter combination that achieves the highest accuracy in the random forest algorithm is ultimately selected, and the SHAP interpretability algorithm is introduced to explain the MAML-RF model. This approach quantifies and clarifies the impact of risk factors on disaster risk and the decision-making process of the model.  
Figure 2: Technical roadmap of MAML-RF-SHAP heavy rain disaster risk assessment model.