neuralSpring — Neural Architectures, Structure Prediction, ML Surrogates

Proves the Isomorphism Theorem — all neural architectures decompose into 6 primitives. 1,425 tests, 113,515 LOC, AlphaFold2/3 in pure Rust f64.

Domain

Neural network primitives (GEMM, Attention, Normalization, Nonlinearity, Reduction, Gating), protein structure prediction (AlphaFold2/3 Evoformer, IPA, diffusion), ML surrogates, NPU inference, transfer learning.

Repository: syntheticChemistry/neuralSpring

The Science Story

neuralSpring proves the Isomorphism Theorem: every neural architecture — from LSTM to Transformer to AlphaFold — decomposes into exactly 6 computational primitives (GEMM, Attention, Normalization, Nonlinearity, Reduction, Gating). This is not a simplification; it is a mathematical fact. The consequence: implement 6 primitives correctly on GPU, and every architecture follows.

The spring validates this across 25 papers, 4 research groups, and 5 disciplines. AlphaFold2/3’s Evoformer, IPA module, and confidence heads all decompose into the same 6 primitives that power LSTM time-series prediction and ESN reservoir computing.

Headline Results

  • 1,425 tests passing, 0 failed
  • 113,515 lines of Rust across 3 crates
  • 6 primitives → every neural architecture (GEMM, Attention, Normalization, Nonlinearity, Reduction, Gating)
  • AlphaFold2/3 Evoformer + IPA + diffusion in pure Rust f64 — no Python, no JAX
  • 83.6x faster than Python/NumPy on equivalent workloads
  • 47 CPU ops promoted to GPU, 384/384 bit-identical multi-GPU results
  • NPU inference at 2.8 us/step on AKD1000 — 1,000x faster than GPU for streaming

Validation Phases

PhaseKey Result
Primitives6 primitives implemented in CPU + GPU (WGSL via coralReef)
ArchitectureLSTM, ESN, HMM, Transformer, Evoformer — all decompose into 6 primitives
Structure PredictionAlphaFold2/3 in f64 Rust — Evoformer, IPA, diffusion, pairformer, confidence
Transfer LearningCross-species PK (canine → human), cross-domain surrogates (airSpring Michigan→NM with 200 samples)
NPUAKD1000 int8 quantization validated, ESN streaming at 2.8 us/step, coin-cell 11 years

Researchers Reproduced

ResearcherDepartmentDomain
John JumperDeepMindAlphaFold2/3 protein structure prediction
Andrea J. GonzalesPharmacology, MSUHill/IC50, PK models, allometric scaling
Rika AndersonBiology, CarletonPangenomics, evolutionary inference

What the Constraint Revealed

Eliminating PyTorch/JAX forced the primitives-first approach. When you cannot import a framework, you must understand what the framework does. The 6-primitive decomposition emerged from this constraint — and it turns out to be architecturally cleaner than any framework. GPU portability comes free because coralReef compiles the same WGSL shaders for every vendor. NPU support required only mapping primitives to spiking equivalents.

The isomorphism also enables cross-spring transfer: the same GEMM that powers lattice QCD in hotSpring powers protein folding in neuralSpring and LSTM prediction in airSpring. The primitive is substrate-independent.

Cross-Spring Connections

  • → hotSpring: Isomorphic GEMM serves plasma physics and nuclear structure
  • → wetSpring: ESN/LSTM anomaly detection for sentinel microbes; NPU int8 quantization
  • → airSpring: MLP surrogate replaces FAO-56 at R²=0.999; transfer learning bridges Michigan→NM
  • → healthSpring: Hill/IC50, PK models, allometric scaling → human therapeutics
  • → groundSpring: Sensor noise floors for training data validation
  • lithoSpore: ML surrogate enrichment for LTEE modules (additive)
  • → Squirrel: MCP adapter with 14 tools for AI-assisted science

baseCamp Papers

Papers 01, 02, 04, 05, 06, 07, 08, 10, 11, 12, 16 — see baseCamp Science for full list.

neuralSpring contributes ML methods to 11 of 26 baseCamp papers.