提示词成分对大语言模型鲁棒性的影响分析
CSTR:
作者:
作者单位:

中国科学院软件研究所

作者简介:

通讯作者:

中图分类号:

基金项目:

国家自然科学基金(62402484)


Impact Analysis of Prompt Components on the Robustness of Large Language Models
Author:
Affiliation:

Institute of Software Chinese Academy of Sciences

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    基于提示词的对抗攻击已成为评估大语言模型(Large Language Models,LLMs)鲁棒性的有效手段。然而,现有方法往往将提示词视为单一整体文本,忽略了其结构异质性,即不同提示词成分对鲁棒性的影响存在差异。为理解提示词成分对LLMs鲁棒性的影响,本文提出一种面向提示词成分分解框架(Prompt Anatomy)。该框架可将提示词拆解为不同的成分类别,并结合提出的成分对抗扰动方法(Component-Level Perturbation, COMPERTURB)对各成分进行选择性扰动,进而生成多样的对抗样本。实验结果显示,Prompt Anatomy关于提示词成分识别的准确率超85%(其中ChatGPT-4o达100%);成分级对抗扰动的攻击成功率(Attack Success Rate,ASR)较基线平均提升9.3个百分点,其中任务指令与额外信息鲁棒性最脆弱,角色设定鲁棒性最强;经过困惑度筛选后的样本可以使攻击成功率额外提升6.5~12.8个百分点。总而言之,该框架为LLMs鲁棒性评估、提示工程优化及安全防御提供了有力的支撑。

    Abstract:

    Prompt-based adversarial attacks have emerged as an effective approach for evaluating the robustness of Large Language Models (LLMs). However, existing methods typically treat prompts as a single integrated text, failing to account for their structural heterogeneity—specifically, the differential impacts of distinct prompt components on robustness. To clarify the influence of prompt components on LLMs robustness, a prompt component-oriented perturbation framework (Prompt Anatomy) is proposed in this study. The framework is capable of decomposing prompts into various component categories and selectively perturbing each component by integrating the proposed Component-Level Perturbation (COMPERTURB) method, thus generating diverse adversarial examples. Experimental results demonstrate that the Prompt Anatomy framework achieves an accuracy of over 85% in prompt component identification (with ChatGPT-4o attaining 100%); the success rate of component-level perturbation attacks is increased by an average of 9.3% compared with the baseline. Among the components, task instructions and additional information are the most vulnerable, while role settings exhibit the highest robustness. Furthermore, samples filtered via perplexity can further enhance the attack success rate by an additional 6.5 to12.8 percentage points. In conclusion, this framework offers robust support for LLMs robustness evaluation, prompt engineering optimization, and security defense.

    参考文献
    相似文献
    引证文献
引用本文
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2025-11-21
  • 最后修改日期:2025-12-19
  • 录用日期:
  • 在线发布日期: 2026-04-29
  • 出版日期:
文章二维码