Chapter 5: Why AI Needs Mathematics
Cameron S. Movassaghi, Amanda Momenzadeh, and Jesse G. Meyer, “From Articles to Code: On-Demand Generation of Core Algorithms from Scientific Publications,” Bioinformatics 42, no. 1 (2026): btag015, https://doi.org/10.1093/bioinformatics/btag015.
Movassaghi, Momenzadeh, and Meyer, “From Articles to Code.”
The study is by Movassaghi, Momenzadeh and Meyer. The random forests that matched the accuracy of the version in scikit-learn, a standard open-source library, were written by GPT-o4-mini-high and by Gemini Pro 2.5, as the study’s authors call them, the second after the pasted error message; the comparison ran over a hundred random splits of a classic small dataset of flower measurements. The five methods were random forests (Breiman, 2001), ComBat batch correction (Johnson and colleagues, 2007), the Augusta network-inference method (Musilova and colleagues, 2024), SERRF (Fan and colleagues, 2019) and a gene-set enrichment workflow. For ComBat, a method for removing the distortions that creep in when samples are processed in separate batches, the implementations that ran at the first attempt matched the reference package on three measures across a hundred synthetic datasets. For SERRF, one model could not produce a working implementation at the first attempt, though its code sometimes ran, and another succeeded at the second attempt, once the structure of the data had been explained to it. GPT-o4-mini-high succeeded on every task it was given. Several other pairings of model and task failed: Claude 4 Sonnet could not accept the PDF and the prompt together for the random forest, and GPT-4o and Gemini 2.5 Flash failed at ComBat. The authors call their benchmark “intentionally limited in scope”; there were generally fewer than ten attempts per task, by the authors’ estimate. Movassaghi, Momenzadeh, and Meyer, “From Articles to Code.”
Movassaghi, Momenzadeh, and Meyer, “From Articles to Code.”
Movassaghi, Momenzadeh, and Meyer, “From Articles to Code.” Others have tried the same trick on a larger scale. PaperCoder, presented at the ICLR conference in 2026, is a system of cooperating language models that turns machine-learning papers into code repositories in three stages, planning, analysis and generation; its builders had the results judged in part by the authors of the papers themselves. In April 2025, OpenAI’s PaperBench asked AI agents to replicate twenty machine-learning papers from scratch. The best agent tested, Claude 3.5 Sonnet (New) with open-source scaffolding, achieved an average score of 21 percent, and the company reported that the models did not yet beat a group of machine-learning PhDs given part of the same task. Minju Seo et al., “Paper2Code: Automating Code Generation from Scientific Papers in Machine Learning,” in International Conference on Learning Representations (ICLR 2026) (2026), accessed October 25, 2026, https://proceedings.iclr.cc/paper_files/paper/2026/hash/41b6674c28a9b93ec8d22a53ca25bc3b-Abstract-Conference.html; Giulio Starace, Oliver Jaffe, Dane Sherburn, et al., “PaperBench: Evaluating AI’s Ability to Replicate AI Research,” April 2, 2025, accessed October 25, 2026, arXiv: 2504.01848.
James W. Cooley and John W. Tukey, “An Algorithm for the Machine Calculation of Complex Fourier Series,” Mathematics of Computation 19, no. 90 (1965): 297–301, https://doi.org/10.1090/S0025-5718-1965-0178586-1; Michael T. Heideman, Don H. Johnson, and C. Sidney Burrus, “Gauss and the History of the Fast Fourier Transform,” Archive for History of Exact Sciences 34, no. 3 (1985): 265–277, https://doi.org/10.1007/BF00348431.
Heideman, Johnson, and Burrus, “Gauss and the Fast Fourier Transform.”
Matteo Frigo and Steven G. Johnson, “The Design and Implementation of FFTW3,” Proceedings of the IEEE 93, no. 2 (February 2005): 216–231, https://doi.org/10.1109/JPROC.2004.840301.
MathWorks, “[MATLAB documentation: fft, release R2026b],” accessed October 25, 2026, https://www.mathworks.com/help/matlab/ref/fft.html.
Cooley and Tukey, “Algorithm for the Machine Calculation.”
Gatheral led the equity quantitative group at Merrill Lynch, in which I worked from January to September 2004, and joined the faculty of Baruch College, City University of New York, in 2010. Baruch College, City University of New York, “[Baruch Professor Jim Gatheral Named Quant of the Year (news release)],” February 25, 2021, accessed October 31, 2026, https://newscenter.baruch.cuny.edu/news/baruch-professor-jim-gatheral-named-quant-of-the-year/.
Terry J. Lyons, “Rough Paths, Signatures and the Modelling of Functions on Streams,” May 18, 2014, accessed October 25, 2026, arXiv: 1405.4537.
University of Oxford, “Rough Paths: Gaining Insights and Building Solutions,” Oxford Suzhou Centre for Advanced Research, accessed October 25, 2026, https://oscar.web.ox.ac.uk/rough-paths-gaining-insights-and-building-solutions.
Oxford’s page does not name the company. It lists among the funders the European Research Council, Man Group plc, the UK’s Engineering and Physical Sciences Research Council and the Alan Turing Institute. University of Oxford, “Rough Paths.”
The library is PETSc. Of fifty-four attempts, twenty-five produced code that failed to compile or to run. Hong Zhang et al., “An Agentic Evaluation Framework for AI-Generated Scientific Code in PETSc,” March 16, 2026, accessed October 25, 2026, arXiv: 2603.15976.
H. Zhang et al., “Agentic Evaluation Framework.”
Zhenghan Song, Yulong Liu, Cheng Wan, et al., “Your Simulation Runs but Solves the Wrong Physics: PDE-Grounded Intent Verification for LLM-Generated Multiphysics Simulation Code,” May 10, 2026, accessed October 25, 2026, arXiv: 2605.09360.
Sébastien Bubeck et al., “Early Science Acceleration Experiments with GPT-5,” November 20, 2025, accessed October 25, 2026, arXiv: 2511.16072.
One experiment and one attempt, reported by an OpenAI researcher; seven of the report’s fourteen authors are listed with OpenAI. Bubeck et al., “Early Science Acceleration Experiments.”
Google DeepMind names reinforcement learning on reasoning data and a curated corpus of solutions for its 2025 Olympiad system, and code and mathematical text, not broken down by source, for AlphaProof; OpenAI says the agents behind its Navier–Stokes claim could read a cached copy of the internet while they worked. The training-data summaries discussed in Chapter 4 name categories of source but no paper, journal or preprint server. Thang Luong and Edward Lockhart, “Advanced Version of Gemini with Deep Think OfÏcially Achieves Gold-Medal Standard at the International Mathematical Olympiad,” Google DeepMind, July 21, 2025, accessed October 25, 2026, https://deepmind.google/blog/advanced-version-of-gemini-with-deep-think-officially-achieves-gold-medal-standard-at-the-international-mathematical-olympiad/; Thomas Hubert, Rishi Mehta, Laurent Sartran, et al., “Olympiad-Level Formal Mathematical Reasoning with Reinforcement Learning,” Nature 651, no. 8106 (March 2026): 607–613, https://doi.org/10.1038/s41586-025-09833-y; OpenAI, “On the Navier–Stokes Millennium Prize Problem,” September 8, 2026, https://openai.com/index/navier-stokes-solution/.
Joel Becker et al., “Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity,” July 12, 2025, accessed October 25, 2026, arXiv: 2507.09089.
METR, “We Are Changing Our Developer Productivity Experiment Design,” February 24, 2026, accessed October 25, 2026, https://metr.org/blog/2026-02-24-uplift-update/.
Google DeepMind, “AlphaEvolve: A Gemini-Powered Coding Agent for Designing Advanced Algorithms,” May 14, 2025, accessed October 25, 2026, https://deepmind.google/blog/alphaevolve-a-gemini-powered-coding-agent-for-designing-advanced-algorithms/.
Tom Beyer, “We’re Rolling Out AlphaEvolve Widely to Solve Google Cloud Customers’ Hardest Problems,” Google, July 9, 2026, accessed October 25, 2026, https://blog.google/innovation-and-ai/infrastructure-and-cloud/google-cloud/alphaevolve-on-cloud/.
Daya Guo, Dejian Yang, Haowei Zhang, et al., “DeepSeek-R1 Incentivizes Reasoning in LLMs through Reinforcement Learning,” Nature 645 (September 17, 2025): 633–638, https://doi.org/10.1038/s41586-025-09422-z, arXiv: 2501.12948.
Guo, Yang, Zhang, et al., “DeepSeek-R1 Incentivizes Reasoning.”
Zhihong Shao et al., “DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models,” February 2024, Project repository: https://github.com/deepseek-ai/DeepSeek-Math, accessed November 20, 2026, arXiv: 2402.03300.
Its rewards came from a scoring program that had itself learned which answers were correct, not from a fixed rule. Shao et al., “DeepSeekMath.”
Yang Yue, Zhiqi Chen, Rui Lu, et al., “Does Reinforcement Learning Really Incentivize Reasoning Capacity in LLMs Beyond the Base Model?,” April 18, 2025, accessed October 25, 2026, arXiv: 2504.13837.
Another group found that one open model improved by 21.4 points on a mathematics benchmark when trained with randomly assigned rewards, nearly as much as the 29.1 points it gained from correct ones, but that such rewards “often fail to produce gains for other model families.” It is a finding about particular models, not evidence that the correctness of a reward does not matter. Rulin Shao, Shuyue Stella Li, Rui Xin, et al., “Spurious Rewards: Rethinking Training Signals in RLVR,” June 12, 2025, accessed October 25, 2026, arXiv: 2506.10947.
Xumeng Wen, Zihan Liu, Shun Zheng, et al., “Reinforcement Learning with Verifiable Rewards Implicitly Incentivizes Correct Reasoning in Base LLMs,” International Conference on Learning Representations (ICLR 2026) (2026), accessed November 25, 2026, arXiv: 2506.14245, https://proceedings.iclr.cc/paper_files/paper/2026/hash/517f9b9c227b9dd51dba4560f37165ed-Abstract-Conference.html.
Charlie Zhang, Graham Neubig, and Xiang Yue, “On the Interplay of Pre-Training, Mid-Training, and RL on Reasoning Language Models,” December 8, 2025, accessed November 25, 2026, arXiv: 2512.07783, https://arxiv.org/abs/2512.07783.
Ömer Faruk Akgül et al., “Rethinking RL for LLM Reasoning: It’s Sparse Policy Selection, Not Capability Learning,” May 7, 2026, accessed November 25, 2026, arXiv: 2605.06241, https://arxiv.org/abs/2605.06241.
Mercor, “Mathematics Domain Expert [job advertisement],” accessed November 23, 2026, https://work.mercor.com/jobs/list_AAABoYr34sDSXamCPtFMIrdv/mathematics-domain-expert; Mercor, “Mathematics Domain Expert [job advertisement on jobRxiv],” jobRxiv, October 31, 2026, accessed November 26, 2026, https://jobrxiv.org/job/mathematics-domain-expert/; Maxwell Zeff, “How AI Labs Use Mercor to Get the Data Companies Won’t Share,” October 29, 2025, accessed November 23, 2026, https://techcrunch.com/2025/10/29/how-ai-labs-use-mercor-to-get-the-data-companies-wont-share/.
Zeff, “How AI Labs Use Mercor”; Cristian Dina, “Mercor Raises $750m at a $20bn Valuation to Train AI on Every Job,” November 10, 2026, accessed November 23, 2026, https://thenextweb.com/news/mercor-750m-series-d-20bn-valuation.
Mercor, “Mathematics Domain Expert (jobRxiv)”; Mercor, “Mathematics Domain Expert.”
Hubert, Mehta, Sartran, et al., “Olympiad-Level Formal Mathematical Reasoning.”
By the authors’ account, the network was pretrained on “approximately 300 billion tokens of code and mathematical text” and fine-tuned on “approximately 300,000 state–tactic pairs extracted from human-written proofs in the Mathlib library”; the translation model “auto-formalized approximately 1 million natural-language problems into a dataset of around 80 million formal Lean problems.” Hubert, Mehta, Sartran, et al., “Olympiad-Level Formal Mathematical Reasoning.”
Hubert, Mehta, Sartran, et al., “Olympiad-Level Formal Mathematical Reasoning.”
Ke Zhang et al., “Beyond Compilation: Evaluating Faithful Natural-Language-to-Lean Statement Formalization,” June 30, 2026, accessed October 25, 2026, arXiv: 2606.31002.
Of the 227 translations, 198 compiled; 131 passed the authors’ criterion, applied by two AI judges whose verdicts were audited by humans; human review confirmed at least 54 errors among the compiling translations. K. Zhang et al., “Beyond Compilation.”
Craig Disselkoen, Aaron Eline, Shaobo He, et al., “How We Built Cedar: A Verification-Guided Approach,” July 1, 2024, accessed October 25, 2026, arXiv: 2407.01688.
Tom Klose, written answers to the author’s questions, October 2026.
Luong and Lockhart, “Advanced Version of Gemini with Deep Think.”
Bogdan Georgiev et al., “Mathematical Exploration and Discovery at Scale,” November 3, 2025, accessed October 25, 2026, arXiv: 2511.02864.
Shao et al., “DeepSeekMath.”
Maggie Huan et al., “Does Math Reasoning Improve General LLM Capabilities? Understanding Transferability of LLM Reasoning,” July 1, 2025, accessed October 25, 2026, arXiv: 2507.00432 [cs.AI].
Other studies point the same way. A paper at ICLR 2026 found that gains from reinforcement training transfer between mathematics and programming, structured domains alike, but generalize inconsistently elsewhere and can vanish where the reasoning looks different. In one controlled 2025 experiment with a family of open seven-billion-parameter models, training on mathematics raised scores on logic puzzles from 9.07 to over 21; for one of the models, it cut performance in programming from 67.46 to 29.59. A paper from June 2026 takes it as given that “reasoning skills transfer unevenly across domains,” and builds its training curriculum around the fact, testing it on models with fewer than four billion parameters. Chuxuan Hu et al., “Breaking Barriers: Do Reinforcement Post Training Gains Transfer to Unseen Domains?,” in International Conference on Learning Representations (ICLR 2026) (2026), accessed October 25, 2026, arXiv: 2506.19733 [cs.CL]; Yu Li et al., “Can One Domain Help Others? A Data-Centric Study on Multi-Domain Reasoning via Reinforcement Learning,” July 23, 2025, accessed October 25, 2026, arXiv: 2507.17512; Yongjin Yang et al., “Transferability for General Reasoning: An Automated Curriculum for Multi-Domain RLVR,” June 23, 2026, accessed October 25, 2026, arXiv: 2606.25178.
Mohammed Abouzaid et al., “First Proof,” February 5, 2026, accessed October 25, 2026, arXiv: 2602.05192.
Tony Feng, Junehyuk Jung, Sang-hyun Kim, et al., “Aletheia Tackles FirstProof Autonomously,” February 24, 2026, accessed October 25, 2026, arXiv: 2602.21201.
Jeremy Avigad, “Mathematicians in the Age of AI,” March 4, 2026, accessed November 20, 2026, arXiv: 2603.03684.
Google DeepMind, “AlphaEvolve.”
Jean-Guillaume Dumas, Clément Pernet, and Alexandre Sedoglavic, “A Non-commutative Algorithm for Multiplying 4x4 Matrices Using 48 Non-complex Multiplications,” June 16, 2025, accessed October 25, 2026, arXiv: 2506.13242.
AlphaEvolve’s wider mathematical trials point the same way. Georgiev and Wagner of Google DeepMind, with Gómez-Serrano and Terence Tao, set it loose on sixty-seven problems; in one case, by their account, a construction it found was turned into a proof by another AI system and checked in Lean by a third. In their words, “it was the combination of human expertise and the computational capabilities of AlphaEvolve that led to the best results overall.” Georgiev et al., “Mathematical Exploration and Discovery.”
Anthony Ha, “OpenAI’s “Embarrassing” Math,” TechCrunch, October 19, 2025, accessed October 25, 2026, https://techcrunch.com/2025/10/19/openais-embarrassing-math/.
Bubeck et al., “Early Science Acceleration Experiments.”
International Mathematical Union, “Fields Medals 1998,” accessed November 21, 2026, https://www.mathunion.org/imu-awards/fields-medal/fields-medals-1998; International Mathematical Union, “Fields Medals 1990,” accessed November 21, 2026, https://www.mathunion.org/imu-awards/fields-medal/fields-medals-1990.
Fields Medalists, “A Severe Misalignment of AI in Mathematics,” September 11, 2026, accessed November 19, 2026, https://doi.org/10.5281/zenodo.22737750, https://mathandai.org/; Advisory Group on Mathematics and Artificial Intelligence, “Advisory Group on Mathematics and Artificial Intelligence,” accessed October 25, 2026, https://agmai.org/; Advisory Group on Mathematics and Artificial Intelligence, “Responsible Release of AI-Generated Mathematics,” September 29, 2026, accessed October 25, 2026, https://agmai.org/general-sep29/; Ben Brubaker, “As AI Closed In on ‘Unique Games’ Proof, Researchers Raced to Beat the Machines,” Quanta Magazine, October 7, 2026, https://www.quantamagazine.org/as-ai-closed-in-on-unique-games-proof-researchers-raced-to-beat-the-machines-20261007/.
OpenAI, “Navier–Stokes Millennium Prize Problem.”
Alexander Bastounis, Fabian Circelli, and Anders C. Hansen, “Navier-Stokes Lost in Translation: Why Lean Verification of AI Autoformalisation Does Not Guarantee Correct Natural Language Proofs,” October 6, 2026, accessed November 20, 2026, arXiv: 2610.08144.
Clay Mathematics Institute, “[Millennium Prize Problems],” accessed November 27, 2026, https://www.claymath.org/millennium-problems.
The paper thanks Anthropic for supporting the collaboration. Buckmaster described the pair’s earlier results, released in September 2026, as coming from a purely personal collaboration, free of involvement by either man’s employer. Levent Alpöge and Tristan Buckmaster, “Finite-Time Blow-Up for the Navier–Stokes Equations,” November 20, 2026, accessed November 21, 2026, https://github.com/tristanbuckmaster/navier-stokes/; Tristan Buckmaster, “[Mastodon post on the unforced Euler and Navier–Stokes results],” November 20, 2026, accessed November 21, 2026, https://mastodon.social/@tristanbuckmaster/117649035783718539; Tristan Buckmaster, “[Statement],” accessed November 20, 2026, https://cims.nyu.edu/~tristanb/statement.pdf.