NeuralCert: certified computational discovery of extremal mathematical constructions
Organizations: Netherlands Defence Academy; Data Science Centre of Excellence, NL Ministry of Defence
Abstract
Neural networks are becoming popular in solving mathematical problems, but stochastic models do not provide mathematical exactness by themselves. This study introduces a discovery-to-certification framework in which high-dimensional variational trial functions are learned in a compact separable representation, spectrally diagnosed and pruned, and then certified exactly through multimodular evaluation. Exact certification makes the numerical proofs fully explicit and independently verifiable. This framework can be run on a standard personal computer. Across three extremal problems, we show that neural optimization can contribute to rigorous mathematics in three distinct ways: by discovering improved constructions, by exposing empirical invariants that lead to proofs, and by revealing optimization barriers whose geometry motivates new analytic or numerical representations. More broadly, these results suggest a path toward AI-assisted mathematics in which flexible computational discovery and exact certification become complementary components of a single rigorous workflow.
Figures & tables
| Trial space (degree cap by body count) | Eigensolver | Dimension | Retained | Certified |
|---|---|---|---|---|
| , all degrees | high precision | 408 | 408 | |
| , all degrees | float64 whitening | 408 | 191 | |
| , degrees | float64 whitening | 441 | 134 | |
| , degrees | high precision | 678 | 678 | |
| , all degrees | float64 whitening | 1601 | 421 |
| # | Correction | Cause / symptom |
|---|---|---|
| 1 | Baseline v9 (factored): per pair; stable inv_softplus ; per-pair max-rescale; adaptive log-space GL outer windows; diagonal preconditioning ( ); parts() protocol. | Foundation. inv_softplus fixes for rate (all ); per-pair rescale replaces a global max that flushed small pairs to round-off. |
| 2 | double-count fix: divide exact base re-evaluations by . | Exact base evals carried while was also added in new_sig ; the spurious factor is not of Gram form indefinite . |
| 3 | train() validation-ordering fix: validate before opt.step() . | read pre-step, report() post-step; agree measured the Adam step, rejecting nearly all snapshots (fallback to iter 700). |
| 4 | Log-space channel protocol: log_parts ; --channel-sign positive/free . | Prerequisite for the log-space recursion; needs sign-definite channels. |
| 5 | Log-space recursion: . | The collapse drove past the float64 floor; round-off put random signs on diagonal pairs ( ), making indefinite. |
| 6 | Shared graded outer mesh (one geometric Gauss rule for all pairs). | Per-pair windows gave each entry its own rule the Gram matrix of nothing; and did not improve under refinement. |
| Ver | Change | Failure mode / motivation |
|---|---|---|
| v1 | Initial multimodular backend. is never formed over ; per -bit prime, one nmod powering plus two weight-table multiplies execute both linear functionals as single coefficient extractions: for , and for the pair-dependent -weights combined as scalar–poly ops against per-prime tables folding in , the -power clearing, and batched harmonic inverses. Reconstruction is aggregate-only—two integers with known-denominator scalings—via deterministic centered CRT against exact a priori bounds, plus held-out verification primes. Float pass decoupled from the exact engine ( , by renormalized binary powering). Greedy -weighted pruning on the float pencil ( --prune-tol ); only surviving pairs reach the CRT engine. | Establishes the architecture: avoid the one unavoidable giant integer, reconstruct only two aggregate scalars, keep the float discovery pass cheap and separate from exact arithmetic. |
| v2 | _ritz no longer calls the Cholesky-based generalized solver: it equilibrates by the diagonal, eigendecomposes the metric , truncates to eigenvalues above of the top one, and solves the standard symmetric problem in whitened coordinates, embedding zeros for dead channels. Self-test adds exact agreement with scipy.eigh(B,A) on a PD case and a finite on a singular metric. | scipy.eigh(B,A) requires positive definite; at the float Gram is numerically semidefinite and Cholesky fails ( LinAlgError: leading minor not positive definite ). Restricting to is the correct regularization: null-space components contribute to . |
| v3 | B-side of the float DP rescaled by : run the -fold convolution power on , so , with carried in the log-scale ( degenerates to the old path). Driver interlock: float-predicted checked against discovery before any exact work. | At the certified value collapsed to (valid but worthless). concentrates like near , so the whole B-region sat below the renormalized peak—beneath float64 accuracy. was noise; the pruner dropped channels “for free” and the exact engine certified a garbage frozen . |
| v4 | Truncated convolution _tconv forced to direct np.convolve , removing the FFT path. Large- float-DP regression test against exact closed forms at . | FFT convolution carries an absolute error relative to the vector peak, while spans internally; entries sit up to below peak and are buried by noise by , then amplified through each squaring (closed-form check failed by ). Direct summation keeps per-entry relative accuracy; the self-convolution integrand peaks at the interior , representable to (float64 ceiling near ). |
| v5 | Product-exact prime budgeting ( gen_primes_for_bound ): accumulate the actual prime product until it exceeds rather than assuming bits/prime. Miller–Rabin citation corrected (least strong pseudoprime to bases is ; Sorenson–Webster 2017, OEIS A014233). Self-test cross-checks generated primes against FLINT’s proven fmpz.is_prime ; new strong-cancellation test ( , near-identical channels). | Collaborator review round: tighten certification claims (exact prime count, correct primality bound, FLINT belt-and-braces), cover the small-signed-aggregate CRT branch, and measure which proposed speedups were real ( mul_low benched slower than the full FFT multiply; native modular dot kernel deferred). |
| v6 | Added --float-only survey mode: projection float DP pruning per degree, stopping before any exact/CRT work. | Cheap degree scouting at large : projection and float-predicted answer “is this reachable at this basis degree” in minutes per degree, without spending the prime budget. |
| difference | |||||
|---|---|---|---|---|---|
| (ladder rung) |
| matrix values | config. walk | agree | |||||
|---|---|---|---|---|---|---|---|
| 2 | 4 | 2 | 8 | yes | |||
| 2 | 4 | 4 | 128 | yes | |||
| 2 | 4 | 2 | 8 | yes | |||
| 2 | 4 | 4 | 104 | yes | |||
| 2 | 5 | 2 | 11 | yes | |||
| 2 | 5 | 4 | 245 | yes |
| k | Channels | VRAM | |
|---|---|---|---|
| 100 | 32 | 3000 | 36 |
| 100 | 48 | 3000 | 77 |
| 100 | 64 | 3000 | 133 |
| 100 | 32 | 4000 | 48 |
| 100 | 48 | 4000 | 102 |
| 100 | 64 | 4000 | 110 |
| Discovery | Degree | Certification | ||||
|---|---|---|---|---|---|---|
| 20 | 3.128345991229 | 36 | 33 | 60 | 3.127557950496731089199291 | 0,992 |
| 21 | 3.170106837298 | 36 | 30 | 60 | 3.169687744135085908710644 | 0,992 |
| 22 | 3.210448579010 | 36 | 29 | 60 | 3.209791425249774301029605 | 0,991 |
| 23 | 3.249812450248 | 36 | 30 | 60 | 3.249018102873413922834334 | 0,991 |
| 24 | 3.287477573848 | 36 | 32 | 60 | 3.286239994066373110168097 | 0,991 |
| 25 | 3.322508727072 | 36 | 28 | 60 | 3.322151135960770560379734 | 0,991 |
| Discovery | Degree | Certification | |||
|---|---|---|---|---|---|
| 20 | 3.210936069786 | 36 | 33 | 60 | 3.210366921521749737183691731395 |
| 21 | 3.252680335644 | 36 | 30 | 60 | 3.252298834127242084124289323548 |
| 22 | 3.292779266722 | 36 | 29 | 60 | 3.292126369692432458798975243945 |
| 23 | 3.331173442193 | 36 | 30 | 60 | 3.330322094752801530355410455276 |
| 24 | 3.368036770635 | 36 | 30 | 60 | 3.366908489372213299919519038109 |
| 25 | 3.402371365754 | 36 | 29 | 60 | 3.402010619443212328887383163464 |
| Certified value | Rank | ||
|---|---|---|---|
| 50 | 3.942127742490453604663761985558 | 5 | |
| 50 | 3.712509239545921204317529071368 | 8 | |
| 50 | 3.764504991324559702999466932710 | 7 | |
| 50 | 3.874384180153464414710468398524 | 6 | |
| 50 | 3.959088983406359921645433483059 | 4 | |
| 50 | 3.988718438122563563392522885252 | 3 |
Mathematical Reasoning
Mathematical reasoning studies how AI systems solve problems, construct proofs, use tools, and discover or verify mathematical results.
See all 155 papers