SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.07340 · NeurIPS · 2021

MathBERT: A Pre-trained Language Model for General NLP Tasks in Mathematics Education

Jia Shen, Michiharu Yamashita, Ethan Prihar, Neil Heffernan, Xintao Wu, Ben Graff, Dongwon Lee

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 3 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2106.07340.json · badge: /api/ran/2106.07340.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
tbs17/MathBERT canonical (classifier label)
classifier basis not recorded on the link
6 ran · 3 no recorded run
FunctionStatusWhere it lives
convert_to_unicode Ran
ran; our contract draft was wrong, not the code
tbs17/MathBERT/mathbert/tokenization.py
pointer only (licence: MIT); the stored copy get_code serves, from huawei-noah/Pretrained-Language-Model, is pointer only (licence: NONE) · get_code("1923fc05163d207d")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, tbs17/MathBERT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_float_feature Ran
ran; our contract draft was wrong, not the code
tbs17/MathBERT/mathbert/create_pretraining_data.py
pointer only (licence: MIT) · get_code("b24b3b9c700da839")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, tbs17/MathBERT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_int_feature Ran
ran; our contract draft was wrong, not the code
tbs17/MathBERT/mathbert/create_pretraining_data.py
pointer only (licence: MIT) · get_code("dd3ef48a15aec0cd")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, tbs17/MathBERT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

gelu Ran
ran, honoured the contract we drafted
tbs17/MathBERT/mathbert/modeling.py
pointer only (licence: MIT) · get_code("d08f324f950148de")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, tbs17/MathBERT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_activation Ran
ran; our contract draft was wrong, not the code
tbs17/MathBERT/mathbert/modeling.py
pointer only (licence: MIT) · get_code("5842ee67106321d6")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, tbs17/MathBERT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

printable_text Ran
ran; our contract draft was wrong, not the code
tbs17/MathBERT/mathbert/tokenization.py
pointer only (licence: MIT) · get_code("0e5615f8994003cf")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, tbs17/MathBERT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

file_based_input_fn_builder Not yet run
unverified (harvested, no recorded run)
tbs17/MathBERT/mathbert/run_classifier.py
pointer only (licence: MIT) · get_code("1b46c9ce24fc6db3")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, tbs17/MathBERT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_assignment_map_from_checkpoint Not yet run
unverified (harvested, no recorded run)
tbs17/MathBERT/mathbert/modeling.py
pointer only (licence: MIT); the stored copy get_code serves, from toggle1995/RIS-DMMI, is pointer only (licence: NONE) · get_code("50958618b65e514e")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, tbs17/MathBERT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_vocab Not yet run
unverified (harvested, no recorded run)
tbs17/MathBERT/mathbert/tokenization.py
pointer only (licence: MIT) · get_code("ff83ccc8b0b6462d")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, tbs17/MathBERT, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 9 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
convert_to_unicode 36 other papers
20 dated earlier, 15 later, 1 same year, order not determinable
1609.08144 (2016-09)
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 33 more not named here
printable_text 33 other papers
20 dated earlier, 12 later, 1 same year, order not determinable
1609.08144 (2016-09)
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 30 more not named here
get_activation 32 other papers
23 dated earlier, 9 later · 1 only as an assembly brick
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.04085 (2019-01)
Passage Re-ranking with BERT
and 29 more not named here
gelu 26 other papers
18 dated earlier, 8 later · 4 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
and 23 more not named here
get_assignment_map_from_checkpoint 26 other papers
19 dated earlier, 7 later
1804.05392 (2018-04)
Higher-order Coreference Resolution with Coarse-to-fine Inference
1808.09781 (2018-08)
Self-Attentive Sequential Recommendation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
and 23 more not named here
load_vocab 16 other papers
13 dated earlier, 3 later
1609.08144 (2016-09)
Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.08746 (2019-01)
BioBERT: a pre-trained biomedical language representation model for biomedical text mining
and 13 more not named here
create_int_feature 13 other papers
10 dated earlier, 3 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1906.05474 (2019-06)
Transfer Learning in Biomedical Natural Language Processing: An Evaluation of BERT and ELMo on Ten Benchmarking Datasets
1908.08962 (2019-08)
Well-Read Students Learn Better: On the Importance of Pre-training Compact Models
and 10 more not named here
create_float_feature 9 other papers
7 dated earlier, 2 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1908.08962 (2019-08)
Well-Read Students Learn Better: On the Importance of Pre-training Compact Models
1909.06356 (2019-09)
Addressing Semantic Drift in Question Generation for Semi-Supervised Question Answering
and 6 more not named here
file_based_input_fn_builder 7 other papers
5 dated earlier, 2 later
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1905.09217 (2019-05)
Deeper Text Understanding for IR with Contextual Neural Language Modeling
1906.09317 (2019-06)
Identification of Tasks, Datasets, Evaluation Metrics, and Numeric Scores for Scientific Leaderboards Construction
and 4 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Since the introduction of the original BERT (i.e., BASE BERT), researchers have developed various customized BERT models with improved performance for specific domains and tasks by exploiting the benefits of transfer learning. Due to the nature of mathematical texts, which often use domain specific vocabulary along with equations and math symbols, we posit that the development of a new BERT model for mathematics would be useful for many mathematical downstream tasks. In this resource paper, we introduce our multi-institutional effort (i.e., two learning platforms and three academic institutions in the US) toward this need: Math-BERT, a model created by pre-training the BASE BERT model on a large mathematical corpus ranging from pre-kindergarten (pre-k), to high-school, to college graduate level mathematical content. In addition, we select three general NLP tasks that are often used in mathematics education: prediction of knowledge component, auto-grading open-ended Q&A, and knowledge tracing, to demonstrate the superiority of MathBERT over BASE BERT. Our experiments show that MathBERT outperforms prior best methods by 1.2-22% and BASE BERT by 2-8% on these tasks. In addition, we build a mathematics specific vocabulary 'mathVocab' to train with MathBERT. We discover that MathBERT pre-trained with 'mathVocab' outperforms MathBERT trained with the BASE BERT vocabulary (i.e., 'origVocab'). MathBERT is currently being adopted at the participated leaning platforms: Stride, Inc, a commercial educational resource provider, and ASSISTments.org, a free online educational platform. We release MathBERT for public usage at: https://github.com/tbs17/MathBERT. • Applied computing → Education; • Computing methodologies → Natural language processing.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2106.07340")
get_code_for_paper("2106.07340")
have("2106.07340")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2106.07340.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2106.07340.svg)](https://syntology.ai/paper/2106.07340)

Connect an agent — have() is free.