Papers › Pretrained Language Models are Symbolic Mathematics Solvers too!

Pretrained Language Models are Symbolic Mathematics Solvers too!

7 Oct 2021arXiv:2110.03501archive 2025-07-28

Kimia Noorbakhsh, Modar Sulaiman, Mahdi Sharifi, Kallol Roy, Pooyan Jamshidi

Solving symbolic mathematics has always been of in the arena of human ingenuity that needs compositional reasoning and recurrence. However, recent studies have shown that large-scale language models such as transformers are universal and surprisingly can be trained as a sequence-to-sequence task to solve complex mathematical equations. These large transformer models need humongous amounts of training data to generalize to unseen symbolic mathematics problems. In this paper, we present a sample efficient way of solving the symbolic tasks by first pretraining the transformer model with language translation and then fine-tuning the pretrained transformer model to solve the downstream task of symbolic mathematics. We achieve comparable accuracy on the integration task with our pretrained model while using around $1.5$ orders of magnitude less number of training samples with respect to the state-of-the-art deep learning for symbolic mathematics. The test accuracy on differential equation tasks is considerably lower comparing with integration as they need higher order recursions that are not present in language translations. We propose the generalizability of our pretrained language model from Anna Karenina Principle (AKP). We pretrain our model with different pairs of language translations. Our results show language bias in solving symbolic mathematics tasks. Finally, we study the robustness of the fine-tuned model on symbolic math tasks against distribution shift, and our approach generalizes better in distribution shift scenarios for the function integration.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2110.03501")

Code

Syntology Ran 3 of 14 code samples harvested from 1 repository linked to this paper; 11 have no recorded run. Of those that ran: 1 ran · violated contract; 2 ran · fixture could not drive it.

By repository: official repository: 14 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

softsys4ai/differentiable-proving officialmentioned in paperpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 3 ran; 0 honoured the contract we drafted; 11 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
2ran · fixture could not drive it
11unverified

Licence: 0 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from softsys4ai/differentiable-proving. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

Embedding softsys4ai/differentiable-proving/src/model/transformer.py official repository ran · fixture could not drive it MIT (permissive) · a3e27bd1e8b628ed · report
bool_flag softsys4ai/differentiable-proving/src/utils.py official repository ran · violated contract MIT (permissive) · cc66d68d2046d6a3 · report
get_masks softsys4ai/differentiable-proving/src/model/transformer.py official repository ran · fixture could not drive it MIT (permissive) · b2470f4f0c09db41 · report
count_nested_exp softsys4ai/differentiable-proving/src/envs/char_sp.py official repository unverified MIT (permissive) · ee55712ae0b3fe41 · report
count_occurrences softsys4ai/differentiable-proving/src/envs/sympy_utils.py official repository unverified MIT (permissive) · 073d361ac66e3887 · report
count_occurrences2 softsys4ai/differentiable-proving/src/envs/sympy_utils.py official repository unverified MIT (permissive) · 6080120f02a457e3 · report
create_logger softsys4ai/differentiable-proving/src/logger.py official repository unverified MIT (permissive) · 2f7db44ecae76417 · report
initialize_exp softsys4ai/differentiable-proving/src/utils.py official repository unverified MIT (permissive) · c7bf75ed8696c79a · report
preprocess_function_new softsys4ai/differentiable-proving/evaluator.py official repository unverified MIT (permissive) · dec620c6ce2bad55 · report
read_data_test softsys4ai/differentiable-proving/src/hf_utils.py official repository unverified MIT (permissive) · c93cf67af5f23a7b · report
read_data_test_new softsys4ai/differentiable-proving/src/hf_utils.py official repository unverified MIT (permissive) · 8aff65325d4bd420 · report
read_data_train softsys4ai/differentiable-proving/src/hf_utils.py official repository unverified MIT (permissive) · ad6a5d0d33aad981 · report
simplify softsys4ai/differentiable-proving/src/envs/sympy_utils.py official repository unverified MIT (permissive) · b2af0a4a625a6ae2 · report
timeout softsys4ai/differentiable-proving/src/utils.py official repository unverified MIT (permissive) · e7b55aa114a5156a · report

Tasks

IngenuityLanguage ModellingMath

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Test

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections