Voidly's existing forecast model answers the question "will a shutdown happen?". But journalists also need to know "if it happens, how long will it last?" Russia's 2022 Twitter block has lasted years; Sri Lanka's 2022 social-media block lasted days. Same probability, very different consequences — and the duration is the dimension that lets you tell them apart.
We trained a Random Survival Forest (scikit-survival 0.25) on every confirmed censorship or mixed-type incident in the Voidly Atlas — n=343, with a 78% right-censoring rate (most incidents are still open or were only observed at a single point in time). The 13 input features are: country risk tier, continent one-hot, severity one-hot, incident-type one-hot, first-seen year + month, and a 24-month prior-shutdown count for the country. Training is stratified by event status so train and test both see the (few) confirmed- closed rows.
Test-set c-index = 0.728 (train 0.769).
That clears the 0.65 promote floor we agreed on for ML
ship decisions. Per-country test-set residuals are
available in the model sidecar at
/v1/forecast/duration/info.
Endpoint
POST /v1/forecast/duration
with body
{country, severity, incident_type}
returns median, P25, P75, IQR, the 5-point survival
curve, the c-index of the underlying model, and any
honest caveats triggered by the input (e.g.
"country not found in country_geography").
Example: for Iran in a critical/censorship scenario the
model returns median ≈ 5 days with a wide 2-day IQR,
driven by Iran's high prior-shutdown count and the
prevalence of long-running Iranian blocks in the
training cohort.
Honest caveats
- 78% censoring rate — c-index from a survival model with this much censoring is noisier than the equivalent classification AUC. We report the IQR alongside the median for that reason.
- Single-point observations get a 24h floor before censoring kicks in (otherwise the "never observed again" rows would encode as 0h duration, which is wrong).
- Country features collapse to risk tier + continent. Two countries in the same tier + continent will get similar predicted durations unless they diverge on severity, type, or prior-shutdown count. We do not have enough per-country events to learn a fully country-specific hazard yet.
- Status="active" is treated as right-censored even when the incident may have actually resolved already and just hasn't been marked. This biases toward over-estimating duration for cohorts dominated by stale active rows.
What ships
- Model bundle:
/opt/voidly-ai/models/shutdown_duration_rsf_v1.pkl - Metrics sidecar:
/opt/voidly-ai/models/shutdown_duration_rsf_v1.json - Endpoint:
POST /v1/forecast/duration(proxied via api.voidly.ai) - Info:
GET /v1/forecast/duration/info - Public page: /atlas/duration
- Build scripts:
scripts/build-survival-features.py,scripts/train-shutdown-duration-rsf.py,scripts/patch-duration-endpoint.py(idempotent, AST-validated).