MathAttack: Attacking the Mathematical Problem-Solving Ability of Large Language ModelsMathAttack: Attacking Large Language Models Towards Math Solving Ability
Researchers propose the MathAttack attack method, which, unlike approaches that attack prompts, directly makes adversarial modifications to math word problem (MWP) samples to test the security of large language models' mathematical problem-solving ability. Methodologically, it first uses logical entity recognition to identify and freeze the logical entities in the problem, then applies word-level attacks to the remaining text, and constructs the RobustMath dataset to evaluate robustness. Experiments on RobustMath, GSM8K, and MultiAirth show that the method can effectively attack large language models' mathematical problem-solving ability. The authors observe that adversarial examples can transfer from models with higher accuracy to attack models with lower accuracy (e.g., from large-size models to small-size models, from few-shot to zero-shot prompting), that complex problems with more solution steps, longer text, and more numbers are more easily attacked, and that adding adversarial examples to few-shot prompts can improve model robustness. The authors state that they will release the code and dataset.