Source-linked AI summary

Water-network decisions share one hydraulic gradient, and it can now be computed exactly

Tianwei Mu, Yue Wang, Mingzhe Yuan, Wenhong Wang, Qing Luo, Min Xiao, Jun Li, Hui Yang, Manhong Huang

arXiv:2609.06323v1cs.DC

TL;DR

WDN decisions such as calibration and leak localization involve continuous parameters, but the hydraulic engine exposes no derivatives for them. The paper makes the global gradient algorithm differentiable, using one shared gradient object for calibration, leak search, and sensor placement. The maximum head deviation was 1.137 × 10−13 ft at worst; calibration reached its endpoint in a median 595 model calls, and operating-network ambiguity was 7.42 km of main, not 84.

  • Problem

    WDN decisions such as calibration and leak localization involve continuous parameters, but the hydraulic engine exposes no derivatives for them.

    Source: §1 · p. 2, §4 · p. 13
  • Method

    The paper makes the global gradient algorithm differentiable, using one shared gradient object for calibration, leak search, and sensor placement.

    Source: §4 · p. 13, §5 · p. 14
  • Results

    The maximum head deviation was 1.137 × 10−13 ft at worst; calibration reached its endpoint in a median 595 model calls, and operating-network ambiguity was 7.42 km of main, not 84.

    Source: §4 · p. 13, §5 · p. 14
  • Takeaways & Limitations

    The shared gradient gives three readings of the same object, while coherence marks a district-level scale for the leak ambiguity that survives.

    Source: §4 · p. 13

    Leak recovery is an inverse crime by construction because leaks were injected into the same model used for inversion.

    Source: §3.4 · p. 10

Abstract

from arXiv · show

Calibration, leak localisation and sensor placement on water distribution networks (WDNs) are decisions about continuous parameters, yet the hydraulic engine that defines the physics returns a solution and no derivatives, so practice falls back on derivative-free search or on surrogates whose error the answer inherits. We make the global gradient algorithm itself exactly differentiable: the forward pass reproduces the reference engine's discrete devices, status switching and low-flow linearisation included, and the backward pass solves the implicit adjoint by reusing the forward pass's terminal factorisation, so one extra sparse solve returns every parameter's gradient at once, batched over scenarios on one graphics processor. Across 52 public, synthetic and operational networks and 8,140 simulation frames, every network meets the acceptance criterion, the largest head deviation from EPANET 2.2 is 1.137e-13 ft and 25 agree exactly. One adjoint solve replaces the 906 simulations a finite-difference roughness Jacobian costs on the 905-pipe L-TOWN benchmark, and a leak-inversion training loop runs at 463-470 ms per optimiser step for 256 scenarios, 191 times the prior pipeline. Gradient calibration reaches its endpoint within a median 595 model calls, where the strongest of five tuned metaheuristics needs 8,060 to match it on the training loss and two never do within 20,000. On a 554-link operating network, one adjoint pass audits, pipe by pipe, which roughness parameters the installed sensors can constrain and which sensors to add, on the model the utility already operates.

1 Introduction

Calibration, leak localization, and sensor placement require continuous-parameter decisions, but hydraulic engines expose solutions without derivatives. This work differentiates the reference solver itself, preserving its deployed behavior while providing a shared gradient for these decisions.

1 Introduction

  • Existing approaches either use derivative-free search, whose cost grows with parameter count, or surrogates whose approximation error enters downstream decisions.The paper identifies the exact gradient of the deployed hydraulic engine as the missing ingredient.Source: §1 · p. 2
  • The method differentiates the deployed numerical scheme, including its discrete devices, status switching, and low-flow head-loss linearisation.Its backward pass is the implicit adjoint of the iteration the utility runs, not a smoothed substitute.Source: §1 · p. 2
  • 1.137×10−13 ft was the largest head deviation across 52 networks and 8,140 frames, with no network excluded from verification.The forward pass was compared against the reference binary.Source: §1 · p. 2
  • At batch size 256, one forward-plus-backward L-TOWN scenario takes 1.90 ms rather than 333 ms, though a single solve is not faster.The batched solver reuses each scenario’s terminal factorisation for the adjoint.Source: §1 · p. 2
  • One gradient object supports least-squares calibration, leak-search analysis through Jacobian-column coherence, and sensor placement through Fisher information.The Cramér–Rao lower bound prices the identifiability added sensors buy.Source: §1 · p. 2
  • On the operating network, simulated sensor additions restore parameter identifiability but do not recover leaks defeated by noise.The placement objective, unlike coherence itself, recovers one of the three leaks as coherence predicts.Source: §1 · pp. 2–3

2 Materials and methods

The methods combine a bit-faithful replica of EPANET’s hydraulic solver with an implicit adjoint for computing gradients, extending the framework to leak signatures, batched GPU scenarios, calibration and sensor placement. They also describe greedy sensor augmentation that preserves pipe identifiability and verification of forward agreement and gradient correctness against multiple references.

2.1 Networks and data

  • The verification suite contains 52 networks spanning public, generated, and operational models, including City D and City H.City D has 542 nodes, 554 links, and 79 throttle-control valves; City H has 921 nodes, 1,038 links, and 6 pumps. The operational models are anonymised and released with utility permission.Source: §2.1 · p. 3

2.2 The global gradient algorithm, and a bit-faithful replica

  • The replica must reproduce EPANET 2.2 engineering-device behavior: low-flow head-loss linearisation; discrete status logic for check valves, pumps, PRVs and tanks, including hysteresis and throttled checking; and convergence requiring status consistency.Its factorisation elimination order and left-looking Cholesky loop were ported verbatim.Source: §2.2 · p. 3

2.3 Exact gradients: the implicit adjoint

  • 906 simulations are required to finite-difference all 905 L-TOWN pipe roughnesses, while one forward-plus-adjoint pair returns the same gradient.The implicit adjoint reuses the forward solve’s Schur matrix and factorisation; one backward solve and contraction return gradients for demand, emitter coefficient, fixed head, and pipe resistance, with memory independent of iteration count. The backward pass freezes the converged status configuration, and derivatives on clamped branches are zero.Source: §2.3 · p. 4

2.4 The leak perturbation operator and the signature dictionary

  • A leak adds a rank-one diagonal update, preserving the symbolic factorisation so a sweep over M candidate nodes needs M solves, not M factorisations.The adjoint returns ∂L/∂C_i for all candidate leaks simultaneously; stacking normalised sensor responses yields the signature dictionary used by sparse localisation methods.Source: §2.4 · p. 5

2.5 Batched scenarios on one GPU

  • On the paper’s mainline and operating networks, one factorisation serves both forward and backward passes, and the backward pass adds no factorisation.The batch evaluates status branches by masks and one-hot selection, ending only when every scenario is converged and status-consistent; GPU sparse-solver symbolic analysis is cached by batch shape.Source: §2.5 · p. 5

2.6 Calibration problem, baselines and fairness protocol

  • Calibration estimates Hazen–Williams roughness from noisy junction heads, comparing an Adam–L-BFGS–Levenberg–Marquardt gradient pipeline against five tuned derivative-free baselines.The gradient pipeline’s Levenberg–Marquardt Jacobian comes from the adjoint; baselines are DE, PSO, CMA-ES, SA, and a DE→Levenberg–Marquardt hybrid, evaluated on fresh seeds at matched model-call budgets.Source: §2.6 · p. 5

2.7 Sensor placement objective

  • Sensor placement selects k pressure-sensor junctions by maximising a prior-regularised Bayesian D-optimal objective over adjoint-built head-to-pipe sensitivities.The objective is maximised by lazy greedy search, with an optimality certificate and submodularity check.Source: §2.7 · p. 6
  • Augmentation holds the installed sensor set fixed and greedily adds k virtual sensors while ensuring no pipe loses identifiability.The identifiability condition is expressed as coverage of pipes crossing the census threshold.Source: §2.7 · p. 6

2.8 Verification protocol

  • All operating-network gradient checks passed; the worst reached 0.57 of its threshold.Verification used Richardson-extrapolated central differences, an unrolled-versus-implicit cross-check, and a 22-item audit of degenerate cases.Source: §2.8 · p. 6
  • The 54-item regression suite passed all 53 numerical checks, including seven on operational models, plus one packaging guard.It covers alignment, replay, extended-period simulation, and symmetry and status-schedule guards.Source: §2.8 · p. 6

3 Results

The results evaluate the implicit-adjoint Jacobian of the deployed engine’s converged state with respect to its parameters, covering solver fidelity, batching, calibration, and leak-search limits. Exact sensitivity and coherence analyses characterize roughness identifiability with installed sensors, the effect of adding sensors, and when leak localization remains ambiguous—including why roughness-oriented sensor placement alone does not ensure leak recovery.

3.1 Exact gradients of the solver as deployed

  • Across 52 networks and 8,140 frames, all met the acceptance criterion; maximum head deviation from EPANET 2.2 was 1.137 × 10−13 ft, and 25 networks agreed exactly.Per-frame Newton iteration counts were identical on all 52 networks. The fidelity result is scoped to the serial replica path; the batched decision chain agrees within the conditioning envelope.Source: §3.1 · p. 6, Table 1 · p. 7, Figure 2 · p. 7
  • 5.9 × 10−8 was the implicit adjoint’s worst relative error across 61 coordinates and four parameter classes per network, below the 10−6 threshold.The comparison used Richardson-extrapolated central differences and included the operating network.Source: §3.1 · p. 7
  • External gradient checks met their stated thresholds: the worst differences were 5.56 × 10−5 for eight Hanoi coordinates and 4.78 × 10−5 across 24 non-clamped City D pipes.For six clamped pipes, the analytic gradient was exactly zero and the finite-difference residual was at most 6.45 × 10−7, at least 1.6 × 10^4 below the smallest non-clamped gradient.Source: §3.1 · p. 7

3.2 What batching buys

  • 463–470 ms per optimiser step for 256 scenarios was 190.7–191.6× faster than the prior pipeline, while one L-TOWN scenario fell from 333 ms to 1.90 ms at B = 256.The L-TOWN speedup was 175–176×; peak memory at B = 1,024 was 22.6× below the dense path’s. The sparse-over-dense crossover was near 300 junctions.Source: §3.2 · p. 8, Figure 3 · p. 8

3.3 Calibration: least squares on the gradient object, at matched budget

  • At σ = 0.1 ft over 30 seeds, the gradient calibrator reached its endpoint in a median 595 calls; the DE→LM hybrid came within 5% of that endpoint on 96.7% of seeds at a median 8,060 calls.Across every 200–5,000-call budget, all five tuned baselines were worse on every metric; DE and PSO never came within 20,000 calls.Source: §3.3 · p. 8
  • On City D, calibration of 432 free pipes had median final training errors of 8.4 × 10−4, 9.4 × 10−3, and 8.5 × 10−2 at head-noise levels σ = 0.03, 0.1, and 0.3 ft.With truth demands perturbed by ±15% but inversion run on nominal demands, the median rose from 9.11 × 10−3 to 9.51 × 10−3; one of four repeats reached 1.62 × 10−2.Source: §3.3 · p. 9

3.4 Leak search with the same object’s columns

  • Noiseless City D inversion recovered all three injected leaks with maximum relative discharge error 5.9 × 10−7, but at σ = 0.1 ft recovered none.The noiseless case is an inverse crime because leaks were injected into the same model used for inversion; with noise, the two returned candidates were neither true leak.Source: §3.4 · p. 10, Figure 5 · p. 10

3.5 Where the search stops: the coherence of the columns

  • On L-TOWN, mutual coherence reached 0.9999999981 across 1,770 candidate pairs, and each true leak had an inseparable rival with coherence at least 0.987023.Forty-two within-zone pairs exceeded 0.999; coherence this close to one violates every sufficient condition for sparse recovery and explains the spurious neighbouring candidates.Source: §3.5 · p. 10
  • The 49-candidate, 40-sensor work-order dictionary had median coherence 0.934, 51 pairs above 0.999, and a 0.99999 rival for the 1.5 L s−1 leak.The L-TOWN lost leaks had coherent rivals spanning 984 m and 512 m of connected pipe, while the returned leak had no rival above the stated threshold and 96 m at stake.Source: §3.5 · pp. 10–11
  • Grouping mutually coherent, network-adjacent candidates into clusters put two of City D’s three injected leaks within the top three clusters at τ = 0.999; these held seven candidates across 7.42 km of main.Source: §3.5 · p. 11
  • Against 20 size-matched random groupings, the coherence-based design was never significant (p ≥0.095) and won only on radius, 179 against 1,700 m.The leak defeated by the amplitude limit had signal-to-noise 0.50 against 166 and 151, remained a singleton at every τ ≥0.5, and ranked 49th to 36th even when forced in with its twelve most coherent neighbours.Source: §3.5 · p. 11

3.6 Sensor placement: a prescription, and how far it closes the loop

  • A one-adjoint, 25-frame census classified City D’s 554 links: 279 roughnesses were identifiable, 149 were not, and 196 had all-zero sensitivity columns.The 196 comprise 41 dead branches, 6 links clamped at the low-flow threshold, and 79 non-pipe links, alongside the 149 unidentifiable pipes; central differences also returned zero for the all-zero columns.Source: §3.6 · p. 11, Figure 6 · p. 12
  • At k = 10 on Hanoi, D-optimal design attained an identifiable-subspace CRLB trace of 1.4746 versus a random median of 13.642, with a worst-case optimality-certificate ratio of 0.763.There were zero submodularity violations in 200 samples, and the search took 8 ms; Hanoi has no structurally unobservable pipe.Source: §3.6 · p. 11, Table 2 · p. 12
  • With the 40 designated City D sensors retained, coverage recovered 37 of 149 unobservable pipes at k = 5 and all 149 at k = 80; D-optimal recovered 21 and 76, respectively.Neither augmentation lost a pipe at any budget; on L-TOWN, 36 coverage additions restored all 62 unobservable pipes, whereas reselection from scratch lost 99.Source: Table 2 · p. 12, §3.6 · p. 13
  • On the fixed reference-subspace roughness-error ruler, coverage +20 scored 17.45 and D-optimal +20 scored 18.04, versus a random median of 21.73; none of 100 same-pool, same-budget random additions matched either.Source: §3.6 · p. 13
  • Coherence-maximising additions recovered L2 in 12/14 City D configurations versus 3/40 random draws, but L3 recovery was indistinguishable from random and L1 was amplitude-limited.Across 55 sets, the rival-coherence gap separated every recovering configuration from every losing one; on L-TOWN, only one and 14 of 746 positions separated the two unrecovered leaks from their nearest alternatives.Source: §3.6 · p. 13

4 Discussion

Calibration, leak search, and sensor placement become three readings of one differentiated solver rather than separate black-box searches. The discussion connects solver fidelity to transfer on utility models while bounding the demonstrated results and operating scope.

4 Discussion

  • One differentiable solver object turns calibration, leak search, and sensor siting from three separate black-box searches into three readings of one object.The engine's lack of derivatives had previously kept these decisions separate.Source: §4 · p. 13
  • 7.42 km of main, not 84, is the ambiguity a crew must walk; coherence rules out a junction-level answer and sizes a district-level one that survives.The placement prescription keeps the utility's sensors and names additions.Source: §4 · p. 13
  • The placement census makes unidentifiable pipes identifiable, but only additions chosen against coherence recover a leak; all new sensors remain virtual.Identifiability-driven additions do not recover leaks defeated by noise.Source: §4 · pp. 13–14
  • 1.137 × 10^-13 ft is the forward pass's largest head deviation from the reference engine, supporting transfer to a utility's existing model without surrogate residual.The census and coherence reading are by-products of one pass, not assumptions.Source: §4 · pp. 13–14
  • Extended-period simulation is forward-verified, but inter-frame storage coupling is not differentiated, leaving multi-day control synthesis out of scope.The gradients are those of steady-state frames.Source: §4 · p. 14
  • Gradients are for a frozen status configuration, may be one-sided at status flips, and the batched path covers only its documented feature subset.The dense default path is slower per solve than the reference engine.Source: §4 · p. 14
  • The equal-budget calibration claim is bounded at 5,000 calls; on wall-clock time, the strongest baseline with promised eight-way parallelism draws level.The claim rests on call count rather than elapsed time.Source: §4 · p. 14
  • The noiseless operating-network leak recovery is an inverse crime, and its noisy counterpart fails; coherence-driven additions recover one of three leaks, so diagnosis—not recovery—is what generalizes.The inverse crime injects leaks into the same model the inversion searches.Source: §4 · p. 14

5 Conclusions

The paper makes the global gradient algorithm exactly differentiable and verifies it against EPANET 2.2 across 52 networks. It applies the resulting adjoint to calibration, leak analysis, and sensor siting, including on an operating network.

5 Conclusions

  • Across 52 networks, the algorithm’s worst head deviation from EPANET 2.2 was 1.137 × 10−13 ft, none were excluded, and gradients were batched on one GPU.The algorithm also returns gradients for the three standing water-network decisions from one gradient object.Source: §5 · p. 14
  • Calibration reached its endpoint in a median 595 model calls, versus 8,060 for the strongest of five tuned metaheuristics.Two metaheuristics did not reach that training loss within 20,000 calls.Source: §5 · p. 14
  • For leak inversion, the adjoint evaluates utility work-order candidates, while signature coherence identifies when noise defeats junction-level recovery and sizes a district-level answer.The conclusion describes using the utility’s work-order candidates and the same gradient object’s coherence to assess the surviving district-level answer.Source: §5 · p. 14
  • On the operating network, added sensors restore simulated identifiability for some pipes but do not recover leaks defeated by noise.The sensor-siting result keeps the installed 40 sensors and adds a few to restore identifiability of pipes their data could not inform.Source: §5 · p. 14
  • The adjoint also exposes its own limits, helping utilities decide where sensors, crews, and trust should go before committing resources.The stated operational use is to audit which roughness parameters installed sensors can constrain and which sensors to add.Source: §5 · p. 14

CRediT authorship contribution statement

The contribution statement assigns conceptual, technical, investigative, writing, supervisory, and resource roles across the author team.

CRediT authorship contribution statement

  • T. Mu contributed conceptualization, methodology, software, validation, investigation, visualization, and the original draft; Y. Wang contributed data curation, investigation, and review and editing.Source: CRediT authorship contribution statement · p. 15
  • M. Yuan contributed conceptualization, supervision, funding acquisition, and review and editing; W. Wang contributed software, formal analysis, and review and editing; Q. Luo contributed resources, funding acquisition, and review and editing.Source: CRediT authorship contribution statement · p. 15
  • M. Xiao contributed validation and formal analysis; J. Li contributed investigation and resources; H. Yang contributed supervision and project administration; M. Huang contributed supervision and review and editing.Source: CRediT authorship contribution statement · p. 15

Declaration of competing interest

The authors report no known competing financial interests or personal relationships that could have appeared to influence the work.

Declaration of competing interest

Data availability

The data statement describes releases for operational and public networks, generated data, and software, while distinguishing released materials from upstream network files that are not redistributed.

Data availability

  • The two operational network models and one year of leak-repair records from one model are released in anonymized form with the operating utility’s permission under CC BY 4.0.Source: Data availability · p. 15
  • Public networks are fetched from upstream sources and checked against recorded SHA-256 digests rather than redistributed; sources and licenses are listed with the code.Source: Data availability · p. 15
  • The code release includes randomly generated networks and their generator, the emitter-augmented Hanoi configuration, and measurement reports; development is public on GitHub and the submitted version is archived at Zenodo.Source: Data availability · p. 15
  • L-TOWN is available under CC BY 4.0 as Zenodo record 4017659, and HydroGrad’s dgga package is MIT-licensed; the sparse route requires CUDA and the reference cross-checks EPANET 2.2.Source: Data availability · p. 15

Supplementary Information

The supplementary information collects implementation and derivation details, verification and experiment protocols, and supporting figures and tables. It also documents provenance and anonymisation for the reported operational models.

Supplementary Notes

  • Supplementary Notes 1–13 expand the main text’s implementation, derivation, and protocol details, including arithmetic reproduction, differentiation routes, leak analysis, and optimiser settings.The notes also cover PRV penalties, batched status logic, sparse solving, calibration, sensor placement, and leak diagnosability.Source: Supplementary Information · p. 16

Supplementary discussion

  • The supplementary discussion covers reference solutions as unsuitable training labels, learned surrogates, and the paper’s complete list of limitations.The supplementary materials also state the paper’s shared-gradient framing.Source: Supplementary Information · p. 16

Supplementary figures and tables

  • Tables S1–S16 report per-network fidelity, gradient checks, regression tests, calibration and leak-search experiments, sensor-placement analyses, and optimiser comparisons.Figure S1 depicts nine verified network topologies across three orders of magnitude in size.Source: Supplementary Information · p. 16

Provenance and anonymisation

  • The reported measurements are generated from recorded files, and operational models City D and City H are anonymised by counts and positional labels.The models are released with utility permission; operating-network node, link, and sensor identifiers are omitted.Source: Supplementary Information · p. 16

Supplementary Notes

The notes explain why exact agreement with EPANET requires reproducing its arithmetic and input handling, then detail two differentiation routes and the constraints of the implicit adjoint. The adjoint reuses the forward factorisation, with a PRV-specific correction needed for accurate gradients.

Supplementary Note 1: reproducing the reference arithmetic

  • Five networks are sensitive to a one-unit input round-trip error in reservoir heads or valve settings; reading those fields directly from text brings all five to bit-level agreement.The remaining suite maximum is 1.14 × 10−13 ft, and only 25 of 52 networks agree bit for bit after correction.Source: Supplementary Note 1: reproducing the… · p. 18
  • At 12,527 nodes, a one-unit-in-the-last-place roughness perturbation shifts EPANET’s own answer by 1.3 × 10−6 to 6.9 ft, making arithmetic order material to fidelity.The replica therefore follows EPANET’s elimination ordering, loop structure, transcendental routines, constants, accumulation order, and parsing semantics.Source: Supplementary Note 1: reproducing the… · pp. 17–18

Supplementary Note 2: the two differentiation routes

  • Truncated unrolling differentiates a finite K-step map, not the fixed point; on seven public networks its demand gradient converges on four, is borderline on Pescara, and fails on ky4 and Net3.The route refuses PRV networks at construction and requires a health check before trust on a new network.Source: Supplementary Note 2: the two… · p. 19
  • The implicit-function adjoint differentiates the converged EPANET update-rule root, using an assembled Newton polish so gradient checks measure gradient error rather than forward-solve residual.Without polishing, the GGA half-iteration can stall near 10−7 relative error, while a full Newton step drives the residual to about 10−14 ft.Source: Supplementary Note 2: the two… · pp. 19–20
  • One triangular solve against the forward pass’s terminal factorisation, plus sparse matrix–vector products, computes the backward pass without a new factorisation.At active PRVs, direct reuse of the big-M penalty factorisation gives a wrong gradient; a rank-p Woodbury correction and iterative refinement address the mismatch.Source: Supplementary Note 2: the two… · pp. 20–21
  • With the correction, all four parameter classes match a sparse-LU adjoint to relative error 1.4 × 10−10, while status switching leaves derivatives tied to the converged smooth branch.The implementation does not support pressure-driven demand, and gradients at status-flipping parameters are at best one-sided.Source: Supplementary Note 2: the two… · pp. 20–21

Supplementary Note 4: the leak perturbation operator and the signature dictionary

The notes show how leak sensitivities form a candidate dictionary, how the batched path reproduces status behaviour, and how invariant sparsity supports sparse solves. They also qualify performance comparisons by network size, batch size, memory, and the cost of the reference-engine replica.

Supplementary Note 4: the leak perturbation operator and the signature dictionary

  • 29 s of single-process CPU time builds the 60-candidate leak dictionary, whose signatures stack sensor responses over operating frames; its all-pair median coherence is 0.825840, versus 0.871 within zones.The all-pair set includes 275 cross-zone pairs that are exactly orthogonal; the within-zone statistic uses a different denominator.Source: Supplementary Note 4: the leak… · p. 22
  • Tightening the solve preserves the dictionary’s coherence conclusion, but the zone decomposition requires it because the shipped stopping setting leaves spurious responses across valve boundaries.The maximum coherence is unchanged to nine significant figures, and the count above 0.999 remains 42.Source: Supplementary Note 4: the leak… · p. 22

Supplementary Note 5: the batched status machine

  • 134 of 134 L-TOWN valve-forcing scenarios reach element-identical terminal states in batched and serial paths, while transition subsequences agree item by item in 131 of 134.The three divergences are stopping-time-only; the batched path covers 18 of 21 public PRV networks, with the remainder excluded by unsupported device combinations.Source: Supplementary Note 5: the batched… · p. 23

Supplementary Note 6: sparsity-pattern invariance and the stateful sparse solver

  • Leak and status changes preserve the Schur-complement sparsity pattern because device changes alter values without deleting closed-link slots; the sparse route builds its structure once and updates values.A cache-capacity mismatch can silently trigger replanning, costing 3.99–4.45× step time on ky4 and 2.33–2.43× on Modena.Source: Supplementary Note 6: sparsity-pattern… · pp. 23–24

Supplementary Note 7: the cost crossover, and why the end-to-end factor must be split

  • Sparse-versus-dense crossover depends on both network size and batch size: forward-plus-backward crossover lies between 92 and 268 junctions, while small networks can lose substantially at large batches.On nine-junction Net1, the sparse route reaches 0.06× at batch size 1,024; the end-to-end factor also combines GPU and linear-algebra effects, so it is not one universal speedup.Source: Supplementary Note 7: the cost… · pp. 24–25
  • On L-TOWN at batch size 1,024, sparse forward-plus-backward uses 1,286 MiB versus 29,096 MiB for dense; the sparse replica costs 26× to 73× the reference library on public models.The reference-engine comparisons are single-machine timings, not portable performance claims.Source: Supplementary Note 7: the cost… · p. 25

Supplementary Note 8: the calibration comparison protocol

The supplementary protocols test calibration, forward and gradient fidelity, sensor augmentation, leak diagnosability, and a layout-independent scoring rule. Results distinguish what added sensors can identify from what remains limited by noise, signature coherence, or the candidate pool.

Supplementary Note 8: the calibration comparison protocol

  • Calibration compares an Adam–L-BFGS–Levenberg–Marquardt gradient method against five tuned derivative-free baselines on noisy Hanoi and City D data, with matched model-call budgets and fresh evaluation seeds.City D freezes 43 pipes deemed structurally unidentifiable; baseline hit rates are metric-specific, and the 20,000-call non-hit statement applies only to DE and PSO.Source: Supplementary Note 8: the calibration… · pp. 25–26

Supplementary Note 9: the verification protocol in full

  • All 52 networks pass the forward acceptance criteria across 8,140 frames; 25 agree exactly, with maximum deviations of 1.14 × 10−13 ft in head and 1.42 × 10−14 cfs in flow.Independent gradient checks also pass, including 22 hand-constructed degenerate cases; structurally absent derivatives are zero for low-flow linearisation, closed links, and valves.Source: Supplementary Note 9: the verification… · pp. 26–27
  • On City D, coverage restores all 149 target pipes by 56 added sensors, while D-optimal placement restores 76 at 80; augmentation loses none of the pipes visible to installed sensors.On L-TOWN, coverage restores all 62 unobservable pipes by 36 additions; the Hanoi pipe is restored by one coverage or four D-optimal additions.Source: Supplementary Note 9: the verification… · p. 28
  • Designed sensor additions recover L2 in the tested noisy City D inversion, but do not generally restore leak recovery: L1 remains below noise, and L3’s recovery is indistinguishable from random placement.L2 recovery tracks each layout’s rival-coherence gap rather than the placement objective label; on L-TOWN, augmentation returns the same one of three leaks as the original set.Source: Supplementary Note 9: the verification… · pp. 28–30

Supplementary Note 11: from single-point localisation to cluster-level diagnosability

  • At τ = 0.999, 25 operating-network clusters place two of three leaks in the top three, with mean radius 179 m; at τ = 0.995, 22 L-TOWN clusters include all three.On the operating network the selected clusters contain seven candidates and 7.42 km of main; the largest cluster radius is 750 m.Source: Supplementary Note 11: from… · pp. 30–31
  • Cluster grouping improves inspection radius rather than hit rate over random groupings, and does not rescue the noise-defeated leak; tight-radius gains also depend on the threshold selected from the sweep.The design does not beat chance on hit rate; for the operating network, radius is 179 m versus 1,700 m at the same hit rate.Source: Supplementary Note 11: from… · p. 31

Supplementary Note 12: scoring a sensor layout on a ruler that does not move with it

  • A fixed reference subspace makes roughness-error scores comparable across layouts, unlike each layout’s own informative pipes or subspace, which change with sensor design.The reference directions are selected before any design using sensitivity from the fully instrumented candidate pool and an absolute posterior-standard-deviation criterion.Source: Supplementary Note 12: scoring a… · p. 31
  • Across all twelve tested budget, noise, and objective combinations, no random layout matches the design on the fixed-subspace score; the reported randomisation p-values are conditional on one noise realisation.The design’s advantage is not universal across metrics: head-MSE-selected layouts can rank poorly on identifiability, and within-budget prediction of achieved error is weak.Source: Supplementary Note 12: scoring a… · pp. 31–32

Supplementary Note 13: optimiser enhancements, the baseline tuning budget and the wall clock

The supplementary tests find that a Schur-complement diagonal preconditioner improves parameter error on the design’s own identifiable subspace, but not demonstrably on a layout-independent ruler. Against the tuned baseline, the gradient method’s advantage is clearest in model-call count rather than wall-clock time.

Supplementary Note 13: optimiser enhancements, the baseline tuning budget and the wall clock

  • The Schur-complement diagonal preconditioner improves internal-ruler error from 17.71 to 12.40 on all 10 seeds, but its layout-independent-ruler gain is not established.Training loss worsens on all 10 seeds; no tested enhancement beats the 200-call gradient configuration on both parameter-error rulers.Source: Supplementary Note 13: optimiser… · p. 32
  • At 200 calls, the gradient configuration beats differential evolution at 20,000 calls on parameter error: 16.66 for DE remains worse than the gradient result.Baselines were tuned at 2,000 calls, equal to their evaluation budget; the configurations matched those selected under the larger tuning budget.Source: Supplementary Note 13: optimiser… · pp. 32–33
  • The gradient configuration uses 200 model calls versus 1,997 for the hybrid, but their wall times are effectively tied after accounting for the hybrid’s promised eight-way parallelism.The comparison rests on one hybrid seed, not five.Source: Supplementary Note 13: optimiser… · p. 33

Supplementary Discussion

The discussion identifies reference-engine nonconvergence as a risk for simulated training labels and positions the differentiable replica as complementary to surrogates. It also sets boundaries on fidelity, feature coverage, gradient paths, speed, and the scope of leak and sensor demonstrations.

Some EPANET reference solutions must not be used as labels

  • On ky5 and BWSN Network 2, EPANET stops rather than converges at the input files’ accuracy setting, producing stale flows or highly unstable heads that should not be used as training labels.The paper recommends checking each frame’s residual against the input stopping criterion; L-TOWN’s shipped setting yields a stopping solution 1.7 × 10−4 ft from the converged one.Source: Some EPANET reference solutions must… · p. 34

Relation to the surrogate literature

  • A differentiable replica supplies both hydraulic outputs and sensitivities, complementing surrogates that may be faster and generalise across topologies; no sensitivity-trained surrogate is evaluated here.The replica also provides a reference for auditing surrogate gradients, an error dimension the cited literature does not report.Source: Relation to the surrogate literature · p. 34

Limitations, in full

  • The implementation covers a documented subset of EPANET features, not all of EPANET; several valves, pressure-driven demand, water quality, and other features are rejected or unvalidated.The batched differentiable path is narrower still: it reaches 18 of 21 public benchmark networks with the status machine, while rejecting Darcy–Weisbach and several valve types.Source: Limitations, in full · pp. 35–36
  • The 10−14 ft agreement is platform- and binary-specific, and depends on a non-default exact-input parser path; the default input path retains one-unit rounding differences on some US-unit models.Only 25 of 52 networks agree exactly; the other 27 have deviations between 10−14 and 1.14 × 10−13 ft from reduction-order effects.Source: Limitations, in full · p. 35
  • Gradients apply to a frozen status configuration; parameter changes that flip a valve or pump status have one-sided derivatives at best.The unrolled route refuses PRV networks, and its truncated demand gradient does not converge in K on ky4 and Net3.Source: Limitations, in full · p. 35
  • The GPU adjoint explicitly refuses several cases, including pump-parameter gradients, float32, and second derivatives; the sparse route also requires a vendor solver and CPU execution is unsupported.These paths raise rather than silently falling back to another method.Source: Limitations, in full · p. 35
  • The dense default path is 26–73 times slower than the reference engine per public steady-state frame and 21–47 times slower on operating rows; GPU loses to CPU at batch size one.Large L-TOWN speedups are measured against the prior serial CPU-adjoint pipeline, not EPANET; the replica is slower per solve than the reference engine.Source: Relation to the surrogate literature · p. 34, Limitations, in full · p. 36
  • Leak demonstrations use one network and one injected triple each, and added sensors are simulated rather than installed; the code is not validated for operational use.The City D work-order inversion is an inverse crime, its noisy counterpart recovers none, and what generalises is the diagnosis rather than recovery, with one qualified exception.Source: Limitations, in full · p. 36

Supplementary Figures

Figure S1 depicts nine of the 52 verified networks, with panels ordered by node count and independently scaled.

Supplementary Figures

  • The nine panels show pipes, reservoirs, tanks, pumps, and valves; each has its own scale bar, so apparent sizes are not directly comparable across panels.City D and City H use released-model coordinates that are local and rigidly transformed; junctions are not drawn.Source: Figure S1 · p. 37

Supplementary Tables

The supplementary tables audit forward fidelity, gradient behavior, edge cases, regression checks, computational costs, and calibration and sensor-design experiments. The reported checks include full agreement on Newton iteration counts across the 52-network suite and passing results on the stated degenerate-case and status-switching audits.

Forward verification

  • All 52 networks are checked against EPANET 2.2 across every frame, with identical Newton iteration counts on all 52.Table S1 reports maximum deviations; its footnote says one row reaches the acceptance criterion only under the exact-input control.Source: Table S1 · p. 39

Gradient checks

  • Worst implicit gradient error was 5.85 × 10−8 versus 1.21 × 10−6 for unrolling across two networks and four parameter classes, including City D.External checks also report mass, demand, and Hazen–Williams errors across cross-validation cases.Source: Supplementary Tables · p. 42

Audits and regression

  • All 22 degenerate cases passed their own thresholds; status schedules and PRV subsequences had zero disagreements, and all three seeded mutants were detected.The regression suite reports 53 numerical checks passing and one packaging guard clean.Source: Supplementary Tables · p. 42, Table S5 · p. 42

Reference comparison and cost

  • L-TOWN matched the reference bit for bit, while float32 was refused for 785/785 heads and 909/909 flows.The cost tables report double-precision timing and memory by batch size and compare the replica path with the reference library across a network-size sweep.Source: Supplementary Tables · p. 42, Table S6 · p. 43, Table S7 · p. 43

Calibration and sensor design

  • The supplementary experiments also cover calibration noise and robustness, virtual sensor additions, augmented-set calibration and leak search, and coherence-driven placement against random controls.The sensor additions are designed and verified in simulation, not installed; the placement table also re-scores a test on L-TOWN’s coarse stage.Source: Table S8 · p. 44, Table S9 · p. 45, Table S10 · p. 46

Optimizer controls

  • Table S16 presents optimiser enhancements and a wall-clock reading on City D, including every arm at a 2,000-call evaluation budget, batching multiple starts, and derivative-free baselines under an eight-way-parallel boundary.Source: Table S16 · p. 51
Loading 2609.06323v1…