Skip to content

Repository files navigation

PolyaNet

A mathematically-informed neural operator for early warning of climate and geophysical crises.

PolyaNet embeds the arithmetic structure of the Pólya operator K(i,j) = Λ(gcd(i,j))/√(ij) directly into its architecture. The spectral properties of this operator (unbounded growth λ_max → ∞ on the critical line, lower bound supR N ≥ (log 2/128)·log N) are formally verified in Lean 4, making PolyaNet the first ENSO predictor with a machine-checked mathematical core.

Key results (NOAA ONI, 1950–2026; val 2011–2026)

Model L6 L12
Persistence 0.323 −0.022
LSTM 0.252 −0.004
Transformer 0.351 0.386
PolyaNet 0.431 0.446

At the 12-month horizon — the window needed for real crisis prevention — baselines collapse while PolyaNet retains a robust signal.

Structure

  • polyanet.py — PolyaLayer (Pólya kernel + Dirichlet convolutions, theorem-initialized) + validation V1–V3
  • stress.py / stress2.py / stress3.py — synthetic, climate (ONI), seismic (USGS) stress tests
  • train.py / train_seis.py — ENSO and seismic forecasting (S3, S4)
  • bench.py — benchmark vs persistence/LSTM/Transformer (S5)
  • lean/ — Lean 4 formalization (EigenvalueLimit.lean et al.)
  • data/ — manually downloaded datasets (oni.data, query.csv)

Requirements

Python 3.10+, torch, numpy, pandas. Data: NOAA ONI (data/oni.data), USGS catalog (data/query.csv).

License

MIT

About

PolyaNet: a neural operator embedding the formally verified (Lean 4) arithmetic structure of the Pólya operator. 12-month ENSO forecast corr 0.45 vs 0.00 for persistence; beats LSTM & Transformer. Early-warning prototype for climate & geophysical crises.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages