Imagine peering inside the Earth to predict earthquakes or find hidden resources, like a medical scanner for our planet. This project analyzes seismic waves the vibrations from earthquakes or other sources to map the Earth's subsurface. By transforming complex seismic data into clear images of underground properties, our model helps predict earthquakes, locate oil and gas, and support clean energy solutions.
This repository implements a Physics-Informed Generative Adversarial Network (GAN) for Elastic Full Waveform Inversion (FWI). It combines a U-Net Generator, a Wasserstein Discriminator, and a Fourier Neural Operator (FNO) based Elastic Wave Solver. The pipeline is designed for reconstructing sub-surface Earth properties (e.g., Vp, Vs, ρ) from seismic waveforms (u_x, u_z).
- Physics-Informed Training with elastic wave equation residual loss
- FNO-based Elastic Wave Solver for waveform simulation
- GAN Training: Generator learns Earth model from seismic data; Discriminator ensures realism
- Multi-parameter Inversion: Includes P-wave (Vp), S-wave (Vs), density (ρ), Poisson’s ratio (pr), and Young’s modulus (pm)
- Fully differentiable end-to-end pipeline using PyTorch
└── 📁FWI
└── 📁data
└── 📁source_info
├── data_x_i.npy
├── data_z_i.npy
├── data.md
└── 📁test
└── 📁source_info
├── data_x_i.npy
├── data_z_i.npy
└── 📁velocity_models
├── density_i.npy
├── pm_i.npy
├── pr_i.npy
├── vp_i.npy
├── vs_i.npy
└── 📁velocity_models
├── add_density.py
├── data.md
├── density_i.npy
├── pm_i.npy
├── pr_i.npy
├── vp_i.npy
├── vs_i.npy
├── download.py
└── 📁dataloaders
├── __init__.py
├── source_waveforms.py
├── velocity_models.py
└── 📁FNO
├── __init__.py
├── fno.py
├── losses.py
└── 📁GAN
└── 📁Discriminator
├── discriminator.py
├── losses.py
└── 📁Generator
├── generator.py
├── losses.py
├── __init__.py
└── 📁Training
├── fno_training.py
├── GAN_training.py
├── generator_model.png
└── README.md
Seismic Waveforms (uₓ, u_z)
│
▼
┌───────────────┐
│ Generator │───> (Vp, Vs, ρ, pr, pm)
└───────────────┘
│
▼
┌──────────────────────┐
│ Elastic Wave Solver │ (FNO)
└──────────────────────┘
│
▼
┌──────────────────────┐
│ Predicted Waveform û │
└──────────────────────┘
│
▼
┌──────────────────────┐
│ Discriminator (WGAN) │
└──────────────────────┘
- Input: Seismic waveforms
[B, 10, 1000, 70](concatenatedu_xandu_z, each[B, 5, 1000, 70]), representing multicomponent seismic data (1000 time points, 70 spatial points). - Output: Subsurface properties
[B, 5, 70, 70](( V_p ), ( V_s ), density, Poisson’s ratio, Young’s modulus), forming 70x70 spatial grids for geophysical analysis.
- Generator: A U-Net model maps seismic waveforms (
[B, 10, 1000, 70], concatenatingu_xandu_z, each[B, 5, 1000, 70]) to subsurface properties ([B, 5, 70, 70]: ( V_p ), ( V_s ), density, Poisson’s ratio, Young’s modulus), trained with adversarial, data misfit (MSE), and PDE residual losses. - Discriminator: A Wasserstein GAN (WGAN) discriminator assesses the realism of synthetic waveforms (generated by the FNO solver) against observed waveforms, using adversarial loss.
- FNO-based Elastic Wave Solver: A Fourier Neural Operator simulates elastic wave propagation, generating synthetic waveforms from the generator’s outputs, enforced by PDE residual loss.
- Adversarial Loss (WGAN):
L_adv = -D(G(z)).mean() - Data Misfit Loss (MSE):
L_data = MSE(FNO(V_pred), waveform_obs) - Physics Loss (PDE Residual):
L_pde = || ρ ∂²u/∂t² - ∇·σ ||² - Total Generator Loss:
L_total = L_adv + λ_data * L_data + λ_pde * L_pde
Using ECFB dataset from SMILE Team
Each sample consists of:
| File | Shape | Description |
|---|---|---|
| data_x_i.npy | [B, 5, 1000, 70] | u_x waveform |
| data_z_i.npy | [B, 5, 1000, 70] | u_z waveform |
| vp_i.npy | [B, 1, 70, 70] | P-wave velocity |
| vs_i.npy | [B, 1, 70, 70] | S-wave velocity |
| density_i.npy | [B, 1, 70, 70] | Density |
| pr_i.npy | [B, 1, 70, 70] | Poisson's ratio |
| pm_i.npy | [B, 1, 70, 70] | Young’s modulus |
Inputs to the Generator: u_x + u_z → [B, 10, 1000, 70]
Outputs from Generator: [B, 5, 70, 70] → input to FNO for waveform reconstruction
The subsurface property images ( V_p , V_s , density, etc.) enable multiple applications:
- Earthquake Prediction: Identifies fault zones and stress regimes for seismic hazard assessment.
- Oil and Gas Exploration: Maps reservoir properties for drilling optimization.
- Geothermal Energy: Detects subsurface thermal structures for resource evaluation.
- Carbon Sequestration: Assesses storage site integrity using density and elastic moduli.
- Infrastructure Planning: Evaluates ground stability for construction by analyzing Poisson’s ratio and Young’s modulus.
- Add Waveform to Spectrogram conversion
- FNO losses and Additional Physics constraints
- Implement training loops
- Add documentation for each module
- Documentation for usage and examples