Calc-X and Calcformers: Empowering Arithmetical Chain-of-Thought through Interaction with Symbolic Systems

Marek Kadlčík, Michal Štefánik, Ondřej Sotolář, Vlastimil Martinek
5/24/2023
cs.LGcs.AIcs.CL

No official code found. Best implementation: prompteus/calc-x (9 stars, MIT, last commit 2025-06-04).

Abstract

Despite outstanding performance in many tasks, language models are notoriously inclined to make factual errors in tasks requiring arithmetic computation. We address this deficiency by creating Calc-X, a collection of datasets that demonstrates the appropriate use of a calculator in reasoning chains. Calc-X is suitable for teaching language models to offload computations to a symbolic system. We survey and unify several existing chain-of-thought datasets into a proposed format, resulting in a standard collection of over 300,000 samples requiring arithmetic reasoning. Finally, we use the new Calc-X collection to train open-source calculator-using models we call Calcformers and show that these models approximately double the accuracy of generating correct results compared to vanilla language model baselines. We make all Calc-X datasets, source code and Calcformers models publicly available.

View on arXivView PDF

Code Implementations(1)

prompteus/calc-xCommunity100%
MIT

Repository for EMNLP papers Calc-X, Calcformers and Self-training LMs for Arithmetic Reasoning

92Python, Jupyter NotebookFeb 1, 20231 years agoMIT

Similar Papers

Cite this paper

@article{kadlk2023calcx,
  title  = {Calc-X and Calcformers: Empowering Arithmetical Chain-of-Thought through Interaction with Symbolic Systems},
  author = {Marek Kadlčík and Michal Štefánik and Ondřej Sotolář and Vlastimil Martinek},
  year   = {2023},
  eprint = {2305.15017},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.15017v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.15017.svg)](https://codeofpaper.com/paper/2305.15017)

Discussion