Skip to content

lu-group/red-diffeq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Under Construction

RED-DiffEq

Regularization by Denoising Diffusion Models for Solving Inverse PDE Problems

Python 3.8+ License: MIT

RED-DiffEq

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.

Method Overview

RED-DiffEq Method

Data

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:

See dataset/README.md for more details.

Code

Quick Start (Terminal)

Run all commands from the repository root.

1. Environment setup

python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

2. Download pretrained model

Download 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/

3. Run a quick OpenFWI example (single sample)

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_terminal

4. Run a quick Marmousi example

python scripts/run_inversion.py \
  --config example/example_config/red-diffeq_marmousi.yaml \
  --experiment_name example_marmousi_terminal

Full Dataset Runs

Use 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.yaml

TV 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.yaml

Output

Each 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:

  • result
  • initial_velocity
  • ground_truth
  • total_losses
  • obs_losses
  • reg_losses
  • ssim
  • mae
  • rmse

Notes

  • Primary entry point: scripts/run_inversion.py
  • Current maintained diffusion checkpoint: pretrained_models/model-4.pt
  • For reproducibility, set experiment.random_seed in your config.

Cite this work

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}
}

Questions

To get help on how to use the data or code, simply open an issue in the GitHub "Issues" section.

License

This project is licensed under the MIT License. See LICENSE.

Acknowledgments

About

RED-DiffEq: Regularization by denoising diffusion models for solving inverse PDE problems with application to full waveform inversion

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors