Robustness of Prompting: Enhancing Robustness of Large Language Models Against Prompt Attacks

Lin Mu;Guowei Chu;Li Ni;Lei Sang;Yiwen Zhang
{"title":"Robustness of Prompting: Enhancing Robustness of Large Language Models Against Prompt Attacks","authors":"Lin Mu;Guowei Chu;Li Ni;Lei Sang;Yiwen Zhang","doi":"10.1109/TAI.2026.3697684","DOIUrl":null,"url":null,"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 (CoT) 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 <italic>r</i>obustness <italic>o</i>f <italic>p</i>rompting (<italic>RoP</i>), a novel prompting strategy aimed at enhancing the robustness of LLMs. RoP consists of two stages: <italic>Error Correction</i> and <italic>Guidance</i>. In the <italic>Error Correction</i> stage, RoP applies diverse perturbation methods to generate adversarial examples, which are used to generate prompts that correct input errors automatically. In the <italic>Guidance</i> 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.","PeriodicalId":73305,"journal":{"name":"IEEE transactions on artificial intelligence","volume":"7 10","pages":"5664-5677"},"PeriodicalIF":0.0000,"publicationDate":"2026-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE transactions on artificial intelligence","FirstCategoryId":"1085","ListUrlMain":"https://ieeexplore.ieee.org/document/11535755/","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/3/27 0:00:00","PubModel":"Epub","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

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 (CoT) 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.
提示的鲁棒性:增强大型语言模型对提示攻击的鲁棒性
通过有效地利用提示策略,大型语言模型(llm)在各种任务中表现出了显著的性能。然而,它们对输入干扰非常敏感,例如排版错误或轻微的字符顺序错误,这可能会严重损害它们的性能。尽管在诸如思维链(CoT)和自动提示生成等提示技术方面取得了进步,但制定明确减轻此类扰动负面影响的提示策略仍然是一个悬而未决的挑战。为了弥补这一差距,我们提出了提示的鲁棒性(RoP),一种新的提示策略,旨在提高llm的鲁棒性。RoP包括两个阶段:纠错和引导。在纠错阶段,RoP应用各种摄动方法生成对抗样例,这些样例用于生成提示,自动纠正输入错误。在导引阶段,RoP根据修正后的输入产生最优的导引提示,引导模型产生更鲁棒和准确的推理。通过跨越算术、常识和逻辑推理任务的综合实验,我们证明了RoP显著提高了llm对对抗性扰动的鲁棒性。至关重要的是,与干净的输入场景相比,它保持了模型的准确性,并且只有最小的退化,从而将RoP建立为增强LLM在实际应用中的鲁棒性的实用有效方法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
CiteScore
7.70
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书