One model, two readings

A single model of how located capacity gets shared out. Thousands of [[agent|agents]] arrive one at a time; each compares what every site would cost it, adds its own [[tastenoise|taste noise]], picks one, stays a while and leaves. A site’s price rises with how many are there, and its fit adapts to what it serves. Read it as an economy and the agents are households choosing parcels; read it as a neural network and they are spikes, each won by one neuron of a competitive layer. Both views draw the same agents: every dot moving in one is the same arrival moving in the other. Architectures in both fields turn out to be the same equation with different terms switched on, and stated in symbols each pairing is exact. Underlined terms and blue citations open on hover; click one to pin it and follow its links. Follow one arrival walks through a single choice.

Architectures ⇄ architectures

Each row is one setting of the same model, named in both fields. The columns are the model's terms; a dot means the term is off. Pick a row.

As an economy

    As a neural network

      Economy

      Neural network

      The one model

      Ukj = − t·d(s, j) + s·κ·Σq Wkq·(Bkq ∗ rq)j − pj − m·(1 − fitkj) − ν·κ·rj,−k + ρ·log(1 + rj/r0) − H + κ·(w·e−γTj·gj + v·Tj)
      P(k from s picks j) ∝ exp(Ukj / τ) , or the outside option
      pj rises with load and fades slowly, loadj ≤ cap
      fit follows what j serves, and what its neighbours serve

      The whole model in symbols, and why each pairing is exact ↓

      Knobs

      Readout

      The model in symbols

      Everything above is one stochastic process, stated here once. The dictionary after it names each symbol in both fields and says why each pairing is exact rather than an analogy; model.test.mjs checks the claims.

      1. Arrivals. Sites $j$ = 1…$N$ sit at points of a map ⇄ sheet. Arrivals come as a [[poisson|Poisson process]]. Each has a type $k$ and a starting point $s$, together its class $c$, which arrives at rate $λ_c$.
      2. What an option costs. For an arrival of type $k$ from $s$, site $j$ costs $c_j = t_k·d(s, j) + p_j + m·(1 − fit_{kj}) + ν·κ·r_{j,−k} − ρ·log(1 + r_j/r_0) + H − s·κ·Σ_q W_{kq}·(B_{kq} ∗ r_q)_j$ distance, price, [[mismatch|mismatch]], the other types’ load at $j$, a bonus for busy sites, a [[headtax|tax per resident]] $H$, the same everywhere, and the gain from being near the types this one deals with (the [[agglomeration|interaction]] term, item 7). (The panel above writes the same thing as a utility, $U = −c$.)
      3. Choice. The arrival takes the option with the lowest $c_j − τ·ε_j$, where each $ε_j$ is its own draw from a [[gumbel|Gumbel distribution]], unless the outside option’s value $V_0$ beats them all. So $P(j) = e^{−c_j/τ} ÷ (e^{V_0/τ} + Σ_i e^{−c_i/τ})$ the [[logit|logit]] ⇄ [[softmax|softmax]] [[@mcfadden1974]]. A network produces the same law if each neuron fires at rate $e^{−c_j/τ}$ ([[escapenoise|escape noise]]) and the first to fire takes the input: of several independent exponential clocks, clock $j$ rings first with probability $rate_j ÷ Σ rates$. The two are one fact, because minus the log of an exponential waiting time is a Gumbel draw [[@yellott1977;nessler2013]]. The input is lost if a clock of rate $e^{V_0/τ}$ rings first.
      4. Stays and load. Each arrival stays an [[exponential|exponential]] time with mean $T$, then leaves. $n_j$ counts those present, and the [[meanload|load]] is $r_j = n_j ÷ (sT)$, with $s$ agents per unit of demand. By [[little|Little’s law]] its average is the rate of arrivals at $j$.
      5. Prices. $p_j = a_j + b_j$, where $a_j$ follows one of three rules:
        • Elastic supply ⇄ adaptation: $a_j = κ·r_j$, the slope of a cost $κ·r_j^2/2$. Each occupant ⇄ spike still in effect adds $κ ÷ (sT)$. With a memory, the price falls no faster than $e^{−time/memory}$ after demand drops ([[sticky|sticky]]).
        • Fixed supply ⇄ set point: $a_j$ rises by $τ·log(r_j ÷ c)$ per step until $r_j = c$.
        • Relative fees ⇄ balancing: the same with $c$ the average load, stepping by $τ·log(r_j ÷ r_{avg})$ ([[sinkhorn|Sinkhorn]]) or by a fixed amount $u$ toward the average ([[balancing|DeepSeek’s rule]]).
        A cap $n_j ≤ n_{max}$ either reroutes, so the arrival looks elsewhere and $b_j ≥ 0$ rises while a waiting list forms (the [[shadowprice|shadow price]]), or drops, so the arrival is turned away and $b_j$ = 0.
      6. Tuning. $fit_{kj} = Σ_q w_{jq}·S_{kq}$, where $w_j$ is the share of site $j$ fitted for each type ⇄ the share of neuron $j$’s synapses tuned to each input, and $S$ says how well something fitted for one type serves another. $w_j$ moves toward the mix of types that $j$ and its neighbours serve, weighting neighbours by a Gaussian of width $σ$.
      7. Interaction. $(B_{kq} ∗ r_q)_j = Σ_i B_{kq}(d_{ij})·r_{iq}$ is how much of type $q$ is near $j$, through a kernel $B_{kq}(d) = e^{−d/ℓ_{kq}} ÷ Z_{kq}$ scaled so that a uniform load $r$ gives $r$. $W_{kq}$ says how much type $k$ deals with type $q$: how many trips ⇄ connections run between them. With a starting point $s$ given (a centre ⇄ an input neuron) and $s = 0$, this is the [[downtown|land market]]; with no starting point (sources “anywhere”) the interaction term alone places arrivals, and the centre is an outcome. A second kernel with the opposite sign and a longer reach (competition for the same customers ⇄ [[lateralinhibition|lateral inhibition]]) can be added. The field $B ∗ r$ follows the load with a memory, since arrivals learn where the others are. Optionally a type’s gain saturates, $x_0·log(1 + field/x_0)$: one job, one input, is what a unit needs.
      8. Geography and technology. A layer $g_m(j)$ over the sites (a coast ⇄ where a sensory input arrives) is worth $κ·w_{km}$ per unit to type $k$. Technology $T_j$ is a layer the arrivals make: it grows with the load using a site, spreads to neighbours through a kernel of reach $ℓ_T$ (knowledge propagation ⇄ myelin along used tracts) and decays, $dT_j/dt = α·r_j + D·((B_T ∗ T)_j − T_j) − δ·T_j$. It is worth $κ·v·T_j$ to everyone, it fades the given layers, $w_{km}·e^{−γ·T_j}$, and it lengthens the reach of dealings between two sites by their mean technology, $ℓ_{ij} = ℓ·(1 + β·(T_i + T_j)/2)$, with the kernel renormalized to its own reach so the same pull is spread over more partners. So an arrival’s cost gains $−κ·(Σ_m w_{km}·e^{−γT_j}·g_m(j) + v·T_j)$, and for a given $T$ every term is still the slope of one function: $F$ gains $−κ·Σ_j r_j·(Σ_m w·e^{−γT_j}·g_m(j) + v·T_j)$.
      9. Taxes. A tax on buildings at rate $θ$ turns $κ$ into $(1 + θ)·κ$ in the price. A tax per resident adds the same $H$ to every $c_j$. A Pigouvian charge adds, a second time, the nuisance an arrival causes the others, $ν·κ·r_{j,−k}$. A tax on land value takes a share $L$ of the landowner’s residual $p_j·r_j − (1 + θ)·κ·r_j^2/2$, which is in no $c_j$. The table of taxes pairs each with its network counterpart.

      What the equilibrium is

      With more and smaller agents ($s → ∞$) the loads follow the average flows exactly: the [[fluidlimit|fluid limit]] [[@kurtz1970]]. For steady demand, fixed tuning and prices without memory, those flows settle where the [[freeenergy|free energy]] $F = Σ_{c,j} x_{cj}·(t·d + m·(1 − fit)) + Σ_j κ·r_j^2/2 + ν·κ·Σ_j r_{jA}·r_{jB} − (s·κ/2)·Σ_{k,q} W_{kq}·Σ_{i,j} r_{ik}·B_{kq}(d_{ij})·r_{jq} − κ·Σ_j r_j·(Σ_m w·e^{−γT_j}·g_m(j) + v·T_j) − ρ·Σ_j G(r_j) + τ·Σ_{c,j} x_{cj}·log(x_{cj} ÷ λ_c)$ is lowest. $x_{cj}$ is the flow of class $c$ to site $j$, and $G$ is the function whose slope is $log(1 + r/r_0)$. Under a fixed supply, the constraint $r_j = c$ takes the place of $κ·r_j^2/2$. Every price is the slope of $F$ at its site’s load, a [[lagrange|Lagrange multiplier]], which makes the model a [[potential|potential game]] [[@monderer1996;sandholm2001]].

      $F$ leaves two things out, in both readings: [[sticky|sticky]] prices depend on history, and the tuning rule isn’t derived from $F$ (the dictionary says what it is instead). And it exposes one: the nuisance actually suffered is $2νκ·Σ_j r_{jA}·r_{jB}$, twice the term in $F$, because each arrival counts the nuisance it suffers but not the nuisance it causes, an [[externality|externality]]. Charging each arrival the nuisance it causes, a [[pigou|Pigouvian tax]], makes the true cost the potential, so equilibria sit where it is flat. With weak nuisance it has a single minimum, the charge finds it, and the tests confirm the true total cost falls. With strong nuisance several separated layouts are each stable, and the charge guarantees only one of them.

      $F$ also needs nuisance to be mutual. If use A minds use B more than B minds A, no single function’s slopes give both their costs, and the model stops being a [[potential|potential game]]. Settling then needs another reason. One is enough: a [[stablegame|stable game]] settles without any potential [[@hofbauer2009]], and a chase, where B seeks A while A avoids B, is one, because its nuisance has no symmetric part. The tests find more. Two uses settle even under strong one-sided nuisance, which isn’t stable, because at a site the split between two uses can only move one way, with no room to rotate. Three uses that each mind the next never settle once $ν$ passes $2τ/(κ·x)$, with $x$ a use’s load at the busiest site, while a symmetric control with the same symmetric part separates there and stops. A Pigouvian charge adds the nuisance caused to the nuisance suffered, which makes any nuisance mutual, so it restores a potential and settles the three uses too.

      The dictionary

      Symbol Economy Neural network Why it’s the same
      $j$A parcel; a firm; a workplaceA neuron; an [[expert|expert]]; a [[query|key]]The same index
      An arrival of type $k$ from $s$A household, customer or commuterAn input [[spike|spike]], a [[token|token]], a [[query|query]]The same point of a [[poisson|Poisson process]]
      $τ·ε_j$[[tastenoise|Taste noise]]; τ is the [[taste|variety of tastes]] [[@mcfadden1974]][[escapenoise|Escape noise]]: which neuron fires first; τ is the [[temperature|temperature]] [[@gerstner2014]]Exact: the first of several exponential clocks is a [[gumbel|Gumbel]] argmax [[@yellott1977]]
      $P(j) ∝ e^{−c_j/τ}$[[logit|Logit]] choice[[softmax|Softmax]] routing and attentionThe same formula
      $t·d(s, j)$[[commute|Commute cost]]; trips fall off as $e^{−t·d/τ}$, the [[gravity|gravity model]] [[@wilson1967]][[wiring|Wiring cost]]; [[alibi|ALiBi]] [[@press2022]]; cortical connections fall off exponentially with distance [[@ercsey2013]]Exact for ALiBi; the same form in cortex
      $T$How long a household [[stay|stays]]How long one spike’s [[channel|adaptation channel]] stays open [[@schwalger2010]]The same random time
      $r_j = n_j ÷ (sT)$[[floorspace|Floor space in use]], one floor per householdSpikes still in effect; on average, the [[firingrate|firing rate]]The same count; its mean is the arrival rate ([[little|Little’s law]])
      $a_j = κ·r_j$[[rent|Rent]] equals the cost of the last floor, when $r$ floors cost $κ·r^2/2$ [[@mills1967;brueckner1987]][[adaptation|Adaptation]]: each spike in effect adds $κ ÷ (sT)$ to the threshold [[@benda2003]]; $κ·r^2/2$ is [[selfinhibition|self-inhibition]]The same rule
      $a_j$ moves until $r_j = c$Fixed supply: [[tatonnement|tâtonnement]] [[@walras1874]]A [[homeostasis|homeostatic]] set point [[@foldiak1990;desai1999]]The same resting point; the steps differ (here $τ·log(r_j ÷ c)$, Földiák’s linear)
      $c$ = the average loadFees that follow competitors’; [[sinkhorn|congestion pricing]][[balancing|Load-balancing bias]] [[@wang2024]]; [[sinkhorn|Sinkhorn]] attention [[@sander2022]]Exact: the experts use DeepSeek’s fixed step, attention Sinkhorn’s log step
      $n_j ≤ n_{max}$, and $b_j$[[heightlimit|Height limit]]; $b_j$ is what price exceeds building cost by [[@glaeser2005manhattan]][[ratecap|Firing-rate cap]]; for experts, a [[capfactor|capacity factor]] that drops the overflow [[@fedus2022]]The same constraint, with $b_j$ its [[lagrange|multiplier]]; dropped overflow is [[erlang|Erlang loss]]
      $V_0$[[outside|Outside option]]: moving away, staying home [[@berry1994]]The input fading before any neuron fires; an [[sink|attention sink]] [[@xiao2024]]; softmax with 1 added to the denominator [[@miller2023]]Exact: one more option ⇄ one more clock
      $w_j$, fit, $m$The share of a building [[fit|fitted]] for each use; $m$, what a misfit costsThe share of a neuron’s synapses [[tuning|tuned]] to each input; its drive is $w·x$ [[@rumelhart1985]]The same term
      $w_j$ → the mix servedRefitting toward current use[[competitive|Competitive learning]]: weights move toward the inputs won [[@grossberg1976;rumelhart1985]]The same rule
      $σ$[[localization|Localization economies]]: firms learn from nearby firms [[@marshall1890;lucas2002]]The neighbourhood of a [[som|self-organizing map]] [[@kohonen1982]]The same kernel
      $s·κ·Σ_q W_{kq}·(B_{kq} ∗ r_q)_j$[[agglomeration|Agglomeration]]: the gain from being near the types one deals with, falling off with distance [[@beckmann1976;fujita1982]][[wiringeconomy|Wiring economy]]: short wires to the populations a neuron reads from [[@chklovskii2004;chen2006]]The same term; with symmetric $W$ it is the slope of a pairwise term of $F$, so prices stay multipliers. A bump that forms with no input given is a [[neuralfield|neural field]]’s [[@amari1977]]
      $κ·(w·e^{−γT_j}·g_j + v·T_j)$[[geography|Geography]] given (a coast) and made ([[technology|roads, a port]]); the made kind grows with use, spreads [[@hagerstrand1965]] and changes what the given kind is worth [[@bleakley2012]]The substrate’s fixed structure (a sensory edge) and [[myelination|myelin]] that follows use, spreads along tracts and extends reach [[@fields2015;gibson2014]]The same form: a site value that accumulates where activity is, diffuses, and reshapes the cost of distance. Myelin’s dynamics differ in detail; the pairing is of resting states
      $ν·κ·r_{j,−k}$[[nuisance|Nuisance]] from another use there [[@coase1960]][[interference|Interference]] from another feature on the same neuron [[@elhage2022]]The same term; in the toy models, interference grows with the overlap squared times how often the other feature is active
      $ρ·log(1 + r_j/r_0)$[[scale|Economies of scale]], learning by doing [[@arrow1962]]Rich-get-richer routing; [[collapse|expert collapse]] [[@shazeer2017]]The same term: the pull grows as $(1 + r/r_0)^{ρ/τ}$, an [[urn|urn]] process [[@arthur1989]], and even loads break when $ρ/τ > 1 + r_0/r$
      $B_j$[[built|Built stock]], durable [[@glaeser2005durable]]Capacity kept for a neuron, like the metabolic machinery that follows its activity [[@wongriley1989]]The same bookkeeping; no choice depends on it
      $Σ r ÷ Σ max(r, B)$[[occupancy|Occupancy]]UtilizationThe same ratio
      Agents ⇄ flows ($s → ∞$)Individual households ⇄ the continuum of urban models[[spiking|Spiking]] neurons, [[hardattention|hard attention]] [[@xu2015]], top-1 routing ⇄ rate models, soft attention, [[softmoe|soft mixtures]] [[@puigcerver2024]]The flows are the agents’ [[fluidlimit|many-agent limit]] [[@kurtz1970]]
      $F$Real cost minus τ times the variety of choices [[@anas1983]]Energy minus τ times entropy [[@hopfield1982;ackley1985]]The same function, the [[freeenergy|free energy]]

      Taxes

      Only taxes whose network counterpart is exact are here. A network collects nothing, so in each case only what the tax does to choices carries over. Left out, because nothing in this model responds to them: a vacancy tax (the built stock affects no choice), a transfer tax (stays here don’t depend on the cost of moving), a self-assessed or Harberger tax (owners here set no prices), and a road congestion toll (commutes here don’t slow with traffic).

      Tax In the model Neural network Why it’s the same What it does here
      [[landtax|On land value]]Takes a share of $p·r − (1 + θ)·κ·r^2/2$, which is in no $c_j$Nothing: a network has no landownerExact: no cost and no term of $F$ changesRaises revenue; the city doesn’t move [[@george1879;brueckner1986]]
      [[buildingtax|On buildings]]$κ → (1 + θ)·κ$Stronger [[adaptation|adaptation]] per spike: heavier [[selfinhibition|self-inhibition]]Exact: the same parameterShorter buildings, higher rents downtown, a wider city; with one floor per household, sprawl [[@brueckner2003]]
      [[headtax|Per resident]]$+H$ at every site[[globalinhibition|Global inhibition]]: the same inhibition on every neuronExact: a softmax ignores what all options share [[@nessler2013]]A closed city doesn’t move. In an open one people leave until rents have fallen by about $H$ [[@oates1969;wheaton1974]]
      [[pigou|Pigouvian, on nuisance]]$+ν·κ·r_{j,−k}$ again: the nuisance an arrival causesThe [[interference|interference]] a feature causes the others, which training on the total loss countsExact: what an arrival suffers plus what it causes is the slope of the true costLess nuisance; with weak nuisance, a lower true cost [[@pigou1920]]
      [[fueltax|Per unit of distance]]Adds to $t$A steeper [[wiring|wiring cost]] per unit of distance; a steeper [[alibi|ALiBi]] slopeExact: the same parameterWhat the commute ⇄ wiring knob does

      Where the correspondence breaks

      References

      Cited inline throughout the page: click a citation to see its entry here.