Sismik Analiz.
A negative result is still a finding.
Can past earthquake magnitudes alone predict the next magnitude?
The right question. The right metric.
I examined whether past earthquake magnitudes alone can predict the next magnitude using deep learning.
My contribution.
Bi-LSTM and attention LSTM in PyTorch.
This setup cannot predict magnitude.
Both models showed low explanatory power on the test set. Past magnitudes alone do not appear sufficient to predict the next earthquake’s magnitude.
What I learned.
Preventing data leakage matters more than a flattering score.
Tech stack.
Python
PyTorch
Jupyter
- Bi-LSTM
- Attention
Technical notes and project scope
The problem and my role
Earthquake records form a time series, and time-series forecasting has well-known architectures. The question was whether those architectures could predict the next magnitude from past magnitudes alone.
My own notebook in this four-person team is PyTorch-based. The TensorFlow and Bi-GRU work in the team repository belongs to other members; I do not present it as mine.
Implementation decisions
- I split a 31,915-record dataset into 20-step windows.
- I built two models in PyTorch: a bidirectional LSTM and an attention-based LSTM.
- I measured success with R² rather than accuracy — accuracy is a meaningless metric when predicting a continuous value.
Outcome and learning
Bi-LSTM R² = 0.10, attention LSTM R² = 0.02. Both models fail to explain nearly any of the variance. Conclusion: a univariate setup cannot predict earthquake magnitude.
Inflating these numbers would have been easy — overlap the windows and let train and test leak into each other, or swap the metric for accuracy. Either would have produced a handsome chart, and either would have been a lie. Showing that a model does not work is itself a finding; the real engineering is refusing to dress up a null result as a success.