Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bilybill/SC-PINN

Repository files navigation

Space Correlation Constrained Physics Informed Neural Network (SC-PINN) for Seismic Tomography

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.

Overview

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:

  1. Physical Principles: The Eikonal equation governing seismic wave propagation.
  2. Observational Data: Seismic traveltime data.
  3. 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).

SC-PINN Framework

Project Structure

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

Installation

To reproduce the results, you need to set up the software environment, which involves installing Madagascar and configuring the Python dependencies.

1. Madagascar Installation

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:
    source $RSFROOT/share/madagascar/etc/env.sh
    export PYTHONPATH=$RSFROOT/lib:$PYTHONPATH
    Verify the installation by running import m8r in a Python shell.

2. Python Environment

We provide an environment.yml file to create a Conda environment with all necessary dependencies.

  1. Clone the repository:

    git clone https://github.com/YourUsername/SC-PINN.git
    cd SC-PINN
  2. Create the environment:

    conda env create -f environment.yml
  3. Activate the environment:

    conda activate scpinn

Core Dependencies:

  • Python >= 3.8
  • PyTorch >= 1.10
  • NumPy, Matplotlib, SciPy
  • TensorBoard
  • Loguru
  • Pytorch-Warmup
  • Kornia

Usage

1. Data Preparation

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 .npy formats are supported.

2. Configuration

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.

3. Running Experiments

To reproduce the SC-PINN results (e.g., with a linear initial model):

bash runSCPINN.sh

To run the baseline PINN method:

bash runPINN.sh

These scripts will automatically:

  1. Load the configuration.
  2. Back up the source code and config for the specific experiment run.
  3. Start the training process.
  4. Save logs to result/<ExpName>/<BaseFileName>_exp<Iter>/PINNTomo.log.
  5. Save TensorBoard events to result/<ExpName>/<BaseFileName>_exp<Iter>/tb_runs/.
  6. Save model checkpoints and visualization figures in the result directory.

Key Features

  • 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.

Citation

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

License

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.

About

Space Correlation Constrained Physics Informed Neural Network for Seismic Tomography

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors