Source-linked AI summary
SeisBench -- A Toolbox for Machine Learning in Seismology
Jack Woollam, Jannes Münchmeyer, Frederik Tilmann, Andreas Rietbrock, Dietrich Lange, Thomas Bornstein, Tobias Diehl, Carlo Giunchi, Florian Haslinger, Dario Jozinović, Alberto Michelini, Joachim Saul, Hugo Soto
TL;DR
Seismology needs quality-controlled benchmark datasets and common model implementations to make ML methods easier to compare and deploy. SeisBench provides an open-source interface for models, datasets, processing, and augmentation, reducing barriers for practitioners and experts. Its scope includes integrated datasets with metadata and class-distribution limitations that users must consider.
Problem
Different datasets, frameworks, metrics, and formats make ML model comparison and deployment difficult in seismology.
Method
SeisBench is an extensible open-source framework providing standardized access to seismological ML models and benchmark datasets through a common API.
Results
SeisBench integrates literature-based benchmark datasets, models with corresponding weights, and common processing and augmentation workflows for training, application, and comparison.
Takeaways & Limitations
Users can apply and benchmark seismological ML models through a shared interface rather than separately integrating datasets, frameworks, and model implementations.
Takeaways & Limitations
Some integrated datasets lack original station metadata and may overlap in waveforms or metadata, while GEOFON has unevenly represented picked phases.
Abstract
from arXiv · showhide
Machine Learning (ML) methods have seen widespread adoption in seismology in recent years. The ability of these techniques to efficiently infer the statistical properties of large datasets often provides significant improvements over traditional techniques. With the entire spectrum of seismological tasks, e.g., seismic picking, source property estimation, ground motion prediction, hypocentre determination; among others, now incorporating ML approaches, numerous models are emerging as these techniques are further adopted within seismology. To evaluate these algorithms, quality controlled benchmark datasets that contain representative class distributions are vital. In addition to this, models require implementation through a common framework to facilitate comparison. Accessing these various benchmark datasets for training and implementing the standardization of models is currently a time-consuming process, hindering further advancement of ML techniques within seismology. These development bottlenecks also affect "practitioners" seeking to deploy the latest models on seismic data, without having to necessarily learn entirely new ML frameworks to perform this task. We present SeisBench as a software package to tackle these issues. SeisBench is an open-source framework for deploying ML in seismology. SeisBench standardises access to both models and datasets, whilst also providing a range of common processing and data augmentation operations through the API. Through SeisBench, users can access several seismological ML models and benchmark datasets available in the literature via a single interface. SeisBench is built to be extensible, with community involvement encouraged to expand the package. Having such frameworks available for accessing leading ML models forms an essential tool for seismologists seeking to iterate and apply the next generation of ML techniques to seismic data.
1 Introduction
Seismology’s expanding datasets have driven rapid ML adoption, but comparing models remains difficult because studies use different data, frameworks, and metrics. SeisBench addresses these bottlenecks through an open-source package for standardized access to models and benchmark datasets.
- Motivation: Growing seismic datasets and improved computational resources have enabled ML methods to achieve strong performance across seismological tasks.ML methods probabilistically model dataset statistics to perform task-specific inference.
- Comparison challenge: Different datasets, ML frameworks, and assessment metrics make it difficult to determine which techniques perform best for each seismological task.Regional and environmental differences can prevent direct comparison between models trained on different data.
- Benchmarking: Benchmark datasets support fair comparison across environments, but creating quality-controlled datasets requires substantial time.They also improve comparability between studies and accelerate testing of novel algorithms.
- Comparison challenge: Differing benchmark formats and implementation libraries introduce additional discrepancies that benchmarking must control.Operations across PyTorch, TensorFlow, Keras, and Scikit-learn need to be checked for direct comparability.
- Contribution: Standardized access to benchmark datasets and leading models is presented as a crucial ingredient for advancing the state of the art.SeisBench follows comparable tools developed in other ML application domains.
- Contribution: Seismology lacked a common toolbox, leaving practitioners and experts with significant integration and comparison work that hindered broader ML adoption and progress.SeisBench was built as an open-source package to address these issues.
2 The SeisBench ML framework
SeisBench unifies seismological ML models, benchmark datasets, and processing operations through common interfaces and formats. Its extensible design supports comparisons across seismic environments and broader waveform-based tasks.
- Unified framework: SeisBench integrates published and custom benchmark datasets with ML models through a unified point of access.The initial release directly integrates literature datasets and provides access to additional custom benchmarks.
- Unified framework: Common dataset formats and model interfaces enable algorithm comparison across global and local seismic environments.Traditional methods can also be deployed alongside deep learning models in comparison workflows.
- Processing and augmentation: The framework includes an augmentation API that standardizes preprocessing and data augmentation operations for training pipelines.These operations include commonly repeated preprocessing and augmentation steps such as adding waveform noise.
- Extensibility: SeisBench supports broader waveform-based seismological tasks by allowing dataset metadata parameters to serve as supervised learning targets.Although the included models initially focus on picking and event detection, the API is designed for tasks including source and magnitude estimation and ground-motion prediction.
- Standardized data format: Waveforms are stored in HDF5 and indexed by lookup keys, while associated labels and metadata use a CSV table with standardized parameter names.The metadata structure permits specialized fields and supports custom querying and waveform extraction pipelines.
- Dataset integration: Converted datasets are exposed through dataset-specific classes built on a common interface for filtering metadata and obtaining waveforms.The initial collection spans seismic arrivals from local to global scales, although some datasets lack station or source information and some may overlap through shared SCEDC data.
3 Models
SeisBench provides an extensible model interface for applying seismological ML models to waveform data. Its initial release integrates literature models through PyTorch, including original and dataset-specific weights where available.
- The model interface supports applying diverse models to waveform-based seismic tasks through an extensible framework.
- SeisBench integrates literature models with PyTorch and provides original training weights where possible, alongside weights trained on included datasets.
- The initial model collection includes BasicPhaseAE, CRED, DPP, GPD, and PhaseNet.
4 Training data generation pipeline
SeisBench standardizes training-data preparation through a modular generation API. Its processing and augmentation blocks can be combined flexibly and reused across compatible datasets.
- Training pipelines typically preprocess traces, encode labels, and augment examples to increase waveform variability.Examples include truncating traces, normalization, and adding noise.
- The generate API combines reusable blocks for window selection, label definition, normalization, and standard data augmentation.Custom routines can also be added when needed.
- Because the generate API relies on the abstract data API, the same augmentations can be applied across SeisBench-compatible datasets with minimal code changes.
5 Example workflows - Using SeisBench benchmark datasets and models
SeisBench supports workflows for applying pretrained models, training and transfer learning, and benchmarking models across datasets. These workflows expose seismic ML operations through a common API, while pretrained performance may depend on weight-data matching.
- Workflow 1: The API lets practitioners apply pretrained EQTransformer and GPD models to seismic streams with only a few commands.Model weights are downloaded when needed and cached for repeat use.
- Workflow 1: Figure 5 displays model picks and output characteristic functions, with EQTransformer event detections shown as shaded regions.The GPD example includes a spurious S-pick before the event onset.
- Workflow 1: The model results shown with original weights may not represent optimum performance when application-matched training data could improve the models.
- Workflow 2: SeisBench combines data, generate, and model modules to train PhaseNet on the INSTANCE dataset.
- Workflow 2: Transfer learning requires changing the imported dataset or model, while pretrained models are loaded through the from_pretrained method.
- Workflow 3: SeisBench enables comparison pipelines for evaluating newly proposed algorithms against existing state-of-the-art routines.The authors provide benchmark code as a template for future studies.
6 Extensibility
SeisBench is released as extensible open-source software and invites community contributions. Its framework is intended to accommodate additional models and waveform-based seismological tasks as the field expands.
- The API is released under GPLv3, is designed for extension, and encourages users to contribute datasets and models through GitHub.
- SeisBench can support tasks such as hypocentre determination, source parameter estimation, and magnitude estimation when suitable metadata labels are available.
- Once models for a task are integrated, their processing routines can be reused to compare them with existing state-of-the-art models.The paper presents this reuse as supporting further ML innovation in seismology.
7 Conclusions
SeisBench is an open-source Python package that reduces barriers to applying, benchmarking, and training machine-learning models on seismic data. It provides common access to benchmark datasets and integrated models and weights through an extensible framework.
- SeisBench provides practitioners and experts a common framework for applying, benchmarking, and training machine-learning algorithms on seismic data.It is designed to reduce barriers for users deploying models and researchers comparing or developing algorithms.
- The package offers downloadable benchmark datasets through a common interface for machine learning in seismology.
- SeisBench integrates state-of-the-art seismic models and corresponding weights through a common access point.
- The initial release includes picking models, while the framework also applies to waveform-analysis tasks such as location and magnitude estimation.
- The framework is intended to support iteration and deployment of models while advancing machine-learning development in seismology.