FoNE: Precise Single-Token Number Embeddings via Fourier Features
Tianyi Zhou, Deqing Fu, Mahdi Soltanolkotabi, Robin Jia, Vatsal Sharan
Abstract
Language models treat numbers in the same way as ordinary word tokens, which introduces two major issues: (1) embeddings of numerical tokens primarily reflect their frequency in text corpora rather than their inherent numerical properties, leading to frequency bias, and (2) numbers are often split into multiple tokens, forcing the model to aggregate these pieces to recover their values. Inspired by the observation that pre-trained Large Language Models (LLMs) internally learn Fourier-like features for number tokens, we propose Fourier Number Embedding (FoNE), a novel method that directly maps numbers into the embedding space with their Fourier features. FoNE encodes each number as a single token with only two embedding dimensions per digit, effectively capturing numerical values without fragmentation. Compared to traditional subword and digit-wise embeddings, FoNE achieves higher accuracy on arithmetic tasks, requires significantly less training data, and offers more efficient training and inference. A M-parameter Transformer trained from scratch with FoNE outperforms a fine-tuned Llama-3.2-1B model on addition, subtraction, and multiplication. FoNE is also the only method that achieves accuracy on over 100,000 test examples across these tasks. On 6-digit decimal addition, FoNE needs 64 less data than subword and digit-wise embeddings to reach accuracy, while using 3 and 6 fewer tokens per number, respectively.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext abed6003-ef77-4237-95df-60d41837fb04Cited by top-tier papers6
- Computational Algebra with Attention: Transformer Oracles for Border Basis AlgorithmsHiroshi Kera, Nico Pelleriti, Yuki Ishihara, Max Zimmer et al.NeurIPS 2025 · 8 citations
- Efficient numeracy in language models through single-token number embeddingsLinus Kreitner, Paul Hager, Jonathan Mengedoht, Georgios Kaissis et al.ICML 2026 · 5 citations
- CONE: Embeddings for Complex Numerical Data Preserving Unit and Variable SemanticsGyanendra Shrestha, Anna Pyayt, Michael N. GubanovSIGMOD 2026
- Enhancing Numerical Prediction in LLMs via Smooth MMD AlignmentZhuo Zuo, Li Yue, Wenhao Zheng, Chenpeng Wang et al.ICML 2026
- GeoNum: Bridging Numerical Continuity and Language Semantics via Geometric EmbeddingShengkai Jin, Tianyu Chen, Chonghan Gao, Jun HanAAAI 2026
Builds on24
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
- Fourier Features Let Networks Learn High Frequency Functions in Low Dimensional DomainsMatthew Tancik, Pratul P. Srinivasan, Ben Mildenhall, Sara Fridovich-Keil et al.NeurIPS 2020 · 4,036 citations
- Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
Related papers
- Pre-trained Large Language Models Use Fourier Features to Compute AdditionTianyi Zhou, Deqing Fu, Vatsal Sharan, Robin JiaNeurIPS 2024 · 48 citations
- Language Models Learn Universal Representations of Numbers and Here's Why You Should CareMichal Stefánik, Timothee Mickus, Marek Kadlcík, Bertram Højer et al.ACL 2026 · 1 citation
- Regress, Don't Guess: A Regression-like Loss on Number Tokens for Language ModelsJonas Zausinger, Lars Pennig, Anamarija Kozina, Sean Sdahl et al.ICML 2025
- Transformers Can Do Arithmetic with the Right EmbeddingsSean McLeish, Arpit Bansal, Alex Stein, Neel Jain et al.NeurIPS 2024 · 94 citations
- LightToken: A Task and Model-agnostic Lightweight Token Embedding Framework for Pre-trained Language ModelsHaoyu Wang, Ruirui Li, Haoming Jiang, Zhengyang Wang et al.KDD 2023 · 5 citations
