The most consequential number in an outbreak is the reproduction number: the average count of new infections each case causes. Above 1 the epidemic grows, below 1 it dies out. Public health decisions depend less on its precise value than on when it crossed 1 and how sure we are that it stays below. Current tools answer this poorly. Smoothing methods blur the sharp breaks that lockdowns cause. Bayesian changepoint models explore the space of break dates with random-walk samplers that come with no guarantee of having found the right answer. Neither reports calibrated probabilities for "the epidemic has been below threshold since date X."
This proposal combines two pieces. The first is a model of how cases arise. The renewal equation, which predicts today's cases as the reproduction number times a weighted sum of recent cases, makes the fit of a candidate phase depend only on observed data inside and just before that phase. The second is dynamic programming segmentation, which finds the best way to cut a sequence into contiguous pieces by reusing solutions for shorter prefixes. When each phase's fit is a closed-form score that adds up across phases, dynamic programming finds the exact best set of break dates in time quadratic in the series length. The same recursion, run as a sum instead of a minimum, gives the exact posterior over all $2^{N-1}$ possible segmentations. From that posterior we read off the probability that the reproduction number was below 1 on each day, the distribution of the turning-point date, and the number of threshold crossings, with no sampling at all.
Core Claim
Under a renewal likelihood that conditions on observed past incidence, a model in which the reproduction number $R$ is constant within phases has exactly additive phase costs with a conjugate closed form. Exact forward–backward recursions over segmentations are therefore available. Adding a sub-critical or super-critical label to each phase turns segmentation into direct inference about the $R=1$ threshold. This is new relative to the file in three ways. It replaces the approximate Add-Delete-Swap sampler of Bayesian SIR Model with Change Points with an exact computation. It outputs threshold-event probabilities rather than point estimates of phase parameters. It targets the stability question itself, meaning which side of 1 the epidemic is on, instead of generic changes in count level.
The formulation also explains why exactness is possible here and not for SIR-type compartmental segmentation. In a compartmental model, the hidden susceptible and infected counts entering a phase depend on every earlier phase. That breaks the optimal-substructure property that dynamic programming needs, a limitation the file flags for non-additive costs. Conditioning on observed incidence removes this carry-over, because the influence of the past is summarized entirely by observed quantities.
The Model
Let $y_t$ be reported cases on day $t$, and let $w_s$ be the generation-interval distribution, the probability that a secondary case occurs $s$ days after its infector. The infectiousness pressure is $\Lambda_t=\sum_{s\ge 1} w_s y_{t-s}$. Within phase $k$ we assume $y_t \sim \mathrm{Poisson}(R_k \Lambda_t)$. With a Gamma$(a,b)$ prior on $R_k$, write $Y$ for the phase's total cases and $L$ for its total infectiousness pressure. The marginal likelihood of the phase covering days $j+1$ through $i$ is then
$$m(j+1,i)=\frac{b^a\,\Gamma(a+Y)}{\Gamma(a)\,(b+L)^{a+Y}}\prod_{t=j+1}^{i}\frac{\Lambda_t^{y_t}}{y_t!},\qquad Y=\sum_{t=j+1}^{i} y_t,\; L=\sum_{t=j+1}^{i}\Lambda_t .$$
Both $Y$ and $L$ come from prefix sums, so each phase score costs $O(1)$ time. The forward recursion $F(i)=\sum_{j<i}F(j)\,m(j+1,i)\,\pi(i-j)$, where $\pi$ is a prior on phase length, is the product-partition recursion used in Modeling changing dependency structure in multivariate time series. Here it is applied to an epidemiological renewal cost. A matching backward pass gives, for every day, the exact posterior mixture of gamma distributions for $R_t$, and therefore the probability that $R_t<1$.
The threshold-labeled variant adds a binary state to the recursion. The prior on $R_k$ is a gamma distribution truncated to $(0,1)$ or to $(1,\infty)$, and its normalizer is an incomplete gamma function, so it stays closed-form. The recursion then returns exact posteriors over phase-label sequences. These answer questions such as "the probability of exactly one downward crossing, occurring between February 8 and 10." The MAP variant replaces sums by minima, which is the penalized recurrence of Detecting Abrupt Changes in High-Dimensional Self-Exciting Poisson Processes, a paper that already showed penalized dynamic programming works well on branching-type point processes. That paper's models are not epidemiological, and it reports no threshold quantities.
Real counts are overdispersed, meaning they vary more than a Poisson model allows. We handle this with a negative-binomial cost at a fixed dispersion chosen by held-out likelihood. This is necessary because a misspecified count loss makes dynamic programming find spurious boundaries with full confidence, a limitation the file notes explicitly for DP segmentation. Exact posteriors are retained under the Poisson-gamma model. Under the negative-binomial cost we either use a dispersion grid or report the MAP segmentation with a profile-likelihood interval.
Why the Threshold Is the Right Target
Direction 1 of the file establishes that $R_0=1$ is a robust dividing line. Modeling self-propagating malware with epidemiological models shows that adding a dormant stage shifts outbreak timing while leaving $R_0$ unchanged. Stability of epidemic models over directed graphs shows that the eradicate-or-persist outcome remains a strict two-way split even on directed contact networks. We turn this robustness into two testable predictions about the segmentation.
The first prediction concerns the generation interval. Whether a phase is above or below 1 should be insensitive to errors in $w_s$, because $R=1$ corresponds to zero growth whatever the generation interval. Estimated magnitudes of $R$ and the exact boundary dates, however, should shift. The second prediction concerns reporting. A constant reporting fraction cancels between $y_t$ and $\Lambda_t$, so threshold labels are invariant to it. A change in the reporting fraction, by contrast, will look like a changepoint. Gu's Singapore analysis found exactly such a reporting anomaly between March 23 and April 2, which makes it a natural test case.
We also address the finite-duration question raised in the file. The classical guarantee that $R<1$ implies eradication holds only as time goes to infinity, but real phases are finite. The renewal model shows the gap concretely: after $R$ drops, incidence keeps rising for roughly one generation interval because of infections already in progress. Our posterior separates two statements, "R is below 1" and "incidence is contracting." Reporting both distinguishes the moment control begins from the moment its effect on case counts becomes visible.
Research Program
We will build the exact recursion, its labeled variant, and its MAP counterpart. The labeled variant will be validated against brute-force enumeration on short series. We will then study behavior under misspecification. On the modeling side, this means synthetic data from stochastic SIR and SEIR models, including SEIR with a dormant stage, where the renewal model is only an approximation, susceptible depletion is real, and latency distorts the generation interval. On the observation side, it means reporting delays and time-varying reporting fractions. Where susceptible depletion matters, we multiply $\Lambda_t$ by one minus observed cumulative incidence over a population size. This keeps phase costs additive, because the correction uses data rather than hidden states.
Baselines
The naive reference point is a sliding-window reproduction-number estimate that divides windowed $Y$ by windowed $L$ and declares a threshold crossing when that ratio passes 1. We run it with the same generation interval and with window length tuned on synthetic validation data. It has no segmentation and no posterior. The proposal beats it if the turning-point date is more accurate and if flip-flopping near $R=1$ becomes less frequent.
The smoothing competitor is the varying-coefficient SIR approach of Tracking Reproductivity of COVID-19 Epidemic in China with Varying Coefficient SIR Model. It estimates daily transmission by locally weighted regression and located the Chinese turning point between February 8 and 10, 2020, with average $R_{14}$ at 0.86 across provinces by February 10. We re-implement it on the same 30-province data with its bandwidth tuned. The proposal must place the crossing inside that window, or explain the disagreement, and must localize synthetic abrupt breaks more sharply.
The strongest existing method is Gu's Bayesian SIR changepoint model, which uses Add-Delete-Swap MCMC and reports an Adjusted Rand Index of 0.960 in its most distinct synthetic scenario, with 4 changepoints found on Singapore Omicron data. The Adjusted Rand Index measures agreement between two partitions of the days, with 1 meaning identical. We regenerate Gu-style scenarios and run both methods on identical data and priors. MCMC gets a wall-clock budget equal to a multiple of our exact runtime. Beating it means matching or exceeding its Adjusted Rand Index at far lower cost, giving better-calibrated $P(R_t<1)$, and producing stable answers across runs where MCMC chains disagree.
The decisive ablation keeps the dynamic programming recursion identical and replaces only the renewal cost. The replacement fits piecewise log-linear growth on log-incidence, which amounts to piecewise-linear segmentation in the spirit of Mixed Integer Programming for Change-point Detection, solved here exactly by dynamic programming. This isolates whether the renewal cost, and not dynamic programming itself, is doing the work.
Why not just…?
Why not just segment log-incidence into piecewise exponential-growth phases? This is the real threat. Under standard assumptions the sign of the growth rate equals the sign of $R-1$, so growth-rate segmentation also detects threshold crossings. The difference we expect is timing. After an abrupt change in $R$, incidence takes about a generation interval to settle to its new growth rate, so growth-rate boundaries should lag true policy dates by roughly that amount, and a short phase can be missed entirely. The cost-swap ablation measures this lag on synthetic data with known break dates. If the lag is negligible at realistic noise levels, we will report that the simpler cost suffices and that the contribution reduces to exact threshold posteriors.
Why not just keep the Bayesian SIR sampler of Gu? It already achieves 0.960 Adjusted Rand Index in easy scenarios, so accuracy alone may not separate the two methods. The case for exactness rests on hard cases, namely closely spaced or weak breaks and posteriors with several plausible segmentations, and on reproducibility. The head-to-head comparison at matched compute will show whether MCMC's threshold probabilities vary across chains in exactly those cases.
Why not just smooth or filter, as the varying-coefficient model or Kalman estimators do? The varying-coefficient authors themselves note that local smoothing "can also smooth out rapid changes." Kalman tracking of a random-walk transmission rate lags abrupt mandates and yields no discrete phases. Our synthetic step-change experiments quantify the resulting error in turning-point dates. If real data turn out to change smoothly, the smoothing baseline should win on held-out likelihood, and we will report that.
Why not just use a neural hybrid such as EpiNode? How (Not) to Hybridize Neural and Mechanistic Models reports up to a 57% RMSE reduction for forecasting, but it answers a different question and produces no discrete phases or threshold probabilities. We treat it as complementary, not as a competitor.
Proposed Experiments
On synthetic renewal, stochastic SIR, and dormant-stage SEIR data with known breaks, we measure Adjusted Rand Index, Hausdorff distance between true and estimated break dates, turning-point date error, calibration of $P(R_t<1)$ via reliability curves, and runtime. We repeat these under deliberately misspecified generation intervals and under drifting reporting fractions to test the two invariance predictions. On real data, we use Singapore Omicron (January 3 to April 21, 2022), where the checks are agreement with Gu's four changepoints and whether the reporting anomaly surfaces as a spurious boundary. We use the Chinese 30-province and 15 Hubei-city data from January to February 2020, where the check is the posterior on the February 8–10 crossing. We use CDC influenza-like-illness series for the 10 HHS regions, where the check is threshold labels across seasons.
The decisive checks are two. First, on synthetic step changes, the renewal cost must localize breaks with less lag than the growth-rate ablation. Second, threshold labels must stay stable when the generation interval is misspecified, while magnitudes of $R$ shift. If both fail, the idea reduces to faster changepoint detection. If both hold, it provides exact, calibrated answers to the question epidemic decisions depend on.
References
- Bayesian SIR model with change points with application to the Omicron wave in Singapore
- Modeling changing dependency structure in multivariate time series
- Detecting Abrupt Changes in High-Dimensional Self-Exciting Poisson Processes
- Modeling self-propagating malware with epidemiological models
- Stability of epidemic models over directed graphs: A positive systems approach
- Tracking Reproductivity of COVID-19 Epidemic in China with Varying Coefficient SIR Model
- Mixed Integer Programming for Change-point Detection
- How (Not) to Hybridize Neural and Mechanistic Models for Epidemiological Forecasting