Cargando…

A neural network solves, explains, and generates university math problems by program synthesis and few-shot learning at human level

We demonstrate that a neural network pretrained on text and fine-tuned on code solves mathematics course problems, explains solutions, and generates questions at a human level. We automatically synthesize programs using few-shot learning and OpenAI’s Codex transformer and execute them to solve cours...

Descripción completa

Detalles Bibliográficos
Autores principales: Drori, Iddo, Zhang, Sarah, Shuttleworth, Reece, Tang, Leonard, Lu, Albert, Ke, Elizabeth, Liu, Kevin, Chen, Linda, Tran, Sunny, Cheng, Newman, Wang, Roman, Singh, Nikhil, Patti, Taylor L., Lynch, Jayson, Shporer, Avi, Verma, Nakul, Wu, Eugene, Strang, Gilbert
Formato: Online Artículo Texto
Lenguaje:English
Publicado: National Academy of Sciences 2022
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9371704/
https://www.ncbi.nlm.nih.gov/pubmed/35917350
http://dx.doi.org/10.1073/pnas.2123433119
_version_ 1784767215115960320
author Drori, Iddo
Zhang, Sarah
Shuttleworth, Reece
Tang, Leonard
Lu, Albert
Ke, Elizabeth
Liu, Kevin
Chen, Linda
Tran, Sunny
Cheng, Newman
Wang, Roman
Singh, Nikhil
Patti, Taylor L.
Lynch, Jayson
Shporer, Avi
Verma, Nakul
Wu, Eugene
Strang, Gilbert
author_facet Drori, Iddo
Zhang, Sarah
Shuttleworth, Reece
Tang, Leonard
Lu, Albert
Ke, Elizabeth
Liu, Kevin
Chen, Linda
Tran, Sunny
Cheng, Newman
Wang, Roman
Singh, Nikhil
Patti, Taylor L.
Lynch, Jayson
Shporer, Avi
Verma, Nakul
Wu, Eugene
Strang, Gilbert
author_sort Drori, Iddo
collection PubMed
description We demonstrate that a neural network pretrained on text and fine-tuned on code solves mathematics course problems, explains solutions, and generates questions at a human level. We automatically synthesize programs using few-shot learning and OpenAI’s Codex transformer and execute them to solve course problems at 81% automatic accuracy. We curate a dataset of questions from Massachusetts Institute of Technology (MIT)’s largest mathematics courses (Single Variable and Multivariable Calculus, Differential Equations, Introduction to Probability and Statistics, Linear Algebra, and Mathematics for Computer Science) and Columbia University’s Computational Linear Algebra. We solve questions from a MATH dataset (on Prealgebra, Algebra, Counting and Probability, Intermediate Algebra, Number Theory, and Precalculus), the latest benchmark of advanced mathematics problems designed to assess mathematical reasoning. We randomly sample questions and generate solutions with multiple modalities, including numbers, equations, and plots. The latest GPT-3 language model pretrained on text automatically solves only 18.8% of these university questions using zero-shot learning and 30.8% using few-shot learning and the most recent chain of thought prompting. In contrast, program synthesis with few-shot learning using Codex fine-tuned on code generates programs that automatically solve 81% of these questions. Our approach improves the previous state-of-the-art automatic solution accuracy on the benchmark topics from 8.8 to 81.1%. We perform a survey to evaluate the quality and difficulty of generated questions. This work automatically solves university-level mathematics course questions at a human level and explains and generates university-level mathematics course questions at scale, a milestone for higher education.
format Online
Article
Text
id pubmed-9371704
institution National Center for Biotechnology Information
language English
publishDate 2022
publisher National Academy of Sciences
record_format MEDLINE/PubMed
spelling pubmed-93717042022-08-12 A neural network solves, explains, and generates university math problems by program synthesis and few-shot learning at human level Drori, Iddo Zhang, Sarah Shuttleworth, Reece Tang, Leonard Lu, Albert Ke, Elizabeth Liu, Kevin Chen, Linda Tran, Sunny Cheng, Newman Wang, Roman Singh, Nikhil Patti, Taylor L. Lynch, Jayson Shporer, Avi Verma, Nakul Wu, Eugene Strang, Gilbert Proc Natl Acad Sci U S A Physical Sciences We demonstrate that a neural network pretrained on text and fine-tuned on code solves mathematics course problems, explains solutions, and generates questions at a human level. We automatically synthesize programs using few-shot learning and OpenAI’s Codex transformer and execute them to solve course problems at 81% automatic accuracy. We curate a dataset of questions from Massachusetts Institute of Technology (MIT)’s largest mathematics courses (Single Variable and Multivariable Calculus, Differential Equations, Introduction to Probability and Statistics, Linear Algebra, and Mathematics for Computer Science) and Columbia University’s Computational Linear Algebra. We solve questions from a MATH dataset (on Prealgebra, Algebra, Counting and Probability, Intermediate Algebra, Number Theory, and Precalculus), the latest benchmark of advanced mathematics problems designed to assess mathematical reasoning. We randomly sample questions and generate solutions with multiple modalities, including numbers, equations, and plots. The latest GPT-3 language model pretrained on text automatically solves only 18.8% of these university questions using zero-shot learning and 30.8% using few-shot learning and the most recent chain of thought prompting. In contrast, program synthesis with few-shot learning using Codex fine-tuned on code generates programs that automatically solve 81% of these questions. Our approach improves the previous state-of-the-art automatic solution accuracy on the benchmark topics from 8.8 to 81.1%. We perform a survey to evaluate the quality and difficulty of generated questions. This work automatically solves university-level mathematics course questions at a human level and explains and generates university-level mathematics course questions at scale, a milestone for higher education. National Academy of Sciences 2022-08-02 2022-08-09 /pmc/articles/PMC9371704/ /pubmed/35917350 http://dx.doi.org/10.1073/pnas.2123433119 Text en Copyright © 2022 the Author(s). Published by PNAS. https://creativecommons.org/licenses/by/4.0/This open access article is distributed under Creative Commons Attribution License 4.0 (CC BY) (https://creativecommons.org/licenses/by/4.0/) .
spellingShingle Physical Sciences
Drori, Iddo
Zhang, Sarah
Shuttleworth, Reece
Tang, Leonard
Lu, Albert
Ke, Elizabeth
Liu, Kevin
Chen, Linda
Tran, Sunny
Cheng, Newman
Wang, Roman
Singh, Nikhil
Patti, Taylor L.
Lynch, Jayson
Shporer, Avi
Verma, Nakul
Wu, Eugene
Strang, Gilbert
A neural network solves, explains, and generates university math problems by program synthesis and few-shot learning at human level
title A neural network solves, explains, and generates university math problems by program synthesis and few-shot learning at human level
title_full A neural network solves, explains, and generates university math problems by program synthesis and few-shot learning at human level
title_fullStr A neural network solves, explains, and generates university math problems by program synthesis and few-shot learning at human level
title_full_unstemmed A neural network solves, explains, and generates university math problems by program synthesis and few-shot learning at human level
title_short A neural network solves, explains, and generates university math problems by program synthesis and few-shot learning at human level
title_sort neural network solves, explains, and generates university math problems by program synthesis and few-shot learning at human level
topic Physical Sciences
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9371704/
https://www.ncbi.nlm.nih.gov/pubmed/35917350
http://dx.doi.org/10.1073/pnas.2123433119
work_keys_str_mv AT droriiddo aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT zhangsarah aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT shuttleworthreece aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT tangleonard aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT lualbert aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT keelizabeth aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT liukevin aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT chenlinda aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT transunny aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT chengnewman aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT wangroman aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT singhnikhil aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT pattitaylorl aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT lynchjayson aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT shporeravi aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT vermanakul aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT wueugene aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT stranggilbert aneuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT droriiddo neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT zhangsarah neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT shuttleworthreece neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT tangleonard neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT lualbert neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT keelizabeth neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT liukevin neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT chenlinda neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT transunny neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT chengnewman neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT wangroman neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT singhnikhil neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT pattitaylorl neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT lynchjayson neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT shporeravi neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT vermanakul neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT wueugene neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel
AT stranggilbert neuralnetworksolvesexplainsandgeneratesuniversitymathproblemsbyprogramsynthesisandfewshotlearningathumanlevel