Skip to content

ManzhuYu/Code-fire-progression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wildfire Spread Dynamics: Attention-Based Spatiotemporal ConvLSTM Models

Paper License: MIT

Masrur, A., Yu, M., & Taylor, A. (2024). Capturing and interpreting wildfire spread dynamics: attention-based spatiotemporal models using ConvLSTM networks. Ecological Informatics, 82, 102760.

This repository contains the full model suite, training notebooks, transferability experiments, and uncertainty quantification for three attention-based ConvLSTM architectures that predict wildfire spread dynamics from simulated and satellite-derived active fire data.


Overview

Wildfire spread is a complex spatiotemporal process driven by both local dynamics (direct fire front contact) and long-range effects (spotting — firebrands carried by wind that ignite new fires at a distance). Existing models struggle to capture both simultaneously. This work proposes a ConvLSTM framework augmented with pairwise and patchwise self-attention mechanisms to learn these multi-scale dependencies, evaluated against a baseline ConvLSTM with no attention.

Models are trained to forecast wildfire spread up to 10 days ahead using a rolling prediction strategy, and are tested for transferability across held-out fire events.

Key contributions:

  • Two novel attention-based ConvLSTM architectures capturing local-to-global spatiotemporal dependencies in wildfire spread
  • Systematic evaluation of pairwise vs. patchwise self-attention for fire front prediction
  • Patch footprint sensitivity analysis (3×3 to 11×11)
  • Transferability experiments across geographically distinct fire events
  • Calibrated uncertainty quantification for spread predictions
  • Validation on both simulated (percolation model) and real-world (VIIRS satellite, California 2012–2020) data

Model Architectures

ID Notebook prefix Description
M1 m1. / rm1. Baseline ConvLSTM — no attention mechanism
M2 m2. / rm2. Pairwise Self-Attention ConvLSTM — captures interactions between each pair of spatial positions; best overall performance
M3 m3. / rm3. Patchwise Self-Attention ConvLSTM — attention over local patch subregions; optimal footprint size: 7×7

M2 outperforms M1 and M3 across all evaluation metrics, particularly in predicting the location of spot fires. M3 with a 7×7 patch footprint achieves the best precision among patchwise configurations and is used as the M3 default in subsequent analysis.


Repository Structure

├── m1.convlstm_percolation.ipynb                         # M1 training (percolation dataset)
├── m2.PairwiseSelfAttention_convlstm_percolation.ipynb   # M2 training
├── m3.patch_{3,5,7,9,11}_convlstm_percolation.ipynb      # M3 training — 5 patch sizes
│
├── rm1.ConvLSTM_fire_progression.ipynb                   # M1 evaluation & results
├── rm2.ConvLSTM_fire_progression.ipynb                   # M2 evaluation & results
├── rm3.ConvLSTM_{3,5,7,9,11}_fire_progression.ipynb      # M3 evaluation — 5 patch sizes
│
├── trm1.transferability.ipynb                            # M1 transferability
├── trm2.transferability.ipynb                            # M2 transferability
├── trm3.transferability_{3,5,7,9,11}.ipynb               # M3 transferability — 5 patch sizes
│
├── urm1.uncertainty.ipynb                                # M1 uncertainty quantification
├── urm2.uncertainty.ipynb                                # M2 uncertainty quantification
├── urm3.uncertainty_{3,5,7,9,11}.ipynb                   # M3 uncertainty — 5 patch sizes
│
├── uncertainty_m{1,2,3}_*.csv                           # Precomputed uncertainty results
│
├── test_Kalamath.ipynb                                   # Klamath fire event test
├── test_globfire.ipynb                                   # GlobFire dataset test
├── discussion.ipynb                                      # Analysis and figure generation
└── uncertainty_test_combined.ipynb                       # Combined uncertainty analysis

Data

Dataset 1 — Simulated Wildfire Spread (Percolation Model)

  • Semi-empirical percolation model from Burge et al. (2020), incorporating fuel density, moisture content, slope, and wind
  • 3,000 samples — not calibrated to specific events; designed to emulate general wildfire behaviors under controlled conditions
  • Used for both primary model training/evaluation and interpretability analysis

Dataset 2 — California Satellite-Observed Wildfire Spread (2012–2020)

  • Derived from VIIRS active fire detections (375 m resolution), object-based fire tracking system (Chen et al., 2022)
  • 1,929 samples spanning California wildfires 2012–2020
  • Co-located biophysical features (7 variables per grid cell):
    1. Location of all unburned vegetation
    2. Location of tree vegetation currently burning
    3. Location of all vegetation burned prior to current time step 4–5. Wind U and V components (ERA5-Land, 9 km → interpolated to 375 m)
    4. Soil moisture (ERA5-Land, 9 km → interpolated to 375 m)
    5. Elevation (SRTM/NASADEM)
  • Vegetation layers co-located with MODIS NDVI (250 m, 16-day composite)

Train / validation / test split: ~60% / ~20% / ~20%

Dataset release: The processed spatiotemporal fire progression dataset will be made publicly available upon publication. To request early access, contact the corresponding author.


Evaluation Metrics

  • RMSE — computed separately for fire grids and non-fire grids
  • Precision, Recall, F1-score — fire front prediction accuracy via binary classification (fire probability threshold: 0.1)
  • Spot fire location accuracy — evaluated across probability thresholds 0.01–0.10

Requirements

pip install torch torchvision numpy pandas matplotlib scikit-learn jupyter

GPU recommended for training M3 variants. Patch sizes beyond 11×11 were not tested due to compute constraints.


Usage

Training

Open any m{1,2,3}.*.ipynb notebook and run cells sequentially. Each notebook includes data loading, percolation sequence construction or VIIRS preprocessing, model definition, and training loop with validation.

Evaluation

Use the corresponding rm{1,2,3}.*.ipynb notebooks to load trained weights and generate RMSE, precision, recall, and F1 metrics.

Transferability

The trm*.ipynb notebooks apply trained models to held-out fire events (Klamath fires, GlobFire) to assess geographic generalizability.

Uncertainty Quantification

The urm*.ipynb notebooks generate prediction intervals and calibration curves. Precomputed results are in the uncertainty_*.csv files.


Key Results

M2 (Pairwise Self-Attention ConvLSTM) achieves the best performance across all metrics on both datasets, demonstrating that pairwise attention is more effective than patchwise attention for capturing the multi-scale spatiotemporal dynamics of wildfire spread — including long-range spotting effects.

For M3 (Patchwise), a 7×7 footprint achieves the best precision in fire location prediction and is used as the default configuration.

All models show low error in areas far from the fire front. The tendency to over-predict near the fire edge reflects the model's attempt to capture potential fire spread, consistent with the inherent uncertainty of fire front dynamics.

For full quantitative results, see: doi.org/10.1016/j.ecoinf.2024.102760


Citation

@article{masrur2024wildfire,
  title={Capturing and interpreting wildfire spread dynamics: attention-based spatiotemporal models using ConvLSTM networks},
  author={Masrur, Arif and Yu, Manzhu and Taylor, Alan},
  journal={Ecological Informatics},
  volume={82},
  pages={102760},
  year={2024},
  publisher={Elsevier},
  doi={10.1016/j.ecoinf.2024.102760}
}

Contact

Manzhu Yu (Corresponding Author), Associate Professor & Director, GEOlab
Department of Geography, Penn State University
mqy5198@psu.edu

Part of the GEOlab AI Wildfire Suite — open tools for fire spread, smoke exposure, and community protection.

About

Attention-based spatiotemporal ConvLSTM models for wildfire spread prediction. Pairwise and patchwise self-attention mechanisms capture local fire front dynamics and long-range spotting effects. Validated on simulated percolation data and VIIRS satellite observations (California 2012–2020).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors