Research on a Dynamic Prediction Method for Rainstorm Disaster Chains Based on LLM-Optimized Sliding Window and Dynamic Bayesian Network
Abstract
1. Introduction
2. Materials and Methods
2.1. Study Area and Data
2.1.1. Study Area
2.1.2. Data
2.2. Methods
2.2.1. Overall Framework of the SW-DBN Model
2.2.2. Data Processing and Database Construction
2.2.3. Perception–Reasoning: Adaptive Sliding Window and LLM Latent Parameter Mining
- (1)
- Pattern switching indicator : indicates whether the system has entered a new evolution phase.
- (2)
- Causal dependency strength : infers the closeness of causal associations between disaster nodes under the current window context.
- (3)
- Evolution trend estimate : provides the future tendency of disaster state nodes, used for feedback optimization of window parameters in the dynamic regulation stage.
- (4)
- Potential causal edge suggestions : identifies potential causal relationships not yet included in the candidate structure set but supported by the window data patterns.
2.2.4. Dynamic Regulation: Latent Parameter-Driven Bidirectional Adaptive Adjustment
- Adaptive Updating of DBN Topology and CPT Parameters
- 2.
- Feedback Optimization of Sliding Window Width and Step Size
2.2.5. Cascade Verification
3. Results
3.1. Experimental Environment
3.2. Evaluation Metrics
3.2.1. Prediction Accuracy Metrics
- (1)
- Accuracy (ACC)Accuracy measures the model’s overall discriminative ability for all samples. In this paper, the average accuracy across the four nodes—landslide, debris flow, flash flood, and waterlogging—is used as the final accuracy.
- (2)
- Precision (P)Precision reflects the proportion of samples predicted by the model as disaster occurrences that actually occurred, indicating the reliability of the prediction results.
- (3)
- Recall (R)Recall measures the model’s ability to capture actual disaster events, reflecting the risk of missed alarms.
- (4)
- F1-Score (F1)The F1-score is the harmonic mean of precision and recall, providing a comprehensive evaluation of the model’s predictive balance.
- (5)
- AUC-ROC The area under the receiver operating characteristic curve (AUC-ROC) is adopted as an overall performance metric independent of threshold selection. An AUC value closer to 1 indicates a stronger ability of the model to distinguish between disaster occurrence and non-occurrence.
3.2.2. Early Warning Timeliness Metrics
3.3. Comparative Experiments
- Static Bayesian Network (Static BN): Represents the traditional static risk assessment method, where the network structure and parameters do not evolve over time.
- Standard Dynamic Bayesian Network (Standard DBN): Serves as the baseline method for dynamic probabilistic graphical models, with a network structure adopting a predefined chain topology and parameters learned solely from monitoring data through maximum likelihood estimation, without incorporating any external knowledge or feature optimization strategies.
- Long Short-Term Memory Network (LSTM): A classical variant of recurrent neural networks adept at capturing temporal dependencies. This paper constructs a two-layer LSTM network, with the input being the multivariate time-series sequence within the sliding window and the output being the occurrence probabilities of the four disaster nodes—landslide, debris flow, flash flood, and waterlogging—for the next hour. The hidden layer dimension is set to 128, with Dropout (0.2) applied to prevent overfitting.
- Random Forest (RF): A classical ensemble learning model widely used in disaster risk assessment. To adapt to the temporal prediction task, dynamic monitoring data such as meteorological and hydrological variables from the past 24 h are concatenated with static environmental factors as a feature vector to directly predict the disaster occurrence state. The Random Forest contains 200 decision trees with a maximum depth of 15.
- Temporal Convolutional Network (TCN): A non-recurrent temporal model using dilated causal convolutions to capture long-range dependencies. The TCN is configured with 4 residual blocks; a kernel size of 3; and dilation rates of 1, 2, 4, 8, and 128 hidden channels trained with the same input window and prediction horizon as LSTM.
- Transformer: A self-attention-based temporal model. The transformer encoder is configured with 4 attention heads, 2 layers, a feed-forward dimension of 512, and positional encoding for the temporal dimension. It takes the same multivariate time-series input as LSTM and TCN.
- Adaptive DBN with Statistical Change Point Detection (CP-DBN): A non-LLM adaptive DBN baseline where the pattern switching indicator is derived from a CUSUM (cumulative sum) change point detection algorithm applied to the rainfall intensity time series, instead of the LLM. The DBN topology is adjusted using the same candidate edge set, but causal strengths are computed from purely data-driven correlation coefficients rather than LLM priors. This baseline isolates the contribution of the LLM component by replacing it with a statistical alternative.
- SW-DBN: The complete SW-DBN model proposed in this paper.
3.4. LLM Output Quality Evaluation
3.5. Ablation Experiments
- (1)
- Baseline: Standard DBN without any optimization modules.
- (2)
- Model A: Baseline + adaptive sliding window, DBN structure remains static.
- (3)
- Model B: Baseline + LLM latent parameters, fixed window.
- (4)
- Model C: Baseline + sliding window + LLM latent parameters, dynamic regulation disabled.
- (5)
- Model D: The complete SW-DBN model proposed in this paper.
3.6. Sensitivity Analysis of Sliding Window Parameters
4. Discussion
5. Conclusions
- The SW-DBN model achieves leading performance in the dynamic prediction of rainstorm disaster chains, with an average accuracy of 84.8% across four disaster nodes—representing improvements of 7.5, 2.4, and 4.3 percentage points over the standard DBN, transformer, and CP-DBN, respectively. Its MWLT of 4.6 h exceeds the best non-LLM baseline (CP-DBN: 3.5 h) by 1.1 h, and more than doubles that of LSTM (2.4 h). Per-node evaluation with bootstrap 95% confidence intervals and McNemar’s test () confirms that these gains are statistically significant. The LLM output evaluation against expert-labeled chains further validates the reliability of the semantic reasoning component, with 87% agreement on phase detection and a causal strength MAE of 0.12.
- Ablation experiments verify the individual effectiveness and synergistic effects of the three modules—adaptive sliding window, LLM latent parameter mining, and dynamic regulation—which form a positive reinforcement loop, with dynamic regulation being the key link in achieving the holistic performance leap.
- SW-DBN organically integrates the semantic parsing and knowledge mining capabilities of LLMs with the temporal probabilistic reasoning capability of DBNs, providing quantified probabilistic predictions of disaster chains and traceable causal propagation paths, thereby offering technical support that combines dynamic adaptability and interpretability for disaster prevention and mitigation decision-making.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| ACC | Accuracy |
| AUC | Area Under Curve |
| BN | Bayesian Network |
| CPT | Conditional Probability Table |
| DBN | Dynamic Bayesian Network |
| DEM | Digital Elevation Model |
| FN | False Negative |
| FP | False Positive |
| LSTM | Long Short-Term Memory |
| LLM | Large Language Model |
| MWLT | Mean Warning Lead Time |
| RF | Random Forest |
| ROC | Receiver Operating Characteristic |
| SW-DBN | Sliding Window-optimized Dynamic Bayesian Network |
| TN | True Negative |
| TP | True Positive |
Appendix A. Key Parameters and Hyperparameters of the SW-DBN Model
| Parameter Name | Symbol | Value | Description |
|---|---|---|---|
| Minimum window length | 2 h | Adaptive window lower bound | |
| Initial maximum window length | 12 h | Adaptive window initial upper bound | |
| Decay coefficient | Calibrated by historical events | Window sensitivity to change intensity | |
| Minimum sliding step | 1 h | Sliding step lower bound | |
| Maximum sliding step | 4 h | ≈1/4 of avg. rainstorm duration, rounded to integer | |
| Step adjustment | 1 h | Per-step adjustment | |
| Window upper bound adjustment | 1 h | per-update adjustment | |
| Unstable trend threshold | 0.5 | Trigger compression threshold | |
| DBN edge activation threshold | Determined on validation set | Causal edge activation threshold | |
| Confidence counter confirmation period | 9 h | Confirmation time window | |
| Confidence counter confirmation times | 3 | Required confirmation counts | |
| Confidence counter expiration period | 18 h | Expiration time window | |
| CPT prior pseudo-count coefficient | Maximized log-likelihood on validation set | LLM prior weight coefficient | |
| Minimum CPT prior pseudo-count | 0.1 | Prevent zero-probability | |
| Early warning threshold | 0.5 | Posterior probability warning threshold |
Appendix B. LLM Prompt Template for DeepSeek-R1-14B
## System Instruction
You are an expert in rainstorm disaster chain analysis.
Given multi-source observational data within the current time window,
output the following four parameters strictly in JSON~format.
## Input Window Data Format
- Time range: [start_time, end_time]
- Hourly rainfall sequence: [r1, r2, ..., rL]
- Cumulative rainfall sequence: [c1, c2, ..., cL]
- Hourly disaster states:
(landslide, debris flow, flash flood, waterlogging): [state_t1, ...]
- Static background: slope, distance to river, drainage density, etc.
## Output Format (JSON)
{
"delta": 0 or 1,
"rho": {"rainfall→landslide": 0.xx, "rainfall→waterlogging": 0.xx, ...},
"tau": {"landslide": "rising/stable/declining", ...},
"new_edges": ["landslide→flash flood", ...]
}
## Parsing Rules
- delta=1: significant change in rainfall or impending disaster trigger
- rho: causal dependency strength, ranging in [0,1]
- tau: evolution trend of each disaster node in the next stage
- new_edges: causal edges supported by data but not in the candidate set
References
- Li, R.; Qi, S.; Wang, Z.; Fu, X.; Gao, H.; Ma, J.; Zhao, L. Research on the Heavy Rainstorm–Flash Flood–Debris Flow Disaster Chain: A Case Study of the “Haihe River ‘23·7’ Regional Flood”. Remote Sens. 2024, 16, 4802. [Google Scholar] [CrossRef]
- Yu, Z.; Zhan, J.; Yao, Z.; Peng, J. Characteristics and mechanism of a catastrophic landslide-debris flow disaster chain triggered by extreme rainfall in Shaanxi, China. Nat. Hazards 2024, 120, 7597–7626. [Google Scholar] [CrossRef]
- Huang, C.; Cai, Q.; Zhang, Y.; Li, M.; Zhong, L. Discrimination of Debris Flow Types and Evaluation of Landslide Sediment Supply Capacity: A Case Study of the Jiuzhai Valley Meizoseismal Area Postearthquake. Int. J. Geomech. 2025, 25, 05025009. [Google Scholar] [CrossRef]
- Xiong, J.; Zeng, L.; Tang, C.; Chen, H.; Chen, J.; Tang, C.; Gong, L.; Chen, M.; Zhang, X.; Shi, Q. Chain effects of landslide activity intensity decay on landslide sediment transfer and debris flow activity. Can. Geotech. J. 2026, 63, 1–24. [Google Scholar] [CrossRef]
- Mihu-Pintilie, A.; Stoleriu, C.C.; Urzică, A. UAV and field survey investigation of a landslide triggered debris flow and dam formation in Eastern Carpathians. Front. Earth Sci. 2024, 12, 1403411. [Google Scholar] [CrossRef]
- Wang, Y.; Gao, G.; Zhai, J.; Liu, Q.; Song, L. Evolution characteristics of the rainstorm disaster chains in the guangdong–hong kong–macao greater bay area, china. Nat. Hazards 2023, 119, 2011–2032. [Google Scholar] [CrossRef]
- Wang, Z.; Quan, H.; Zhu, W.; Jin, R.; Jin, G.; Cui, Y. The susceptibility assessment of rainstorm disaster chains in the Tumen River Basin based on Convolutional Neural Network and Bayesian Network. KSCE J. Civ. Eng. 2025, 30, 100411. [Google Scholar] [CrossRef]
- Huang, L.; Chen, T.; Deng, Q.; Zhou, Y. Reasoning disaster chains with Bayesian network estimated under expert prior knowledge. Int. J. Disaster Risk Sci. 2023, 14, 1011–1028. [Google Scholar] [CrossRef]
- Zhao, X.; Qu, Z.; Zhang, J.; Sha, Y. Risk assessment and mitigation strategies for rainstorm-induced disaster chains in Northwest China. Nat. Hazards Rev. 2025, 26, 04024050. [Google Scholar] [CrossRef]
- Lu, Y.; Qiao, S.; Yao, Y. Risk assessment of typhoon disaster chain based on knowledge graph and Bayesian network. Sustainability 2025, 17, 331. [Google Scholar] [CrossRef]
- Zhang, L.; Wang, W.; Guo, Q.; Liu, X.; Wang, Z. Research on Scenario Evolution and Emergency Decision-Making Analysis for Earthquake Disaster Chain. Nat. Hazards Rev. 2026, 27, 04026004. [Google Scholar] [CrossRef]
- Zhu, L.; Ma, J.; Wang, C.; Defilla, S.; Yan, Z. Sensitivity analysis of coastal cities to effects of rainstorm and flood disasters. Environ. Monit. Assess. 2024, 196, 386. [Google Scholar] [CrossRef] [PubMed]
- Sohail, A.; Arshad, A.; Naqvi, R.A.; Zhang, Y. A Hybrid Dynamic Bayesian Network for Flood-Driven Health Vulnerability: Integrating Local Knowledge and Spatial Data. Pure Appl. Geophys. 2026, 183, 1947–1959. [Google Scholar] [CrossRef]
- Huang, J.; Wang, Z.; Sun, D.; Wang, H. Scenario deduction for urban rainstorm-induced waterlogging disaster chain based on dynamic Bayesian network. Reliab. Eng. Syst. Saf. 2025, 267, 111881. [Google Scholar] [CrossRef]
- Luo, S.; Yuan, D.; Wei, B.; Hu, Y.; Xu, F. Dam multi-source heterogeneous monitoring data fusion and synchronization method based on time series analysis. Eng. Struct. 2025, 338, 120623. [Google Scholar] [CrossRef]
- Zhao, K.; Guo, C.; Cheng, Y.; Han, P.; Zhang, M.; Yang, B. Multiple time series forecasting with dynamic graph modeling. Proc. VLDB Endow. 2023, 17, 753–765. [Google Scholar] [CrossRef]
- Pedroso, D.F.; Almeida, L.; Pulcinelli, L.E.G.; Aisawa, W.A.A.; Dutra, I.; Bruschi, S.M. Anomaly detection and root cause analysis in cloud-native environments using large language models and Bayesian networks. IEEE Access 2025, 13, 77550–77564. [Google Scholar] [CrossRef]
- Mukanova, A.; Milosz, M.; Dauletkaliyeva, A.; Nazyrova, A.; Yelibayeva, G.; Kuzin, D.; Kussepova, L. LLM-powered natural language text processing for ontology enrichment. Appl. Sci. 2024, 14, 5860. [Google Scholar] [CrossRef]
- Zhou, Y.; Liu, P. Assessing multi-hazards related to tropical cyclones through large language models and geospatial approaches. Environ. Res. Lett. 2024, 19, 124069. [Google Scholar] [CrossRef]
- Wang, C.; Engler, D.; Li, X.; Hou, J.; Wald, D.J.; Jaiswal, K.; Xu, S. Near-real-time earthquake-induced fatality estimation using crowdsourced data and large-language models. Int. J. Disaster Risk Reduct. 2024, 111, 104680. [Google Scholar] [CrossRef]
- Balderas-Díaz, S.; Guerrero-Contreras, G.; Muñoz, A.; Rodríguez-Fórtiz, M.J. Fusing temporal and contextual features for enhanced traffic volume prediction. In Proceedings of the World Conference on Information Systems and Technologies; Springer Nature: Cham, Switzerland, 2024; pp. 74–84. [Google Scholar]
- Liang, S.; Chen, D.; Li, D.; Qi, Y.; Zhao, Z. Spatial and temporal distribution of geologic hazards in Shaanxi Province. Remote Sens. 2021, 13, 4259. [Google Scholar] [CrossRef]
- Feng, L.; Qi, W.; Xu, C.; Yang, W.; Yang, Z.; Xiao, Z.; Chen, Z.; Li, T.; Shao, X.; Gao, H.; et al. Landslide research from the perspectives of Qinling mountains in China: A critical review. J. Earth Sci. 2024, 35, 1546–1567. [Google Scholar] [CrossRef]
- Wang, X.; Hu, S.; Lian, B.; Wang, J.; Zhan, H.; Wang, D.; Liu, K.; Luo, L.; Gu, C. Formation mechanism of a disaster chain in Loess Plateau: A case study of the Pucheng County disaster chain on August 10, 2023, in Shaanxi Province, China. Eng. Geol. 2024, 331, 107463. [Google Scholar] [CrossRef]
- Xie, C.; Gao, H.; Huang, Y.; Xue, Z.; Xu, C.; Dai, K. Leveraging the DeepSeek large model: A framework for AI-assisted disaster prevention, mitigation, and emergency response systems. Earthq. Res. Adv. 2025, 5, 100378. [Google Scholar] [CrossRef]
- Jean, M.È.; Morin, C.; Ossa Ossa, J.E.; Duchesne, S.; Pelletier, G.; Pleau, M. Optimal distribution of green and grey infrastructures coupled with real time control of the sewer for combined sewer overflows control as an adaptation measure to climate change. Urban Water J. 2024, 21, 419–435. [Google Scholar] [CrossRef]






| Item | Model/Specification |
|---|---|
| CPU | Intel Xeon Silver 4216 × 2 |
| Memory | 64 GB RAM |
| GPU | NVIDIA GeForce RTX 3090 |
| Storage | 1 TB NVMe SSD |
| Software Name | Version |
|---|---|
| Ubuntu Server | 22.04 |
| Python | 3.13.12 |
| PyTorch | 2.9.0 |
| DeepSeek | R1-14B |
| PostgreSQL/PostGIS | 15.14/3.6 |
| Split | Date Range | Landslide (Pos/Neg) | Debris Flow (Pos/Neg) | Flash Flood (Pos/Neg) | Waterlogging (Pos/Neg) |
|---|---|---|---|---|---|
| Train | 2007–2020 | 152/7600 | 7/350 | 346/17,300 | 95/4750 |
| Validation | 2021–2023 | 33/1650 | 1/50 | 75/3750 | 21/1050 |
| Test | 2024–2026 | 33/1650 | 1/50 | 75/3750 | 21/1050 |
| Model | ACC, % | P, % | R, % | F1-Score, % | AUC-ROC | MWLT, Hour |
|---|---|---|---|---|---|---|
| Static BN | 68.2 | 65.1 | 60.3 | 62.6 | 0.71 | N/A |
| Standard DBN | 77.3 | 74.5 | 72.8 | 73.6 | 0.83 | 2.8 |
| LSTM | 79.8 | 77.2 | 76.5 | 76.8 | 0.86 | 2.4 |
| RF | 75.6 | 73.8 | 71.2 | 72.5 | 0.80 | 1.9 |
| TCN | 81.2 | 79.5 | 80.8 | 80.1 | 0.87 | 2.5 |
| Transformer | 82.4 | 80.8 | 81.5 | 81.1 | 0.88 | 2.7 |
| CP-DBN | 80.5 | 78.2 | 79.0 | 78.6 | 0.85 | 3.5 |
| SW-DBN | 84.8 | 83.5 | 83.0 | 83.3 | 0.89 | 4.6 |
| Node | Precision | Recall | F1 | AUC | FAR (%) | MAR (%) | MWLT (h) |
|---|---|---|---|---|---|---|---|
| Landslide | 85.2 | 84.5 | 84.8 | 0.91 | 12.3 | 15.5 | 5.2 |
| Debris flow | 82.8 | 81.2 | 82.0 | 0.88 | 14.0 | 18.8 | 4.8 |
| Flash flood | 83.5 | 82.0 | 82.7 | 0.89 | 13.2 | 18.0 | 4.2 |
| Waterlogging | 84.5 | 85.0 | 84.7 | 0.90 | 15.5 | 15.0 | 4.0 |
| Macro Avg | 84.0 | 83.2 | 83.6 | 0.90 | 13.8 | 16.8 | 4.6 |
| Overall ACC | 84.8% (95% CI: 82.1–87.5%) | ||||||
| Overall AUC | 0.89 (95% CI: 0.86–0.92) | ||||||
| Output Type | Accuracy/Agreement | Precision | Recall | F1 |
|---|---|---|---|---|
| Pattern switching () | 0.87 | 0.84 | 0.82 | 0.83 |
| Causal strength () MAE | 0.12 | - | - | - |
| Evolution trend () | 0.82 | 0.79 | 0.76 | 0.77 |
| Causal edge suggestions | 0.76 | 0.72 | 0.69 | 0.70 |
| Model | ACC, % | P, % | R, % | F1-Score, % | AUC-ROC | MWLT, Hour |
|---|---|---|---|---|---|---|
| Baseline | 77.3 | 74.5 | 72.8 | 73.6 | 0.83 | 2.8 |
| Model A | 80.1 | 77.8 | 78.5 | 78.1 | 0.85 | 3.8 |
| Model B | 82.1 | 80.2 | 79.5 | 79.8 | 0.87 | 3.9 |
| Model C | 83.8 | 82.5 | 81.9 | 82.2 | 0.88 | 4.3 |
| Model D | 84.8 | 83.5 | 83.0 | 83.3 | 0.89 | 4.6 |
| Parameter | Value | ACC (%) | MWLT (Hour) |
|---|---|---|---|
| (h) | 1 | 83.2 | 4.1 |
| 2 (default) | 84.8 | 4.6 | |
| 3 | 84.3 | 4.4 | |
| 4 | 82.5 | 3.8 | |
| (h) | 6 | 81.8 | 3.5 |
| 8 | 83.4 | 4.0 | |
| 10 | 84.2 | 4.4 | |
| 12 (default) | 84.8 | 4.6 | |
| 16 | 84.5 | 4.3 | |
| 0.1 | 82.4 | 3.2 | |
| 0.3 | 83.9 | 4.1 | |
| 0.5 (default) | 84.8 | 4.6 | |
| 0.7 | 84.3 | 4.9 | |
| 1.0 | 83.6 | 4.6 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Wu, Z.; Huang, M.; Zhou, W.; Cui, K.; Huang, Y.; Zhai, Z.; Cheng, C. Research on a Dynamic Prediction Method for Rainstorm Disaster Chains Based on LLM-Optimized Sliding Window and Dynamic Bayesian Network. Appl. Sci. 2026, 16, 6232. https://doi.org/10.3390/app16126232
Wu Z, Huang M, Zhou W, Cui K, Huang Y, Zhai Z, Cheng C. Research on a Dynamic Prediction Method for Rainstorm Disaster Chains Based on LLM-Optimized Sliding Window and Dynamic Bayesian Network. Applied Sciences. 2026; 16(12):6232. https://doi.org/10.3390/app16126232
Chicago/Turabian StyleWu, Zhengyi, Meng Huang, Wentao Zhou, Kewei Cui, Yongxiong Huang, Zhiwei Zhai, and Chao Cheng. 2026. "Research on a Dynamic Prediction Method for Rainstorm Disaster Chains Based on LLM-Optimized Sliding Window and Dynamic Bayesian Network" Applied Sciences 16, no. 12: 6232. https://doi.org/10.3390/app16126232
APA StyleWu, Z., Huang, M., Zhou, W., Cui, K., Huang, Y., Zhai, Z., & Cheng, C. (2026). Research on a Dynamic Prediction Method for Rainstorm Disaster Chains Based on LLM-Optimized Sliding Window and Dynamic Bayesian Network. Applied Sciences, 16(12), 6232. https://doi.org/10.3390/app16126232

