
Overview01
The pipeline detects a quake, locates it, sizes it and sends an alert. Each result is reported with its classic-seismology baseline, a 95% confidence interval and a replay of real days the system never trained on.
SeismicSoCal trains on 26 years of Southern California data (USGS catalogue + SCEDC waveforms, 2000 → 2026): 6,243 quakes (M2.0–7.1) for sizing and 50,743 detection windows, including 2,062 hard negatives: real live-stream noise that once fooled a detector. Every split is chronological. A SeedLink daemon runs the same engine 24/7 on a free Oracle VM, and a monthly MLOps loop decides whether a retrained model is allowed to replace the live one.
- 01
Built the detector as a CNN → Transformer on the 19 stations that actually stream, with the P-wave anywhere in the window and real live-noise false triggers as hard negatives: ROC-AUC 0.9998 (95% CI 0.9997–0.9999) vs. 0.816 for STA/LTA on 7,303 held-out windows.
- 02
Sized quakes with a CNN → GNN → Transformer over the station graph: R² 0.951, MAE 0.10 on 937 held-out quakes vs. 0.886 for amplitude + distance; a 10-seed study separates seed variance from sampling variance.
- 03
Made a replay of 80 archived days the acceptance test: 145 push alerts and every one a real quake (time-shifted chance baseline 0%), pushed sizes within MAE 0.12 of the catalogue, median location error 3–4 km.
- 04
Estimated the shaking at each user's home (Modified Mercalli intensity) from magnitude, distance, ground type and a per-quake correction, validated on USGS "Did You Feel It?" reports: MAE 0.42 levels, 94% within one level on 28 held-out quakes, with the home location never leaving the phone.
- 05
Built QuakeOps: MLflow tracking and a champion/challenger registry, a Dagster retrain job, a six-rule statistical + replay promotion gate, Evidently drift checks and GitHub Actions deploys.
Scope: research demonstration, not an official warning system. It detects quakes after they begin and alerts within tens of seconds; it does not predict them.
Results vs. classical seismology02
Deep beats classical on both tasks, and the confidence intervals don't overlap.
| Task | Architecture | Deep model (95% CI) | Classical baseline |
|---|---|---|---|
| Detect: is it a quake? | CNN → Transformer, single station, 30 s | AUC 0.9998 (0.9997–0.9999), MCC 0.886 | STA/LTA 0.816 (0.805–0.828) |
| Size: how big? | CNN → GNN → Transformer, multi-station | R² 0.951 (0.943–0.959), MAE 0.10 | amp + distance 0.886 (0.871–0.898) |
| Quick check: worth a first alert? | median of a·log peak + b·log dist + c, first 4 s of P | MAE 0.24; passes 93% of M3+, 1.1% of <M2.5 | n/a (it is the classic formula) |
Detect, in plain English
Every 2 seconds each sensor hands the model its last 30 seconds of ground motion, and the model decides whether an earthquake is in it or just traffic, wind or sensor noise. It works wherever the quake starts in the window (AUC 0.9997 / 0.9999 / 0.9997 with the P-wave at 2 / 12 / 22 s), and train, validation and test AUC match, so it isn't memorising.

Near-perfect wherever the quake starts in the window.
False triggers at the live threshold
The live trigger is 0.6, not the checkpoint's MCC-optimal 0.9987, so both are reported. A per-window trigger still isn't an alert: it also needs a clean pick and two more stations that locate the same source.
| Threshold | Test noise (n = 2,339) | Held-out live noise, Oct 2–5 (n = 397) | Event windows caught |
|---|---|---|---|
| 0.6 (live trigger) | 1.41% | 0.25% | 99.6% |
| 0.9987 (checkpoint MCC) | 0.00% | 0.25% | 91.9% |
Size, technically
Each station's 3-component window is normalised to unit peak, so the CNN reads shape; its log peak velocity and log distance from the located epicentre are graph-node features, so the graph reads size. Two graph-convolution layers over the 19-station network (Gaussian distance weights, σ = 50 km) and a Transformer across stations feed the head. Training jitters the epicentre by ~8 km and the picks by ±0.5 s and drops stations at random, so it learns under live conditions.

Take away the graph and it loses to the classic formula.
Seed variance vs. sampling variance
| Magnitude model (937 held-out quakes) | R² | 95% CI |
|---|---|---|
| Single model, mean over 10 seeds | 0.949 | 0.948–0.951 (t-interval over seeds) |
| 10-seed ensemble | 0.952 | 0.944–0.959 (event bootstrap) |
| Live 5-seed ensemble | 0.951 | 0.943–0.959 |
| Amplitude + distance baseline | 0.886 | 0.871–0.898 |
| Ensemble − baseline (paired) | +0.067 | +0.056 … +0.079 |
The deep model's lead over the baseline is about 6× the width of either uncertainty. Ensembling adds only +0.003, well inside the sampling CI, so the live system keeps 5 seeds rather than 10.
The live pipeline & alerts03
The models run continuously on a live SeedLink stream with USGS out of the loop, and everything
runs on waveform (data) time, never wall-clock time. The same module, pipeline.py, runs live and in the
replay harness.
Every first notice is followed by a confirmation or a retraction that replaces it.
Why three stations
With 3 picks, latitude, longitude and origin time are exactly determined, so a low misfit proves nothing on its own. The locator also uses negative evidence: a real quake reaches nearer stations first, so a solution whose closer stations stayed quiet is coincident noise. One or two stations become a tentative event: logged, never pushed. Requiring four stations was tested on validation days: it confirmed 31 events instead of 86 and missed a real out-of-network M3.6 that three stations caught.
Two-stage alerts, with a speed the user picks
Five variants of the first message were replayed over 20 days, and the speed trade-off is now a setting the user picks:
| First-message variant | Test days: sent / real M2.5+ / retracted / no quake | Median after origin | Quick-size MAE |
|---|---|---|---|
| Standard (4 s of P, full response removal) | 6 / 6 / 1 / 0 | 33.4 s | 0.21 |
| 4 s, sensitivity-scaled (not offered) | 6 / 6 / 1 / 0 | 27.7 s | 0.20 |
| Fast (2 s of P, sensitivity-scaled) | 7 / 6 / 2 / 0 | 25.9 s | 0.26 |
| Push on location alone (rejected) | 72 / 8 / 67 / 5 | 25.6 s | – |
Pushing on location alone would mean about 7 first messages a day, nearly all retracted. Both stages carry the same notification tag, so the confirmation ("Mx.x earthquake confirmed", with the distance and expected shaking) or the retraction ("Update: smaller quake… you can disregard the earlier alert") replaces the first message in the tray.
Where it can see, and who gets alerted


Users follow stations, not a location. A device is alerted when a confirmed quake is within 150 km of a station it follows, with the distance measured from the located epicentre to that station.
Shaking at your home (MMI)04
A magnitude and a distance don't tell someone what they felt. For every quake, the current one in a push and every past one in the quake list, the app estimates the shaking at the user's home as a Modified Mercalli Intensity level (I–X, e.g. "Light: felt indoors; dishes and windows rattle"). It's an estimate from the physics and our own sensors, not a measurement at the house.
Validated against people's reports
USGS "Did You Feel It?" collects what people report feeling. The DYFI offset was fitted on the older 29 Southern California M3.5+ quakes and the result scored once on the newer 28 quakes (1,892 report cells):
| Held out: 28 quakes, 1,892 cells | MAE (MMI levels) | Within one level |
|---|---|---|
| This model | 0.42 | 94% |
| Without the DYFI offset | 0.68 | – |
| Without the ground-type term | 0.40 | – |
Reported honestly: the ground-type term gave no measurable gain on these reports (a 10 km report cell averages many kinds of ground). It stays because it's physically right and fitted from our own records, but it isn't what makes the estimate work. Error is flat with distance.
One set of equations, three implementations

Every quake is checked against what the live system actually caught.
Acceptance test: a replay of 80 held-out days05
A test AUC alone doesn't say whether a live system can be trusted, so the acceptance test is a replay: the exact live engine runs over archived continuous data. Thresholds were calibrated on separate validation days, then frozen and scored once on 80 held-out days (Apr 2022 – Aug 2026): 60 days with an M3+ quake in coverage and 20 random days. Every precision is reported next to a chance baseline: the same declarations shifted by an hour.
| 80 held-out days | Result |
|---|---|
| Push alerts | 145; 133 matched a catalogued M2.5+ within 60 km. The other 12 were also real quakes, outside the network and placed 63–145 km off. None was for a quake that didn't happen (chance baseline 0%). |
| Confirmed events that were real | 86% on busy days, 79% on random days (chance 4% / 0%); about 7 false confirmations a week, logged and never pushed |
| First message → confirmation | Standard ~31 s, Fast ~25 s, confirmation ~50 s after the quake begins |
| First messages later retracted | Standard 28%, Fast 36%: the faster setting retracts more, and the confirmation replaces the first message either way |
How do you know an alert from this thing is real?
It replayed 80 archived days it never trained on. 145 pushes, and every one was a real quake.
And how many quakes did it miss?
About a third of M3+ overall, mostly inside aftershock swarms. Isolated M3+ with sensors up: 83% caught.
Catch rate, and where the misses are
| Catalogued quakes in coverage | M1–1.5 | M1.5–2 | M2–2.5 | M2.5–3 | M3+ | M2+ |
|---|---|---|---|---|---|---|
| Caught | 9% | 29% | 41% | 60% | 68% (CI 60–74%) | 52% |
- By situation: with at least 3 stations online, 83% of isolated M3+ quakes were caught (86% in good coverage, 80% where it's thin), against 60% inside rapid sequences. For most missed sequence quakes a neighbour within 10 minutes and 50 km was caught, so the area was still alerted.
- All 58 missed M3+, classified: 27 came back-to-back with another quake nearby, 16 happened while fewer than 3 stations had data in the archive, 7 were seen but not confirmed, and 8 weren't seen; most of those last ones sit where coverage is thinnest (Imperial Valley and the Salton Sea).
- Below M2 is outside the magnitude training range; those sizes read slightly high but stay under the M3 push floor.
Catching more quakes in swarms
Most misses were a second quake absorbed into the first: an echo window (a new event this close to a declared one counts as its coda) and a station rest period (no new pick this soon after the last) hid it. I swept 32 configurations on validation days only (12 swarm days, including Ridgecrest 2019, plus 10 quiet days), with an adoption rule fixed in advance: raise the catch rate with no more duplicates and no more quiet-day false detections.
| Validation swarm days | Before (120 s / 60 s) | Adopted (30 s / 45 s) |
|---|---|---|
| M3+ caught | 40.0% | 59.1% |
| M2+ caught | 32.4% | 45.4% |
| Confirmed events that were real | 76.5% | 75.2% |
| Duplicates / quiet-day false detections per week | 0 / 13.3 | 0 / 13.3 |
Configurations that caught more (up to 84% of M3+) were rejected because every one added false detections or duplicates. Scored once on the 80 held-out days, the adopted setting raised M3+ catch from 71% to 78% (detection-only scoring) with no duplicates and precision 85% → 84%. It went live on Oct 7, 2026.
Shadow mode before alerts
After going live the system runs in shadow mode: it detects, locates, sizes and logs everything but sends no pushes. A nightly job scores the live log against USGS in three tiers (confirmed, pushed, tentative), each with its own chance baseline. Pushes are switched on only once confirmed precision on live data clearly beats chance and pushed magnitudes match the catalogue.
QuakeOps: retraining, promotion gate and drift06
QuakeOps handles retraining, promotion and drift monitoring. A retrained model can only replace the live one by proving, statistically and on replayed days, that it's at least as good.
| Rule | Detect | Size |
|---|---|---|
| G1 beats the classic baseline | paired ΔAUC vs STA/LTA, CI low > 0 | paired ΔR² vs amp + dist, CI low > 0 |
| G2 non-inferior to the champion | ΔAUC ≥ −0.001; ΔMCC ≥ −0.02; false triggers at the live 0.6 ≤ champion + 0.5 pp | ΔR² ≥ −0.01 and CI high ≥ 0; ΔMAE ≤ +0.01 |
| G3 replay acceptance | precision ≥ 0.85 and ≥ chance + 0.5; no false pushes; M3 recall ≥ champion | same push checks; event-centric MAE ≤ champion + 0.02 |
| G4 tests | pytest + daemon selftest | same |
| G5 lineage | clean tree; commit, dataset version, seeds recorded | same |
| G6 reason to switch | newer data, or a superiority CI > 0 | same |
A rule that can't be evaluated is logged as SKIPPED, never a silent pass. The gate never edits the live operating thresholds: a detector that needs a new trigger fails G3, and recalibrating is a deliberate, manual step.
Every live model traces back to its commit, dataset and seeds.

Watching the live stream for drift
The daemon logs three scale-free features per station every 30 s (detector score, crest factor, high-frequency share), computed on the model's own input so they're comparable with training. A daily Evidently job compares each station with its training noise: ok, watch (1 feature drifted) or drifting (2+), with an email after two drifting days in a row.
Drift features started logging on Oct 6, 2026, which is why the station pills still read "no data": the first statuses arrive with the next daily run.
Status: the registry, daily pull, drift logging, /health page and CI/CD deploys are live. The gate has been checked on a dry run (champion vs. itself); the first end-to-end monthly retrain hasn't run yet.
Deployment & architecture07
The whole service runs on an Oracle Cloud Always-Free Ampere A1 (ARM64) VM for $0. Caddy provides HTTPS and serves the site, systemd runs the API server, which supervises the SeedLink daemon and respawns it if the stream drops, and separate timers run the nightly crosscheck and the daily QuakeOps pull + drift check. The Android app is a Capacitor build of the same web app with FCM push, native code that writes the home-shaking line into notifications, and an update gate for breaking releases.

Known limits
- Coverage: strongest where 3+ stations sit within ~100 km (LA basin, Inland Empire, Mojave, Ridgecrest, Kern). Quakes outside the network are located from a one-sided set of stations and can be tens of km off.
- Latency: 25–60 s after origin. This is rapid detection, not pre-arrival warning (ShakeAlert's job).
- Locator: fixed 8 km depth and a 1-D travel-time model, with an empirical correction fitted on 31,427 picks.
- Small quakes: below M2 (outside the magnitude training range) sizes read slightly high; harmless for the M3 floor.
- Swarms: a quake right after another nearby can still be absorbed into it; about 60% are caught inside sequences.
- Shaking estimates: depth is ignored, an off-network mislocation shifts the estimate, and a single house can differ more than the 0.42-level average, which is measured over 10 km report cells.