STATSEI14 · PRACTICAL TUTORIAL

Deep Learning
Meets ETAS

Practical Hybrid Workflows for Seismic Forecasting

Francisco Plaza-Vega
Universidad de Santiago de Chile

13 October 2026 · Chile

How do we turn a seismic question into a deep-learning experiment?

From seismic questions to a learning experiment

Section Guiding question
1. Seismic questions and data What do we observe, and what do we want to estimate?
2. From data to learning tasks How do we define inputs, targets and representations?
3. Deep-learning building blocks How do different models use the available information?
4. Lessons from our research What worked, what was difficult, and what did we learn?
5. Guided practical How do we build and evaluate a weekly occurrence forecast?

How do we turn a seismic question into a deep-learning experiment?

Seismic questions and data

01
What do we observe, and what do we want to estimate?

What can we learn from seismicity?

Recorded training-period events in the Chilean study region, with coastlines and a locator.

Signals record ground motion.

Catalogues describe event times, locations and magnitudes.

Histories and maps organize information across time and space.

The same catalogue can support different tasks. First define what the output should mean.

Map: frozen USGS training catalogue and Natural Earth. Illustrates today’s regional setting.

Deep learning in seismology: inputs and targets

Example Input Learning task
ConvNetQuake · 2018 Recorded waveforms Detect events and classify their source region
RECAST · 2023 Past event times and magnitudes Estimate the next-event time distribution
Delgado et al. · 2025 Features of catalogued events Classify foreshock, mainshock and aftershock labels
Farfán et al. · 2025 Sequences of daily spatial grids Forecast gridded seismic activity

Today’s practical: 30 days of history and a seven-day occurrence probability.

From data to learning tasks

02
How do we define inputs, targets and representations?

From a scientific question to a learning task

We define: the question, information available, input and target.

We represent inputs: as a vector, sequence or map.

Represented data → Neural network → Defined output

Architecture combines information; training adjusts weights.

The output and the loss must match the scientific question.

Deep-learning building blocks

03
How do different models use the available information?

MLP: combine measured features

English adaptation of the course multilayer perceptron diagram: input features, hidden layers and output.

A multilayer perceptron learns nonlinear combinations of a feature vector.

Optional extension: the MLP uses 90 values at fixed lag positions. Diagram adapted from the author’s DL course, Unit 2.

CNN: learn local patterns with shared filters

English course-style diagram of local convolution filters, feature maps and an output.

The same filter examines different neighborhoods.

Optional extension: CNN1D shares filters across days. Diagram adapted from the author’s DL course, Unit 3.

LSTM: carry information through a sequence

LSTM input: 30 days by three daily catalogue features. Shared recurrent updates produce a final state of 16 values, which a Dense layer with sigmoid transforms into the next-week occurrence probability.

Today’s example: 30 × 3 input → state (16) → Dense + sigmoid → weekly probability

Output: probability of at least one catalogue M ≥ 5 event in the next seven days.

Adapted from the author’s DL course, Unit 4.

Generative learning: produce new samples

GAN diagram: noise z enters generator G and produces the generated sample x̃ = G(z). The discriminator compares generated and observed examples to provide a training signal. After training, G produces new samples directly.

The output of G is a new data sample, such as a synthetic sequence.

GAN is an adversarial learning scheme; G and D may use different neural architectures.

Later case: mainshock conditions + noise → a possible aftershock sequence.

GAN schematic adapted from the author’s DL course, Unit 5.

Lessons from our research

04
What worked, what was difficult, and what did we learn?

ETAS intensity maps support two learning tasks

A temporal ETAS fit with shared parameters supplies daily intensity maps on a one-degree grid. Thirty spatial maxima feed LSTM regression and thirty maps feed CNN classification of six macrozones.

Nicolis, Plaza & Salas · Spatial Statistics 42 (2021), 100442 · CSN Chile, 2000–2017

ETAS intensity describes a conditional event rate

\lambda(t\mid\mathcal H_t)=\mu+\sum_{t_i<t}\text{contribution from event }i

Background + magnitude-dependent contributions that decay with time

Published construction: common ETAS parameters applied across 1° × 1° cells produce a sequence of intensity maps.

A map value is an estimated occurrence rate, not an earthquake magnitude.

A map maximum becomes one value in the LSTM input

A schematic daily ETAS intensity map is reduced to its spatial maximum. Thirty successive daily maxima enter an LSTM, whose target is the next day's maximum. The grid and relative values are teaching illustrations.

30 daily spatial maxima → LSTM → next-day maximum intensity

Nicolis, Plaza & Salas (2021) · Original published regression task · Diagram illustrates the operation, not measured values

Published LSTM result: an ETAS-derived test target

Original published Figure 5b: observed ETAS-derived test target and LSTM predictions for the magnitude-six setting. The original axis and plotting scale are preserved.

M ≥ 6 setting · Table 3

Model RMSE R²
ETAS 0.5475 0.6241
LSTM 0.5296 0.6561

Lower error and higher R² for this reported comparison.

The network tracks a model-derived target; this is not a direct event-probability test.

Nicolis, Plaza & Salas (2021), Figure 5(b) and Table 3 · Original plotting scale retained

CNN: locate the next map maximum in one of six macrozones

Six latitudinal macrozones reconstructed from the published Table 2 over geographic context. A constructed maximum in zone three and illustrative six-class probabilities show the CNN target. These are teaching values, not empirical predictions.

The target is one macrozone containing the next day’s maximum ETAS intensity.

Nicolis, Plaza & Salas (2021), Table 2 · Natural Earth geography · Marker and probabilities are illustrative

Generative exploration of aftershock sequences

Mainshock conditions and random noise enter a conditional generator. A constructed 224-value sequence makes the output representation visible: 90-minute intervals over fourteen days, absence marker 2.5 and a maximum of 5.1. These values are not observations or a fitted generator output.

The intended output is a possible sequence conditioned on a mainshock.

Jara Muñoz (2025) · Undergraduate thesis in Statistical Engineering · Universidad de Santiago de Chile

An observed and generated sequence: one manuscript case

GANT · case B

━━ Observed reference

━━ Generated sequence

Vertical axis: interval maximum magnitude (Mw).

2.5 marks absence.

Original manuscript Figure 4, GANT case B from the primary random-split experiment. The observed curve is dark and the generated curve is coral; the horizontal axis covers 336 hours. The original case annotation is PI minus 136 percent.

Compare occurrence, peak magnitude and timing, as well as the shape of the curve.

2026 manuscript under review, Figure 4 · One case from the primary random split · Original PI = −136% for this case

GANT temporal evaluation: too many occupied intervals

Temporal GANT evaluation: occupied intervals are 9.27 percent observed versus 77.43 percent generated. Intervals with magnitude at least five are 1.22 percent observed versus 0.40 percent generated.

GANT overproduces occupied intervals while underrepresenting intervals with M ≥ 5.

2026 manuscript under review · Temporal evaluation · Percentages of intervals, not total event counts

Observed sequences define magnitude-threshold labels

Constructed observed-sequence illustration with maximum 5.1: the threshold-five label is one and the threshold-six label is zero. Actual observed sequences, not GAN outputs, supply training labels in the classification study.

Mainshock features → classifier → probability of at least one qualifying aftershock

Manuscript under review · 14 days, 100 km · Observed outcomes define labels; the displayed sequence is constructed

Classification performance depends on the evaluation

Reported target (Table 9): at least one Mw ≥ 6 aftershock within 14 days and 100 km.

Evaluation scheme Best reported classifier ROC-AUC
Random split Random Forest 0.816
Temporal split Gradient Boosting 0.672
Geographic split Random Forest 0.642

Each row selects the best model in its own evaluation. Models and evaluation samples differ.

These AUCs measure discrimination. They do not establish calibrated probabilities.

Plaza-Vega, Jara, Nicolis & Salinas (2026), manuscript under review · Table 9 · Magnitude-threshold classification

Research hypothesis: ETAS-informed generation

History available at the origin → ETAS-derived information → Conditional generator

Possible role: supply a conditioning variable or a constraint on generated sequences.

Question: does that addition improve occurrence, magnitude and temporal structure under a fixed evaluation?

This is a proposed research direction. No hybrid results are shown here.

Future work discussed in the manuscript · The tutorial’s illustrative activity score is a separate feature experiment

Guided practical

05
How do we build and evaluate a weekly occurrence forecast?

The practical applies the same modelling decisions

Shared decisions: question → representation → model and output → evidence.

Case Representation Output
Spatial Statistics ETAS maps and daily maxima Intensity maximum and its macrozone
Generative study Mainshock conditions and noise A possible binned aftershock sequence
Classification study Mainshock predictors; observed outcome labels Occurrence or exceedance probability
Today’s practical Daily catalogue channels Weekly occurrence probability

Now: 30 days of catalogue history → probability of at least one M ≥ 5 event in the next seven days.

Core: references, LSTM and probability evaluation. Optional: Transformer and spatial comparisons.

From the catalogue to three daily features

For each day, summarize catalogue events with M ≥ 4.5 inside the study region.

Daily feature Definition What it describes
Event count log(1 + N_t) How many input events occurred
Maximum magnitude excess Maximum magnitude − 4.5; zero if empty How far the maximum exceeds 4.5
Event presence 1 if N_t > 0; otherwise 0 Whether any input event occurred

30 consecutive days (rows) × 3 daily features (columns) → one LSTM input

Illustrative day: two input events, maximum M = 5.2 → [1.10, 0.70, 1] before standardization.

Input: 30 past days, M ≥ 4.5 → output: probability of at least one M ≥ 5 event in the next seven days.

The table shows values before standardization. The network uses means and standard deviations from training histories only. Features are also called channels.

Evaluate using the temporal order of the problem

Chronological training, validation and test periods, with crossing future target weeks excluded.

Today we compare validation probabilities using Brier score, log loss and calibration.

Train 2001–2016 · Validation 2017–2020 · Test 2021–2025 was inspected previously and is excluded from this comparison.

Guided experiment: from one example to an LSTM probability

30 days × 3 catalogue channels → LSTM → weekly probability

Build one example: identify the input window, forecast origin and label.

Fit references and the LSTM: read compile, fit and predict beside the model.

Evaluate: compare Brier score, log loss and calibration.

Does the LSTM improve on training prevalence and logistic regression in this experiment?

Temporal tutorial and notebook · Seed 7 · Optional comparison: Transformer on the same history and target

Optional comparison: a Transformer on the same history

Compact Transformer: the same 30 days by three catalogue channels, a 16-feature projection with learned day positions, one two-head attention block with residual normalization and a feed-forward layer, average pooling, and a weekly probability.

Same history and target. A different way to combine information across days.

Current temporal tutorial · 2,257 trainable parameters versus 1,297 for LSTM · One fixed, small configuration

Validation performance for the weekly occurrence task

Model Validation Brier Validation log loss
Training prevalence 0.188 0.563
Logistic regression 0.204 0.614
LSTM 0.182 0.548
Transformer (optional) 0.188 0.562

Lower is better. The LSTM has the lowest losses in these individual fits. Read calibration alongside them.

These are development results from one region and one validation period.

One fit per neural model, seed 7 · 208 validation weeks · Display rounded to three decimals

What can this result tell us about the problem?

Reading the validation results

Compare each model with training prevalence.

Read Brier, log loss and calibration together.

Questions for the next experiment

Which representation and target preserve useful structure?

What information is available in the catalogue?

Would more data, capacity or a different training budget change the result?

Useful deep learning depends on how we represent the phenomenon and formulate the task.

Validation also controls early stopping. One seed does not measure initialization sensitivity.

Spatial extension: Graph + LSTM

Six geographic cells form a fixed rook graph. Thirty days of three features per node pass through graph convolution within each day, a shared LSTM over time and six marginal weekly occurrence probabilities.

Graph connections share spatial information; the LSTM summarizes each node’s history.

What did we learn, and what would we test next?

  1. What information did our daily channels preserve or discard?
  2. What did the LSTM comparison with simple references establish?
  3. Which research question would you explore next with maps, graphs or an activity score?

Deep learning offers flexible tools. Their scientific value depends on the question and the evidence.

Further exploration: optional reading and experiments · LSTM references and optional extensions

Appendix · MLP: combine values at fixed lag positions

Input: 30 days × 3 channels. Output: one weekly occurrence probability.

from tensorflow import keras

inputs = keras.Input(shape=(30, 3))
fixed_lags = keras.layers.Flatten()(inputs)
hidden = keras.layers.Dense(16, activation="relu")(fixed_lags)
probability = keras.layers.Dense(1, activation="sigmoid")(hidden)
model_mlp = keras.Model(inputs, probability)

Flatten gives 90 values at fixed lag positions; Dense learns nonlinear combinations.

Temporal notebook · Same catalogue channels and M ≥ 5 occurrence target over the next seven days

Appendix · CNN1D: share filters across neighbouring days

Input: 30 days × 3 channels. Output: one weekly occurrence probability.

from tensorflow import keras

inputs = keras.Input(shape=(30, 3))
local = keras.layers.Conv1D(
    16, kernel_size=3, padding="same", activation="relu")(inputs)
combined = keras.layers.Conv1D(
    16, kernel_size=3, padding="same", activation="relu")(local)
summary = keras.layers.GlobalAveragePooling1D()(combined)
probability = keras.layers.Dense(1, activation="sigmoid")(summary)
model_cnn1d = keras.Model(inputs, probability)

Conv1D scans time. A spatial CNN uses Conv2D to scan map neighbourhoods.

Temporal notebook · Width-three filters use all three channels; pooling summarizes responses across days

Appendix · the LSTM steps

Input: 30 days × 3 channels. Output: one weekly occurrence probability.

inputs = keras.Input(shape=(30, 3))
state = keras.layers.LSTM(16)(inputs)
probability = keras.layers.Dense(1, activation="sigmoid")(state)
model_lstm = keras.Model(inputs, probability)
model_lstm.compile(optimizer="adam", loss="binary_crossentropy")
history_lstm = model_lstm.fit(
    X_train, y_train, validation_data=(X_val, y_val),
    epochs=20, batch_size=64, callbacks=[stopping_lstm], shuffle=False)
p_lstm = model_lstm.predict(X_val).ravel()
brier = np.mean((p_lstm - y_val) ** 2)

Define the model · compile · fit · predict · evaluate probabilities

Appendix · conditional GAN: two networks, different outputs

G: conditions + noise → sequence. D: sequence + conditions → real/fake score.

Generator G

from tensorflow import keras
from tensorflow.keras import layers
noise = keras.Input(shape=(16,), name="noise")
conditions = keras.Input(
    shape=(5,), name="conditions")
g = layers.Concatenate()([noise, conditions])
g = layers.Dense(64, activation="relu")(g)
g = layers.Dense(128, activation="relu")(g)
generated = layers.Dense(
    224, activation="tanh")(g)
generator = keras.Model(
    [noise, conditions], generated, name="G")

Discriminator D

sequence = keras.Input(
    shape=(224,), name="sequence")
d = layers.Concatenate()([sequence, conditions])
d = layers.Dense(128, activation="relu")(d)
d = layers.Dense(64, activation="relu")(d)
real_score = layers.Dense(
    1, activation="sigmoid")(d)
discriminator = keras.Model(
    [sequence, conditions], real_score, name="D")

G produces 224 scaled values. D’s real/fake score is not an occurrence probability.

Small, untrained teaching example · Reduced conditional-GAN architecture; no thesis replication or performance claim

Appendix · GAN training alternates two updates

Pseudocode: the update logic below is explanatory, not executable Python.

for each batch of observed sequences and mainshock conditions:
    draw noise; generated = G(noise, conditions)
    keep G fixed
    D_loss = BCE(1, D(observed, conditions))
           + BCE(0, D(generated, conditions))
    update only D weights to reduce D_loss

    draw fresh noise; generated = G(noise, conditions)
    keep D weights fixed, but pass gradients through D
    G_loss = BCE(1, D(generated, conditions))
    update only G weights to reduce G_loss

After training: choose conditions, draw noise and use G to produce a candidate sequence.

BCE = binary cross-entropy · D learns labels real = 1 and generated = 0; G is updated toward D’s real label

Appendix · quantities and scientific meaning

Quantity Question answered
Process intensity At what conditional rate do events occur?
Magnitude How large is an event?
Shaking intensity What motion or effects occur at a location?
Risk What consequences may occur given exposure and vulnerability?

Today’s output is a probability of a defined occurrence event.

Appendix · ETAS-inspired feature experiment

r_t(s)=\sum_{t-L\le t_i<s}10^{\alpha(M_i-M_0)} \left(1+\frac{s-t_i}{c}\right)^{-p},\quad s\le t.

Illustrative: α=1, c=1 day, p=1.1, L=30 days.

Controlled comparison: both LSTMs use the same available history.

Representation: log1p(score) is an additional daily channel.

Optional representation experiment. The illustrative index is not a fitted ETAS rate.

Appendix · original generative examples

Original manuscript figure comparing observed and generated sequences for cGAN, WGAN-GP and GANT in two illustrative cases.

2026 manuscript under review · Original PI annotations use a mean-reference denominator · Illustrative cases

Appendix · evidence and availability

Check Meaning
Chronological, purged targets Future target intervals do not cross partitions.
Training-only normalization Later inputs do not set scaling parameters.
Frozen revised catalogue Data bytes and provenance are reproducible.
Historical catalogue vintages Not reconstructed.

Reproducibility and historical information availability are separate requirements.

Appendix · sources and further reading