mlsanityData to 7 Oct 2026

MathAttack: Attacking Large Language Models Towards Math Solving Ability

arXiv 2309.01686 ↗First posted 4 Sep 2023cs.CLcited by 31

Not on the map. Why?

Abstract (arXiv)

With the boom of Large Language Models (LLMs), the research of solving Math Word Problem (MWP) has recently made great progress. However, there are few studies to examine the security of LLMs in math solving ability. Instead of attacking prompts in the use of LLMs, we propose a MathAttack model to attack MWP samples which are closer to the essence of security in solving math problems. Compared to traditional text adversarial attack, it is essential to preserve the mathematical logic of original MWPs during the attacking. To this end, we propose logical entity recognition to identify logical entries which are then frozen. Subsequently, the remaining text are attacked by adopting a word-level attacker. Furthermore, we propose a new dataset RobustMath to evaluate the robustness of LLMs in math solving ability. Extensive experiments on our RobustMath and two another math benchmark datasets GSM8K and MultiAirth show that MathAttack could effectively attack the math solving ability of LLMs. In the experiments, we observe that (1) Our adversarial samples from higher-accuracy LLMs are also effective for attacking LLMs with lower accuracy (e.g., transfer from larger to smaller-size LLMs, or from few-shot to zero-shot prompts); (2) Complex MWPs (such as more solving steps, longer text, more numbers) are more vulnerable to attack; (3) We can improve the robustness of LLMs by using our adversarial samples in few-shot prompts. Finally, we hope our practice and observation can serve as an important attempt towards enhancing the robustness of LLMs in math solving ability. We will release our code and dataset.

Key facts. Cited by 31 papers in the map (data through 7 Oct 2026). Builds on 30 of its 39 references that are in the map. First posted on arXiv 4 Sep 2023.

Builds on

30 of 39 references.

References · 30

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  2. 2021Training Verifiers to Solve Math Word Problemscited by 9,743
  3. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  4. 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,397
  5. 2023A Survey on Evaluation of Large Language Modelscited by 1,227
  6. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
  7. 2021GLM: General Language Model Pretraining with Autoregressive Blank Infillingcited by 1,026
  8. 2022Solving math word problems with process- and outcome-based feedbackcited by 871
  9. 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 861
  10. 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 820
  11. 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
  12. 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
18 more
  1. 2018Universal Sentence Encodercited by 485
  2. 2022Complexity-Based Prompting for Multi-Step Reasoningcited by 387
  3. 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 376
  4. 2016Solving General Arithmetic Word Problemscited by 353
  5. 2022Reasoning with Language Model Prompting: A Surveycited by 251
  6. 2023Specializing Smaller Language Models towards Multi-Step Reasoningcited by 249
  7. 2019Adversarial Attacks and Defenses in Images, Graphs and Text: A Reviewcited by 234
  8. 2023PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Promptscited by 218
  9. 2023On the Robustness of ChatGPT: An Adversarial and Out-of-distribution Perspectivecited by 208
  10. 2023MathDial: A Dialogue Tutoring Dataset with Rich Pedagogical Properties Grounded in Math Reasoning Problemscited by 128
  11. 2023Adversarial Demonstration Attacks on Large Language Modelscited by 58
  12. 2022A Survey of Robust Adversarial Training in Pattern Recognition: Fundamental, Theory, and Methodologiescited by 44
  13. 2023On Robustness of Prompt-based Semantic Parsing with Large Pre-trained Language Model: An Empirical Study on Codexcited by 41
  14. 2021Adversarial Examples for Evaluating Math Word Problem Solverscited by 20
  15. 2023Learning by Analogy: Diverse Questions Generation in Math Word Problemcited by 18
  16. 2022Practice Makes a Solver Perfect: Data Augmentation for Math Word Problem Solverscited by 9
  17. 2023Solving Math Word Problem with Problem Type Classificationcited by 6
  18. 2022Semantic-based Data Augmentation for Math Word Problemscited by 5

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 2; 2024: 13; 2025: 11; 2026: 5.

31 papers.

Sort:

By area:

  1. 2024Large Language Models for Mathematical Reasoning: Progresses and Challengescited by 283
  2. 2024GSM-Plus: A Comprehensive Benchmark for Evaluating the Robustness of LLMs as Mathematical Problem Solverscited by 155
  3. 2024A Survey of Mathematical Reasoning in the Era of Multimodal Large Language Model: Benchmark, Method & Challengescited by 55
  4. 2024MoralBench: Moral Evaluation of LLMscited by 50
  5. 2024Is Your Model Really A Good Math Reasoner? Evaluating Mathematical Reasoning with Checklistcited by 48
  6. 2024ChatGLM-Math: Improving Math Problem-Solving in Large Language Models with a Self-Critique Pipelinecited by 47
  7. 2025PR-Attack: Coordinated Prompt-RAG Attacks on Retrieval-Augmented Generation in Large Language Models via Bilevel Optimizationcited by 29
  8. 2023Mathematical Language Models: A Surveycited by 24
  9. 2024Goal-guided Generative Prompt Injection Attack on Large Language Modelscited by 22
  10. 2024Evaluating LLMs' Mathematical and Coding Competency through Ontology-guided Interventionscited by 20
  11. 2024Cutting Through the Noise: Boosting LLM Performance on Math Word Problemscited by 14
  12. 2025ArithmAttack: Evaluating Robustness of LLMs to Noisy Context in Math Problem Solvingcited by 13
19 more
  1. 2023A Security Risk Taxonomy for Prompt-Based Interaction With Large Language Modelscited by 12
  2. 2025A Survey on Mathematical Reasoning and Optimization with Large Language Modelscited by 12
  3. 2025TreeCut: A Synthetic Unanswerable Math Word Problem Dataset for LLM Hallucination Evaluationcited by 11
  4. 2025Evaluating Robustness of Large Language Models Against Multilingual Typographical Errorscited by 9
  5. 2025J&H: Evaluating the Robustness of Large Language Models Under Knowledge-Injection Attacks in Legal Domaincited by 7
  6. 2024Round Trip Translation Defence against Large Language Model Jailbreaking Attackscited by 6
  7. 2024Adversarial Math Word Problem Generationcited by 6
  8. 2025From ASR to ASP: Evaluating Prompt Attack Vulnerabilities Against Open-Source LLMscited by 6
  9. 2025ASyMOB: Algebraic Symbolic Mathematical Operations Benchmarkcited by 5
  10. 2025Evaluating and Improving Robustness in Large Language Models: A Survey and Future Directionscited by 5
  11. 2024Exploring Concept Depth: How Large Language Models Acquire Knowledge and Concept at Different Layers?cited by 4
  12. 2026Farther the Shift, Sparser the Representation: Analyzing OOD Mechanisms in LLMscited by 3
  13. 2024When Not to Answer: Evaluating Prompts on GPT Models for Effective Abstention in Unanswerable Math Word Problemscited by 2
  14. 2025SmoothGuard: Defending Multimodal Large Language Models with Noise Perturbation and Clustering Aggregationcited by 2
  15. 2025Geometry-Guided Adversarial Prompt Detection via Curvature and Local Intrinsic Dimensioncited by 1
  16. 2026Fragile Reasoning: A Mechanistic Analysis of LLM Sensitivity to Meaning-Preserving Perturbationscited by 1
  17. 2026The Safeguard Worked. Is the LLM System Safer?cited by 0
  18. 2026No Free Efficiency: Revisiting the Trade-off Between Training Efficiency and Model Vulnerabilitycited by 0
  19. 2026Towards Robust Numerical Claim Verificationcited by 0