Papers › Arithmetic-Based Pretraining -- Improving Numeracy of Pretrained Language Models

Arithmetic-Based Pretraining -- Improving Numeracy of Pretrained Language Models

13 May 2022arXiv:2205.06733archive 2025-07-28

Dominic Petrak, Nafise Sadat Moosavi, Iryna Gurevych

State-of-the-art pretrained language models tend to perform below their capabilities when applied out-of-the-box on tasks that require understanding and working with numbers. Recent work suggests two main reasons for this: (1) popular tokenisation algorithms have limited expressiveness for numbers, and (2) common pretraining objectives do not target numeracy. Approaches that address these shortcomings usually require architectural changes or pretraining from scratch. In this paper, we propose a new extended pretraining approach called Arithmetic-Based Pretraining that jointly addresses both in one extended pretraining step without requiring architectural changes or pretraining from scratch. Arithmetic-Based Pretraining combines contrastive learning to improve the number representation, and a novel extended pretraining objective called Inferable Number Prediction Task to improve numeracy. Our experiments show the effectiveness of Arithmetic-Based Pretraining in three different tasks that require improved numeracy, i.e., reading comprehension in the DROP dataset, inference-on-tables in the InfoTabs dataset, and table-to-text generation in the WikiBio and SciGen datasets.

PaperPDFCodeCode 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="2205.06733")

Code

Syntology Ran 2 of 16 code samples harvested from 2 repositories linked to this paper; 14 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 1 ran with no contract checked.

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

ukplab/emnlp2022-reasoning-aware-pretraining officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
ukplab/starsem2023-arithmetic-based-pretraining officialmentioned in papermentioned on GitHubpytorch 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

16 samples harvested; 2 ran; 0 honoured the contract we drafted; 14 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 · our draft was wrong
1ran
14unverified

Licence: 0 of the 16 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

count_trainable_parameters ukplab/emnlp2022-reasoning-aware-pretraining/callbacks.py official repository ran Apache-2.0 (permissive) · a3826392847cbef3 · report
get_lines ukplab/starsem2023-arithmetic-based-pretraining/evaluation/evaluate.py official repository ran · our draft was wrong Apache-2.0 (permissive) · f28ffee2040b376b · report
MNRLoss ukplab/emnlp2022-reasoning-aware-pretraining/losses.py official repository unverified Apache-2.0 (permissive) · db28bccfc5903f08 · report
add_args ukplab/emnlp2022-reasoning-aware-pretraining/args.py official repository unverified Apache-2.0 (permissive) · abd5798bdcfa8197 · report
char_level_representation_encoding ukplab/emnlp2022-reasoning-aware-pretraining/char_level_representation.py official repository unverified Apache-2.0 (permissive) · 83a07f606672603b · report
char_level_representation_impl ukplab/emnlp2022-reasoning-aware-pretraining/char_level_representation.py official repository unverified Apache-2.0 (permissive) · 4bdcc6fd40a2753c · report
convert_text_scientific_notation ukplab/emnlp2022-reasoning-aware-pretraining/scientific_notation.py official repository unverified Apache-2.0 (permissive) · 112d014b2004b7e4 · report
get_checkpoint_callback ukplab/emnlp2022-reasoning-aware-pretraining/callbacks.py official repository unverified Apache-2.0 (permissive) · c2d5c83a83cd96ef · report
get_early_stopping_callback ukplab/emnlp2022-reasoning-aware-pretraining/callbacks.py official repository unverified Apache-2.0 (permissive) · 5aa0f4cc91bef627 · report
get_lines ukplab/emnlp2022-reasoning-aware-pretraining/metrics.py official repository unverified Apache-2.0 (permissive) · eae00458a5958ff0 · report
get_scientific_notation ukplab/emnlp2022-reasoning-aware-pretraining/scientific_notation.py official repository unverified Apache-2.0 (permissive) · 3966b063074a6009 · report
is_float ukplab/emnlp2022-reasoning-aware-pretraining/utils.py official repository unverified Apache-2.0 (permissive) · 0327ea5057921c8d · report
masked_loss ukplab/emnlp2022-reasoning-aware-pretraining/losses.py official repository unverified Apache-2.0 (permissive) · 78a995a45343b076 · report
pad_or_trim ukplab/emnlp2022-reasoning-aware-pretraining/char_level_representation.py official repository unverified Apache-2.0 (permissive) · bd8cd57d2905efde · report
rebuild_string_in_new_notation ukplab/emnlp2022-reasoning-aware-pretraining/scientific_notation.py official repository unverified Apache-2.0 (permissive) · 05764486881f3364 · report
trim_batch ukplab/emnlp2022-reasoning-aware-pretraining/utils.py official repository unverified Apache-2.0 (permissive) · 75996269cea01a0c · report

Tasks

Contrastive LearningReading ComprehensionTable-to-Text GenerationText Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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