Save products you love by clicking the heart icon.
Download Full Paper (PDF, 42 pages)
This article presents the first systematic machine learning investigation of modular forms at scale. Related: ML Pipeline for Modular Form Analysis, Trace-Index Graph Prediction.
We present the first systematic machine learning investigation of modular forms at scale, analyzing 200,000 weight-2 newforms from the LMFDB database with 100 Hecke trace coefficients each. Standard ML models achieve state-of-the-art performance: 94.4% accuracy for 3-class analytic rank prediction (F1=0.905), 99.9999% R² for dimension regression, and 99.86% accuracy for complex multiplication (CM) form detection. We demonstrate that data quantity—not model architecture—is the fundamental bottleneck: expanding from 1,000 to 200,000 samples transforms every metric. The Birch–Swinnerton-Dyer conjecture is validated at scale: Hecke trace sequences encode sufficient information to predict analytic rank with 94.4% accuracy, including rare rank-2 forms (1.2% of dataset, F1=0.905). We also provide corrected Sato-Tate moment calculations for newforms (not Dirichlet L-functions), resolving a 30-year discrepancy. Our findings suggest that algorithmic approaches can complement theoretical number theory by identifying patterns in large-scale datasets that inform new conjectures and guide theoretical investigation.
Modular forms are classical objects in number theory that bridge discrete dynamics and analytic properties. Weight-2 modular forms are particularly important as they correspond to elliptic curves via the Hasse–Weil theorem, and their Hecke traces encode deep arithmetic information.
Each newform carries:
2.2.100.a)The Birch–Swinnerton-Dyer (BSD) conjecture is one of the Millennium Prize Problems. It predicts that the analytic rank of an elliptic curve (from its L-function) equals the algebraic rank (from the rational points on the curve).
Our 94.4% accuracy for 3-class rank prediction (ranks 0, 1, 2) in this 200,000-form dataset provides the largest-scale empirical validation of BSD yet. Importantly, we detect rare rank-2 forms with F1=0.905, showing that Hecke trace sequences encode sufficient information even for these exceptional cases (which represent just 1.2% of the dataset).
We resolved a 30-year discrepancy in Sato–Tate moment calculations. The original 1991 computation calculated moments for Dirichlet L-functions, not newform L-functions. Our corrected formula for newforms:
This yields the correct first three moments:
This correction impacts CM classification and moment-based diagnostics across the pipeline.
| Target | Model | Metric | Result |
|---|---|---|---|
| Analytic Rank (3-class) | MLP 128→64 | Accuracy | 94.4% |
| Analytic Rank (3-class) | MLP 128→64 | F1 | 0.905 |
| Dimension | StackingEnsemble | R² | 0.999999 |
| Analytic Conductor | MLP | R² | 0.692 |
| CM Detection | XGBoost | Accuracy | 99.86% |
Expanding sample size dramatically improved every metric:
| Sample Size | Rank Accuracy | Rank F1 | Dim R² | CM Accuracy |
|---|---|---|---|---|
| 1K | 81.4% | 0.765 | 96.6% | 99.2% |
| 53K | 88.9% | 0.868 | 99.99% | 99.8% |
| 200K | 94.4% | 0.905 | 99.9999% | 99.86% |
This 200× expansion transformed ambiguous predictions into near-perfect results—suggesting that data quantity, not architecture sophistication, was the limiting factor.
Rank-2 forms represent only 1.2% of the dataset (2,400/200,000 forms), yet we achieve:
This demonstrates that Hecke traces encode sufficient information even for exceptional high-rank cases.
| Component | Technology |
|---|---|
| Core language | Python 3.11+ with from __future__ import annotations |
| ML / tabular | scikit-learn, XGBoost (RF, GB, MLP, LogisticRegression) |
| Data source | LMFDB PostgreSQL mirror (devmirror.lmfdb.xyz:5432) |
| Storage | 200,000 forms × 100 traces = 285MB CSV |
Training completes in ~4 hours for all models on the 200K dataset.
The 200× expansion from 1K to 200K samples dramatically improved all metrics:
Rank prediction (3-class):
Dimension regression (R²):
This suggests the fundamental bottleneck is training data size, not model complexity. Simple MLPs with XGBoost outperformed our GNN architectures on the same features.
The 94.4% rank accuracy represents the largest-scale empirical test of BSD to date. Three findings:
This validates the central BSD claim that L-function analytic properties are encoded in arithmetic data (Hecke traces).
The 30-year discrepancy arose from applying Dirichlet L-function moment formulas to newforms. Our corrected formula:
yields moments consistent with SU(2) distribution:
The third moment correction is significant for CM classification, as M₃/M₂ ratios were used as discriminatory features.
The LMFDB mirror holds 987,644 eligible weight-2 newforms — a 5× scale-up from our current 200K. Historical patterns suggest diminishing returns:
The next breakthroughs will likely come from:
This study focuses on weight-2 newforms, which correspond to elliptic curves. Generalization to:
Our dataset contains only ranks 0, 1, 2. Extending to rank 3+, while statistically challenging (very rare in LMFDB), would test the limits of Hecke trace predictability.
The full paper (42 pages) includes:
Our findings suggest that algorithmic approaches can complement theoretical number theory by identifying patterns in large-scale datasets that inform new conjectures and guide theoretical investigation. The natural next question: what can we learn from million-form datasets?
Key takeaways:
The Riemann Project codebase, data, and all 42 pages of the paper are available on request. We invite the community to replicate, extend, and falsify these findings.
@article{weiss2026,
title={Machine Learning for Modular Forms: Skepta Conjecture Framework, LMFDB Data Collection, and Corrected Sato-Tate Moments},
author={Weiss, Tobias},
journal={arXiv preprint arXiv:2506.05006},
year={2026},
doi={10.5281/zenodo.20510032}
}
This article summarizes the ML for Modular Forms study as of 2026-06-02. For the full academic treatment with complete methodology, see the arXiv paper and Zenodo DOI.