You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(70): the propagation tier — RWR, heat diffusion, resistance, SimRank, and the triad census
Round 69 asked which algorithms could take MCL's dense-matmul lead;
this round builds the five families the scientific-use assessment
ranked highest, aimed at network biology's propagation methods. Seven
public methods, each with a CPU reference (the spec), executor
routing, closed-form Node specs, and — for the five dense forms — GPU
kernels, parity specs with verified controls, and benchmark rows.
The tier's structural decision: seed forms vs dense forms.
randomWalkWithRestart({seeds}) and heatDiffusion({seeds}) — the
everyday bio calls — are O(E)-per-step sparse walks, so they are
CPU-only and an explicit 'gpu' rejects, pointing at the dense sibling
(the weighted-betweenness no-path precedent). The dense forms are
the GPU tier:
- randomWalkWithRestartProximity: S = c(I − (1−c)W)⁻¹ by Neumann
iteration, one matmul per step; CPU = one sparse solve per column.
- heatKernel: exp(−tL) by scaling-and-squaring (Taylor chain + s
squarings); CPU applies the same scaled operator 2^s times per
column — the same power, sparsely. Pinned against the pair and
triangle matrix exponentials in closed form.
- effectiveResistance (+ commuteTime): B = L + J-blocks (the 1/n_c
shift cancels out of every resistance), CPU f64 Gauss–Jordan, GPU
Newton–Schulz — O(n³) both sides, so the GPU wins at every density.
The NS converge compare is *relative* (NS_COMPARE): an absolute
bound sits under f32 noise wherever the inverse's entries are large
(measured: 96/96 iterations ran at n=1024; relative freezing took
it 642 → 200 ms).
- simRank: S′ = C·Q·S·Qᵀ, two matmuls per step, diagonal pinned;
pinned against the 4-cycle fixed point x = C(1+x)/2.
- motifCensus: the 16 Holland–Leinhardt classes ('030T' = the
feed-forward loop) as closed forms over seven trace primitives
shared verbatim by both executors — CPU wedge walks, GPU four
matmuls + Hadamard folds. The load-bearing spec is a brute-force
differential: an independent classifier over every triple of six
random digraphs, exact equality per class.
Density gates as in round 69 (sparse CPU walks own sparse graphs);
resistance gates on size alone. Conventions: simple graph (parallel
edges collapse / sum weights, loops drop); RWR sinks absorb
(documented leak); heat and resistance demand positive weights
(TypeError). Six new guards, all pinned; throw gate at zero unrun;
JSDoc gates 100%; 2245 Node specs green.
Parity: five new live specs, each proven able to fail by degrading
its kernel (C skewed, restart diagonal skewed, a Taylor term dropped,
2I skewed to 2.01I, a fold mask swapped) — all five controls failed,
all 20 specs restored green on apple metal-3.
Measured on the M2 (one-off; the archive run remains the RX 580's):
heatKernel 932× at n=1024 — the largest ratio any family has measured
— rwrProximity 119×, simRank 45×, resistance 9×, census 12× at 2048.
Bench rows sized so a cell stays in MCL's cost class (the dense CPU
references are minutes at n=2048; sizes stop at 1024, heat pins
time = 0.02).
Claude-Session: https://claude.ai/code/session_01T6ZDogLZVCQ7QRM1aviH4h
Copy file name to clipboardExpand all lines: EXECUTIVE_SUMMARY.md
+22-6Lines changed: 22 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,9 +38,9 @@ The v4 rewrite: a columnar model and a WebGPU renderer, per
38
38
39
39
|||
40
40
|---|---|
41
-
| Automated tests | 2,223 unit · 427 module · 24 soak · 386 browser (some skip for want of a WebGPU adapter) |
42
-
| Documented API |366 members over 48 sections, gated at 100% |
43
-
| Visual regression | 46 goldens compared **exactly** — zero differing pixels · 45 live v3-vs-v4 pixel-parity scenes, 7 of them close-ups at zoom 3–4 · 11 numeric routing-parity scenes · 15 CPU-vs-GPU algorithm-parity scenes |
41
+
| Automated tests | 2,245 unit · 427 module · 24 soak · 396 browser (some skip for want of a WebGPU adapter) |
42
+
| Documented API |373 members over 48 sections, gated at 100% |
43
+
| Visual regression | 46 goldens compared **exactly** — zero differing pixels · 45 live v3-vs-v4 pixel-parity scenes, 7 of them close-ups at zoom 3–4 · 11 numeric routing-parity scenes · 20 CPU-vs-GPU algorithm-parity scenes |
44
44
| Benchmarks | 25 suites, 4 published profiles · **all 366 v3-comparative pairs read v4-faster** (geometric mean 13.7×, minimum 1.03×) · GPU algorithm executors 13× geo-mean over their CPU reference |
45
45
| Style parity | v4 accepts 157 of v3's 291 style property names; the rest dropped by decision |
46
46
| Bundle | 691 KiB minified / 185 KiB gzipped — ~1.5× v3 (410 / 126 KiB); the WGSL shaders, which v3 has no equivalent of, are minified at build time |
@@ -166,6 +166,20 @@ The v4 rewrite: a columnar model and a WebGPU renderer, per
166
166
- Buys three algorithms v3 never had, on kernels the suite already trusts;
167
167
each of the five new parity specs was proven able to fail by degrading its
168
168
kernel; crossover numbers await the benchmark machine.
169
+
-**12 Aug** — the propagation tier: network biology's algorithms
170
+
- Five more families, chosen by scientific usefulness: random walk with
171
+
restart (seed propagation — the disease-gene-prioritization primitive —
172
+
plus the all-pairs proximity matrix), heat-kernel diffusion (HotNet-style
173
+
exp(−tL), seed and all-pairs forms), effective resistance / commute time
174
+
(Laplacian pseudo-inverse: f64 elimination on the CPU, Newton–Schulz
175
+
matmuls on the GPU — O(n³) both sides, so the GPU wins at every density),
176
+
SimRank, and the sixteen-class triad census ('030T' is the biology
177
+
literature's feed-forward loop), whose closed forms are pinned by a
178
+
brute-force classify-every-triple spec. Seed forms are CPU-only by
179
+
design — O(E) walks with nothing for a kernel to win.
180
+
- Buys the network-biology propagation toolbox on the existing kernel
181
+
machinery; five more parity specs, each proven able to fail; measured on
182
+
an M2: RWR proximity 119×, SimRank 45× at n=1024.
169
183
170
184
---
171
185
@@ -183,9 +197,11 @@ The v4 rewrite: a columnar model and a WebGPU renderer, per
183
197
`executor: 'cpu' | 'gpu' | 'auto'` — including, since 12 Aug, the
184
198
whole-collection `closenessCentralityNormalized`; the single-root form
185
199
stays synchronous.
186
-
-**Three algorithm families v3 never had**: `triangleCount`,
187
-
`neighborhoodSimilarity` and `katzCentrality`, on the same executor
188
-
contract.
200
+
-**Eight algorithm families v3 never had**, on the same executor
0 commit comments