Robustness of Prompting: Enhancing Robustness of Large Language Models Against Prompt Attacks
- 27 May 2026
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Artificial Intelligence
- Vol. PP (10) , 1-14
Abstract
Large Language Models (LLMs) have demonstrated remarkable performance across various tasks by effectively utilizing a prompting strategy. However, they are highly sensitive to input perturbations, such as typographical errors or slight character order errors, which can significantly impair their performance. Despite advances in prompting techniques such as Chain-of-Thought and automatic prompt generation, developing a prompting strategy that explicitly mitigates the negative impact of such perturbations remains an open challenge. To bridge this gap, we propose Robustness of Prompting (RoP), a novel prompting strategy aimed at enhancing the robustness of LLMs. RoP consists of two stages: Error Correction and Guidance. In the Error Correction stage, RoP applies diverse perturbation methods to generate adversarial examples, which are used to generate prompts that correct input errors automatically. In the Guidance stage, RoP generates an optimal guidance prompt based on the corrected input, guiding the model to generate more robust and accurate inferences. Through comprehensive experiments spanning arithmetic, commonsense, and logical reasoning tasks, we demonstrate that RoP significantly improves LLMs’ robustness against adversarial perturbations. Crucially, it preserves model accuracy with only minimal degradation compared to clean input scenarios, thereby establishing RoP as a practical and effective approach for enhancing LLM robustness in real-world applications.1Keywords
All Related Versions
Funding Information
- National Natural Science Foundation of China (62206004)
- Natural Science Foundation of Anhui Province (2508085MF159)
- Hefei Key Technology R&D “Champion-Based Selection” (2024SGJ010)
This publication has 19 references indexed in Scilit:
- NetPrompt: Neural Network Prompting Enhances Event Extraction in Large Language ModelsIEEE Transactions on Big Data, 2025
- Prompt Learning for Few-Shot Question Answering via Self-Context Data AugmentationIEEE Transactions on Artificial Intelligence, 2024
- A survey on large language models for recommendationWorld Wide Web, 2024
- PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Prompts2023
- Adversarial Attacks and Defenses in Machine Learning-Empowered Communication Systems and Networks: A Contemporary SurveyIEEE Communications Surveys & Tutorials, 2023
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?2022
- Measure and Improve Robustness in NLP Models: A Survey2022
- Did Aristotle Use a Laptop?A Question Answering Benchmark with Implicit Reasoning StrategiesTransactions of the Association for Computational Linguistics, 2021
- Are NLP Models really able to Solve Simple Math Word Problems?2021
- Parsing Algebraic Word Problems into EquationsTransactions of the Association for Computational Linguistics, 2015