HomeVaccine Hesitancy Behavioral ModelAgent-Based Vaccine Hesitancy Social Network

🗣 Agent-Based Vaccine Hesitancy Social Network

This simulation models the spread of vaccine hesitancy through a social network. It allows users to explore how different factors influence the behavior and attitudes of individuals towards vaccination.

Vaccine Hesitancy Behavioral Model2DModerate60 FPS
vaccine-hesitancy-network ↗ Open standalone

Seeding a Synthetic Population — The 3Cs Model of Vaccine Hesitancy

Agent-based modeling (ABM) treats each member of a population as an autonomous decision-making unit whose belief state emerges from individual attributes and social context, rather than assuming a homogeneous population reacting uniformly to messaging. The WHO SAGE Working Group on Vaccine Hesitancy (2014) formalized the psychological drivers of hesitancy into the "3Cs model" — Confidence, Complacency, and Convenience — which this simulation uses to initialize each agent's belief state and susceptibility to social influence.

  • 2014: WHO SAGE 3Cs framework (MacDonald et al., Vaccine journal)
  • 120: Simulated population (agents on scale-free graph)
  • Top 10: Global vaccine hesitancy (2019) (WHO threat to global health)
  • 4: Belief states modeled (Confident/Complacent/Hesitant/Refusing)

The 3Cs model — Confidence, Complacency, Convenience

The SAGE Working Group defines vaccine hesitancy as "a delay in acceptance or refusal of vaccination despite availability of vaccination services," driven by three interacting dimensions:

Confidence: trust in the effectiveness and safety of vaccines, in the system that delivers them (clinics, providers, regulators), and in the motives of policymakers. Low confidence often traces to specific trust ruptures — a local adverse-event rumor, a historical medical-ethics scandal, or perceived conflicts of interest in health authorities.

Complacency: perceived risk of the vaccine-preventable disease is low enough that vaccination is not viewed as a necessary preventive action. Complacency rises precisely when vaccination programs succeed — as disease incidence falls, the salience of the threat fades faster than the (mis)perceived risk of the vaccine itself, a dynamic sometimes called the "victim of its own success" paradox.

Convenience: physical availability, affordability, geographical accessibility, ability to understand (health literacy), and appeal of immunization services. Even highly confident, non-complacent individuals may fail to vaccinate if convenience barriers are high.

Each simulated agent is initialized with a composite 3Cs score sampled around the population mean set by the Initial Hesitancy slider, then discretized into one of four belief states used throughout the simulation: Confident, Complacent, Hesitant, and Refusing.

From continuous belief to discrete state — a SEIR-like framing for attitudes

This model borrows its state-transition architecture from compartmental epidemic models (SEIR) but applies it to attitudes rather than infection. Instead of Susceptible→Exposed→Infected→Recovered, agents move probabilistically among Confident, Complacent, Hesitant, and Refusing based on:

1. Individual stubbornness (θᵢ): a fixed per-agent resistance-to-persuasion parameter, sampled from a Beta distribution — modeling the empirical finding that attitude change resistance is heterogeneous and skewed (most people update moderately; a persistent minority is highly resistant in both directions).

2. Social exposure: the weighted proportion of an agent's network neighbors in each belief state, updated every simulation tick.

3. A stochastic transition rule: an agent flips state when weighted neighbor influence exceeds its personal stubbornness threshold, analogous to a discrete choice model with idiosyncratic noise (a logit-linked threshold, following Granovetter 1978 — detailed in Stage 3).

This architecture lets the same population produce very different aggregate outcomes purely from network topology — even holding the average individual 3Cs score constant, clustering and influence-path structure change final coverage substantially, which is the central finding this simulation is built to illustrate.

Homophily — Why Hesitancy Clusters Instead of Diffusing Evenly

Real social networks are not random graphs. People preferentially form ties with others who share attitudes, values, and demographic traits — a phenomenon social network theorists call homophily. McPherson, Smith-Lovin & Cook's landmark review "Birds of a Feather" (Annual Review of Sociology, 2001) established homophily as one of the most robust regularities in social network structure, and it has direct consequences for how health beliefs propagate.

  • 2001: Homophily review (McPherson, Smith-Lovin & Cook, ARS)
  • r ≈ 0.3–0.6: Assortativity in belief nets (observed in survey-linked social graphs)
  • ~70%: Rewiring probability (sim) (of ties biased toward same-state peers)
  • ~15–20%: Bridging ties remaining (cross-cluster edges after rewiring)

Modeling assortative rewiring

Starting from the scale-free graph seeded in Stage 1, this simulation performs biased edge rewiring: for each edge, with probability proportional to the Network Influence Strength slider, the endpoint is swapped for a same-belief-state node if one is reachable within two hops. This mimics real processes — selective exposure (choosing information sources and social contacts that confirm existing views), triadic closure within like-minded friend groups, and geographic/community sorting (hesitant families cluster in specific schools, congregations, or neighborhoods).

The result is visible directly on the canvas: instead of a uniform salt-and-pepper mix of colors, belief states organize into spatially coherent clusters connected by a shrinking set of "bridge" ties. This structural signature has been documented empirically — Salathé & Khandelwal (2011, PLOS Computational Biology) mapped vaccine-sentiment clustering in Twitter networks during the H1N1 pandemic and found significant assortativity by sentiment, predicting future clusters of unvaccinated individuals well before outbreaks occurred in those communities.

Why clustering matters more than the population average

A population with 20% hesitancy uniformly distributed behaves very differently from one where the same 20% is spatially concentrated. Uniformly distributed hesitancy is unlikely to produce local disease outbreaks because herd immunity is achieved in every neighborhood. Clustered hesitancy creates "pockets of susceptibility" below the herd-immunity threshold even when aggregate national coverage looks adequate.

This is not a hypothetical: the 2014-15 Disneyland measles outbreak and repeated outbreaks in geographically and ideologically clustered under-vaccinated communities (e.g., specific Orthodox Jewish communities in New York, 2018-19; Somali-American communities in Minnesota, 2017) trace directly to homophily-driven clustering of hesitancy rather than to low mean national coverage, which in each case remained above 90%.

Aggregate coverage statistics can be dangerously misleading. A region reporting 94% national MMR coverage can still sustain measles transmission (R₀ ≈ 12–18) within homophilous under-vaccinated clusters where local coverage falls to 50-70% — well below the ~95% herd-immunity threshold for measles.

Influence Cascades — Granovetter's Threshold Model Applied to Belief Propagation

Mark Granovetter's 1978 paper "Threshold Models of Collective Behavior" (American Journal of Sociology) proposed that individuals adopt a behavior (in the original paper, joining a riot) once the proportion of others already adopting it exceeds their personal threshold. This simple rule, applied over a network rather than a homogeneous crowd, produces rich cascade dynamics — and it maps directly onto belief change: an agent shifts toward hesitancy or confidence once enough of its visible social neighbors hold that view.

  • 1978: Threshold model publication (Granovetter, American J. of Sociology)
  • logit-linked: Per-tick transition rule (weighted neighbor share vs. θᵢ)
  • localized: Cascade size (low influence) (confined to dense subgraph)
  • network-wide: Cascade size (high influence) (crosses bridge ties)

The threshold rule implemented in this simulation

At each simulation tick, agent i observes the belief-state composition of its k neighbors, computes a weighted "hesitancy pressure" pᵢ = Σⱼ wᵢⱼ · hesitant(j) / Σⱼ wᵢⱼ (where wᵢⱼ is tie strength), and compares pᵢ against its individual threshold θᵢ. If pᵢ exceeds θᵢ, the agent probabilistically transitions one step toward the more hesitant end of the state spectrum (Confident→Complacent→Hesitant→Refusing); if neighbor confidence pressure dominates, the agent can move the opposite direction. The Network Influence Strength slider scales wᵢⱼ globally — weak influence produces slow, localized drift; strong influence produces fast, wide cascades.

Critically, threshold models produce discontinuous, hard-to-predict aggregate outcomes from smooth changes in individual parameters. A population where average threshold sits just above the initial hesitant fraction may show almost no cascade; nudge the average threshold slightly lower (or increase the initial seed of hesitant early-adopters) and the same network produces a full cascade to majority hesitancy. This sensitivity is the reason vaccine-confidence campaigns emphasize early, proactive engagement — once a cascade initiates past a critical mass, reversing it requires substantially more effort than preventing it.

Weak ties, strong ties, and cascade reach

Granovetter's earlier and equally influential paper, "The Strength of Weak Ties" (1973), showed that novel information and influence often travels farther through infrequent, low-intimacy ties that bridge otherwise disconnected clusters, rather than through dense strong-tie clusters that mostly just reinforce information already circulating internally. In this simulation, the sparse bridging ties that survive homophilous rewiring (Stage 2) function exactly as these weak ties: when a cascade does cross a cluster boundary, it is almost always via one of these bridges, and superspreading of confidence-restoring messaging through a small number of well-placed bridge agents can be disproportionately effective — the theoretical basis for the trusted-messenger intervention tested in Stage 4.

The Trusted Messenger Effect — Why Who Delivers the Message Matters as Much as the Message

Public health communication research consistently finds that message source credibility moderates persuasive impact independent of message content. Community health workers, local clergy, trusted physicians, and peer parents who already hold high in-group standing convert hesitant individuals at substantially higher rates than generic public-service messaging from an unfamiliar or institutional source. This simulation designates the highest-betweenness-centrality node in the network as a "trusted messenger" and amplifies its outgoing influence weight.

  • +15–30 pp: CHW program coverage gains (observed in multiple LMIC trials)
  • meta-analyses: Messenger effect literature (source credibility × persuasion)
  • 3×: Simulated influence amplification (trusted node outgoing weight)
  • betweenness: Selection criterion (centrality — bridges clusters)

Community health workers and peer messengers in the empirical literature

A substantial body of global-health field research documents that vaccination uptake responds more strongly to trusted, socially-proximate messengers than to mass-media or institutional campaigns alone. Community health worker (CHW) programs — locally recruited, trained laypeople embedded in the community they serve — have repeatedly demonstrated large coverage gains in randomized and quasi-experimental trials across immunization contexts, because CHWs combine three properties simultaneously: (1) high perceived similarity to the target audience (reducing social distance), (2) repeated, low-cost contact opportunities (enabling the dose-response effects seen in general persuasion research), and (3) accountability within an ongoing relationship rather than a single anonymous transaction.

Betweenness centrality — a graph-theoretic measure of how often a node lies on the shortest path between other node pairs — is used here as a proxy for real-world "bridge" individuals: the parent who is active in both the vaccine-skeptical parenting group and the mainstream PTA, the nurse who is also a respected elder in a specific cultural community. Selecting an intervention target by centrality rather than by raw popularity (degree) reflects network-intervention research showing that bridging position, not just audience size, predicts how far an intervention message will propagate.

Simulating the amplified-weight intervention

Mechanically, the trusted-messenger intervention in this model triples the outgoing tie weight wᵢⱼ for every edge leaving the selected node, without changing its position in the graph. Watch the canvas: the trusted node (rendered in cyan with a persistent glow) does not gain new connections — it simply persuades along its existing ties far more often per tick. Because this node was selected for high betweenness, several of its edges are exactly the sparse bridging ties described in Stage 3, so amplified influence there disproportionately seeds cascades across cluster boundaries rather than merely reinforcing an already-confident local neighborhood.

Network-targeted interventions that amplify a small number of high-centrality trusted messengers can outperform blanket awareness campaigns of far greater total reach, because the constraining factor in cascade propagation is not total message volume but whether the message crosses cluster-bridging ties into hesitant enclaves at all.

Equilibrium and Projected Coverage Against the Herd-Immunity Threshold

After sufficient ticks, the influence-diffusion process settles into a dynamic equilibrium — the network-wide distribution of belief states stabilizes even as individual agents continue to flicker between adjacent states at the margins. The simulation reads out this equilibrium as a projected vaccination coverage figure and compares it against the classical epidemiological herd-immunity threshold, 1 − 1/R₀, to make the practical stakes of the belief-diffusion process concrete.

  • 1 − 1/R₀: Herd immunity formula (classical epidemiological threshold)
  • 12–18: Measles R₀ (requires ~92–95% coverage)
  • 12–17: Pertussis R₀ (requires ~92–94% coverage)
  • ~1.3: Influenza R₀ (requires ~23% coverage (illustrative))

Reading equilibrium coverage off the network

Projected coverage is computed as the equilibrium share of agents in the Confident or Complacent states (both of which convert to actual vaccination in this simplified model, since Complacent agents still accept vaccination when convenient — they simply do not prioritize it, consistent with the 3Cs framework's treatment of Convenience as a separable barrier). Hesitant and Refusing agents are treated as non-vaccinating at equilibrium.

Because of the clustering dynamics established in Stage 2, this simulation deliberately reports both a global coverage figure and an implicit warning about local variance: identical global coverage numbers can correspond to wildly different outbreak risk profiles depending on whether the shortfall is spread evenly or concentrated in a few dense hesitant clusters that individually sit far below threshold.

Policy implications — why network structure belongs in coverage targets

Traditional vaccination policy sets a single national or regional coverage target derived from R₀. Agent-based, network-aware modeling of the kind demonstrated here argues for supplementing that target with cluster-level surveillance: identifying homophilous hesitant enclaves via survey-linked social network data or geographic proxies (school-level exemption rates, sentiment clustering on social media per Salathé & Khandelwal 2011) and directing trusted-messenger interventions specifically at the bridging nodes connecting those enclaves to the wider confident population — rather than distributing a fixed communications budget uniformly across the whole population regardless of network position.

The single most actionable output of network-based hesitancy modeling is not "raise average confidence by X points" but "identify which specific bridging individuals, if converted or engaged, would reconnect an under-immunized cluster to the broader confident network" — a fundamentally different, and more efficient, targeting logic than mass messaging.
⚙ Under the hood

This simulation models the spread of vaccine hesitancy through a social network. It allows users to explore how different factors influence the behavior and attitudes of individuals towards vaccination.

CanvasBiomedicine

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)