Pre-trained Language Models Learn Remarkably Accurate Representations of Numbers

Warning

This publication doesn't include Institute of Computer Science. It includes Faculty of Informatics. Official publication website can be found on muni.cz.
Authors

KADLČÍK Marek ŠTEFÁNIK Michal MICKUS Timothee SPIEGEL Michal KUCHAŘ Josef

Year of publication 2025
Type Article in Proceedings
Conference Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing
MU Faculty or unit

Faculty of Informatics

Citation
web https://aclanthology.org/2025.emnlp-main.1356/
Keywords robustness; model editing; interpretability; probing; language models
Description Pretrained language models (LMs) are prone to arithmetic errors. Existing work showed limited success in probing numeric values from models’ representations, indicating that these errors can be attributed to the inherent unreliability of distributionally learned embeddings in representing exact quantities. However, we observe that previous probing methods are inadequate for the emergent structure of learned number embeddings with sinusoidal patterns. In response, we propose a novel probing technique that decodes numeric values from input embeddings with near-perfect accuracy across a range of open-source LMs. This proves that after the sole pre-training, LMs represent numbers with remarkable precision. Finally, we find that the embeddings’ preciseness judged by our probe’s accuracy explains a large portion of LM’s errors in elementary arithmetic, and show that aligning the embeddings with the pattern discovered by our probe can mitigate these errors.
Related projects:

You are running an old browser version. We recommend updating your browser to its latest version.

More info