Chapter 12: Results — neuralSpring

ML primitives and the Isomorphism Theorem: all architectures decompose into six operations. 2,450+ checks, coralForge AlphaFold2/3.

📐 Architecture-ready

12.1 Validation Summary

neuralSpring validates BarraCuda’s ML primitives against published neural network architectures and evolutionary computation methods. 2,450+ checks pass across 25 reproduced papers + 5 WDM surrogates: 206 Python baselines (Phases 0, 0+, 0++), 31 WDM Python baselines, 1600+ Rust/GPU validations (Phases 1–5e), and 186 WDM Rust validations (nW-01..05). neuralSpring establishes the Isomorphism Theorem — that all neural architectures decompose into 6 fundamental primitives — and validates that BarraCuda implements all six, with ~90% of production math running on GPU. The WDM surrogate queue (Sessions 79–87) extends validation to reservoir computing: LSTM fixed-weight reservoirs with pooled readout (nW-03) and Echo State Networks with ridge regression readout (nW-05).

Table 12.1 — Phase Summary

PhaseDomainChecksStatus
Phase 0 (Python baselines)Surrogates, transformers, LSTM, transfer4848/48
Phase 0+ (Scholarly reproductions)PINN, DeepONet, LeNet-5, ERA5 LSTM, quantization3131/31
Phase 0++ (Extended reproductions)Dolson, Liu, Waters, Kachkovskiy, Anderson (15 papers)127127/127
Phase 1a (neuralSpring-native Rust)Rust port of all Python experiments183183/183
Phase 1b (BarraCuda CPU primitives)GEMM, attention, normalization, gating, reduction272272/272
Phase 2 (BarraCuda CPU ports)Full model inference in Rust203203/203
Phase 3c (GPU shaders)Individual shader validation108108/108
Phase 3d (GPU pipeline + cross-dispatch)End-to-end GPU inference9494/94
Phase 4 (GPU pipelines, PRNG, MHA, eigh)Advanced GPU validation100+All pass
Phase 5a–b (GPU Tensor, full-stack)23/25 papers at GPU Tensor tier98+All pass
Phase 5c–d (Multi-GPU, benchmarks)RTX 4070 + TITAN V bit-identical133+143All pass
Phase 5e (Pure GPU promotion)38 CPU→GPU ops (~90% math on GPU)4747/47
Total1800+All pass

Post-Phase Status (Session 94)

Quality GateStatus
Validation binaries197
Library tests685
Named tolerances139+
validate_all185/185 PASS
Python baselines39
WDM surrogates5 (nW-01..05)
coralForge (AlphaFold2/3)Py 62/62, Rs 55/55, GPU 37/37
clippy (pedantic+nursery)0 warnings
doc warnings0
unsafe blocks0 (forbid)
TODO/FIXME/MOCK/STUB0 in src/
Hardcoded paths0
Inline magic numbers0

coralForge: Sovereign Structure Prediction (Sessions 88–94)

coralForge extends neuralSpring with sovereign structure prediction primitives — AlphaFold2 Evoformer, IPA, backbone frames, and torsion angles; AlphaFold3 diffusion, pairformer, and confidence heads. All implemented in pure Rust f64, validated against NumPy baselines, and accelerated via 15 df64 WGSL shaders on consumer GPUs.

coralForge is the strongest test of the Isomorphism Theorem: structure prediction uses “novel” operations (triangle multiplication, Invariant Point Attention, SE(3)-equivariant diffusion) that appear unique to the domain. Yet every operation decomposes into the same 6 fundamental primitives. No new primitive category was required.

See: coralForge/ white paper series for full design, architecture, validation, and LTEE application plan.


12.2 The Isomorphism Theorem

Table 12.2 — Primitive Inventory and Architecture Mapping

PrimitiveWGSL ShaderMLPTransformerLSTMCNNDeepONetPINN
GEMMgemm_f64.wgsl
Attentionattention.wgsl
Normalizationlayernorm.wgsl
Nonlinearityrelu.wgsl, tanh.wgsl
Reductionreduce_sum.wgsl
Gatinglstm_cell.wgsl

All neural architectures decompose into these 6 primitives. BarraCuda implements all 6 as WGSL shaders. This means any architecture that can be expressed as a composition of these primitives can run on any Vulkan-capable GPU without CUDA.


12.3 Phase 0 — Synthetic Baselines (48/48)

ExperimentArchitectureMetricExpectedActualStatus
Neural surrogateMLP 6→64→64→1R² (Rastrigin)≥ 0.40~0.40+PASS
R² (Rosenbrock)≥ 0.95> 0.99PASS
R² (Ackley)≥ 0.90> 0.95PASS
FAO-56 RMSE≤ 0.20 mm/day0.07–0.08PASS
FAO-56 R²≥ 0.950.999+PASS
TransformerNumPy self-attentionNumPy vs PyTorch< 1e-10~2.22e-16PASS
Causal mask leak< 1e-6~0PASS
Sequence forecastingLSTM/GRU 32 hidden≥ 0.80~0.93–0.94PASS
Transfer learningMLP fine-tunedSource R²> 0.950.999PASS
Domain gap (NM)> 0.01 ΔR²0.326PASS
Isomorphic catalogCross-domainPrimitives mapped66PASS

12.4 Phase 0+ — Scholarly Reproductions (31/31)

Table 12.3 — Paper Reproduction Results

PaperArchitectureMetricPaper ValueneuralSpringStatus
Raissi et al. 2019 (JCP) — PINN BurgersMLP 2→20×8→1, tanhL2 relative error0.06% (L-BFGS)5.1% (Adam)PASS
IC error~0< 1e-6PASS
BC error~0~1e-15PASS
Lu et al. 2021 (NMI) — DeepONetBranch-TrunkMean L2 errorMSE 9.27e-71.2%PASS
LeCun et al. 1998 — LeNet-5 MNISTConv2d+MaxPool+FCTest accuracy~99%98.89%PASS
Gauch et al. 2021 (HESS) — LSTM ERA5LSTM 5→64→32→1NSE> 0.800.849PASS
RMSE (°C)< 5.03.46PASS
Dettmers/Frantar 2022/23 — QuantizationINT8/INT4 MLPINT8 R² degradation< 1%0.017%PASS
INT4 R² degradation< 5%0.79%PASS

PINN note: The 5.1% L2 error vs the paper’s 0.06% reflects Adam-only training (neuralSpring does not implement L-BFGS). The tolerance is set at 15% to account for this optimizer gap. The physics (IC/BC satisfaction, PDE residual structure) is correct; the optimization path differs.


12.5 Phase 0++ — Extended Reproductions (127/127)

Table 12.4 — Faculty Paper Reproductions

PaperFacultyDomainChecksStatus
Iram/Dolson 2020 — Counterdiabatic evolutionDolsonEvolutionary computation11PASS
Dolson 2019 — MODES toolboxDolsonOpen-ended evolution9PASS
Dolson & Ofria 2018 — Ecological dynamicsDolsonMulti-niche EA7PASS
Dolson 2022 — Directed evolutionDolsonLexicase vs tournament8PASS
Foreback/Dolson 2025 — Swarm roboticsDolsonHeterogeneous swarms11PASS
Liu 2014 — HMM phylogeneticsLiuForward/backward/Viterbi10PASS
Liu 2009 — SATé alignmentLiuDivide-and-conquer8PASS
Liu 2015 — IntrogressionLiuPhyloNet-HMM, LRT8PASS
Bruger & Waters 2018 — Game theory QSWatersCooperation dynamics8PASS
Mhatre 2020 — Regulatory networkWatersBistability, Hill ODE7PASS
Srivastava 2011 — Signal integrationWatersTwo-input AND gate8PASS
Kachkovskiy 2016 — Spectral commutativityKachkovskiySkip connection analysis8PASS
Bourgain & Kachkovskiy 2018 — AndersonKachkovskiyIPR localization8PASS
Anderson — Pangenome selectionAndersonGene gain/loss8PASS
Anderson — Meta-populationAndersonFST, isolation-by-distance8PASS

12.6 Rust & GPU Validation (Phases 1–5e)

Table 12.5 — Rust Binary Matrix

PhaseBinary/SuitePrimitives TestedChecksStatus
1aneuralSpring-nativeFull MLP, transformer, LSTM, 31 modules183PASS
1bBarraCuda CPU primitivesGEMM, attention, norm, relu, reduce, gating, eigh, FFT272PASS
2BarraCuda CPU portsFull model inference chains (24/25 papers)203PASS
3cGPU shaders17 WGSL shaders (13 absorbed upstream, 4 local)108PASS
3dGPU pipeline + cross-dispatchMulti-kernel chains, CPU↔GPU parity94PASS
4Advanced GPUPipelines, PRNG, MHA, eigendecomposition100+PASS
5a–bGPU Tensor full-stack23/25 papers at Tensor tier, 12 typed ops98+PASS
5c–dMulti-GPU + benchmarksRTX 4070 + TITAN V NVK bit-identical276+PASS
5ePure GPU promotion38 CPU→GPU ops via gpu_dispatch::Dispatcher47PASS

Table 12.5b — Validation Tier Coverage

TierPapersChecksCoverage
Python control (Py)25/25206100%
Rust CPU (Rs)25/25374+100%
BarraCuda CPU (bC)24/2520396%
BarraCuda GPU Tensor (gT)23/2598+92%
metalForge WGSL (mF)15/25108100%†
GPU Pipeline (gP)15/2594100%†
Cross-dispatch (xD)15/1549100%
Multi-GPU (mG)25/25276+100%
GPU Dispatch (gD)38 ops47~90%

100% of applicable papers (Phase 0/0+ use PyTorch, not WGSL).

Table 12.6 — GPU Benchmark Results

ScaleModelPython (1 thread)BarraCuda CPUGPUCPU/PyGPU/Py
MLP large (3.1M params)4→64→64→103.0 ms2.7 ms178 µs1.1×16.8×
Transformer medium (103M)Pre-norm encoder59 ms15.1 ms566 µs3.9×104×
Transformer xlarge (6.6B)232 ms1.42 s17.8 ms13.1×

Fused Pipeline Speedup

ModelPer-Op GPUFused GPUFused Speedup
MLP (4→64→64→10)4.0 ms92 µs43.6×
Transformer (d=32, h=4, seq=8)13.3 ms174 µs76.6×

The 76.6× fused pipeline speedup for transformers demonstrates that kernel fusion — composing multiple shader dispatches into a single pipeline — produces superlinear performance gains. This is a constrained evolution effect: the WGSL constraint forces explicit data flow between kernels, which makes fusion opportunities visible that are hidden in framework-level abstractions (PyTorch, TensorFlow).


12.7 Key Tolerances

ConstantValueUse
EXACT_F641e-12Exact f64 arithmetic
CROSS_LANGUAGE1e-10Rust vs Python parity
SURROGATE_R2_MIN0.40MLP surrogate minimum
SEQUENCE_R2_MIN0.80LSTM forecast minimum
PINN_L2_ERROR_MAX0.15Adam-only PINN tolerance
QUANT_INT8_DEGRADATION0.01Max INT8 R² loss
QUANT_INT4_DEGRADATION0.05Max INT4 R² loss
TRANSFORMER_NUMPY_VS_PYTORCH1e-10Attention parity

12.8 Scholarly Reproduction Log (25 papers)

#PaperArchitectureKey ResultStatus
1Raissi et al. 2019PINNL2 = 5.1%PASS
2Lu et al. 2021DeepONetL2 = 1.2%PASS
3LeCun et al. 1998LeNet-598.89% accuracyPASS
4Gauch et al. 2021LSTMNSE = 0.849PASS
5Dettmers/Frantar 2022/23QuantizationINT8: 0.017% degradationPASS
6–10Dolson et al. (5 papers)Evo computation46/46 checksPASS
11–13Liu et al. (3 papers)Phylogenetics26/26 checksPASS
14–16Waters lab (3 papers)QS models23/23 checksPASS
17–18Kachkovskiy (2 papers)Spectral theory16/16 checksPASS
19–20Anderson (2 papers)Population genomics16/16 checksPASS
21–25WDM surrogates (nW-01..05)MLP, LSTM reservoir, ESN33/33 Python + 186/186 RustPASS
Total25 papers + 5 WDM surrogates239/239 Python, 1800+ Rust/GPUAll pass

12.9 Connection to Constrained Evolution Thesis

neuralSpring provides three lines of evidence for the thesis:

  1. The Isomorphism Theorem demonstrates that architectural diversity in neural networks is illusory — all architectures compose from 6 primitives. The constrained evolution framework predicts this: under strong constraint (linear algebra, differentiable computation), solutions converge on the same structural elements through different compositions. This is cephalization in neural networks.

  2. Cross-faculty validation (Dolson, Liu, Waters, Kachkovskiy, Anderson — 15 papers, 127 checks) demonstrates that the BarraCuda primitives evolved under ML constraint are fit for evolutionary computation, phylogenetics, systems biology, spectral theory, and population genomics without modification. This is cross-domain kernel reuse — the same phenomenon as the NTT→FFT evolution, at the application level.

  3. The 76.6× fused pipeline speedup demonstrates that constraints can produce emergent performance. The WGSL constraint forces explicit kernel boundaries; explicit boundaries make fusion opportunities visible; fusion produces superlinear speedup. The performance was not designed — it emerged from the constraint.

  4. Pure GPU promotion (Sessions 45–46, 38 ops) demonstrates that the 6 primitives are sufficient for ~90% of all production math across 25 papers and 7 scientific domains. The gpu_dispatch::Dispatcher provides capability-based runtime routing — GPU when available, CPU fallback otherwise. This is the same adaptive pattern that primals use in biomeOS: discover capabilities at runtime, use the best available substrate.

  5. Multi-GPU bit-identity (Session 44) across RTX 4070 (Ada Lovelace, proprietary Vulkan) and TITAN V (Volta GV100, NVK open-source) proves that WGSL math is architecture-portable. Same source, different silicon generations (2017 vs 2023), different driver stacks — identical results. This eliminates vendor lock-in as a constraint on scientific reproducibility.


12.10 Pure GPU Promotion & Code Quality (Sessions 44–49)

Table 12.7 — GPU Dispatch Coverage

38 previously CPU-bound operations promoted to GPU via gpu_dispatch::Dispatcher:

CategoryOperationsGPU Method
Linear algebramatmul, transpose, frobenius_normTensor::matmul, transpose
ML inferenceneural_forward, softmax, pca_projectTensor::matmul chain
Statisticsvariance, mean, pearson_correlationTensor reductions
HMMforward_step, backward_step, viterbi_stepTensor::matmul + max_dim
DistanceL2, Hamming, Jaccard, geographicPairwiseL2Gpu, etc.
Populationallele_freq, nucleotide_div, FSTTensor::sum_dim, div_scalar
Game theoryreplicator_step, spatial_payoffTensor::matmul + softmax
Biologyfitness_eval, hill_activation, diversityBatchFitnessGpu, HillGateGpu
ODErk4_stepTensor::matmul + mul_add

Remaining ~10% CPU-only: full ODE integration loops (sequential timesteps), FST variance decomposition, introgression HMM chain, Viterbi argmax.

Table 12.8 — Code Quality (Session 87)

MetricValue
Rust modules31 + 2 evolved + 5 WDM + gpu_ops/ + gpu_dispatch
Validation binaries172
Library tests623
validate_all156/156 PASS
Python baselines31
WDM surrogates5 (nW-01..05: transport, opacity, S(q,ω), transfer, ESN)
Named tolerances129+ (all justified, minimal)
WGSL shaders21 (13 upstream absorbed, 8 local)
Typed BarraCuda ops12 (all f64 aligned)
External dependencies0 C/C++ crates (pure Rust)
unsafe blocks0 (forbid enforced)
clippy warnings0 (pedantic + nursery)
TODO/FIXME in src/0

Pure Rust Benchmark (11 Phase 0++ Kernels)

KernelPython (1t)Pure RustSpeedup
Counterdiabatic1.2 ms6.7 µs179×
MODES novelty890 µs4.1 µs217×
Eco dynamics340 µs2.8 µs121×
Directed evolution1.1 ms5.9 µs186×
HMM forward2.3 ms12.1 µs190×
SATé pairwise1.8 ms9.4 µs191×
Game theory450 µs3.2 µs141×
Regulatory ODE780 µs4.5 µs173×
Anderson IPR1.5 ms8.3 µs181×
Pangenome FST670 µs3.8 µs176×
Commutator45 µs110 µs0.4×
Geometric mean178.5×

Exception: dense commutator (64×64 matmul) where NumPy BLAS beats pure Rust loops.


12.11 baseCamp Research Program: BioPhysical AI Interpretability

neuralSpring’s baseCamp program applies validated physics and biology primitives to understanding AI systems as physical systems. The program defines five sub-theses, each grounded in published academic work and using existing validated primitives. No new math — only novel composition.

wetSpring took Anderson localization and applied it to quorum sensing (baseCamp Sub-thesis 01). neuralSpring takes the same spectral and dynamical-systems primitives and applies them to AI interpretability. The neural network IS the disordered medium. The weight matrix IS the Hamiltonian. Information propagation through layers IS wave propagation through a lattice.

Table 12.9 — baseCamp Sub-Thesis Mapping

Sub-ThesisNovel ClaimValidated PrimitivesFaculty Anchor
nS-01: Weight HamiltoniansWeight matrix eigenvalue IPR predicts generalizationeigh_f64, BatchIprGpu, anderson_localization.rsM. Mahoney (Berkeley), U. Simsekli (Inria)
nS-02: Information FlowLSTM gating is stencil propagation on a disordered latticehmm.rs, stencil_cooperation.wgsl, signal_integration.rsS. Ganguli (Stanford)
nS-03: Loss LandscapesLoss landscapes are energy landscapes; saddle points are transition statesrk45_adaptive.wgsl, eigh_f64, game_theory.rsD. Wales (Cambridge)
nS-04: Neural PGMDNN forward pass approximates belief propagation on a tree PGMhmm.rs, eigh_f64, introgression.rsY.W. Teh (Oxford/DeepMind)
nS-05: Multi-Agent QSAnderson framework predicts multi-agent AI coordination phase transitionsanderson_localization.rs, swarm_robotics.rs, WrightFisherGpuE. Dolson (MSU)

Grounding Papers (15)

Each sub-thesis reproduces 3 published papers as baselines, then extends with novel applications of validated primitives:

  • nS-01: Martin & Mahoney 2021 (JMLR), Gurbuzbalaban et al. 2025, Ouyang 2025
  • nS-02: Schoenholz et al. 2017 (ICLR), Gu et al. 2020 (ICML), Yang et al. 2025
  • nS-03: Ballard, Wales et al. 2024 (Digital Discovery), Pittorino et al. 2025, Liu et al. 2024
  • nS-04: Li et al. 2023, Nabarro et al. 2024 (ICML), Conmy et al. 2023 (NeurIPS)
  • nS-05: SwarmSys 2025, Emergent Collective Memory 2025, Foreback & Dolson 2025 (already validated as Paper 015)

Full paper details: specs/PAPER_REVIEW_QUEUE.md (Phase 1 — baseCamp Papers).

Cross-Spring Connections

Sub-ThesishotSpring PrimitivewetSpring Primitive
nS-01Anderson QS (IPR, level spacing)
nS-02QS signal propagation (stencil)
nS-03MD energy minimization (RK4/RK45), Boltzmann sampling
nS-04HMM phylogenetics (belief propagation)
nS-05Anderson QS dimensional analysis, game theory

Connection to the Constrained Evolution Thesis

The baseCamp program tests two central predictions of the constrained evolution thesis in the AI domain:

  1. Convergent structure: Architectural constraints produce universal spectral signatures in weight matrices (nS-01), universal landscape topologies (nS-03), and universal coordination strategies (nS-05) — the same convergent evolution observed in biology.

  2. Substrate independence: The physics governing information flow in neural networks (nS-02) and probabilistic inference (nS-04) is mathematically identical to the physics governing biological systems (QS signal propagation, phylogenetic inference). This validates the Isomorphism Theorem: one engine, many substrates.

The significance: the same 6 primitives that serve ML also reveal the physical structure hidden inside AI systems. The baseCamp extensions require only composition of already-validated operations (2,450+ checks across 25 papers + 5 WDM surrogates), not new math.


12.12 WDM Surrogate Queue (Sessions 79–87)

The WDM surrogate queue validates neuralSpring’s ML primitives against warm dense matter physics from hotSpring, demonstrating cross-spring scientific value and two new BarraCuda absorption targets.

Table 12.10 — WDM Surrogate Results

ModelArchitecturePython ChecksRust ChecksKey Result
nW-01 (transport)MLP 2→64→64→3517σ_dc, κ, η from (ρ, T)
nW-02 (opacity)MLP 3→32→32→1525Rosseland opacity interpolation
nW-03 (S(q,ω) peaks)LSTM reservoir, hidden=32627R²=0.98 on (ω_peak, γ) extraction
nW-04 (transfer)MLP with classical→WDM domain adaptation645Transfer learning across plasma regimes
nW-05 (ESN classifier)ESN, reservoir=64, SR=0.9113996.5% accuracy, Python↔Rust < 1e-10
Total33/33153/153186/186 all pass

Reservoir Computing Findings

Two of the five WDM surrogates (nW-03, nW-05) use reservoir computing — a paradigm where recurrent weights are fixed random and only a linear readout is trained:

  1. LSTM reservoir (nW-03): Fixed LSTM cell weights, pooled hidden states (mean + std + last after washout=4), ridge regression readout. Validates that LSTM can function as a feature extractor without backpropagation. Absorption target: barracuda::nn::LstmReservoir.

  2. ESN classifier (nW-05): Fixed reservoir (W_res at spectral radius 0.9, W_in at input scale 0.5), 2-step tanh update, linear readout + argmax. Achieves bit-exact Python↔Rust parity (score difference < 1e-10). Absorption target: barracuda::nn::EsnClassifier.

Cross-Spring Relevance

The reservoir computing models are directly applicable to baseCamp:

  • Sub-thesis 04 (Sentinels): ESN regime classifier detects Anderson regime shifts from community features — same architecture, different inputs
  • Sub-thesis 06 (No-till): LSTM reservoir extracts temporal features from soil parameter time series — predicts r(t) QS regime from θ(t), J(t)
  • Sub-thesis 01 (Anderson QS): ESN classifies extended/localized/marginal states from spectral features computed by shared eigh_f64 primitives

Full sub-thesis documents: baseCamp/sub01_weight_hamiltonians.md through sub05_multiagent_qs.md. Program overview: baseCamp/extensions.md.


See also: