Complex Numerical Reasoning with Numerical Semantic Pre-training Framework

Jun Zhang, E Haihong, Tianyi Hu, Yifan Zhu, Meina Song, Haoran Luo2025

Abstract

Multi-hop complex reasoning over incomplete knowledge graphs (KGs) has been extensively studied, but research on numerical knowledge graphs (NKGs) remains relatively limited. Recent approaches focus on separately encoding entities and numerical values, using neural networks to process query encodings for reasoning. However, in complex multi-hop reasoning tasks, numerical values are not merely symbols, and they carry specific semantics and logical relationships that must be accurately represented. In this work, we propose a Complex Numerical Reasoning with Numerical Semantic Pre-training Framework (CNR-NST). The CNR-NST framework can perform binary operations on numerical attributes in NKGs, enabling it to infer new numerical attributes from existing knowledge. Our approach effectively handles up to 102 types of complex numerical reasoning queries. On three public datasets, CNR-NST demonstrates SOTA performance in complex numerical queries, achieving an average improvement of over 40% compared to existing methods. Notably, this work expands the query types for complex multi-hop numerical reasoning and introduces a new evaluation metric for numerical answers, which has been validated through comprehensive experiments.

Introduction: The Challenge of Numerical Knowledge Graphs

Knowledge Graphs (KGs) are traditionally designed to represent discrete relationships between entities, such as "Bradford is_in United_Kingdom." However, real-world data is inherently numerical, encompassing birth dates, populations, and geographic coordinates. Standard Complex Query Answering (CQA) methods often treat these numerical attributes as static labels or ignore them entirely, failing to capture their continuous nature and the logical relationships between them.

Figure 3: Comparison of query complexity levels and the reasoning process over a Numerical Knowledge Graph.

The primary challenges in this domain are semantic sparsity and the need for arithmetic reasoning. Many numerical values are unique, making it difficult for models to learn generalizable patterns. Furthermore, most existing models lack the "math engine" required to calculate new information—for instance, determining the combined population of two cities if that sum is not explicitly recorded in the KG.

The CNR-NST Framework

To address these limitations, we introduce the CNR-NST (Complex Numerical Reasoning with Numerical Semantic Pre-training) framework. This approach is built upon three fundamental pillars designed to bridge the gap between symbolic reasoning and numerical calculation.

Figure 4: The three pillars of CNR-NST: Fuzzy Number Operations, Numerical Semantic Learning, and handling Numerical Sparsity.

1. Numerical Semantic Pre-training (Multi-ComplEx)

Rather than training on entities and numbers in isolation, CNR-NST utilizes a joint training framework. This allows the model to learn the relationships between entities and their attributes (e.g., Person -> has_height -> 1.8m) while simultaneously capturing the inherent relationships between numbers (e.g., 1990 is_after 1980). This pre-training step ensures the model understands the "topology" of the number line.

2. Fuzzy Set Representation

Multi-hop reasoning involves inherent uncertainty. To manage this, CNR-NST represents numbers as fuzzy sets. This probabilistic approach allows the model to maintain a distribution over possible values throughout the reasoning chain, preventing early commitment to incorrect values and improving robustness.

3. Numerical Binary Operation Operators

The framework incorporates a dedicated arithmetic engine based on the extension principle from fuzzy mathematics. This allows the model to map standard arithmetic operations (addition, subtraction, multiplication, division) onto operations between fuzzy sets. Consequently, the model can infer novel numerical attributes that are not explicitly present in the original dataset.

Experimental Setup and Datasets

The framework was evaluated on three benchmark datasets augmented with numerical data: FB15K, DB15K, and YAGO15K. We significantly expanded the evaluation scope to include 102 distinct query types, a substantial increase from the 77 types used in previous state-of-the-art (SOTA) benchmarks. This expansion includes five new categories specifically requiring explicit arithmetic calculations.

To accurately assess performance on continuous numerical answers, we introduced a new evaluation metric: $MRR_{0.001}$. Unlike traditional metrics that require exact matches, $MRR_{0.001}$ considers an answer correct if the relative error falls within a 0.001 threshold, providing a more practical measure for numerical tasks.

Key Results and Insights

CNR-NST demonstrates significant performance gains across all tested benchmarks:

  • SOTA Performance: The framework achieved an average improvement of over 40% compared to previous numerical reasoning methods like NRN.
  • Arithmetic Proficiency: In queries requiring explicit calculations—where previous models often struggled to achieve any accuracy—CNR-NST showed performance gains exceeding 300%.
  • Efficiency: By focusing on semantic learning during pre-training, the model is highly efficient. For example, training on FB15K took only 0.22 hours, compared to 32.4 hours for previous baselines.
  • Comparison with LLMs: Experimental results indicate that even advanced Large Language Models like GPT-4o struggle with these structured numerical reasoning tasks on KGs, highlighting the value of specialized symbolic-neural hybrids.

Conclusion and Future Work

CNR-NST represents a significant step forward in multi-hop reasoning over Numerical Knowledge Graphs. By treating numbers as continuous entities with inherent semantics and providing a mechanism for fuzzy arithmetic, it overcomes the limitations of traditional CQA methods. Future research will focus on scaling the framework to extremely large, web-scale Knowledge Graphs and expanding the variety of supported natural language query structures to improve robustness in real-world applications.

Summary updated

BibTeX
@misc{zhang2025complex,
  author = {Jun Zhang and E Haihong and Tianyi Hu and Yifan Zhu and Meina Song and Haoran Luo},
  title = {{Complex Numerical Reasoning with Numerical Semantic Pre-training Framework}},
  year = {2025},
  doi = {10.18653/v1/2025.emnlp-main.782},
}
Figure