HomeArticlesGene Regulatory Network

Gene Regulatory Networks: Toggle Switches, Repressilators and Hill Functions

How genes wired to activate and repress each other build switches, clocks and filters -- the circuit logic hiding inside a cell.

mysimulator teamUpdated June 2026≈ 8 min read▶ Open the simulation

A cell's genes are wired like a circuit

A gene does not just sit and get read at a fixed rate -- its protein product can switch other genes on or off, which can switch still others, feeding back on the first gene itself. The result is a gene regulatory network: nodes are genes, edges are 'this protein activates or represses that gene', and the whole thing behaves less like a parts list and more like an analogue electronic circuit built out of promoters and repressors instead of transistors.

live demo · repressilator protein levels oscillating over time● LIVE

The standard way to model one edge of that circuit mathematically is a Hill function, which captures how a transcription factor's effect on a target gene saturates as its concentration rises, rather than growing forever:

activation:  f(x) = x^n / (K^n + x^n)      rises from 0 toward 1 as x grows
repression:  f(x) = K^n / (K^n + x^n)      falls from 1 toward 0 as x grows
K = concentration at half-maximal effect,  n = Hill coefficient (steepness / cooperativity)

A high Hill coefficient n produces a near-switch-like response -- the target gene is essentially off below K and essentially on above it -- which is exactly the sharp, cooperative binding real transcription factors often show when several copies must bind together to have an effect.

The toggle switch: a cell's memory

Wire two genes so each represses the other, and you get a bistable toggle switch: two stable states exist (gene A on / gene B off, or the reverse), and the network sits in whichever one it started in or was last pushed into, refusing to drift to the other on its own. Gardner, Cantor and Collins built exactly this circuit in E. coli in 2000, one of the founding experiments of synthetic biology, and it works as a rudimentary form of cellular memory -- a transient signal can flip the switch, but the state persists after the signal is gone, the same qualitative behaviour an SR latch has in digital electronics.

The repressilator: a clock made of three repressors

Wire three genes in a repression ring instead of two -- A represses B, B represses C, C represses A -- and instead of settling into a stable state the system can oscillate: each gene's protein rises, represses the next, falls as its own repressor rises in turn, and the cycle repeats indefinitely. This is the repressilator, built by Elowitz and Leibler in 2000 as a second founding synthetic-biology circuit, and it demonstrated that a self-sustained biological clock could be engineered from parts with no oscillatory behaviour on their own -- the oscillation is a pure consequence of the network topology (an odd number of repressive edges in a loop) plus appropriate degradation rates, not of any single gene being special.

Feed-forward loops: built-in filters

Beyond switches and clocks, one three-node motif -- gene A regulating gene B both directly and indirectly through gene C -- turns up far more often in real regulatory networks (E. coli's, for instance) than random wiring would predict, because it performs a useful signal-processing job. A coherent feed-forward loop, where the direct and indirect paths agree in sign, acts as a persistence filter: it only turns gene B fully on if the input signal from A stays present long enough for the slower indirect path through C to catch up, which filters out brief noise spikes while still responding to sustained signals. An incoherent feed-forward loop, where the two paths disagree, instead produces a pulse -- a fast rise from the direct path followed by a return to baseline once the delayed, opposing indirect path catches up.

Why ODEs, and where they break down

Modelling protein and mRNA concentrations as continuous variables governed by ordinary differential equations -- production rate as a Hill function of the regulators, minus a linear degradation term -- works well when molecule counts are in the hundreds or thousands, which is typical for many genes. But some regulators are present in only a handful of copies per cell, and there discreteness and randomness in individual binding and transcription events (stochastic noise) can matter enough that continuous ODEs miss real behaviour, such as genetically identical cells in the same environment settling into visibly different states purely by chance -- which is itself sometimes the point, as in bacterial persistence and stem-cell differentiation.

Frequently asked questions

What is a Hill function and why is it used to model gene regulation?

A Hill function describes how a regulator's effect on a target gene saturates rather than growing without bound as concentration rises, and how sharply it switches on or off depending on the Hill coefficient n. It captures the real, cooperative, saturating binding behaviour of transcription factors better than a simple linear or proportional model.

How does a genetic toggle switch 'remember' its state?

Two genes that mutually repress each other create two stable equilibrium states -- roughly, A-on/B-off or A-off/B-on -- and the system stays in whichever state it currently occupies unless an external signal is strong enough to push it past an unstable threshold into the other state. This bistability is what gives the circuit memory.

Why does the repressilator oscillate instead of settling to a stable state?

Because it wires three repressors in a ring with an odd number of repressive edges (A represses B, B represses C, C represses A), no single stable equilibrium exists that satisfies all three repression relationships at once. Combined with the right degradation rates, the network is pushed into a sustained limit-cycle oscillation instead.

Try it live

Everything above runs in your browser — open Gene Regulatory Network and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Gene Regulatory Network simulation

What did you find?

Add reproduction steps (optional)