Forecasting Seismic Wavefields with Latent Flow Matching for Earthquake Early Warning

Yang Wang, Dongwei Lyu, Soon Hoe Lim, Rie Nakata, N. Benjamin ErichsonarXiv 2026

TL;DR

When an earthquake strikes, early warning systems have only seconds to predict where and how hard the ground will shake. GenWaveCastNet tackles this by using latent flow matching—a generative AI technique—to forecast a distribution of possible future seismic wavefields rather than a single deterministic guess. Trained exclusively on small earthquakes, it outperforms existing baselines on both small and large (up to M7.0) simulated quakes, offering more accurate predictions of peak ground velocity and when it will arrive.

What Problem Does This Paper Address?

Earthquake early warning (EEW) is a race against the speed of seismic waves. Conventional systems observe the first few seconds of shaking, estimate the earthquake’s location and magnitude, and plug those numbers into empirical formulas to predict ground motion. This works reasonably well for small quakes, but breaks down for large ones: a massive rupture can still be actively growing when the first warning needs to go out, making its final magnitude impossible to pin down early.

An alternative is to skip estimating source parameters altogether and forecast the seismic wavefield directly. Physics-based simulations can do this, but they are far too slow for real-time warnings. Machine learning models like WaveCastNet are much faster, yet they still struggle to generalize from small training quakes to large, complex "finite-fault" earthquakes. Part of the reason is fundamental: early observations of a large rupture only show a fraction of what’s happening, meaning several different future wavefields are physically consistent with the same initial data. Predicting a single deterministic average blurs over this uncertainty.

Methods

GenWaveCastNet reframes wavefield forecasting as a generative problem using flow matching—a technique that learns a continuous transformation from simple Gaussian noise to complex target data. Because running flow matching directly on high-resolution 3D seismic wavefields would be too slow, the authors operate in a compressed latent space:

Figure 1: Overview of GenWaveCastNet. (a) Future wavefield blocks are generated by integrating a conditional flow in latent space, with longer forecasts obtained through autoregressive latent prediction. (b) The flow-matching decoder reconstructs wavefields at their original resolution by transforming Gaussian noise conditioned on the predicted latent block. (c) The latent flow-matching velocity field is parameterized by a spatiotemporal Transformer with 16 blocks that jointly process the history and noisy future latent representations using factorized spatial and temporal self-attention.
  1. Spatiotemporal Flow-Matching Autoencoder (FM-AE): Instead of a standard variational autoencoder (VAE), the authors use an autoencoder with a generative flow-matching decoder. The encoder compresses a block of 30 wavefield frames ($3 \times 30 \times 320 \times 256$) into a compact latent block ($4 \times 10 \times 40 \times 32$)—a 144× reduction in size. The decoder reconstructs the full-resolution wavefield from Gaussian noise conditioned on that latent block.
  2. Latent Flow-Matching Backbone: A second flow-matching model—a 16-block spatiotemporal Transformer with factorized spatial and temporal self-attention—learns to predict the next latent block given the preceding "history" latent block.
  3. Autoregressive Latent Forecasting: To generate 100-second forecasts from 15.6 seconds of observations, the model autoregressively feeds each predicted latent block back in as history, staying entirely in latent space without decoding and re-encoding at every step. By sampling different realizations of Gaussian noise, GenWaveCastNet generates an ensemble of 10 possible future trajectories, which are decoded and averaged for the final forecast.

Datasets

The authors use the WaveCastNet dataset, which consists of simulated earthquakes in the San Francisco Bay Area:

  • Training: 300 small point-source earthquakes below magnitude M4.5.
  • Evaluation: Held-out point-source earthquakes (< M4.5) and larger finite-fault earthquakes spanning M4.5 to M7.0 (specifically M4.5, 5.0, 5.5, 6.0, 6.5, and 7.0).

No new datasets are introduced.

Key Insights and Ideas

  • Generative ensembles beat deterministic point predictions: Because early seismic data is ambiguous, modeling a conditional distribution of future wavefields—and averaging an ensemble of 10 sampled trajectories—yields significantly better forecasts than predicting a single deterministic outcome.
  • The choice of autoencoder matters: Replacing the FM-AE with a standard VAE while keeping the exact same latent forecasting backbone degraded performance across every tested magnitude, highlighting the value of a generative flow-matching decoder for preserving fine-scale wavefield structure.
  • Observing more of the rupture helps for mega-quakes: For the M7.0 earthquake, the rupture continues well past the initial 15.6-second observation window. Initializing the forecast slightly later (at 20.8 seconds) dramatically improves accuracy, underscoring the physical limit of how much can be known before a rupture finishes evolving.

Key Results

  • Held-out point-source quakes (< M4.5): GenWaveCastNet reduces relative Frobenius norm error (RFNE) by 35% compared to WaveCastNet (0.13 vs. 0.20) and achieves a normalized inner product (ACC) of 0.99.
  • Large finite-fault quakes (M4.5–M7.0): Despite never seeing a finite-fault quake during training, GenWaveCastNet achieves lower RFNE than WaveCastNet at all six tested magnitudes, with the largest absolute improvement at M6.5 (RFNE 0.45 vs. 0.66; ACC 0.91 vs. 0.87).
  • Peak Ground Velocity (PGV) & Timing: The model reduces horizontal PGV amplitude error at 4 of 6 magnitudes and improves threshold-crossing timing accuracy across almost all tested magnitudes and thresholds (except peak timing at M4.5).
  • M7.0 with later initialization: Starting the forecast at 20.8 s boosts GenWaveCastNet's ACC on the M7.0 quake to 0.85, outperforming WaveCastNet at all tested start times.
Figure 2: Predictive distributions of the y-component of particle velocity at three locations marked on the reference wavefield (left). Distributions for GenWaveCastNet and its VAE-based variant are estimated using Gaussian kernel density estimation from ten independent forecasts. Solid and dashed vertical lines indicate WaveCastNet predictions and reference values, respectively.

Limitations and Future Work

  • Simulated, single-region data: All experiments are conducted on simulated earthquakes in the San Francisco Bay Area. Testing on real-world seismic recordings is a crucial next step.
  • Early-window limits on M7.0: Forecasting the largest earthquakes from just 15.6 seconds of data remains challenging because the rupture is still unfolding.
  • Probabilistic warnings: Future work could use GenWaveCastNet's ensemble of forecasts not just for an ensemble-mean prediction, but to directly estimate the probability of exceeding critical ground-motion thresholds.

Summary updated

BibTeX
@misc{wang2026forecasting,
  author = {Yang Wang and Dongwei Lyu and Soon Hoe Lim and Rie Nakata and N. Benjamin Erichson},
  title = {{Forecasting Seismic Wavefields with Latent Flow Matching for Earthquake Early Warning}},
  year = {2026},
  eprint = {2612.05146},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.05146},
}
Figure