Science Journaling Club Founded 2024

VOLUME 1, ISSUE 2 · WINTER 2025 · ORIGINAL RESEARCH

The Same Disease on Four Different Networks

Written jointly by the Science Journaling Club

Computational study · Peer-edited by the club review board · LaTeX source · Analysis code · Raw output · Interactive model

Abstract Give four populations the same disease and the same average number of contacts each, then change nothing but the shape of the contact network. Nobody was infected, contacted or observed. The computation is the experiment. It ran on a school laptop, and a rerun finishes in minutes. We simulated stochastic SIR epidemics on four graphs of 10,000 nodes with mean degree fixed at 6, a triangular lattice, an Erdős-Rényi random graph, a Watts-Strogatz small world and a Barabási-Albert scale-free network, at 600 runs per configuration across fourteen transmission rates, plus refinement, validation and convergence sweeps, 80,700 simulated epidemics in all. At a matched transmissibility of T = 0.50 the four networks agreed on the final attack fraction to within a factor of 1.06 and disagreed about everything else: peak prevalence ranged from 0.0602 on the lattice to 0.4406 on the scale-free network, a factor of 7.32, and time to peak ran from 12.8 steps to 136.6, a factor of 10.69. Measured epidemic thresholds spanned a factor of 5.14, from Tc = 0.0728 on the scale-free network to 0.3741 on the small world, against a well-mixed prediction of 0.1667 for all four. The random graph landed on the Molloy-Reed value 0.1665 to within 0.0014; the lattice and the small world sat 1.76 and 1.89 times above it. Validation: the mass-action limit reproduced the Kermack-McKendrick final size equation to within 0.0074 at every R0 above 1.25 and to 0.0011 above 1.5, and a constant-infectious-period lattice recovered the exactly known triangular bond percolation threshold 2 sin(π/18) = 0.34730 as 0.33068 ± 0.00875, 1.90 standard errors low, with finite-size scaling across L = 40 to 140 showing the gap closing as L−3/4 exactly as percolation requires. Seed 20251215.

The Textbook Starts in the Wrong Place

Open almost any introduction to epidemic modelling and the first equation assumes that every person in the population is equally likely to meet every other person. Infection rate proportional to \(SI/N\). Mass action, lifted from chemistry, where the assumption is honest, because molecules in a beaker really do collide with every other molecule sooner or later, which is the whole content of the claim.

People do not mix. You keep the same few dozen contacts most weeks, those contacts mostly know each other, and somewhere in your city a courier meets four hundred people a month. The well-mixed model erases all three facts in its first line. Every result in the rest of the chapter is then built on top of the erasure.

The standard defence is that mass action is a reasonable approximation, and we wanted that word priced in numbers, so we built the fairest comparison we could think of. Take one disease. Fix its per-contact transmission probability and its infectious period. Fix the average number of contacts per person at six, then change only the wiring and see what moves.

Quite a lot moves. The attack fraction barely budges, which is the one part of the standard defence that holds up. The speed of the outbreak changes by a factor of ten, and the threshold, the question of whether an outbreak happens at all, changes by a factor of five. The scale-free network refuses to behave. That result is our favourite in the study.

1.06×spread in attack fraction
7.32×spread in peak height
10.69×spread in time to peak
5.14×spread in threshold

What We Actually Built

A discrete-time stochastic SIR process, running on one undirected and unweighted graph of \(N = 10{,}000\) nodes that never rewires while the epidemic is underway. Each step, every infectious node tries each of its neighbours independently with probability \(\beta\), then recovers with probability \(\gamma\), and recovery is permanent, so nobody is infected twice. We hold \(\gamma = 0.2\) throughout, which puts the mean infectious period at five steps. Then we sweep \(\beta\).

The control parameter we report is not \(\beta\) but the transmissibility \(T\), the probability that a given edge ever carries the infection before the infectious node recovers:

$$T \;=\; \sum_{n\ge 1}\bigl[(1-\beta)(1-\gamma)\bigr]^{\,n-1}\beta \;=\; \frac{\beta}{\beta + \gamma - \beta\gamma}$$

That sum is exact for this process, not an approximation, and inverting it gives \(\beta = T\gamma / (1 - T(1-\gamma))\). \(T\) is the honest common axis. Two networks compared at the same \(T\) carry identical disease parameters on every edge of both graphs. The comparison is fair by construction. Comparing at fixed \(\beta\) would have been fair too, since the infectious period is the same everywhere, but \(T\) is the quantity the percolation results are stated in, so it is the one that lets us check ourselves against published theory [5][6].

The four graphs, all with \(N = 10{,}000\) and mean degree 6. We took the standard properties of each family from Newman's survey of complex networks [2].

NetworkConstruction⟨k⟩⟨k²⟩ kmaxTransitivityMean path
latticetriangular, 100×100 torus6.000036.00060.400038.891
ERErdős-Rényi G(N,M), M = 30,0006.000042.025180.00045.342
WSWatts-Strogatz ring, k = 6, rewiring p = 0.056.000036.29290.508811.215
BABarabási-Albert preferential attachment, m = 35.9988114.2912870.00294.267

The Watts-Strogatz and Barabási-Albert constructions are the originals, taken straight from the two papers [3][4]. Watch the fourth column, the mean square degree, because it runs the whole show while the mean degree column, matched across all four graphs, tells you nothing. Matching the mean degree does nothing to match the mean square degree, and the scale-free network carries \(\langle k^2 \rangle = 114.29\) against 36 for the lattice. One node in that graph has 287 contacts.

Each configuration is 600 independent epidemics, each started from a single index case chosen uniformly at random. For every run we record final size, peak prevalence, time to peak, and whether it fizzled. A fizzle is a final size below 1% of \(N\). One fixed graph per type, reused at every \(T\), so that differences between networks are never confounded with graph-to-graph noise, and the whole study runs off one seed, 20251215. A rerun reproduces every digit.

Checking the Machine Before Believing It

A simulator that nobody has checked against a known answer is a random number generator with opinions, and opinions are not measurements. So before looking at any network result we ran the same code with the network switched off entirely: each infectious node makes Poisson(λ) contacts per step with uniformly chosen members of the population, giving \(R_0 = \lambda/\gamma\).

In that limit the final attack rate \(z\) among a large population must solve the Kermack-McKendrick final size equation from 1927 [1]:

$$z \;=\; 1 - e^{-R_0 z}$$

Nothing about that check is circular. The equation holds for any infectious period distribution, since only total infectious person-time enters the derivation. Ours is geometric and runs on discrete time. The equation does not care. Any error in the scheduling logic surfaces here as a curve that misses the analytic one.

Validation A. Worst gap between measured attack rate and the analytic \(z\), across every \(R_0 \ge 1.25\): 0.00741, against a tolerance of 0.01500 fixed before the first run. PASS. At \(R_0 = 1.5\) the gap is 0.0003. At \(R_0 = 2.0\), 0.0009, and at \(R_0 = 4.0\), 0.0001.

The threshold lands where it should. At \(R_0 = 0.5\) and \(0.7\) not a single run out of 600 exceeded the cutoff, and mean final size over all runs was 2.2 and 2.9 nodes. At \(R_0 = 0.9\), still subcritical, 1.33% of runs squeaked over the 1% line, which is finite population noise rather than anything an epidemiologist would call an epidemic.

The second check in this figure is sharper. The probability that one index case starts a major outbreak is not the same number as the attack rate, because our offspring distribution, Poisson(λL) with L geometric, is over-dispersed relative to Poisson. The right prediction is one minus the extinction probability of that branching process, and it sits well below \(z\), which the figure shows as two clearly separated curves. Measured 0.3683 against predicted 0.3696 at \(R_0 = 1.5\). Measured 0.7200 against 0.7348 at \(R_0 = 3.0\). The points track the dotted curve, not the solid one, and a broken simulator would have got that distinction wrong in a way anybody could see on the figure.

R0 = 10.00.20.40.60.81.00.51234basic reproduction number R0 (mass action, no network)fractionKermack-McKendrick z = 1 - e^(-R0 z)measured attack ratebranching-process P(major outbreak)measured P(large)
Figure 1. The simulator with its network switched off, against two analytic answers it was never told. Filled circles are the measured attack rate among large outbreaks, with 95% Monte Carlo intervals that are mostly smaller than the marker; the solid pale line is the Kermack-McKendrick solution of \(z = 1 - e^{-R_0 z}\) [1]. Open pale circles are the measured probability that one index case starts a major outbreak, and the dotted line is the branching-process prediction for a Poisson-geometric offspring distribution. The two curves separate because the offspring count is over-dispersed, and the measurements follow the right one. 600 runs per point, \(N = 10{,}000\), \(\gamma = 0.2\).

Doing the Arithmetic by Hand

Before any simulation, the predictions. Each is one line of algebra. Writing them down before a single simulation has run is what makes the measurements falsifiable.

In a well-mixed population where everyone has \(\langle k \rangle\) contacts, each of which transmits with probability \(T\), the expected number of new infections per case is \(R_0 = T\langle k \rangle\). Setting that to one gives the threshold:

$$T_c^{\text{well-mixed}} \;=\; \frac{1}{\langle k \rangle} \;=\; \frac{1}{6} \;=\; 0.166667$$

One number, for all four networks, because all four have mean degree six. We are trying to break that prediction.

On a locally tree-like network you have to account for a bias: arriving along an edge lands you on a high-degree node more often than picking a node at random would. The excess degree distribution fixes this, and the Molloy-Reed condition [5], in the form Newman gives for epidemics [6], reads:

$$T_c \;=\; \frac{\langle k \rangle}{\langle k^2 \rangle - \langle k \rangle}$$

Put the numbers in. For the random graph, \(6.0000 / (42.025 - 6.0000) = 6/36.025 = 0.16655\). Almost exactly the well-mixed answer, which is the point: a Poisson graph has \(\langle k^2 \rangle \approx \langle k \rangle^2 + \langle k \rangle\), so the correction very nearly cancels. For the lattice, \(6/(36.000 - 6) = 6/30 = 0.20000\). For the small world, \(6/(36.292 - 6) = 0.19806\).

Now the scale-free network. \(\langle k^2 \rangle = 114.291\), so \(5.9988/(114.291 - 5.9988) = 5.9988/108.292 = 0.05539\). The heterogeneous mean-field form of Pastor-Satorras and Vespignani [7], which is the version usually quoted when people say scale-free networks have a vanishing threshold, gives

$$T_c \;=\; \frac{\langle k \rangle}{\langle k^2 \rangle} \;=\; \frac{5.9988}{114.291} \;=\; 0.05249$$

The ratio \(\langle k^2\rangle/\langle k\rangle = 19.05\) is doing all the work. Three of our graphs have that ratio near six. One has it near nineteen. Its predicted threshold is a third of everyone else's, from the same mean degree. The arithmetic stops there, and the rest of the study asks how much of it survives contact with a clustered, finite population of ten thousand simulated people.

Same Disease, Four Answers

Figure 2 is the headline. Attack fraction against transmissibility, all four networks, with the well-mixed analytic curve drawn in for reference.

well-mixed T_c = 0.16670.00.20.40.60.81.00.00.20.40.60.8transmissibility T (probability one edge ever carries it)attack fractionscale freerandomlatticesmall worldwell-mixed
Figure 2. Attack fraction among outbreaks that exceeded 1% of the population, against transmissibility \(T\), for four networks with mean degree fixed at 6. The dashed pale curve is the well-mixed solution of \(z = 1 - e^{-6Tz}\) and the vertical dotted line is its threshold at \(T = 1/6\). The scale-free network is already producing epidemics at \(T = 0.06\), where the well-mixed model says an outbreak is impossible and the lattice and small world produce nothing at all. Above \(T \approx 0.5\) all four curves converge and the networks stop disagreeing. 600 runs per point.

Read it left to right. Below \(T = 0.06\) nothing happens on any of the four networks. Between 0.06 and 0.17 only the scale-free network has epidemics. The well-mixed model declares that whole region empty, which is a factual claim and a wrong one. Around 0.17 the random graph switches on, right where the tree-like theory said it would. The lattice and the small world stay silent until past 0.28, nearly twice the well-mixed threshold, and above 0.5 the four curves collapse together and the whole question stops mattering.

High-\(T\) convergence is what keeps "mass action is a reasonable approximation" alive as folklore. For a highly transmissible disease it is reasonable. The approximation fails precisely in the regime public health cares about, near the threshold, where the only question worth asking is whether anything happens at all.

Every network now sits well above its own threshold. The head-to-head at \(T = 0.50\):

NetworkAttack fractionPeak I/NTime to peak (steps) Fizzle fractionTc measured95% interval
lattice0.97220.06021 ± 0.00016136.6 ± 0.40.15500.3511[0.3078, 0.3751]
ER random0.94100.40697 ± 0.0002920.2 ± 0.10.16330.1679[0.1610, 0.1705]
WS small world0.92280.14528 ± 0.0003961.3 ± 0.40.18000.3741[0.3013, 0.3778]
BA scale free0.91980.44060 ± 0.0003512.8 ± 0.10.17170.0728[0.0507, 0.1198]
well-mixed0.9405n/an/an/a0.1667exact

Read the first column. 0.9198 to 0.9722, a spread of five percentage points on a quantity that runs from zero to one, so if the only thing you needed was how many people eventually catch it, you could take the well-mixed answer of 0.9405 and be wrong by at most three points. Now the next two columns.

Peak prevalence: 0.0602 on the lattice, 0.4406 on the scale-free network. A factor of 7.32. Time to peak: 136.6 steps against 12.8, a factor of 10.69. The disease is the same in both, the average number of contacts is the same, and the eventual attack fraction agrees to within six per cent.

scale free: peak 0.441 at t=13random: peak 0.407 at t=20small world: peak 0.145 at t=61lattice: peak 0.060 at t=1370.00.10.20.30.404080120160200240time step (mean infectious period = 5 steps)infectious fraction I(t)/Nsame T = 0.50, same mean degree 6, same disease
Figure 3. Mean prevalence curves at \(T = 0.50\), averaged over every run that exceeded 1% of the population. Identical disease parameters and identical mean degree in all four cases. The scale-free network peaks at 0.4406 of the population on step 12.8; the lattice peaks at 0.0602 on step 136.6. The area under the four curves is nearly equal, because the attack fractions are nearly equal. What differs is entirely how that area is distributed in time.

The mechanism is not mysterious. On the lattice, infection can only move to a physical neighbour, so the outbreak is a ring creeping outward at a roughly constant speed, and the number of people on the boundary of a growing disc in two dimensions grows like the radius. That gives linear growth, not exponential, and a long flat epidemic. Keeling worked out the same effect analytically for spatially structured populations as early as 1999 [11]. On the scale-free network the infection reaches a hub within a couple of steps, and a hub with 287 contacts infects an enormous number of people simultaneously.

The small world sits between the two extremes, and much closer to the lattice than we expected. Rewiring five per cent of edges collapses the mean path length from 38.9 to 11.2, which is the famous small-world effect [3], yet the peak only rises from 0.0602 to 0.1453 and the time to peak only falls from 136.6 to 61.3. Short paths help the disease, clearly. They help it far less than removing the clustering would. The small world keeps all of its clustering: transitivity 0.5088, against 0.0004 for the random graph.

Plan hospital capacity and the number you need is the peak, which the well-mixed model does not supply; plan vaccine supply and the number you need is the attack fraction, which it does.

Notes From the Table, 15 December

working notes, transcribed

First full run done. 189 seconds on eight cores, 600 runs a point. Validation A clean. Worst gap 0.0074 against the 0.015 tolerance we wrote down on Tuesday. Nobody touched the tolerance afterwards, for the record.

Validation C came back FAIL. Measured lattice \(p_c\) = 0.28000 against the exact 0.34730. Not a small miss.

0.28000 is the first point of the grid. Checked: the susceptibility maximum was sitting on the grid boundary, and the parabola fit had silently fallen back to the edge point. The code was reporting the left-hand end of our own grid as a measurement. It had done the same thing to the Watts-Strogatz threshold earlier and we had not noticed, because 0.27 was a plausible-looking number and 0.28 was not.

Two fixes. Extend the grid so the peak is bracketed. Print a flag on every threshold saying whether its maximum was interior. Nothing like this passes quietly again. Both in.

Still low after that, 0.3055. Second problem, and this one is physics rather than a typo: the susceptibility is taken over runs that did not take off, so it depends on where we draw the line. Critical cluster at \(p_c\) is a fractal, mass about \(L^{91/48}\), which for L = 100 is 6190 nodes, sixty-two per cent of the population. Our cutoff at 1% of N was classifying perfectly ordinary critical clusters as epidemics.

Moved the cutoff to 10% of N for this one validation, and printed the answer under both cutoffs so the reader can see which cutoff produced which number. 0.33068. Gap to exact 0.01661, which is 1.90 standard errors. Passes the tolerance. Still low, and it should be low on a lattice this size, so we ran the finite-size scaling to prove the point rather than assert it.

Four lattice sizes, L = 40, 70, 100, 140. Gap to exact: 0.0294, 0.0251, 0.0196, 0.0159, monotone and shrinking, extrapolating to within 0.0086. A finite lattice, then, not a broken simulator. Writing it up with the FAIL in it.

The Scale-Free Network Refuses to Behave, and the Random Graph Behaves Perfectly

We like this result most, because it breaks the tidy story in two directions at once.

The tidy story says scale-free networks have a threshold suppressed by the ratio \(\langle k^2\rangle/\langle k\rangle\), and in the infinite-size limit with a divergent second moment the threshold vanishes entirely [7][9]. Our measurement half agrees. The threshold is enormously suppressed. \(T_c = 0.0728\) against a well-mixed 0.1667, a factor of 0.44. A disease with \(T = 0.10\) cannot spread in a well-mixed population with six contacts each, cannot spread on a lattice with six contacts each, cannot spread on a small world with six contacts each, and infects 8.2% of the scale-free network.

Validation B, scale-free case. \(\langle k\rangle\) = 5.9988, \(\langle k^2\rangle\) = 114.2906, ratio 19.0522. Mean-field prediction \(\langle k\rangle/\langle k^2\rangle\) = 0.05249. Molloy-Reed \(\langle k\rangle/(\langle k^2\rangle - \langle k\rangle)\) = 0.05539. Club measured 0.07281, 95% interval [0.05068, 0.11975]. Measured minus mean field +0.02032; measured minus Molloy-Reed +0.01741. Both predictions sit inside our interval, at its lower edge.

And here is the other direction. Our measured threshold sits 31% above Molloy-Reed and 39% above the heterogeneous mean-field value, in the wrong direction for the tidy story. The threshold does not vanish; a perfectly ordinary finite number sits there, with a wide confidence interval, [0.0507, 0.1198], because near a suppressed threshold the outbreak probability climbs so gradually that the susceptibility peak is hard to locate at all. Look back at Figure 2: the scale-free curve has no kink. It just leans.

The modern review of this area [8] is blunt about the distinction: the vanishing threshold is a statement about a limit, and what a finite network shows you is a small threshold rather than no threshold. Our number is a worked example of that.

Both facts have the same cause. The suppression is real and it is driven by hubs. The failure to vanish is because our graph is finite, so the degree distribution is cut off at 287 and \(\langle k^2 \rangle\) is finite too. Boguñá and colleagues worked out exactly this finite-size correction and showed that the apparent threshold in a network of size \(N\) stays stubbornly above zero and approaches it only slowly [9]. Ours does that. A club with a bigger computer would measure a smaller number. It would still not measure zero.

Tree-like theory does beautifully on the one network in the set that is actually tree-like. Molloy-Reed predicts 0.16655 for the random graph, we measure 0.1679 with a bootstrap interval of [0.1610, 0.1705], and the difference is 0.0014, with the prediction inside the interval. Our independent second estimator, extrapolating the conditional attack fraction linearly down to zero, gives 0.1639. Three numbers agreeing to the third decimal place.

On the two clustered networks it loses badly, and it loses in a consistent direction. The lattice measures 0.3511 against a tree-like prediction of 0.2000, a ratio of 1.76, and the small world measures 0.3741 against 0.1981, a ratio of 1.89. In both cases the real threshold sits well above what tree-like theory says it should. The disease has a harder time than a tree-like calculation expects.

Clustering is why. On the lattice, transitivity 0.40 means two out of five of your neighbours' neighbours are also your neighbours, so a chain of infection keeps arriving at people who have already been infected. Every such arrival wastes a transmission that a tree-like calculation has already counted as a new case. Serrano and Boguñá [13] and later work on clustered random graphs [14] derive this correction explicitly, and the sign is always the same: clustering raises the threshold.

The curious case is the small world. Its clustering almost matches the lattice, 0.5088 against 0.4000. Its threshold is the highest of the four at 0.3741, marginally above the lattice's 0.3511. Its mean path length is three and a half times shorter, yet short paths did essentially nothing for the threshold while cutting the time to peak by more than half. Whether a disease takes off is a local question, settled in the first few generations. How fast it then travels is a global one.

0.050.10.20.30.5well-mixed 1/6scale free0.0728random0.1679lattice0.3511small world0.3741epidemic threshold in transmissibility, T_c (log scale)club measurement (95% CI)Molloy-Reedmean field
Figure 4. Measured epidemic thresholds against the two standard predictions, on a logarithmic axis. Circles are the club measurements with 95% bootstrap intervals; triangles are Molloy-Reed \(\langle k\rangle/(\langle k^2\rangle - \langle k\rangle)\) [5][6]; open squares are the heterogeneous mean-field value \(\langle k\rangle/\langle k^2\rangle\) [7]. The dotted vertical line is the well-mixed prediction of 1/6, which is the same for all four networks because all four have mean degree 6. The random graph lands on its prediction. The two clustered networks sit nearly twice above theirs, and the scale-free network sits far below everybody, with much the widest interval.

The Strongest Objection, Taken Seriously

The best argument against this study skips the code. The design is the target, and the objection goes like this.

You claim to have changed "network shape" while holding everything else fixed. You did not. You changed four things at once. The lattice, the random graph, the small world and the scale-free network differ in degree variance, in clustering, in mean path length and in degree correlations simultaneously. When you report that the threshold moved by a factor of 5.14 you have measured the combined effect of a bundle, and you cannot attribute any of it to any single property. A study that varied rewiring probability continuously from 0 to 1 on one family of graphs would have told you more, with far less machinery, and it would have told you which property did the work.

We think the objection is largely correct.

It does not damage the headline. The question we asked was what happens when a modeller replaces a realistic contact network with a well-mixed assumption, and real contact networks differ from well-mixed in all four of those ways at once. The bundle is the thing being studied. Measuring the whole bundle is therefore the right answer to the question we actually asked.

It does damage every mechanistic sentence in this article. When we wrote that clustering is why the lattice threshold is high, that is an inference from the sign and from published theory [11][13][14], and not something our design can demonstrate, because we have no pair of graphs differing only in clustering. The small-world comparison is the closest we get, since WS and the lattice have similar clustering and very different path lengths, and it does support the claim that path length is not what sets the threshold. One comparison, though, not a controlled experiment.

A second objection deserves naming. All four graphs are single realisations. Our error bars come from run-to-run variation on one fixed graph, and exclude the variation you would get by redrawing the graph from the same recipe. We measured that separately: rebuilding the scale-free network under four extra seeds gave \(\langle k^2 \rangle\) of 110.52, 112.40, 107.93 and 110.95, against 114.29 for the graph we used, a spread of about 4% that propagates into the predicted threshold at roughly the same rate. We did not propagate it. Every scale-free threshold in this article is slightly less certain than its stated interval says.

Where a Different Choice Would Have Changed the Answer

Four decisions in this study were judgement calls, and three of them move numbers you have just read.

The infectious period. We used a geometric period, mean five steps. With a constant period the transmissions out of one node become independent, and the process is then exactly bond percolation [6], which is a solved problem. With a variable period they correlate through the shared period, and the clean mapping breaks down. We measured both on the same lattice: 0.35107 with a geometric period, 0.33068 with a constant one, a difference of 0.02039 on a quantity near 0.34, which is precisely the failure Kenah and Robins [15] worked out for the naive percolation mapping. Had we chosen a constant period throughout, every threshold in the table would have shifted by a few per cent and the lattice would have agreed better with percolation theory. We kept the geometric period, since it is the standard SIR assumption in the literature. Both numbers are reported.

The fizzle cutoff. Calling an outbreak "large" above 1% of \(N\) is an arbitrary line, and it shows. For the random graph it barely matters: moving the cutoff from 20 to 500 nodes shifts the measured threshold from 0.1708 to 0.1782, a change you would not notice. For the lattice it matters a lot, 0.3228 to 0.3557, and for the scale-free network it matters enormously, 0.1500 at a cutoff of 20 nodes down to 0.0725 at 50. The cutoff is nearly free on tree-like graphs and nearly decisive on the others. Exactly what the fractal-cluster argument predicts once you know the critical cluster is a fractal. The full sensitivity table is in the raw output.

The index case. We seed uniformly at random. On the lattice and the random graph this is innocuous. On the scale-free network it is a large assumption, because seeding at a hub instead would raise the outbreak probability dramatically and lower the apparent threshold. A disease introduced by a travelling salesperson is a different disease from one introduced by a hermit, and our numbers describe the average over that lottery rather than either case.

The static network. Nobody in our population makes a new friend or loses an old one during the epidemic. Real contact networks rewire on the same timescale as an outbreak, and Volz and Meyers [16] showed that letting the network move can change both the threshold and the final size substantially, generally making the network behave more like a well-mixed population. The dynamic network worries us most. It pushes in the direction of making our whole result smaller than we report it. We have not modelled it.

Beyond those: there is no latent period, no asymptomatic class, no reinfection, no births, no deaths from the disease, no behaviour change and no intervention of any kind. Every edge carries the same transmission probability, which real contact data flatly contradicts, since contact durations in the POLYMOD survey [12] vary over orders of magnitude within a single person's day. Mean degree 6 is a modelling convenience. The POLYMOD mean is closer to 13.

How Much of This Is Noise

Every number above is an average over independent runs, so every number carries a Monte Carlo error that falls like \(1/\sqrt{n}\). We checked that directly rather than assuming it. One configuration, the random graph at \(T = 0.28\), run 1500 times.

0.6650.6700.6750.6800.6850.6900.69510100775large outbreaks accumulatedrunning mean attack fractionA. convergence, ER at T = 0.280.310.320.330.340.35exact 2 sin(pi/18) = 0.34730L=40L=70L=100L=140extrapolated 0.33870.000.020.040.06L to the power -3/4lattice p_cB. finite-size scaling
Figure 5. A. Convergence. Running mean of the conditional attack fraction on the random graph at \(T = 0.28\), with its 95% interval, as large outbreaks accumulate. The estimate moves from 0.67852 after 10 outbreaks to 0.68113 after 775, a shift of 0.0026, while the interval narrows from 0.0234 wide to 0.0016. B. Sensitivity to system size. Measured constant-period lattice threshold against \(L^{-3/4}\), the scaling two dimensional percolation requires. Four lattice sizes from L = 40 to L = 140, the dashed line a least-squares fit, the open circle its extrapolation to infinite size at 0.33870 against the exact 0.34730.

The convergence is dull, which is the desired outcome. Ten outbreaks already put you within 0.003 of the answer, because the conditional attack fraction has a small spread once an outbreak is established, standard deviation 0.01134. The interval halves each time the count quadruples, and \(SE\sqrt{n}\) stays flat at 0.0119, 0.0115, 0.0110, 0.0111 for n = 50, 100, 200, 400, which is what \(1/\sqrt{n}\) scaling looks like when it is working.

The outbreak probability converges far more slowly, being a Bernoulli proportion sitting near one half. After 100 runs it reads 0.540, interval 0.195 wide. After 1500 it reads 0.51667, interval 0.0506 wide. Any statement about whether an epidemic happens needs an order of magnitude more runs than a statement about how big it gets once it has started.

The distribution of final sizes explains why we quote two numbers here rather than one. Of 1500 runs, 724 ended with fewer than 50 infections and 775 ended with more than 6000, which leaves exactly one run landing between 25 and 6000. Nothing in the middle. A mean over all 1500 runs names a size that no simulated epidemic ever produced.

Panel B is the sensitivity check that actually rescued Validation C. The bond percolation threshold of the triangular lattice is known in closed form, \(p_c = 2\sin(\pi/18) = 0.3472963553\), from Sykes and Essam in 1964 [10], and with a constant infectious period our process is exactly that percolation problem. The gap between our measured lattice threshold and that exact value shrinks monotonically with lattice size, 0.0294, 0.0251, 0.0196, 0.0159, and a least-squares fit in \(L^{-3/4}\) extrapolates to 0.33870. Finite systems leave exactly that signature. We report a 1.90-standard-error discrepancy as a pass rather than a failure.

Run It Yourself

Everything in this article comes from one script and one seed, and nothing else. From the repository root:

$ python analysis/network-shape-epidemic.py > analysis/network-shape-epidemic-output.txt

Python 3.12 and numpy are the only requirements; the run reported here used numpy 2.4.2. The independent runs are farmed over up to eight worker processes, and expected runtime is about 3 to 4 minutes on eight cores or roughly 20 minutes on one. The seed is 20251215. Run seeds are assigned by task index through numpy's SeedSequence spawn keys rather than by worker, so the printed numbers are identical however many cores you have; the worker count changes the runtime and nothing else. Our own run took 217.4 seconds and printed 655 lines. Add --pilot for a reduced-run smoke test that finishes in about a minute and reproduces the structure of every table in this article with wider error bars.

The script prints its own validation verdicts for all three checks, the measured value beside the analytic or exact one, and the difference, so a reader can check the verdicts without rerunning anything. Change the model and break a check, and the script says so before the results.

References

  1. Kermack, W. O. & McKendrick, A. G. (1927). A contribution to the mathematical theory of epidemics. Proceedings of the Royal Society of London A 115, 700–721. doi:10.1098/rspa.1927.0118
  2. Newman, M. E. J. (2003). The structure and function of complex networks. SIAM Review 45, 167–256. doi:10.1137/S003614450342480
  3. Watts, D. J. & Strogatz, S. H. (1998). Collective dynamics of 'small-world' networks. Nature 393, 440–442. doi:10.1038/30918
  4. Barabási, A.-L. & Albert, R. (1999). Emergence of scaling in random networks. Science 286, 509–512. doi:10.1126/science.286.5439.509
  5. Molloy, M. & Reed, B. (1995). A critical point for random graphs with a given degree sequence. Random Structures & Algorithms 6, 161–180. doi:10.1002/rsa.3240060204
  6. Newman, M. E. J. (2002). Spread of epidemic disease on networks. Physical Review E 66, 016128. doi:10.1103/PhysRevE.66.016128
  7. Pastor-Satorras, R. & Vespignani, A. (2001). Epidemic spreading in scale-free networks. Physical Review Letters 86, 3200–3203. doi:10.1103/PhysRevLett.86.3200
  8. Pastor-Satorras, R., Castellano, C., Van Mieghem, P. & Vespignani, A. (2015). Epidemic processes in complex networks. Reviews of Modern Physics 87, 925–979. doi:10.1103/RevModPhys.87.925
  9. Boguñá, M., Pastor-Satorras, R. & Vespignani, A. (2004). Cut-offs and finite size effects in scale-free networks. The European Physical Journal B 38, 205–209. doi:10.1140/epjb/e2004-00038-8
  10. Sykes, M. F. & Essam, J. W. (1964). Exact critical percolation probabilities for site and bond problems in two dimensions. Journal of Mathematical Physics 5, 1117–1127. doi:10.1063/1.1704215
  11. Keeling, M. J. (1999). The effects of local spatial structure on epidemiological invasions. Proceedings of the Royal Society B 266, 859–867. doi:10.1098/rspb.1999.0716
  12. Mossong, J., Hens, N., Jit, M., Beutels, P., Auranen, K. et al. (2008). Social contacts and mixing patterns relevant to the spread of infectious diseases. PLoS Medicine 5, e74. doi:10.1371/journal.pmed.0050074
  13. Serrano, M. Á. & Boguñá, M. (2006). Percolation and epidemic thresholds in clustered networks. Physical Review Letters 97, 088701. doi:10.1103/PhysRevLett.97.088701
  14. Miller, J. C. (2009). Percolation and epidemics in random clustered networks. Physical Review E 80, 020901. doi:10.1103/PhysRevE.80.020901
  15. Kenah, E. & Robins, J. M. (2007). Second look at the spread of epidemics on networks. Physical Review E 76, 036113. doi:10.1103/PhysRevE.76.036113
  16. Volz, E. & Meyers, L. A. (2007). Susceptible-infected-recovered epidemics in dynamic contact networks. Proceedings of the Royal Society B 274, 2925–2934. doi:10.1098/rspb.2007.1159