Machine learning approaches to seismic event classification in the Ostrava region
Authors: Michael Skotnica, Marek Pecha, Jana Rušajová, Bohdan Rieznikov, Vít Wandrol, Markéta Rösnerová, Jaromír Knejzlík
Organizations: Institute of Geonics of the Czech Academy of Sciences, Ostrava, Czechia · Ullmanna, s.r.o., Opava, Czechia · VˇSB-Technical University of Ostrava, Czechia · Brno University of Technology, Czechia
The north-eastern part of the Czech Republic, including the Czech part of the Upper Silesian Coal Basin, is among the most seismically active areas of the country. The seismic stations in the region record mining-induced events, which continue after the cessation of mining, natural earthquakes, which are rare but may originate in the same area, and quarry blasts. A rapid and reliable distinction between the three types is required for the routine evaluation of the continuously recorded data. We study their automatic discrimination with neural networks from short three-component windows starting one second before the P-wave onset. The main data set is the archive of the Seismic Polygon Frenštát (1992--2002), a triggered network whose records were recovered from the original format, cleaned with deterministic and learned quality checks and completed with automatically picked P-wave arrivals; it contains about 40,000 records of all three event types. Among five compared architectures, convolutional networks operating on short-time spectrograms outperform recurrent networks operating on magnitude spectra or on the raw waveform. The best model, EfficientNet-B0 applied to 24-s windows, reaches a macro-averaged F1 score of 0.96, and blasts and natural earthquakes are practically never confused with each other; class weighting and undersampling, the usual remedies for the strong class imbalance, lower the score. Finally, we examine the transfer to the station OKC, which monitors the region today with different instruments. A model trained on the archive alone fails on the modern records, whereas a single model trained on both data sets reaches a macro-F1 score of 0.96 on the archive and 0.92 on the modern station, where the accuracy is limited by the small number of catalogued natural earthquakes rather than by the model.
Figures & tables
Figure 1: A map of the strongest earthquakes in the Northeastern region of the Czech Republic, the stations of the Seismic Polygon Frenštát (SPF), the Czech part of The Upper Silesian Coal Basin (light grey).
Code
Name
Lon ( ∘ E)
Lat ( ∘ N)
h (m)
TRO
Trojanovice
18.174
49.523
435
PST
Pstruží
18.326
49.575
461
PAL
Palkovické Hůrky
18.273
49.640
517
CEL
Čeladná
18.333
49.520
454
VYS
Vyšní Lhoty
18.476
49.637
456
Table 1: The coordinates of the stations from SPF.
Figure 2: Examples of corrupted SPF records detected by the deterministic checks: (a) a clipped signal (amplitude threshold), (b) a distorted signal with a prolonged high amplitude (near-saturation ratio), (c) a very weak signal with several unrealistic spikes (mean-concentration check).
2 transposed conv. layers + conv. projection to 3 channels
Loss / optimizer
Huber loss, AdamW (lr 10−3 , weight decay 10−5 )
Training
batch 128, 60 epochs, clean records only
Input corruption
Gaussian noise ( σ=0.01 ), feature dropout 2 %
Score / threshold
max. window error; 99th percentile of validation scores
Table 3: Architecture and training of the denoising autoencoder.
Removed
Event type
Events
Records
Quality checks
P-wave picking
Used
Tectonic (T)
2,516
12,580
4,292
6,424
1,864
Mining-induced (M)
14,144
70,720
18,331
15,915
36,474
Quarry blast (E)
639
3,195
831
863
1,501
Other
85
425
425 (excluded)
0
All
17,384
86,920
23,454
23,202
39,839
Table 4: Events of the SPF archive by type, the corresponding station records (five stations per event), the records removed by the quality checks of Sections 4.2 – 4.3 and by the P-wave picking of Section 4.4 , and the records used in this study. The 85 unclassified events were excluded by type.
Figure 3: Fan charts of the SPF waveforms of (a) mining-induced events, (b) quarry blasts and (c) natural tectonic events: median signal (solid line) and quantile bands (10–90 % and 25–75 %) of the z-score normalized Z, N and E components.
Model
Input
D [s]
Params
Macro-F1
F1 E
F1 M
F1 T
EfficientNet-B0
STFT
24
4.05 M
0.961 ± 0.002
0.946
0.996
0.941
Hybrid CNN–ViT
STFT
24
2.10 M
0.947 ± 0.002
0.922
0.994
0.923
LSTM
FFT
8
333 k
0.887 ± 0.005
0.822
0.988
0.851
LSTM-FCN
waveform
8
337 k
0.885 ± 0.005
0.809
0.989
0.858
LSTM + self-attention
FFT
8
399 k
0.833 ± 0.004
0.703
0.984
0.811
Table 5: Test-set performance of the final models (trained on 70 % of the events, evaluated on the held-out 30 %). Mean ± standard deviation over three training runs with different random seeds. D is the record duration, Acc. the overall accuracy, and the last columns give the per-class F1 scores.
E
M
T
Model
Prec.
Rec.
Prec.
Rec.
Prec.
Rec.
Acc.
EfficientNet-B0
0.956
0.936
0.995
0.996
0.948
0.933
0.991
Hybrid CNN–ViT
0.935
0.910
0.993
0.996
0.943
0.904
0.988
LSTM
0.858
0.789
0.984
0.993
0.906
0.803
0.976
LSTM-FCN
0.864
0.760
0.983
0.996
0.935
0.792
0.977
LSTM + self-attention
0.852
0.599
0.972
0.997
0.965
0.699
0.968
Table 6: Per-class precision and recall of the final models on the test split (mean over three seeds) and overall accuracy. For comparison, the majority-class baseline (every event labelled M) has an accuracy of 0.916 and a macro-F1 of 0.319.
Model
True
E^
M^
T^
EfficientNet-B0
E
421
27
2
M
13
10903
27
T
6
31
522
Hybrid CNN–ViT
E
410
36
4
M
20
10897
26
T
9
45
505
Table 7: Confusion matrices of the final models on the test split (450 E, 10,943 M, 559 T events), averaged over three seeds and rounded to whole events. Rows are true classes, columns predicted classes.
Configuration
Macro-F1
F1 E
F1 M
F1 T
(a) Record duration D
EfficientNet-B0, D=8 s
0.927 ± 0.006
0.926
0.992
0.864
EfficientNet-B0, D=16 s
0.947 ± 0.002
0.945
0.994
0.903
EfficientNet-B0, D=24 s
0.951 ± 0.000
0.940
0.995
0.919
Hybrid CNN–ViT, D=8 s
0.923 ± 0.006
0.920
0.991
0.857
Hybrid CNN–ViT, D=16 s
0.947 ± 0.002
0.936
0.994
0.912
Table 8: Model selection on the validation split: macro-F1 (mean ± std over three seeds) and per-class F1 for the design choices discussed in the text. Unless stated otherwise, models are trained without class weights, spectrogram models with log compression, and recurrent models on the linear magnitude spectrum.
Model
Parameters
Training [min]
Inference [events/s]
EfficientNet-B0
4,053,456
2.6
17,158
Hybrid CNN–ViT
2,098,182
1.4
17,758
LSTM
333,188
3.7
28,981
LSTM-FCN
336,646
3.2
24,190
LSTM + self-attention
399,492
5.0
16,835
Table 9: Computational cost of the final models: number of trainable parameters, wall-clock training time for 30 epochs, and inference throughput on the test split (11,952 events, including the on-the-fly spectral transform and data loading). Times are means over three runs, each executed alone on one GPU (NVIDIA RTX 5090) with four data-loading workers.
Training data
D [s]
OKC test
SPF test
Macro-F1
F1 E
F1 M
F1 T
Macro-F1
OKC only
16
0.915 ± 0.005
0.975
0.996
0.773
0.288 ± 0.014
SPF + OKC (pooled)
20
0.918 ± 0.007
0.975
0.996
0.783
0.961 ± 0.001
SPF, fine-tuned on OKC
20
0.864 ± 0.007
0.958
0.994
0.639
0.393 ± 0.021
SPF only (no OKC data)
20
0.387 ± 0.006
0.686
0.453
0.021
0.958 ± 0.001
Table 10: Ternary classification on the OKC test events (699 E, 5,379 M, 46 T) with EfficientNet-B0 trained in four ways; mean ± std over three seeds. “SPF test” is the same model evaluated on the SPF part of the test split (450 E, 10,942 M, 559 T). The record length D is the one selected on the validation split for each strategy; fine-tuning starts from the SPF-only model and continues on the OKC training events for 15 epochs at a learning rate of 10−4 .
Training data
D [s]
Macro-F1 (OKC)
F1 T (OKC)
T recognised
OKC only
8
0.840 ± 0.015
0.601
11 / 21
OKC only
16
0.898 ± 0.008
0.748
15 / 21
OKC only
20
0.892 ± 0.004
0.736
15 / 21
SPF + OKC
8
0.873 ± 0.017
0.691
13 / 21
SPF + OKC
16
0.891 ± 0.005
0.724
15 / 21
SPF + OKC
20
0.914 ± 0.009
0.789
16 / 21
Table 11: Model selection for the OKC station: macro-F1 of EfficientNet-B0 on the OKC part of the validation split as a function of the record length D and of the training data (selection runs, trained on the training split only; mean ± std over three seeds). The last column gives the number of the 21 OKC tectonic validation events that are recognised (rounded mean over the seeds).
Model
True
E^
M^
T^
SPF + OKC (pooled)
E
674
23
2
M
7
5370
2
T
2
12
32
SPF only
E
473
43
182
M
216
1595
3568
T
2
4
39
Table 12: Confusion matrices on the OKC test events (rows: true class, columns: predicted; averaged over three seeds and rounded) for the pooled model and for the SPF-only model applied to OKC without any OKC training data.
Training data
Filter
SPF test
OKC test
M → T (OKC)
SPF only
none
0.958±0.001
0.387±0.006
3,568
SPF only
0.5 Hz
0.960±0.001
0.607±0.008
573
OKC only
none
–
0.915±0.005
4
OKC only
0.5 Hz
–
0.929±0.005
1
SPF + OKC
none
0.961±0.001
0.918±0.007
2
SPF + OKC
0.5 Hz
0.962±0.000
0.931±0.005
2
Table 13: Effect of a high-pass filter (0.5 Hz) applied to both data sets before normalization: macro-F1 of the final EfficientNet-B0 models ( D=20 s) on the SPF and on the OKC part of the test split, mean ± std over three seeds, and the number of the 5,379 OKC mining-induced test events labelled as tectonic. The unfiltered OKC-only model is the 16-s model of Table 10 .
Rapid earthquake magnitude estimation is crucial for effective early warning systems that can save lives and reduce economic damage. In this paper, we present a comprehensive study of magnitude classification using only the vertical component of the initial 7-second P-wave window from a single station. We compare six machine learning approaches that range from traditional models to state-of-the-art deep learning architectures. We also curated a novel dataset of 7,318 earthquake events in South Asia. The dataset was categorized into five Richter-scale classes: slight (3.0-3.9), light (4.0-4.9), moderate (5.0-5.9), strong (6.0-6.9) and severe (>= 7.0). Our experiments show that deep learning models substantially outperform traditional approaches. Our Transformer based architecture achieved 76.23% standard accuracy and 81.56% adaptive accuracy with 4.8 ms inference latency. The adaptive-accuracy metric is introduced for the inherent uncertainty in magnitude estimation of near class boundaries. These results indicate that the attention mechanisms in Transformers combined with adaptive classification effectively capture the temporal dynamics of seismic signals. The architectural advantage facilitates promising generalization to rare high-magnitude events, despite the inherent data scarcity characteristic of seismic catalogs. The adaptive accuracy provides a more realistic assessment of model performance, and the result suggests viability for real-time deployment.
Earthquake catalogs underpin studies such as fault structure, earthquake processes and seismic hazard, and their value depends on being both complete and reliable. Machine learning has improved individual tasks of earthquake monitoring, but processing stations independently discards the consistency of arrivals across the network, and running tasks in sequence fragments the information describing each earthquake. We present EQNet2, a geometry-aware multi-station Transformer that jointly predicts phase arrivals, first-motion polarities, source location and magnitude, and the association of arrivals into events. On a Northern California test dataset and on continuous waveforms from Ridgecrest and the San Francisco Bay Area, EQNet2 recovers more weak arrivals, produces fewer false detections, and associates more picks into located events. Its learned attention links information across stations along time--distance patterns consistent with seismic moveout. As seismic networks grow denser, exploiting multi-station coherence and event-centric prediction offers a path to more complete and reliable catalogs.
Haoyu Wang, Weiqiang Zhu
Department of Earth & Planetary Science, University of California, Berkeley · Berkeley Seismology Laboratory, University of California, Berkeley
Earthquake sequences are stochastic on two separated timescales: the seismic waves of any individual earthquake propagate over seconds to minutes, while the earthquakes themselves arrive as a sparse, self-exciting occurrence process, with inter-event intervals from seconds to months. Respecting both scales in one training objective is the open challenge. Foundation models (FMs) for seismic waveforms instead import their learning targets from audio and vision, where every target is computed from a single fixed-length window. Such a window holds one realization of the wave propagation (an earthquake trace), never the occurrence process that decides when earthquakes happen. We develop nine model designs sharing one Mamba encoder-decoder, trained on a fixed corpus of 3M windows, varying the self-supervised objective, quantization bottleneck and mixer; the two key comparisons are architecture-matched, varying the objective alone. Each checkpoint is evaluated frozen on three downstream tasks. Varying the target redistributes downstream skill rather than raising it, and no checkpoint wins everywhere. Adding masking pressure to our strongest classifier re-specializes it rather than making it a generalist: it gains 6.9 points of few-shot P-wave picking precision and loses 9.6 points of few-shot classification accuracy. By the standard imported from language and vision, these models are feature extractors rather than FMs. Controls on capacity, architecture, and domain proximity do not explain why skill moves rather than rises. Against task-specific baselines the advantage is regime-dependent: our checkpoints beat them few-shot on classification and ground-motion prediction, and trail them on full data. We argue the binding constraint is the target, and that settling the question requires a learning target defined across events, the timescale that makes seismicity stochastic in the first place.
Laura Laurenti, David Liu, Brian Kulis +2
Institute of Geophysics, ETH Zurich · Swiss Seismological Service, ETH Zurich · Dept. of Computer Science, Boston University +2