Develop a probabilistic seismic hazard model that integrates machine learning-derived ground motion predictions: data preparation, hybrid modeling, uncertainty, and validation.
Assistant
The user wants a guide on developing a Probabilistic Seismic Hazard Analysis (PSHA) model that integrates Machine Learning (ML)-based Ground Motion Prediction Equations (GMPEs).
The request covers four key areas:
Data Preparation
Hybrid Modeling (integrating ML with physics-based or empirical models)
Uncertainty Quantification
Validation
This is a complex, advanced topic in seismology and earthquake engineering. I need to structure the response logically, providing technical depth without being overwhelming.
Deconstruction of the Request:
Goal: Develop a PSHA model with ML-derived GMPEs.
Components:
Data Preparation: Sources, cleaning, feature engineering (seismic features vs. ground motion features).
Hybrid Modeling: How to mix ML with traditional methods (e.g., NGA-West2, physics-based simulations).
Uncertainty: Aleatory vs. Epistemic uncertainty in the context of ML.
Validation: How to prove the model works (residual analysis, log-likelihood, testing against held-out data).
Drafting the Content - Step-by-Step:
1. Introduction:
Briefly define PSHA.
Explain why ML is being used (capturing non-linearities, high-dimensional data handling) but acknowledge the risk (black box, extrapolation).
2. Phase 1: Data Preparation (The Foundation):
Sources: Where does data come from? (PEER NGA, CESMD, global databases). Physics-based simulations (for data augmentation).
Targets (Y): IMs (Intensity Measures) like PGA, PGV, Sa(T).
Preprocessing:
Logarithmic transformation (crucial for ground motions).
Standardization/Normalization.
Handling missing data (imputation).
Crucial Step: Data splitting (Temporal/Geographic vs. Random). Random splitting is bad in seismology (leakage). Need event-aware splitting.
3. Phase 2: Hybrid Modeling (The Core):
The Concept: Pure ML often fails in extrapolation. We need "Physics-Informed" or "Residual" approaches.
Approach A: Residual Modeling (The "Hybrid" approach). Start with a base empirical GMPE (e.g., Abrahamson et al.). Train ML to predict the residuals (error) of that GMPE. This anchors the ML in physics.
Approach B: Feature Injection. Use ML to predict complex parameters (e.g., site amplification factors) and feed them into a physics equation.
Algorithm Selection: Gradient Boosting (XGBoost/LightGBM) or Neural Networks (MLP/CNNs).
4. Phase 3: Uncertainty Quantification (The PSHA Requirement):
PSHA requires a standard deviation (σ). ML models usually output a point estimate. We need a distribution.
Aleatory Variability (Inherent randomness): The standard deviation of the residuals (σres). Needs to account for inter-event (τ) and intra-event (ϕ) variance (mixed-effects model).
Information Criteria: AIC/BIC (for comparing models).
Extrapolation Testing: Testing on rare events (large M, short R) where data is scarce. This is where the "Hybrid" part proves its worth over pure ML.
6. Implementation Workflow (A summary code/pseudo-code structure):
Show a conceptual workflow using Python libraries (pandas, scikit-learn, tensorflow/pytorch).
7. Integration into PSHA:
How does this fit into the PSHA integral?
Hazard Curve calculation.
Logic Tree integration (weighting the ML-GMPE against traditional ones).
Refining the Technical Details:
Splitting Data: Emphasize "Leave-One-Earthquake-Out" or similar cross-validation to prevent the model from memorizing specific events.
Heteroscedasticity: Ground motion variance changes with magnitude. The ML model needs to capture this (e.g., using quantile regression or predicting sigma directly).
Terminology: Use correct seismological terms (Rrup, Rjb, , , ).
Self-Correction/Review during drafting:
Initial thought: Just suggest a Neural Network.
Correction: No, simple ANN often overfits small datasets. Gradient Boosting Trees (XGBoost) usually work better for tabular GMPE data, or Hybrid Residual models. I will emphasize the Hybrid Residual approach as it's the state-of-the-art for stability.
Focus: Make sure to connect the ML output back to the Logic Tree structure of PSHA. PSHA isn't just one model; it's a weighted sum of possibilities.
Final Structure:
Executive Summary
Data Engineering Strategy (Feature engineering, Event-based splitting).
The Hybrid Modeling Framework (Residual modeling, Physics constraints).
Uncertainty Quantification (Aleatory vs. Epistemic in ML).
Validation Metrics (Residuals, LH, EDR).
Workflow Example (Python structure).
Let's generate the response following this structure.
This guide outlines the development of a Probabilistic Seismic Hazard Analysis (PSHA) model that integrates Machine Learning (ML) for Ground Motion Prediction Equations (GMPEs).
The challenge in this approach is balancing the high predictive capability of ML with the strict physical constraints and uncertainty quantification required for seismic hazard licensing (e.g., for building codes or critical infrastructure).
1. Data Preparation (The Foundation)
Standard GMPEs rely on curated datasets (like the NGA-West2 database). For ML, however, data preparation must address high dimensionality and potential noise.
A. Feature Engineering
Instead of using raw seismogram data, extract physics-informed features:
Seismic datasets are heavily biased towards small magnitudes and large distances.
Problem: An ML model trained on unbalanced data will predict small motions well but fail at predicting rare, large motions (which drive hazard).
Solution: Use Importance Weighting (weighting samples by the inverse of their frequency) or Synthetic Minority Over-sampling (SMOTE) for high-magnitude/near-field records.
C. The "Event-Aware" Split
Never split seismic data randomly.
Wrong Way: Random 80/20 split. This causes "data leakage" because records from the same earthquake appear in both train and test sets.
Right Way:Leave-One-Earthquake-Out cross-validation. Train on all earthquakes except one, test on the held-out earthquake. This ensures the model generalizes to new events, not just new records.
2. Hybrid Modeling (Physics-Guided ML)
Pure "Black Box" ML models (like standard Neural Networks) are risky for PSHA because they can violate physics (e.g., predicting ground motion increases with distance).
A. The Residual Modeling Approach (Model I/O Hybrid)
This is the most robust method for hazard integration.
Base Model: Establish a trusted, physics-based GMPE (e.g., Abrahamson et al. 2014).
ML Corrector: Train an ML model (e.g., Gradient Boosting or Random Forest) to predict the residual (the difference between the observation and the Base Model).
Final Prediction:ln(Y)=ln(YGMPE)
B. Physics-Informed Neural Networks (PINNs)
If building a Deep Learning model from scratch, incorporate physical constraints into the loss function:
Loss=MSEData+λ⋅MS
Constraint Example: Penalize the model if the predicted spectral acceleration does not decay with distance (dSA/dR>0).
3. Uncertainty Quantification
PSHA is driven by uncertainty (μ and σ). An ML model that outputs a single number is useless for PSHA. You must characterize Aleatory (randomness) and Epistemic (knowledge-based) uncertainty.
A. Aleatory Variability (σ)
In standard GMPEs, this is the standard deviation of the residual. In ML, we assume the heteroscedastic nature of seismic noise.
Approach: Assume a Log-Normal distribution.
Calculation: Calculate the Total Standard Deviation (σTotal) on the log-residuals of the test set.
Refinement: Use Quantile Regression (e.g., Quantile Random Forest) to predict the 16th, 50th, and 84th percentiles directly, allowing σ to vary with magnitude and distance.
B. Epistemic Uncertainty (Model Confidence)
This represents our lack of knowledge about the true functional form.
Ensemble Methods: Train multiple ML models (e.g., Bagging or Bootstrap Aggregating). The variance between the models represents the epistemic uncertainty.
Monte Carlo Dropout: For Neural Networks, keep dropout active during inference. Run the prediction 100 times. The spread of the results approximates the epistemic uncertainty.
C. The Logic Tree Integration
To integrate this into a PSHA Logic Tree:
Branch 1: Traditional GMPE (Weight: 0.5)
Branch 2: Hybrid ML-GMPE (Weight: 0.5)
Sigma Adjustment: Ensure the σ of the ML branch is treated as "Sigma Tau" (single station sigma) or adjusted for ergodic assumptions depending on the site-specific study.
4. Validation Strategy
Validation must go beyond standard R2 scores.
A. Goodness-of-Fit Metrics
Log-Likelihood (LLH): Measures how likely the observations are under the predicted probability distribution. This is superior to MSE for hazard analysis.
Euclidean Distance-based Ranking (EDR): A multi-criteria metric that ranks GMPEs based on magnitude, distance, and spectral shape simultaneously.
B. Residual Analysis
Plot residuals (Δ) against Key Parameters:
vs. Magnitude: Ensure no trend (e.g., the model doesn't over-predict small quakes).
vs. Distance: Ensure no trend (attenuation is captured correctly).
vs. Vs30: Ensure site amplification is unbiased.
C. Sensitivity Analysis (SHAP Values)
Use SHAP (SHapley Additive exPlanations) to interpret the ML model.
Sanity Check: If the SHAP plot says increasing Magnitude decreases Ground Motion, the model is flawed.
Physical Plausibility: This is required to convince review panels that the "Black Box" is behaving logically.
5. Implementation Workflow (Python Pseudo-Code)
Here is a conceptual workflow using scikit-learn and scipy.
import numpy as np
import pandas as pd
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.model_selection import GroupKFold
from scipy.stats import norm
# 1. Load Data
df = pd.read_csv('seismic_database.csv')
# Log-transform the target (Standard in PSHA)
df['log_pga'] = np.log(df['pga'])
# Base GMPE prediction (Physics-based)
df['log_gmpe_pred'] = np.log(df['gmpe_prediction'])
# 2. Feature Selection
features = ['Mw', 'Rrup', 'Vs30', 'Mechanism']
X = df[features]
# Target: The Residual (Hybrid Approach)
y = df['log_pga'] - df['log_gmpe_pred']
groups = df['EarthquakeID'] # For Group Splitting
# 3. Model Training (Event-Based CV)
gkf = GroupKFold(n_splits=5)
predictions = []
residuals = []
for train_idx, test_idx in gkf.split(X, y, groups):
X_train, X_test = X.iloc[train_idx], X.iloc[test_idx]
y_train, y_test = y.iloc[train_idx], y.iloc[test_idx]
# Quantile Regression for Uncertainty (50th, 84th percentiles)
gbr_median = GradientBoostingRegressor(loss="quantile", alpha=0.5)
gbr_84 = GradientBoostingRegressor(loss="quantile", alpha=0.84)
gbr_median.fit(X_train, y_train)
gbr_84.fit(X_train, y_train)
# Store results
pred_median = gbr_median.predict(X_test)
pred_84 = gbr_84.predict(X_test)
# Calculate Aleatory Sigma
sigma = pred_84 - pred_median # Approx 1 std dev
# Reconstruct Full Prediction
# Final = Base GMPE + ML Residual Correction
final_pga = np.exp(df.loc[test_idx, 'log_gmpe_pred'] + pred_median)
predictions.append(final_pga)
# 4. Validation (Likelihood)
# Calculate LLH to compare against traditional GMPE
# ...
Summary Checklist for Development
Data: Is the split event-aware to prevent leakage?
Model: Is it hybrid (anchored to physics) or purely data-driven?
Uncertainty: Have you defined both μ and σ?
Validation: Have you plotted residuals vs. Distance/Magnitude?
Explainability: Can you explain why the model predicts specific values (SHAP)?
Epistemic Uncertainty (Knowledge gap):
Model weight (logic tree).
Quantifying ML Epistemic Uncertainty: Ensemble methods (Bootstrap, Bayesian Neural Networks, Monte Carlo Dropout). This gives a range of predictions for the same input.