[Paper Review] Evaluating LLMs' Mathematical and Coding Competency through Ontology-guided Interventions
This paper introduces an ontology-guided framework to generate perturbed mathematical word problems, creating the More dataset of 216 questions derived from GSM8K. Using GPT-4 for semi-automatic perturbation and manual filtering, the study evaluates LLMs across structural, representational, and conceptual perturbations, revealing significant performance drops—especially in concept analysis—demonstrating that current LLMs lack robust mathematical reasoning and are fragile under subtle semantic and format changes.
Recent advancements in Large Language Models (LLMs) have showcased striking results on existing logical reasoning benchmarks, with some models even surpassing human performance. However, the true depth of their competencies and robustness in reasoning tasks remains an open question. To this end, in this paper, we focus on two popular reasoning tasks: arithmetic reasoning and code generation. Particularly, we introduce (i) a general ontology of perturbations for math and coding questions, (ii) a semi-automatic method to apply these perturbations, and (iii) two datasets, GSMORE and HUMANEVAL-CORE, respectively, of perturbed math and coding problems to probe LLM capabilities in numeric reasoning and coding tasks. Through comprehensive evaluations of both closed-source and open-source LLMs, we show a significant performance drop across all the models against the perturbed questions, suggesting that the current LLMs lack robust problem solving skills and structured reasoning abilities in many areas, as defined by our ontology. We open-source the datasets and source codes at: https://github.com/declare-lab/LLM-ReasoningTest.
Motivation & Objective
- To assess the robustness of current LLMs in mathematical reasoning beyond standard benchmarks.
- To identify systematic limitations in LLMs' numerical reasoning under controlled, fine-grained perturbations.
- To develop an extensible ontology of perturbation operations for mathematical word problems.
- To generate a high-quality, diverse dataset (More) for evaluating mathematical reasoning robustness.
- To expose the fragility of even state-of-the-art LLMs like GPT-4 under subtle semantic and structural changes.
Proposed method
- Developed a hierarchical ontology of perturbations, categorizing changes into structural, representational, and concept analysis types.
- Defined 44 distinct perturbation types across dimensions such as logic alteration, format change, and value manipulation.
- Used GPT-4 to semi-automatically generate perturbations on five seed questions from GSM8K.
- Applied rigorous automatic and manual filtering to eliminate ambiguous or invalid perturbations, yielding 216 valid problems in the More dataset.
- Designed evaluation protocols to test LLMs across perturbation types, including format changes, concept analysis, and specialized reasoning tasks.
- Benchmarked five leading LLMs (GPT-4, GPT-3.5, Gemini, Llama2-chat, Metamath) on the More dataset to measure performance degradation.

Experimental results
Research questions
- RQ1How robust are current LLMs to fine-grained perturbations in mathematical word problems?
- RQ2Which types of perturbations—structural, representational, or conceptual—most severely degrade LLM performance?
- RQ3To what extent do closed-source and open-source LLMs differ in handling concept analysis and format change perturbations?
- RQ4Can ontology-guided perturbations effectively expose hidden fragilities in LLM reasoning beyond standard benchmarks?
- RQ5How do performance dependencies between primary and specialized perturbation types reveal underlying reasoning limitations?
Key findings
- GPT-4’s performance dropped from 100% to 75.89% on the More dataset, indicating significant fragility despite high baseline performance.
- GPT-3.5’s performance fell from 80% to 32.26%, highlighting severe sensitivity to perturbations, especially in concept analysis and format changes.
- Gemini’s performance decreased from 100% to 43.12%, demonstrating notable vulnerability under representational and conceptual perturbations.
- Open-source models like Llama2-chat and Metamath showed near-zero performance in specialized categories such as Answer Format and Question Format, indicating poor adaptability to instruction variations.
- Concept analysis perturbations caused the most significant performance drops, revealing that LLMs often fail to grasp deep mathematical concepts beyond surface-level pattern matching.
- Performance degradation was most pronounced in specialized perturbation types that depend on solving primary types first, suggesting hierarchical reasoning failures in LLMs.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.