A Deep Multi-scale Dilated Convolutional Network with Attention for Earthquake Magnitude Classification
MSDCA — a multi-scale dilated CNN with an attention mechanism that classifies the magnitude of Himalayan earthquakes from raw spatio-temporal seismic features, capturing local and global patterns at several receptive-field scales simultaneously.
Authors: Parisa Kavianpour¹, Mohammadreza Kavianpour², Amin Ramezani² *
¹ Faculty of Engineering and Technology, University of Mazandaran, Babolsar, Iran ² Department of Electrical and Computer Engineering, Tarbiat Modares University, Tehran, Iran * Corresponding author
Published in the 2022 8th International Conference on Signal Processing and Intelligent Systems (ICSPIS), IEEE. DOI: 10.1109/ICSPIS56952.2022.10043978
A conventional CNN uses a single kernel size and keeps only the last layer's feature maps, so it sees one receptive field and discards multi-level detail — a poor fit for the chaotic, multi-scale structure of seismic data. MSDCA runs three parallel dilated-convolution branches with different kernel sizes, lets an attention mechanism weight each scale by importance, and concatenates the result for classification. On Himalayan seismic records (1920–2022) it classifies earthquake magnitude into four bins with 98.08 % accuracy, beating ML baselines and ablated variants.
The three core ideas:
- Multi-scale feature extraction. Three parallel branches with kernels 3×1, 5×1, 7×1 capture features at different receptive fields, then concatenate — richer than any single-scale CNN.
- Dilated convolution. Each branch stacks dilated convolutions (rates 2, 3, 5) to widen the receptive field without adding parameters.
- Attention over scales. An attention layer at the end of each branch learns how much each scale should contribute, suppressing irrelevant/redundant features.
Note
Documentation & resources only. This repository currently contains documentation, the dataset description, and figures extracted from the paper — a curated showcase of the published work. The training/inference source code is not yet public (see the Roadmap). If you need details beyond what is documented here, please reach out or cite the paper.
MSDCA has two modules: a feature extractor and a classifier. The input first passes a large-kernel convolution + pooling to dampen high-frequency noise. It then splits into three parallel multi-scale branches (MS1, MS2, MS3), each a stack of dilated convolutions + BN + ReLU + max-pooling, ending in an attention layer and a flatten. The three branch outputs are concatenated and sent to a single fully-connected layer and a softmax for four-class magnitude classification.
Structure of the proposed MSDCA method (Fig. 2 in the paper). Three parallel dilated-conv branches with kernels 3×1 / 5×1 / 7×1, each ending in an attention mechanism, then concatenation → FC(128) → softmax. © 2022 IEEE — see LICENSE.
Full layer parameters, the dilated-convolution and attention equations, and the training setup are in docs/method.md.
| Challenge | Why it breaks ordinary models | How MSDCA responds |
|---|---|---|
| Earthquakes are chaotic & nonlinear | Precursors are hard to measure and variables are nonlinearly coupled, so hand-crafted features are unreliable. | End-to-end deep network learns features directly from raw spatio-temporal data. |
| A single kernel sees one scale | Narrow kernels capture a small receptive field, wide kernels a large one; one fixed size yields incomplete information. | Three parallel branches with different kernel sizes extract complementary multi-scale features. |
| Low-level features get discarded | Conventional CNNs use only the last layer's maps before flattening, dropping detail that still matters for classification. | Multi-scale, cross-layer design preserves and combines features from several levels. |
| Not all features matter equally | Treating every feature as equally important lets redundant/irrelevant information drag accuracy down. | An attention mechanism weights each scale's contribution, emphasizing critical information. |
| Widening the receptive field is costly | Larger kernels mean more parameters and overfitting risk. | Dilated convolution expands the receptive field while keeping the parameter count fixed. |
1. Dilated convolution — bigger receptive field, same parameters. Dilated ("atrous") convolution inserts holes between kernel elements, controlled by a dilation rate. Rate = 1 is ordinary convolution; higher rates cover a wider span without more weights. MSDCA stacks rates 2, 3, 5 inside each branch.
Effect of dilation rate on a 3×3 kernel's receptive field (Fig. 1 in the paper). © 2022 IEEE.
2. Multi-scale branches + attention. Three branches with different kernel sizes view the same input at different scales; an attention layer at the end of each branch assigns weights so the network focuses on the most informative scale, and the weighted outputs are concatenated before classification.
The task is four-class magnitude classification (see docs/datasets.md). MSDCA is compared against ML baselines (SVM, KNN, RF) and ablated deep variants (plain CNN, CNN+AM, MDCNN without attention), using accuracy, precision, recall, and F1.
| Method | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| SVM | 90.35 | 93.42 | 90.65 | 91.04 |
| KNN | 89.44 | 91.32 | 89.52 | 90.06 |
| RF | 87.34 | 86.66 | 85.52 | 86.08 |
| CNN | 95.52 | 92.63 | 94.71 | 93.65 |
| CNN + AM | 96.17 | 97.56 | 95.82 | 96.68 |
| MDCNN | 97.61 | 92.83 | 96.36 | 94.56 |
| MSDCA (proposed) | 98.08 | 96.56 | 96.59 | 96.58 |
Comparison and ablation (Table II in the paper). MSDCA has the highest accuracy and the most stable overall performance.
The per-class confusion matrix confirms stable behavior across all four magnitude bins (minimum per-class accuracy ≈ 96.6 %):
Confusion matrix of the proposed method (Fig. 3 in the paper). © 2022 IEEE.
Each experiment was averaged over five runs to limit randomness.
| Source | U.S. Geological Survey (USGS) seismic catalog |
| Region | Himalayas and adjacent regions (25N–40N, 70E–100E) |
| Period | 1920–2022 |
| Input features | Time + spatial parameters (timestamp in seconds, longitude, latitude, depth) |
| Output | Earthquake magnitude class (4 bins) |
| Samples | 2000 per class (via overlap), 80 % train / 20 % test |
| Preprocessing | Min–Max standardization |
Magnitude bins: C1 (M ≤ 4), C2 (4 < M ≤ 4.5), C3 (4.5 < M ≤ 5), C4 (M > 5). Full details in docs/datasets.md.
Earthquake-Magnitude-Classification-MSDCA/
├── README.md
├── assets/ ← key figures extracted from the paper (© IEEE)
│ ├── msdca_architecture.png
│ ├── dilated_convolution.png
│ └── confusion_matrix.png
├── docs/
│ ├── method.md ← full method, layer table, training setup
│ ├── challenges.md ← the real-world problems this work targets
│ └── datasets.md ← USGS Himalaya data, classes, task design
├── CITATION.cff
├── .gitignore
└── LICENSE ← CC BY 4.0 for docs + IEEE copyright note for figures
- Public documentation of the method, challenges, and dataset
- Key figures extracted from the paper
- Machine-readable citation (
CITATION.cff) - Release training / inference source code
- Data preprocessing & catalog-building scripts
- Pretrained weights
- Reproduction guide (environment + commands)
The code is not yet public. This repo will be updated as components are released.
@inproceedings{kavianpour2022msdca,
title = {Deep Multi-scale Dilated Convolution Neural Network with Attention Mechanism: A Novel Method for Earthquake Magnitude Classification},
author = {Kavianpour, Parisa and Kavianpour, Mohammadreza and Ramezani, Amin},
booktitle = {2022 8th International Conference on Signal Processing and Intelligent Systems (ICSPIS)},
year = {2022},
publisher = {IEEE},
doi = {10.1109/ICSPIS56952.2022.10043978}
}- Documentation in this repository (all
.mdfiles and text) is released under CC BY 4.0. - Figures in
assets/are reproduced from the published IEEE paper and remain © 2022 IEEE. They are included for scholarly, non-commercial showcase purposes under the authors' rights and academic fair-use conventions, and are not covered by the CC BY 4.0 license above. Any reuse must follow IEEE's copyright and reuse policy. See LICENSE for the full notice.


