Abstract
Traditional Machine Reading Comprehension (MRC) models often struggle with tasks requiring discrete reasoning, such as sorting, counting, and arithmetic. NumNet addresses this by integrating a numerically-aware graph neural network (GNN) that explicitly models relationships between numbers. Evaluated on the DROP dataset, NumNet achieves a significant performance boost over existing baselines, reaching an Exact Match score of 64.56%.
Introduction
Standard MRC models excel at identifying text spans but treat numbers as simple character strings, failing to grasp their quantitative magnitude. For example, a model might identify "47" and "36" as yardages in a sports summary but cannot inherently determine which is larger without external logic. While previous models like NAQANet introduced arithmetic headers, they lacked the structural mechanism to perform multi-step comparisons or sorting, which are essential for understanding financial reports or sports news.
Methodology
NumNet incorporates a specialized reasoning module into the standard MRC pipeline to bridge this gap. The architecture consists of three primary stages:
- Encoding: Utilizing components from QANet (convolutions and self-attention), the model generates vector representations of the question and passage.
- Numerically-Aware Graph Construction: The model identifies all numerical values within the text and represents them as nodes in a directed graph. Edges are defined based on numerical magnitude: "greater-than" edges ($n(v_i) > n(v_j)$) and "lower-or-equal" edges ($n(v_i) \le n(v_j)$).
- Heterogeneous GNN (NumGNN): A Graph Neural Network processes this topology using heterogeneous message-passing. It applies different weight matrices based on the edge type and the source of the number (question vs. passage). By iterating for multiple steps (typically $K=3$), the model effectively "sorts" information across the graph.
The final representations are passed to four specialized output heads: Passage Span, Question Span, Counting (0-9), and Arithmetic Expression (addition/subtraction).
Experimental Setup
The model was evaluated on the Discrete Reasoning Over Paragraphs (DROP) dataset. DROP is specifically designed to be adversarial to standard MRC models by requiring addition, counting, or sorting to answer questions. The dataset contains approximately 77k training samples and 9.6k testing samples.
Results
NumNet demonstrated a substantial improvement over traditional and numerical MRC baselines. On the DROP test set, NumNet achieved an Exact Match (EM) score of 64.56% and an F1 score of 67.97%.
As shown in the results, NumNet significantly outperforms BERT (29.45% EM) and the previous state-of-the-art NAQANet (44.07% EM). Ablation studies further confirmed that the explicit "greater-than" and "less-than" edges are critical to the model's success, as removing them leads to a noticeable drop in performance.
Discussion and Insights
The success of NumNet highlights several key principles in numerical MRC:
- Explicit Topology: Baking mathematical realities into the model's architecture is more effective than relying on implicit learning through word embeddings.
- Source Heterogeneity: Numbers in questions often act as filters or conditions (e.g., "more than 7%"), while numbers in passages serve as the data points. Treating these roles differently within the GNN is essential for accuracy.
- Differentiable Sorting: The multi-layer GNN structure allows the model to perform complex comparisons, with 2-3 layers being the optimal depth for most reasoning tasks.
Conclusion and Future Work
While NumNet represents a major step forward, it remains limited by its static graph structure. It cannot currently reason about "intermediate" numbers not explicitly present in the text (e.g., a calculated average). Future research will explore dynamic graphs that can evolve during reasoning and broader support for complex operations like multiplication and symbolic logic.
Summary updated