A genome as a switching circuit
In 1969, biologist Stuart Kauffman proposed a wildly simplified model of gene regulation: treat each gene as a binary switch, on or off, updated at each tick based on the state of a small, fixed number of other genes that regulate it. He called it the NK model — N nodes, each listening to K randomly chosen inputs, each governed by a randomly assigned Boolean rule. It throws away every biochemical detail on purpose, to ask a purely structural question: given only how many things influence each gene, what kinds of long-run behaviour are even possible?
The model, precisely
N nodes, each in state 0 or 1 (off / on) for each node i: choose K OTHER nodes at random → node i's "inputs" assign a RANDOM Boolean truth table with K inputs and 1 output (2^(2^K) possible tables to choose from — e.g. 16 possible tables when K=2) UPDATE RULE (synchronous, every node at once): new_state[i] = truthTable[i]( state[input_1], state[input_2], ..., state[input_K] )
Every node updates simultaneously from the same snapshot, exactly like the Game of Life on this site — this synchrony matters, because it makes the whole network a deterministic function from one of 2^N possible states to another. Deterministic dynamics on a finite state space has an inescapable consequence: starting anywhere, the trajectory must eventually revisit a state it has already seen, at which point it locks into a periodic attractor cycle and repeats it forever.
Why K decides everything
The single wiring parameter K — how many inputs feed each node — turns out to control whether a small perturbation dies out or explodes:
K = 1 ORDERED small perturbations die out quickly; the network freezes
into short attractor cycles; most nodes lock to a fixed value
K = 2 CRITICAL "the edge of chaos" — perturbations neither reliably die
nor reliably grow; attractor lengths scale roughly with √N
K ≥ 3 CHAOTIC a single flipped bit typically cascades through a large
fraction of the network within a few steps; attractor
lengths can grow exponentially with N
The intuition is about how far influence spreads per step. With K = 1, each node only ever reacts to one other node, so a perturbation's influence spreads along a thin, easily-interrupted chain and typically dies out. With larger K, each node is a hub for more inputs, so a change anywhere has more chances to propagate outward to more nodes on the very next tick — and for K ≥ 3 with generic random Boolean functions, that outward branching typically outpaces any damping, producing runaway, chaotic-looking activity.
Measuring the boundary: Derrida plots
Bernard Derrida gave a clean, quantitative way to locate the order-chaos boundary: take two copies of the same network, start them in nearly identical states (differing in one bit), run both forward one step, and measure the fraction of nodes that now disagree — the Hamming distance after one update, as a function of the Hamming distance before it. Plot "distance after" against "distance before" across many trials and the curve either bends below the diagonal (differences shrink — ordered regime), sits almost exactly on the diagonal (differences neither grow nor shrink on average — critical), or bends above it (differences amplify — chaotic). For NK networks with unbiased random Boolean functions, this Derrida curve crosses the diagonal almost exactly at K = 2, which is the origin of the famous "K = 2 is critical" result.
Attractors as cell types
Kauffman's biological punchline was bolder than the mathematics alone: he proposed that different attractor cycles of the same underlying gene network correspond to different, stably differentiated cell types in a real organism — skin cells, liver cells and neurons all share identical DNA, but settle into different self-consistent, self-sustaining patterns of gene activity, exactly as different starting states of the same NK network settle into different attractors. He further noted that networks in the ordered-to-critical regime naturally have a manageable, roughly polynomial number of short attractors — plausibly matching the modest number of distinct cell types found in real organisms — while deep-chaotic networks would have an unmanageably large, exponentially growing number of long, unstable attractors, which is not what biology actually shows. This remains a provocative hypothesis rather than settled biology, but it is the reason Boolean networks are still a standard toy model in systems biology for thinking about cell-fate stability and reprogramming.
Frequently asked questions
Why must an N-node Boolean network eventually cycle?
Because the network is deterministic and has a finite state space of exactly 2^N possible configurations. Starting from any initial state and following the deterministic update rule, the trajectory must revisit a previously-seen state within at most 2^N steps — once it does, it will repeat the same sequence forever, forming a closed attractor cycle. There is nowhere else for the trajectory to go.
What does K actually control?
K is the number of input nodes each node listens to. It directly sets how much a single flipped bit can propagate: with small K, most perturbations die out because few nodes are affected downstream (order). With large K, a single flip typically cascades and affects roughly half the network within a few steps (chaos). K=2 with random Boolean functions sits almost exactly on the boundary between these regimes — the "edge of chaos."
Why did Kauffman think this was a model of cell biology?
He modelled each gene as a Boolean node, switched on or off depending on the state of a handful of regulating genes (K inputs), with the whole genome updating together each "tick." In this picture, an attractor of the dynamics is a stable, self-sustaining pattern of gene activity — Kauffman proposed that different attractors of the SAME genome correspond to different differentiated cell types (skin, liver, neuron), all built from identical DNA but locked into different self-consistent activity patterns.
Try it live
Everything above runs in your browser — open Boolean Network and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Boolean Network simulation