info-diffusion / v0.5
A toy model · v0.1 → v0.5 · SIR-style information spread

Information diffusion,
simulated.

Ten people watch a video. How long until the idea ripples out through the zeitgeist — and where does it stop?

Model
S · I · R compartmental
Engine
Deterministic + Monte Carlo
scroll · watch it spread
0 people reached  ·  tick 0

Every idea is contagious. Some burn through a population in days. Some smolder for years. Most never escape the room they began in.

This is the same math epidemiologists use to track disease — borrowed for word-of-mouth, algorithmic boost, and the ordinary physics of attention.


Three states.
One equation.

§ 02 · The compartments
A population partitions, at every moment, into people who haven't heard it, people who are spreading it, and people who know but have moved on. Watch each pool fill and drain.
01 · Susceptible
S
Haven't heard it yet
Everyone the message hasn't reached. The largest pool at t = 0, draining as conversations land.
02 · Informed · active
I
Know it · still talking
People who heard it and are passing it on. The whole curve hinges on this pool — every infection rides through here.
03 · Recovered · silent
R
Heard it · moved on
People who saw the post a week ago and don't bring it up anymore. Once silent, they stop spreading — even though they still remember.
dS/dt  =  −β·S·I/N
dI/dt  =  β·S·I/N    γ·I
dR/dt  =  γ·I

§ 03 · The viral coefficient
R0 = β γ

Each active spreader infects R0 new spreaders before going silent. The whole story of the curve is whether that number is bigger than one.

The symbols

β
Effective contact rate
conversation_rate × spread_probability · new infections per day per spreader
γ
Recovery rate
rate at which spreaders go silent · 1/γ is the avg days of activity
N
Population
total reachable people · the ceiling on how far the wave can travel
if  R0 < 1
fizzle
More spreaders go silent than they recruit. The idea dies in its first room.
if  R0 = 1
edge
A slow, even diffusion — endemic, no acceleration. The model is on a knife's edge.
if  R0 > 1
viral
Exponential takeoff. Each spreader more than replaces themselves. The S-curve bends.

The shape of the wave.

§ 04 · Integrated SIR · baseline parameters
A run over 90 days with 10 seed viewers, a million-strong population, and a viral coefficient comfortably north of one. The active pool peaks early; the reached pool keeps climbing for weeks.
active spreaders  I(t)
total reached  I + R
wave envelope
peak spreaders
day of peak
50% reached
final reach

§ 05 · Tuning knobs

Five numbers change everything.

Drop a seed of viewers into a population, give them a conversation rate and a stickiness, and let the recovery rate decide when enthusiasm runs out. Every scenario you can think of lives somewhere in this five-dimensional space.

01
v₀seed_viewers
How many people see the video on day zero — the size of the initial spark.
10default
02
Npopulation_size
The total reachable audience — the ceiling that bends the curve back to flat.
1Mdefault
03
cconversation_rate
Average people told per day per active spreader — how loud the megaphone is.
3.0per day
04
pspread_probability
Chance a listener cares enough to pass it on themselves. The stickiness factor.
0.1515%
05
γrecovery_rate
Daily rate at which an active spreader goes silent. Reciprocal is the half-life of enthusiasm.
0.10~10 days

Six scenarios. Six curves.

§ 06 · Preset playbook
From a friend's group chat to an algorithmic firestorm — the same five parameters, dialed into recognizable patterns. Each card runs its own live simulation, looping forever.
01 · tiny creator R₀ ≈ 2.5
scenarioPosted to ten people.
Friend drops something. Tiny audience, low conversation rate, slow recovery — but it can still find a corner.
seeds10
pop500K
02 · small creator R₀ ≈ 3.6
scenarioA niche channel hits.
A loyal fanbase drops a banger. Decent conversation rate, healthy stickiness, normal cooldown.
seeds1K
pop1M
03 · mid creator R₀ ≈ 5.3
scenarioAlgorithm gives a nudge.
Mid-tier creator with the algorithm helping. Bigger seed, higher stickiness — the curve gets steep, fast.
seeds10K
pop5M
04 · viral moment R₀ ≈ 8.3
scenarioSomething hits different.
100K-seed firestorm. Five conversations a day, twenty-percent stickiness, twelve-percent fade — pure exponential blast.
seeds100K
pop50M
05 · fizzle out R₀ ≈ 0.8
scenarioPeople lose interest fast.
Spreads briefly, then dies. Recovery outpaces transmission — the wave never reaches the second room.
seeds500
pop1M
06 · slow burn R₀ ≈ 7.2
scenarioWord of mouth, no algorithm.
Low conversation rate, very sticky, almost no fade. The reach is huge — it just takes months instead of days.
seeds100
pop500K

§ 07 · Run the model

Watch your own idea
spread (or fail to.)

Three on-ramps. Play with it in your browser, fork the repo and run it locally, or rewrite a scenario in src/presets.py and make it yours.

quick start · local
$ git clone https://github.com/nnnsightnnn/info-diffusion
$ cd info-diffusion
$ pip install -r requirements.txt
$ bash scripts/preview.sh         # browser dashboard at :8000
$ python src/explore.py            # interactive CLI explorer
$ python -m streamlit run src/dashboard.py  # streamlit version