🕸️ Network Formation

Written by MySimulator Team · Reviewed by MySimulator Editorial Review

Last updated: 11 July 2026

| |
Nodes: 0
Edges: 0
Max degree: 0
Avg degree: 0
Status: Growing

🕸️ Network Formation — Preferential Attachment

Watch a network grow one node at a time. Each new node connects to a handful of existing nodes chosen with probability proportional to how many connections they already have — the "rich get richer" rule that turns a random-looking web into a scale-free network with a few dominant hubs.

🔬 What It Demonstrates

The Barabási-Albert model: growth plus preferential attachment. Early nodes accumulate connections faster simply because they had more time to be chosen, producing hubs and a heavy-tailed, power-law degree distribution rather than the bell-curve distribution of a random graph.

🎮 How to Use

Watch nodes join and links snap to existing hubs in orange. Raise m to add more edges per new node and thicken the web. Increase growth rate to speed up node arrivals. Pause to inspect the layout, or reset to restart from a fresh five-node seed.

💡 Did You Know?

The same mechanism that grows this simulation also explains why the World Wide Web has a handful of extremely linked pages, why a few scientific papers get cited thousands of times, and why some airports become massive hubs while most stay small.

About Network Formation — Preferential Attachment

This simulation models the Barabási-Albert (BA) process, the most widely cited mechanism for how real-world networks self-organise into a "scale-free" structure. Starting from a small seed of connected nodes, new nodes are added one at a time, each attaching to m existing nodes chosen with probability proportional to their current degree. Because well-connected nodes are more likely to receive each new link, a small number of nodes become disproportionately connected "hubs" while most nodes remain sparsely connected — a dynamic often summarised as "the rich get richer." The live histogram tracks the emerging degree distribution, which converges toward a power law rather than the narrow, symmetric distribution produced by a purely random graph.

The model was introduced in 1999 by physicists Albert-László Barabási and Réka Albert in the paper "Emergence of Scaling in Random Networks," published in Science, after they observed that the World Wide Web's link structure did not match the predictions of classical random-graph theory. Since then, preferential attachment has been used to explain the structure of the internet's router topology, citation networks, airline route maps, social networks, and protein-interaction networks, making it a foundational tool in network science, sociology, epidemiology, and computer science.

Frequently Asked Questions

What is preferential attachment?

Preferential attachment is a network-growth rule in which new nodes are more likely to connect to nodes that already have many connections, rather than choosing targets uniformly at random. In the Barabási-Albert model, the probability that a new node links to an existing node i is proportional to node i's current degree divided by the total degree of the network. This simple local rule, repeated as the network grows, produces a highly uneven global structure with a small number of extremely well-connected hub nodes.

How do I use this simulation?

The simulation starts from a small ring of five connected nodes and adds new nodes automatically at the rate set by the "Growth rate" slider. Use the "m" slider to control how many links each new node forms — higher values densify the network faster. Nodes with orange rings are the current hubs. Pause the growth to inspect the layout or watch the histogram, and reset to restart from scratch with a fresh seed.

Why do a few "hub" nodes emerge — the rich-get-richer mechanism?

Because attachment probability is proportional to degree, nodes that happen to gain an early lead in connections are more likely to gain further connections later, compounding their advantage over time. This positive-feedback loop, mathematically identical to a Yule process or Polya urn, means the earliest and luckiest nodes tend to become the biggest hubs, even though every node followed the identical probabilistic rule. Small early differences get amplified rather than averaged out.

Where did the Barabási-Albert model come from?

The model was proposed in 1999 by Albert-László Barabási and Réka Albert in "Emergence of Scaling in Random Networks" (Science, vol. 286). They mapped part of the World Wide Web's hyperlink structure and found its degree distribution followed a power law, which classical Erdős-Rényi random-graph theory could not explain. They proposed that two ingredients — continuous network growth and preferential attachment — together were sufficient to generate scale-free structure, a result that launched the modern field of network science.

How does a scale-free network differ from an Erdős-Rényi random graph?

In an Erdős-Rényi random graph, every possible edge is included with equal, independent probability, which produces a Poisson-like degree distribution: most nodes have a similar, "typical" number of connections, and extremely high-degree nodes are exponentially rare. A scale-free network produced by preferential attachment instead follows a power-law distribution P(k) ~ k^-gamma, meaning there is no characteristic "typical" degree — most nodes have very few links, but a small fraction have vastly more, spanning orders of magnitude, with no natural cutoff scale.

What real-world networks show power-law degree distributions?

Documented examples include the hyperlink structure of the World Wide Web, the physical router-level topology of the internet, scientific citation networks (a handful of papers receive the vast majority of citations), airline route maps (a few hub airports like Atlanta or Dubai connect to hundreds of destinations), protein-interaction networks in cell biology, and some social and collaboration networks such as co-authorship graphs, where a small number of highly prolific or well-connected individuals dominate the link count.

Why are scale-free networks robust to random failure but fragile to targeted attack?

Because most nodes in a scale-free network have very few connections, removing nodes at random overwhelmingly hits low-degree nodes and barely damages overall connectivity — the network is highly robust to random failure. However, the network's structural integrity depends heavily on its rare hubs. Deliberately removing the highest-degree nodes rapidly fragments the network into disconnected components, a vulnerability with direct implications for internet resilience, epidemic control (targeting super-spreaders), and infrastructure security.

What are some limitations or critiques of the Barabási-Albert model?

The basic BA model assumes attachment probability is exactly linear in degree and that nodes are never removed, which is a simplification of most real systems. Some real networks show "sub-linear" or "super-linear" attachment, node aging (older nodes stop attracting new links regardless of degree), or fitness effects where newer nodes with intrinsically more attractive content can overtake older ones ("fit-get-richer"). Later variants such as the Bianconi-Barabási fitness model and non-linear preferential attachment models were developed to address these observed deviations.