This repository contains the source code for the paper "Space Correlation Constrained Physics Informed Neural Network for Seismic Tomography", accepted by JGR: Machine Learning and Computation on January 30, 2026.
Seismic tomography is a critical method for imaging the Earth's subsurface structure. We develop an improved framework, Space Correlation Constrained Physics-Informed Neural Network (SC-PINN), to enhance tomography accuracy. Unlike traditional methods or standard PINNs, SC-PINN explicitly integrates:
- Physical Principles: The Eikonal equation governing seismic wave propagation.
- Observational Data: Seismic traveltime data.
- Geological Structure Priors: Spatial correlation constraints derived from seismic imaging integration.
This approach demonstrates superior performance in resolving complex velocity variations and is validated on both synthetic datasets (e.g., Marmousi model) and field data (Viking Graben).
The repository is organized as follows:
SC-PINN/
├── ApplyScripts/ # Main training scripts
│ ├── TrainPINN.py # Training script for standard PINN
│ └── TrainSCPINN.py # Training script for SC-PINN (Proposed Method)
├── configjson/ # Configuration files for experiments
│ ├── PINN.json # Config for PINN experiments
│ └── SCPINN.json # Config for SC-PINN experiments
├── DATA_FOLDER/ # Directory for input data (velocity models, traveltimes, etc.)
├── model/ # Neural Network architecture definitions
├── result/ # Output directory for logs, checkpoints, and figures
├── util/ # Utility functions (plotting, file I/O)
├── runPINN.sh # Shell script to execute PINN training
└── runSCPINN.sh # Shell script to execute SC-PINN training
To reproduce the results, you need to set up the software environment, which involves installing Madagascar and configuring the Python dependencies.
This project leverages Madagascar for seismic data processing and I/O (handling .rsf files).
- Download & Install: Please follow the official guide to install Madagascar: http://www.ahay.org/wiki/Installation.
- Python API: Ensure the Madagascar Python API (
m8r) is accessible. Typically, this is handled by sourcing the Madagascar environment script. For example:Verify the installation by runningsource $RSFROOT/share/madagascar/etc/env.sh export PYTHONPATH=$RSFROOT/lib:$PYTHONPATH
import m8rin a Python shell.
We provide an environment.yml file to create a Conda environment with all necessary dependencies.
-
Clone the repository:
git clone https://github.com/YourUsername/SC-PINN.git cd SC-PINN -
Create the environment:
conda env create -f environment.yml
-
Activate the environment:
conda activate scpinn
Core Dependencies:
- Python >= 3.8
- PyTorch >= 1.10
- NumPy, Matplotlib, SciPy
- TensorBoard
- Loguru
- Pytorch-Warmup
- Kornia
The dataset required to reproduce the results in this project is available on Zenodo: https://doi.org/10.5281/zenodo.18463841.
Please download and extract the data, then ensure your dataset files (initial velocity, true velocity, traveltime tables, seismic profiles) are placed in the DATA_FOLDER/ or specified paths in the run scripts.
.rsf(Madagascar) and.npyformats are supported.
Hyperparameters for the experiments are defined in the JSON files located in configjson/. You can modify parameters such as:
epochs: Total number of training epochs.lr: Learning rate.GPUIDs: GPU device IDs to use.velLossceoff,pde_coeff,data_coeff: Weighting coefficients for loss terms.
To reproduce the SC-PINN results (e.g., with a linear initial model):
bash runSCPINN.shTo run the baseline PINN method:
bash runPINN.shThese scripts will automatically:
- Load the configuration.
- Back up the source code and config for the specific experiment run.
- Start the training process.
- Save logs to
result/<ExpName>/<BaseFileName>_exp<Iter>/PINNTomo.log. - Save TensorBoard events to
result/<ExpName>/<BaseFileName>_exp<Iter>/tb_runs/. - Save model checkpoints and visualization figures in the result directory.
- DVG-PDE Loss: A gradient-enhanced loss function for solving the Eikonal equation.
- Structural Constraint: Utilizes dip loss and total variation (TV) regularization to enforce geological consistency with seismic stacked profiles.
- Automatic Mixed Precision (AMP): Supported for efficient training on GPUs.
If you use this code or find it useful in your research, please cite our paper:
@article{https://doi.org/10.1029/2025JH000855,
author = {Wang, Yonghao and Jia, Zhuo and Jiang, Bowu and Lu, Wenkai},
title = {Space Correlation Constrained Physics Informed Neural Network for Seismic Tomography},
journal = {Journal of Geophysical Research: Machine Learning and Computation},
volume = {3},
number = {2},
pages = {e2025JH000855},
keywords = {physics-informed neural network, tomography, inverse problem, spatial correlation},
doi = {https://doi.org/10.1029/2025JH000855},
url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2025JH000855},
eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2025JH000855},
note = {e2025JH000855 2025JH000855},
year = {2026}
}This project is licensed under the CC BY-NC-SA 4.0 license. This license allows for non-commercial use, adaptation, and sharing, provided that appropriate credit is given and any derivative works are shared under the same license.
