Code and data for the letter "Anytime-Valid Alarms for BGP Incident Detection via Conformal e-CUSUM Monitors."
VIGIL monitors one per-minute statistic, the BGP update activity scoped to an origin AS, converts each minute into an online conformal p-value, which is exactly uniform when the stream is exchangeable, and feeds it to a betting-based e-CUSUM. The only parameter is delta. Under exchangeability the probability of any alarm in m monitored minutes is at most 2 m delta, at every stopping time. The per-minute cost is one sorted insertion.
Seven incidents on RouteViews route-views2 (delta = 1e-4, 10 smoothing
seeds, five-hour sessions with a one-hour warmup):
| incident | date | origin | onset (UTC) | detected | median delay |
|---|---|---|---|---|---|
| Google route leak via MainOne | 2018-11-12 | AS15169 | 21:12 | 10/10 | 5 min |
| Cloudflare route leak via Verizon | 2019-06-24 | AS13335 | 10:34 | 10/10 | 1 min |
| CenturyLink / Level 3 outage | 2020-08-30 | AS3356 | 10:04 | 10/10 | 4 min |
| Facebook outage | 2021-10-04 | AS32934 | 15:39 | 10/10 | 2 min |
| Rogers outage | 2022-07-08 | AS812 | 08:44 | 10/10 | 2 min |
| Azure outage | 2023-01-25 | AS8075 | 07:08 | 10/10 | 12.5 min |
| Optus outage | 2023-11-07 | AS4804 | 17:05 | 10/10 | 0 min |
Permutation control (null true by construction): 2 alarms in 880 streams.
Ordinary days: 154 streams (22 ordinary sessions, every origin scored on
every session); VIGIL raises 22.3 alarms on average over seeds. Classical
charts and two learning-based detectors calibrated on held-out ordinary
days to the same alarm budget: see results/results.json, key
calibrated. Every seed-0 ordinary-day alarm is traced to the raw feed and
classified in results/alarm_audit.json.
Fast path (uses the per-minute CSVs shipped in data/, no downloads, a few
minutes):
pip install -r requirements.txt
python reproduce.py
The alarm audit and the per-peer breakdown replay the raw MRT files, which
are not shipped (data/raw/ is ignored by git), so the fast path keeps the
shipped results/alarm_audit.json and results/linx_leak_peers.json and
regenerates everything else.
Full path (downloads about 3.8 GB of MRT update archives from
archive.routeviews.org, rebuilds every per-minute CSV with
pybgpkit-parser, then runs the experiments, the alarm audit, the per-peer
breakdown, and the figures):
python reproduce.py --full
No external binaries are needed. The pipeline runs on Windows, Linux, and
macOS with Python 3.12. The results in the letter were produced on Windows
11 (Intel Core Ultra 7 155U, 16 GB RAM) with Python 3.12.10 and the package
versions pinned in requirements.txt.
src/monitor.pythe monitor: online conformal p-values, power-mixture betting, two one-sided e-CUSUMs with re-arm; CUSUM, EWMA, and z-score chartssrc/learned.pyIsolation Forest and autoencoder baselines on the same streamsrc/sessions.pymonitored origins, sessions, incident periodssrc/pipeline.pyMRT download and per-minute countingsrc/run_experiments.pyevery experiment, writesresults/results.jsonsrc/audit_alarms.pytraces each ordinary-day alarm to the raw feed and classifies it, writesresults/alarm_audit.jsonsrc/peer_breakdown.pyper-peer shares of origin-scoped announcements in one session, writesresults/linx_leak_peers.jsonsrc/make_figures.pythe figures in the letterdata/route-views2/counts_*.csv,data/route-views.linx/counts_*.csvper-minute counts for every session (300 rows each)
Each CSV has one row per minute. The first column, minute_utc, is the
start of the minute in seconds since the Unix epoch (UTC); every session
file has 300 rows 60 s apart, and the t0 and minute_epoch fields in
results/ use the same units. Collector-wide columns: ann, wdr
(announcements and withdrawals), novel (announcements carrying an AS path
not seen earlier in the session). For each monitored origin O:
scoped_Oannouncements originated byOplus withdrawals of prefixes seen earlier in the session with originO(the monitored statistic)a_O,w_Othe announcement and withdrawal parts ofscoped_Opfx_Odistinct prefixes touched by those updates in the minutepeers_Odistinct collector peers reporting themnewpath_Oannouncements whose AS path had not been seen forOearlier in the sessionochg_Oannouncements of a prefix learned with originOthat carry a different origin
Every session is five hours of 15-minute update files. Incident sessions
place the public onset between 150 and 230 minutes after the session start.
Ordinary-day sessions use the same hours on days from the adjacent weeks,
screened against public incident records for the monitored origin. The
second collector, route-views.linx, covers every incident session and the
first ordinary day of each period.
MIT