While Large Language Models (LLMs) have demonstrated remarkable proficiency in general natural language tasks, their "numeracy"—the ability to understand and manipulate numerical data—remains a significant weak point. Numerical Question Answering (QA) is a complex task that requires a system to identify numbers within a text, understand their values, select appropriate operands, and apply correct mathematical logic.
Existing research into these failures has often been ad-hoc, relying on general adversarial attacks that fail to pinpoint specific failure modes. This paper introduces the Diagnosing Numerical Capabilities (DNC) framework, a systematic diagnostic tool designed to identify exactly where the numerical reasoning pipeline breaks down in state-of-the-art NLP systems.
The DNC Framework
The DNC framework decomposes the Numerical QA process into two primary stages, each associated with specific core capabilities:
- Numerical Parsing (Stage 1): Focuses on the model's ability to recognize numbers. This includes Number Detection (recognizing numbers in various formats like "7" vs. "seven") and Number Value Understanding (handling different numerical distributions, such as decimals or very large integers).
- Semantic Parsing (Stage 2): Focuses on the reasoning logic. This includes Operand Selection (identifying the correct numbers to use in a calculation while ignoring distractors) and Operation Reasoning (determining the correct mathematical operation based on linguistic context).
To stress-test these capabilities, the researchers developed eight specific "perturbations" or adversarial attacks. These range from surface-level changes, like converting digits to words (Language) or adding a decimal point to an integer (Type), to more complex semantic distractions, such as adding irrelevant sentences containing numbers (Extra) or changing the linguistic logic of the question (Logic).
Experimental Setup and Datasets
The framework was evaluated using three major benchmarks for Numerical QA:
- ASDiv-a: Math word problems requiring equation generation.
- DROP-num: Discrete reasoning over paragraphs.
- TATQA-a: Question answering over complex tables and text.
The study tested several prominent models, including T5, BART, GPT-2, and Graph2Tree (a specialized math solver). Models were evaluated in two settings: an Attack setting, where models were tested on perturbed data, and a Defense setting, where perturbed data was used for training augmentation.
Key Insights: Fragility and the Logic Bottleneck
The results revealed that even state-of-the-art models are surprisingly fragile. Trivial changes that do not affect human understanding caused massive performance drops. For example, simply adding ".0" to an integer (Type perturbation) or changing digits to words (Language perturbation) led to significant accuracy declines.
The "Logic" Bottleneck
The most severe performance drops occurred during the Semantic Parsing stage. Models struggled significantly more with selecting the right operands and reasoning about mathematical logic than with simple number recognition. Notably, the Graph2Tree model saw a staggering 53.83% absolute accuracy drop when an irrelevant sentence was added to the context (Extra perturbation).
Tokenization vs. Replacement
The paper also explores how models "see" numbers. Models using standard Tokenization (breaking numbers into sub-words) are sensitive to exact values but prone to errors if formatting changes. Conversely, models using Replacement (swapping numbers for placeholders like [NUM1]) can focus better on logic but become "blind" to the actual values, making them easier to fool with irrelevant numerical distractors.
The Execution Gap
An interesting finding was the "Execution Gap": models are often better at generating the correct equation than they are at calculating the final answer. When forced to predict an answer directly without an external symbolic executor, T5's accuracy on ASDiv-a plummeted from 72.95% to a mere 2.46%.
Conclusion and Future Work
While using perturbations as data augmentation (the Defense setting) improved robustness, it did not fully bridge the gap; model performance remained significantly lower than the original clean baselines. The DNC framework highlights that current NLP systems lack a fundamental understanding of numerical logic. Future work must address "numerical common sense"—ensuring models can perform sanity checks to avoid physically impossible answers—and move toward more robust, reasoning-heavy architectures.
Summary updated