PyTorchFire: A GPU-Accelerated Wildfire Simulator with Differentiable Cellular Automata

Zeyu Xia, Sibo Cheng · 2025

Read PyTorchFire: A GPU-Accelerated Wildfire Simulator with Differentiable Cellular Automata by Zeyu Xia, Sibo Cheng (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2502-18738.txt.

Introduction

Zeyu Xia and Sibo Cheng published this study in 2025. They built PyTorchFire, a wildfire simulator that runs on graphics chips. Fire spread is random at its core, which makes faithful simulation hard. Their model treats the land as a grid of cells that pass fire to neighbors. The twist is that the model is differentiable, so its settings can be tuned by gradient descent, like a neural network.

On real-scale fires at fine detail, the tool runs in milliseconds, far faster than older CPU simulators. Live tuning lets it match how a real fire actually moved, in both time and place. Fed with real landscape data, it generalized better than trained stand-in models. The software is open to all. The authors pitch it as a practical aid for forecasting fires and planning the response.

Catalog record

CREATORZeyu Xia, Sibo Cheng
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE56 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2502-18738

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

PyTorchFire: A GPU-Accelerated Wildfire Simulator with Differentiable Cellular Automata Zeyu Xia, Sibo Cheng Abstract Accurate and rapid prediction of wildfire trends is crucial for effective management and mitigation. However, the stochastic nature of fire propagation poses significant challenges in developing reliable simulators. In this paper, we introduce PyTorchFire , an open-access, PyTorch -based software that leverages GPU acceleration. With our redesigned differentiable wildfire Cellular Automata (CA) model, we achieve millisecond-level computational efficiency, significantly outperforming traditional CPU-based wildfire simulators on real-world-scale fires at high resolution. Real-time parameter calibration is made possible through gradient descent on our model, aligning simulations closely with observed wildfire behavior both temporally and spatially, thereby enhancing the realism of the simulations. Our PyTorchFire simulator, combined with real-world environmental data, demonstrates superior generalizability compared to supervised learning surrogate models. Its ability to predict and calibrate wildfire behavior in real-time ensures accuracy, stability, and efficiency. PyTorchFire has the potential to revolutionize wildfire simulation, serving as a powerful tool for wildfire prediction and management. [orcid=0000-0003-0234-5857] [orcid=0000-0002-8707-2589] keywords wildfire simulation ,differentiable cellular automata ,PyTorch-based software ,parallel computing techniques ,GPU-acceleration † † credit: Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Resources, Data Curation, Writing - Original Draft, Visualization, Project administration † † credit: Conceptualization, Methodology, Resources, Writing - Review & Editing, Supervision, Funding acquisition † † corresponding: Corresponding author † † note: Author accepted manuscript. Version of record: Environmental Modelling & Software , vol. 188, article 106401, Apr. 2025. doi:10.1016/j.envsoft.2025.106401 . The version of record is © 2025 The Authors, published by Elsevier Ltd under CC BY 4.0 . Code availability Name of software: PyTorchFire Developer: Zeyu Xia, [email protected] Year first available: 2024 Hardware requirements: Preferred NVIDIA GPU Software requirements: Python 3.8+, preferred 3.11 License: MIT License Program language: Python 3 Homepage : https://github.com/xiazeyu/PyTorchFire Source code: https://doi.org/10.5281/zenodo.13132218 PyPI package: https://pypi.org/project/pytorchfire Document: https://pytorchfire.readthedocs.io Dataset: https://doi.org/10.17632/nx2wsksp9k.1 Main Notations Notation Description Notations for Dataset H,W Height and width of data V_{w} Wind velocity \theta_{w} Wind direction \theta_{s} Slope to neighboring cells p_{\text{veg}} Scaling factor for vegetation type p_{\text{den}} Scaling factor for vegetation density S_{\text{init}} Initial fire state E,\hat{E} Altitude of a cell and its neighbors l Side length (resolution) of dataset Notations for Wildfire Cellular Automata c_{1} Scaling factor for wind velocity c_{2} Scaling factor for wind direction a Scaling factor for ground elevation p_{h} Base burning probability p_{\text{continue}} Probability of continued burning p_{w} Scaling factor for wind p_{s} Scaling factor for slope c Constant for normalization function f_{p} Probability-like normalization function p_{\text{propagate},i,j},p_{\text{propagate}} Probability for cell i to propagate fire to cell j p_{\text{ignite},j},p_{\text{ignite}} Probability of cell j becoming ignited S_{\text{current}} Current fire state S_{\text{next}} Next fire state Notations for Parameter Calibration Trainer r_{\text{first}},r_{\text{between}},r_{\text{last}} Constants for step rings attached to accumulator t Time step it Iteration step y,\hat{y} Observed fire region binary label and predicted ignition probability A,\hat{A} Observed and predicted fire region 1 Introduction There has been an increasing number of devastating effects caused by human-induced climate change. One of its outcomes is the more frequent occurrence of wildfires, which are larger in both scale and duration worldwide [ 36 ] . There are approximately 60,000 undesirable wildfire events (not intentionally set by humans for forest health and safety of nearby communities) with an average burned area of 7.02 million acres annually in the last decade just in the United States [ 6 ] . These fire events have not only put properties at high risk of being damaged by wildfires [ 4 ] , but also pose a significant threat to human health [ 7 ] . Having an accurate and effective prediction, especially in the early stages of a fire event, is crucial for decision making in firefighting and evacuation strategies, as well as for short-term emergency response and long-term fire risk assessment [ 17 ] . Numerous studies have focused on predicting fire spread using various models, such as the semi-empirical model [ 13 , 12 ] , Computational Fluid Dynamics (CFD) -based models [ 34 ] , data-driven models [ 23 ] , and Cellular Automata (CA) -based models [ 18 , 2 , 28 , 31 , 22 ] . However, these models typically utilize the CPU only, which is not fast enough to provide real-time predictions and cannot make predictions in a reasonable time when the fire scale is large or the resolution is high. Recent advances in neural networks [ 16 , 35 , 15 , 39 ] have introduced a novel approach to the construction of wildfire prediction models. Numerous studies [ 8 , 9 , 20 ] have leveraged Machine Learning (ML) surrogate modeling to enhance the efficiency of wildfire simulations. Nevertheless, these methods exhibit significant limitations regarding generalizability. They are typically trained in specific ecoregions, rendering them applicable solely to those particular regions and unsuitable for deployment in diverse ecoregions with varying geophysical conditions. There has been recent research leveraging Message Passing Interface (MPI) for parallelization on CPUs [ 21 ] and utilizing Graphic Processing Unit (GPU) acceleration [ 19 , 27 , 11 ] to enhance wildfire prediction. However, these implementations are frequently developed in C, Compute Unified Device Architecture (CUDA) , or MATLAB programming language, posing challenges for integration into existing wildfire prediction systems due to specific system requirements or the necessity for commercial licenses. It may also cause trouble for the user to use user-provided datasets. In contrast, our proposed approach aims to achieve portability such that, by merely altering the device string, the same software can be executed across different architectures, including CPUs and GPUs from various vendors. Another significant challenge in achieving reliable wildfire prediction is parameter calibration or model correction. As summarized in [ 28 ] , a variety of algorithms [ 2 , 9 , 37 ] have been designed to forecast the progress of regional fires based on local characteristics such as terrain, wind and fuel. However, due to the complexity and chaotic nature of wildfire systems, prediction models often lack accuracy, and the results heavily depend on the initial parameters [ 1 ] . Parameter calibration is crucial for wildfire models to reduce prediction bias. Despite traditional brute-force methods [ 2 , 11 ] , several studies focus on parameter identification using Genetic Algorithm (GA) [ 11 , 27 ] , variational data assimilation [ 8 ] , or the ensemble Kalman filter [ 38 ] . However, these methods are either mathematically unstable, computationally expensive or require a large amount of data, making it challenging to perform parameter calibration on a large scale or in real-time. It is also worth mentioning that, due to the stochastic nature of wildfire modellings, different runs yield varying outcomes, complicating parameter calibration. In this paper, we developed PyTorchFire , a PyTorch -based simulator designed to provide a fast and reliable wildfire simulation platform capable of self-correction using real-world observation data of wildfires. Our simulator incorporates a redesigned, Differentiable Cellular Automata (DCA) model that is efficient and supports real-time parameter calibration with excellent generalizability. With the support of PyTorch , we achieve high computing efficiency without compromising scalability and portability. GPU acceleration not only allows us to perform single simulation steps at the millisecond level but also enables large-scale simulations and higher resolutions that were previously challenging. The probability

Read the complete text