Fitting the exponent
Worth reading first: The cube law.
There are two ways to use a law like Murray’s on real measurements, and they answer different questions.
Assume the exponent. Take k = 3, compute how badly r₀³ = Σrᵢ³ fails on the junctions, and report the error. This asks: how close is this network to the hydraulic optimum?
Fit the exponent. Sweep k, find where r₀ᵏ = Σrᵢᵏ holds best, and report the k. This asks: what relation does this network actually obey?
The second is more informative and it is much less often done.
Why the fitted version says more
Because the answer is a number with meaning rather than a distance from an assumption.
An exponent of 3 is the hydraulic optimum — Murray’s law, minimising pumping plus upkeep.
An exponent of 2 conserves total cross-sectional area across a junction. That is Leonardo’s rule for trees, and it is what a purely mechanical requirement gives: a branch that must support itself.
An exponent between them says the network is trading the two, and where it sits says how the trade is struck. Reporting “12% departure from k = 3” throws that away; reporting “k = 2.4” keeps it.
The same reasoning applies whenever a law is used as a null model. The departure is the measurement, and expressing it as a fitted parameter rather than as a residual keeps its meaning.
Showing the fit can find something else
A fitting routine that always returns three would confirm Murray’s law on any data at all, which is the failure mode this site cares about most.
So the gate builds a set of junctions that obey a square law by construction — daughters sized so that r₀² = r₁² + r₂² — and requires the fit to return 2, not 3. It does, to within a twentieth.
That check costs four lines and it is what makes the 3.000 above worth quoting. Without it, the recovery of Murray’s exponent from a Murray tree is consistent with a routine that returns 3 unconditionally, and there would be no way to tell from the output.
The shape of the fit
The curve matters as much as its minimum.
A sharp minimum means the data pins the exponent down: only a narrow range of k comes close to satisfying the relation. A shallow one means the junctions are consistent with a wide range, and quoting a single value would overstate the case.
Real branching data is noisier than a generated tree, and the width of the minimum is the honest expression of that noise. A published exponent without one is a point estimate with no error attached, and on this subject the error is often wide enough to include both 2 and 3 — which would mean the measurement does not distinguish the hydraulic story from the mechanical one at all.
What the fit still cannot do
Two limits worth stating.
It cannot say why. A network with k = 2.6 is doing something between the two idealisations, and which constraints produce that particular value is a question the fit does not answer. It narrows the field and does not close it.
And it assumes the relation has that form. Fitting an exponent to r₀ᵏ = Σrᵢᵏ presumes the junction obeys a power law of that shape at all, and a network organised on some other principle would be badly described by the best-fitting k. The residual at the minimum is what says whether the form is right, and it should be reported alongside — which is the same discipline the spiral fit uses, where a residual that is not arithmetic noise means the model does not apply.
Reading a fitted exponent
Some values worth having in mind when one comes out of real data.
k ≈ 3 — the hydraulic optimum. Pumping cost plus upkeep cost, minimised. Expect it in small vessels and fine vasculature where mechanics is not the binding constraint.
k ≈ 2 — cross-sectional area conserved. The mechanical answer, and Leonardo’s rule for trees. Expect it where a branch has to hold itself up.
Between — a trade, and the position says how the trade is struck.
Below 2 — the daughters are unusually thin relative to the parent, which happens where the network is dividing many times in a short distance.
Above 3 — rare, and worth checking the measurement before believing it.
Why this generalises beyond branching
The move here — fit the parameter rather than assume it and report the residual — is the same one the spiral fit makes and the same one the divergence-angle recovery makes.
In each case there is a value the theory predicts and a value the data implies, and the informative thing is the second. Reporting a departure from the predicted value collapses a measurement into a verdict; reporting the fitted value keeps it a measurement.
And in each case the routine has to be shown returning something else on data built to a different rule, or its agreement with the theory is uninformative. That check is four lines and it is the difference between a fit and a formality.
What a fitted exponent looks like on real data
The generated trees here return 3.000 because they were built to, which demonstrates the machinery and not much else. Real measurements are the interesting case and the literature is worth summarising.
Mammalian vasculature. Fitted exponents in arterial trees cluster near 3 in the smaller vessels and fall toward 2.3–2.7 in the larger ones, which is consistent with wall mechanics and pulsatile flow becoming significant where the vessel is big.
Plant xylem. Values near 3 in fine branches, with the same drift downward in trunks.
Tree branching, structural rather than vascular. Closer to 2 — Leonardo’s rule — because a branch must hold itself up and the mechanical requirement dominates the hydraulic one at that scale.
The pattern across all three is the same: an exponent near 3 where hydraulics is the binding constraint, drifting toward 2 where mechanics is. That is exactly what one would predict from the derivations, and it is a result that assuming k = 3 and reporting the residual would have thrown away.
The width of the minimum
A fitted parameter without an uncertainty is half a measurement, and on branching data the uncertainty is often large enough to matter.
The curve swept here is the sum of squared log-discrepancies against k, and its width at the minimum says how tightly the data pins the exponent. On a generated tree with exact radii the minimum is sharp. On real measurements, with radii measured to a few per cent and junctions that are not perfectly binary, it can be wide enough to include both 2 and 3.
When it is that wide, the honest report is that the data does not distinguish the hydraulic story from the mechanical one — which is a real finding about the measurement rather than a failure to get an answer.
Why the discrimination check matters more here than usual
A fitting routine that returned 3 unconditionally would confirm Murray’s law on every dataset ever collected, and nothing about its output would reveal the problem. That is the worst kind of bug: silent, plausible and self-confirming.
So the gate builds junctions that obey a square law and requires the fit to return 2. It does, to within a twentieth.
The same reasoning runs through this site. The spiral counter is run on a rational lattice and required to find rows rather than a Fibonacci pair. The angle recovery is fed a non-coprime pair and required to decline. In each case the check costs a few lines, and in each case it is the difference between a measurement and a formality.
Why fitting beats testing
There is a standard way to handle Murray’s law that this essay deliberately does not use, and the contrast is the point.
The standard way: assume k = 3, compute r₁³ + r₂³ at each junction, compare with r₀³, report the mean discrepancy. If it is small, Murray’s law holds.
That procedure has a defect it cannot detect. A network obeying a different exponent still produces a small discrepancy, because the two sides of the equation are strongly correlated whatever the exponent — a big parent has big daughters, and cubing everything does not change that. A square-law network scored against the cube law typically comes out with a discrepancy that reads as “reasonable agreement, some scatter”.
Fitting instead of testing removes the assumption. The exponent is swept, the discrepancy is computed at each value, and the minimum is reported. On a square-law network the minimum is at 2, and the result is that Murray’s law does not hold — which the testing procedure would never have said.
The cost is one extra loop. The gain is a procedure that can return an answer other than the one it was looking for, which is the only kind worth running.
Two networks, one method
The comparison figure runs the fit on a network built to the cube law and on one built to a square law, side by side, with the same code.
The cube-law network returns 3.000. The square-law network returns 2.05. Neither number was available to the fitting routine, which sees radii and junction structure and nothing else.
That pairing is the discrimination check in visible form, and it is doing something a single panel cannot. A figure showing only the cube-law result demonstrates that the method can return 3. The pair demonstrates that it returns 3 because of the data, which is the claim being made.
The same construction recurs across this site: a generator and a recovery that share no code, run on input where the answer is known, including input where the expected answer is the unexpected one. The spiral counter has it, and the angle recovery has it in the sharpest form, since it can decline.
Reading a real network
For anyone wanting to do this on measured data, the practical difficulties are worth listing, because they are where the exponent goes wrong rather than in the arithmetic.
Junctions are not always binary. A trifurcation is fine — the relation sums over however many daughters there are — but a junction misidentified as one bifurcation when it is two closely spaced ones biases the exponent downward.
Radii are hard to measure. A vessel is not a cylinder, its diameter changes along its length, and the value near a junction is distorted by the junction itself. Measure a short way in from the branch point, consistently.
Scale matters. The binding constraint changes with vessel size, so fitting one exponent across four orders of magnitude averages two different regimes and returns something between 2 and 3 that describes neither.
The last is the most common and the most misleading, because the averaged answer often lands near 2.7 and gets reported as approximate agreement with Murray. Fitting within size bands and reporting the exponent as a function of scale is more work and is the honest version.
What a network is, for this purpose
A last note on the abstraction, since “branching network” is doing a lot of work.
The fit needs only a tree: a set of junctions, each with one parent radius and a list of daughter radii. It does not need lengths, angles, positions, or any embedding in space at all.
That is a small enough input to be gathered from a photograph, a scan, or a cast, and it is the same abstraction that an L-system produces — which is why the generated trees on this site can be fed to the fit directly. The L-system draws them; the fit measures them; and the fact that the two agree on an exponent neither shares code about is the check that the drawing is not decoration.
What the sweep looks like
The output is a curve, and the curve carries more than its minimum.
Plotted as summed squared log-discrepancy against k, a network built to an exponent has a clean parabola-like well with its floor at that exponent. The depth says how strongly the data prefers it over neighbouring values; the width is the uncertainty; and an asymmetry — a well that rises steeply on one side and gently on the other — means the data constrains the exponent from one direction only, which happens when the junctions are dominated by very unequal splits.
Reading the curve rather than the minimum is the difference between reporting “k = 2.7” and reporting “the data prefers 2.7, is essentially indifferent between 2.4 and 3.0, and rules out 2 firmly”. The second is what the measurement supports.
It is the same habit as reporting the interval rather than the point in the angle recovery, and for the same reason: a parameter without a width is a number pretending to be a measurement.
What this essay is arguing for
Stripped of the branching, the argument is one sentence: replace assumed constants with fitted parameters wherever the fit is possible.
The cost is small — a sweep instead of an evaluation — and the gain is that the procedure acquires the ability to disagree. A test against an assumed value can only report agreement or scatter. A fit can report a different value, and a different value is information the test could never have produced.
The same substitution is available all over this subject and is mostly not made. Spiral counts get assumed to be Fibonacci rather than counted. A shell gets called golden rather than fitted. A divergence angle gets quoted rather than recovered. In each case the assumed version is right often enough to survive, and wrong in ways the assumption cannot see.
The exponent is the cleanest example because the arithmetic is trivial and the consequence is stark: the same data, scored against an assumption, agrees with Murray; fitted, it says which constraint is binding and how that changes with vessel size. One of those is a formality and the other is a measurement.
What the cylinder field added to this
Expansion built a second place where an exponent is recovered from geometry rather than assumed, and the comparison is worth drawing because the two behave differently.
Here, the exponent in Murray’s law is fitted: a sweep over candidate values, a residual at each, and the minimum taken. The answer comes out at 3 because the tree was built to obey a cube law, and the fit’s credibility rests on it returning 2 when handed junctions built to a square law instead.
On a cylinder, the divergence and rise are solved rather than fitted — two measurements, two unknowns, a bracketed root, and residuals at the floating-point floor. There is no sweep and no minimum, so there is nothing to tune and nothing that could have been tuned.
The difference is not one of care. It is that a fit is the right instrument when the model has more structure than the data pins down, and a solve is available when it does not. A junction gives one number per node and the exponent is shared across all of them, so fitting is what the situation allows.
Worth stating because “fitted” and “solved” are often used interchangeably in captions, and they carry very different guarantees. A solved quantity has an error; a fitted one has an error and a choice of objective.
And a choice of objective is a choice of weights, which is where this thread’s later findings come in. Least squares over a tree’s junctions weights each one by how far the candidate exponents’ predictions stand apart there, so the fit is already concentrating on the junctions worth measuring without anybody saying so — three quarters of a whole tree’s leverage sits in the forks whose two daughters are comparable. That is the objective behaving well.
It also means the fit inherits whatever the sample was selected on. A sweep and a minimum cannot know that the junctions handed to it were the ones within reach of a person on the ground, and a fit given only those returns a precise wrong answer rather than an honest refusal. A solve would have refused, because two equations and two unknowns either have a root or do not. That is the second half of the difference, and it is the half that costs something: a fit is the instrument the situation allows, and the price of allowing it is that it will always produce a number.
What links here
Computed from the collection, not written here: the essays that point at this one.
Reads more easily once this is understood
Essays that name this one as worth reading first.
- A sample that is confidently wrong
- Four ways to count a neighbourhood
- The band decides the answer
- The corner that does not move
- The nearest organ is not the nearest neighbour
- Which junctions say anything
- A wall that stopped moving
- A wall that was never measured
- The window that closes
- The level was doing the ordering
- The exponent an error moves
- Four walls closer than they looked
- The fragile junctions are the informative ones
- Where three and two become one
- A swelling at the fork
- A count carries no error
- A cube law with a lever arm
- A correction that keeps the overlap
- A count that has lost tips
- A crown that carries its own wood
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A count set by a delay — both name branch, fibonacci, l-systems
- A count that loses its growing points — both name branch, fibonacci, l-systems
- Counting up the stem — both name cylinder, discrimination, fibonacci
- Matching instead of correcting — both name discrimination, null model, residual
- Seven rises and two seeds — both name branch, discrimination, fibonacci
- The angle is not the object — both name branch, cylinder, fibonacci
Named objects
A flat tag is an object no other essay names yet.
BranchCylinderDa Vinci's ruleDiscriminationExponent fittingFibonacciL-systemsNull modelResidual