Under Construction
The data and code for the paper S. Shan, M. Zhu, Y. Lin, & L. Lu. RED-DiffEq: Regularization by denoising diffusion models for solving inverse PDE problems with application to full waveform inversion. arXiv preprint arXiv:2509.21659, 2026.
Mini example datasets for quick testing are included in this repository under example/example_dataset/, which contains small subsets of OpenFWI and Marmousi data (seismic and velocity).
The full datasets can be obtained from the following sources:
- OpenFWI: https://openfwi-lanl.github.io/ — place files under
dataset/OpenFWI/Seismic_Data/anddataset/OpenFWI/Velocity_Data/ - Marmousi: https://www.geoazur.fr/WIND/bin/view/Main/Data/WebHome — place files under
dataset/Marmousi/Seismic_Data/anddataset/Marmousi/Velocity_Data/ - Overthrust: https://www.geoazur.fr/WIND/bin/view/Main/Data/WebHome — place files under
dataset/Overthrust/Seismic_Data/anddataset/Overthrust/Velocity_Data/
See dataset/README.md for more details.
Run all commands from the repository root.
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txtDownload the pretrained diffusion model checkpoint from Google Drive and place it in the pretrained_models/ directory:
mkdir -p pretrained_models
# After downloading, move the file:
mv ~/Downloads/model-4.pt pretrained_models/This uses the mini example dataset included in this repository.
python scripts/run_inversion.py \
--config example/example_config/red-diffeq_openfwi.yaml \
--sample_index 0 \
--experiment_name example_openfwi_terminalpython scripts/run_inversion.py \
--config example/example_config/red-diffeq_marmousi.yaml \
--experiment_name example_marmousi_terminalUse the configs in configs/ for full experiments:
python scripts/run_inversion.py --config configs/openfwi/red-diffeq.yaml
python scripts/run_inversion.py --config configs/marmousi/red-diffeq.yaml
python scripts/run_inversion.py --config configs/overthrust/red-diffeq.yamlTV and Tikhonov baselines:
python scripts/run_inversion.py --config configs/marmousi/tv.yaml
python scripts/run_inversion.py --config configs/marmousi/tikhonov.yaml
python scripts/run_inversion.py --config configs/overthrust/tv.yaml
python scripts/run_inversion.py --config configs/overthrust/tikhonov.yamlEach run writes results to the experiment.results_dir path set in the config, under:
<results_dir>/<dataset_name>/<experiment_name>/<timestamp>/<family_name>/
Each *_results.npz typically contains:
resultinitial_velocityground_truthtotal_lossesobs_lossesreg_lossesssimmaermse
- Primary entry point:
scripts/run_inversion.py - Current maintained diffusion checkpoint:
pretrained_models/model-4.pt - For reproducibility, set
experiment.random_seedin your config.
If you use this data or code for academic research, you are encouraged to cite the following paper:
@article{shan2025red,
author = {Shan, Siming and Zhu, Min and Lin, Youzuo and Lu, Lu},
title = {{RED-DiffEq}: Regularization by denoising diffusion models for solving inverse {PDE} problems with application to full waveform inversion},
journal = {arXiv preprint arXiv:2509.21659},
year = {2026}
}
To get help on how to use the data or code, simply open an issue in the GitHub "Issues" section.
This project is licensed under the MIT License. See LICENSE.
- Diffusion model implementation based on denoising-diffusion-pytorch
- OpenFWI dataset

