Large Language Thing

Home/Concepts/Detailed balance and irreversibility in municipal water systems

Detailed balance and irreversibility in municipal water systems

Any world worth modelling is held far from equilibrium. Sunlight arrives, metabolisms burn, capital compounds, steel fatigues. In such systems the mapping from state to dynamics…

The event at reservoir outfall 4

At 06:40 the turbidity probe at outfall 4 logged a spike of 3.1 NTU against a rolling baseline of 0.4. It sat above threshold for eleven minutes, dropped back under 0.5, and the automated log entered it as a transient — probable sediment disturbance from the previous night's flushing programme. No sample bottle was pulled. Distribution continued on schedule. Two days later, a cluster of gastrointestinal complaints from a primary school on the same pressure zone triggered a boil-water notice, and the retrospective assay on archived grab samples from a downstream tap confirmed Cryptosporidium oocysts at levels inconsistent with a sediment event. The utility engineer on shift that morning had done nothing wrong by the written procedure. The procedure was the problem.

What the turbidity spike actually recorded was a transient breach in a filter bed that had been under increasing headloss for six days, following a coagulant dosing change made the previous week to reduce chemical costs. Each of those facts existed somewhere: pressure telemetry showed the headloss climb, maintenance logs showed the dosing change, the assay backlog eventually showed the oocysts. None of them were held together at the moment the turbidity spike occurred, because the system that watched outfall 4 in real time had no channel back to the system that logged filter maintenance five days earlier. The contamination was confirmed after distribution, not before, because "before" required an inference that no single stream, on its own, could support.

Diagnosing the gap

The instinct is to call this a data-integration failure and leave it there. That is true but incomplete. The deeper fault is about what kind of evidence each stream was treated as. The turbidity reading was treated as a state: a number, evaluated against a static threshold, discarded once it fell back under the line. The headloss trend was treated similarly — logged, graphed, occasionally reviewed at a weekly operations meeting, but never fused with the turbidity channel because nothing in the monitoring architecture asked whether the two were the same story told twice.

A filter bed under rising headloss with a recent coagulant change is not in the same physical condition as an identical filter bed with stable headloss and no recent change, even if both show 0.4 NTU at nine in the morning. The instantaneous reading cannot distinguish them. Only the trajectory can: the six days of climbing pressure differential, the date of the dosing change, the timing of the backwash cycles relative to both. This is exactly the situation physics calls a breakdown of detailed balance.

What detailed balance actually says

In a system at true equilibrium, every elementary transition is balanced by its reverse, occurring at exactly the same rate. Run the statistics forward or backward and they look identical. There is no direction, no memory, no accumulating asymmetry. Break that balance — drive the system with a sustained input, a chemical gradient, a pressure differential — and net currents appear. Cycles form. Dissipation accrues. An arrow of time becomes measurable in the statistics themselves.

Richard Tolman gave the principle its formal name in 1938, building on a symmetry Wegscheider had already used in 1901 to constrain chemical reaction rates. Onsager extended it to transport phenomena near equilibrium in 1931, work that earned him the Nobel Prize in 1968. But the case relevant to a filter bed is the one Prigogine later worked out: far from equilibrium, detailed balance fails outright, and the system's steady states carry currents, dissipation, and — critically — history. A far-from-equilibrium system's present configuration no longer determines its future, because two configurations that look the same were driven there by different paths, and they will respond differently to what comes next.

A filter bed is precisely such a system. It is driven continuously by influent flow, chemically altered by coagulant dosing, mechanically stressed by backwash cycles, and it accumulates fouling asymmetrically depending on the sequence of those inputs. Two beds reading identical headloss at the same NTU output are not equivalent if one arrived there via a coagulant underdose and the other via normal ageing. State does not fix dynamics. History is a physical variable sitting inside the filter media, and the only way to recover it is to have been watching the whole sequence, not to have sampled its current cross-section.

A filter bed that reads clean at 9am tells you almost nothing about whether it was clean at 6am for the same reasons, or for different ones.

Where the three generations sit

A system that ingests water-quality data the way a Large Language Model ingests a text corpus — a large batch, gathered and frozen, statistics extracted after the fact — can characterise what turbidity excursions typically look like across a utility's history. It is genuinely good at that. It is structurally unable to tell you, in the moment, whether today's excursion sits on a rising-headloss trajectory or a one-off sediment disturbance, because the batch discards the order in which events occurred relative to one another. Sequence is exactly what gets thrown away when a corpus is treated as an equilibrium ensemble sampled once.

A system built like a Large World Model does better: it senses the scene live, so it can register that the turbidity flux is non-zero right now, which is itself evidence that something is breaking the bed's steady equilibrium. But sensing the present flux is not the same as holding the six-day accumulation that explains it. Without retained ordering, a live sensor array is present-tense only. It can detect that balance is broken. It cannot say why, because "why" lives in a trajectory that has already partly happened by the time any single reading is taken.

What the outfall 4 failure actually required was the third posture: every stream — turbidity, headloss, dosing logs, assay backlog, maintenance records — kept running continuously, each observation stamped with when it was taken and where it came from, so that a rising headloss trend and a dosing change five days prior and an eleven-minute turbidity spike could be read as three observations of one trajectory rather than three unrelated facts in three unrelated systems. That is provenance doing the work ordering does in the physics: it is what turns a pile of readings into a path.

GenerationWhat it holdsWhat it misses at outfall 4
Large Language Modelfrozen batch, order discardedcannot place today's spike on any trajectory
Large World Modellive scene, present fluxdetects the anomaly, not its six-day cause
Large Universe Modelcontinuous streams, ordered, provenance-stamped

The objection worth taking seriously

You can always fold history into state. Add headloss, days-since-dosing-change, and backwash count as state variables, and the filter bed becomes Markovian again. This shows the model was under-specified, not that continuous intake is a requirement.

This is correct mathematics and the concession should be made in full. Any history-dependent system can, in principle, be re-expressed with an enlarged state vector that restores a memoryless description. Preisach models do exactly this for magnetic hysteresis, tracking a population of internal switching elements rather than a single flux value.

The difficulty is not formal, it is epistemic. Those enlarged state variables — days since dosing change, cumulative headloss integral, backwash-cycle count since last media replacement — are not read off the filter bed by a single instantaneous probe. They are constructed by having watched the bed operate over the preceding days. You obtain the sufficient state only by maintaining exactly the kind of continuous, provenance-stamped record the argument calls for. Enlarging the state space does not remove the requirement for continuous intake; it relocates the requirement into the variables' construction. A utility that tries to shortcut this by adding "headloss" as a field to a periodically refreshed dashboard, without preserving when each entry was logged relative to the others, reproduces the exact defect at greater cost: a bigger table, still order-free.

The other objection: cadence over continuity

Most water-quality processes are slowly varying and well characterised. Sample turbidity every fifteen minutes, headloss hourly, assay weekly. Sampling theory guarantees recovery of a band-limited process at the right cadence. Continuous, always-on intake is unnecessary engineering excess.

For steady, slowly drifting processes this is right, and it is in fact how most treatment plants are correctly instrumented today; nobody needs microsecond turbidity data. It fails precisely on the events that matter most: filter breakthrough, main breaks, backflow incidents, cross-connection contamination. These are avalanche-like, not band-limited. A coagulant dosing pump failing mid-shift, a sudden pressure transient from a hydrant left open, a cross-connection activated during a single irrigation cycle — these have no fixed correlation time to sample against, and their consequence, an oocyst count above threshold, can appear and clear within a window shorter than most fixed sampling intervals. Cadence-based monitoring is the right economics for the baseline and the wrong tool for exactly the tail events a boil-water notice exists to prevent. Knowing what cadence would have caught outfall 4 requires knowing in advance how fast the filter bed would fail — which is the information the incident was missing.

What this settles and what it doesn't

None of this promises a system that predicts contamination with certainty. Provenance and continuous intake supply the trajectory; they do not supply infallible inference from it. What they settle is narrower: no batch of frozen readings and no live-only sensor sweep can, even in principle, recover the six-day story that made outfall 4's eleven-minute spike meaningful. That story exists only in the ordering of events across streams that were never unified while running. Holding every stream, indexed by when it was seen, is not an extravagance added on top of good monitoring. It is the minimum object a history-dependent filter bed requires to be legible at all — and once you have that, there is no further category of intake left to reach for.

Continue