PIArena Benchmark
收藏资源简介:
PIArena Benchmark是由宾夕法尼亚州立大学团队构建的提示注入攻击评估基准数据集,集成于统一平台PIArena中。该数据集涵盖多样化目标任务(如问答、检索增强生成等)和四类现实攻击场景(钓鱼注入、内容推广、访问拒绝和基础设施故障),通过上下文感知的注入任务设计增强真实性。数据集的创建过程涉及利用LLM生成与目标指令和上下文相关联的恶意任务。其核心应用领域为大型语言模型安全研究,旨在系统评估防御措施在跨任务泛化性、对抗自适应攻击等方面的鲁棒性,推动提示注入防御技术的演进。
PIArena Benchmark is a prompt injection attack evaluation benchmark dataset constructed by the team from Pennsylvania State University, integrated into the unified platform PIArena. This dataset covers diverse target tasks (such as question answering, retrieval-augmented generation, etc.) and four types of real-world attack scenarios: phishing injection, content promotion, access denial, and infrastructure failure, enhancing authenticity through context-aware injection task design. The dataset creation process involves leveraging LLMs to generate malicious tasks associated with target instructions and contexts. Its core application field is large language model security research, aiming to systematically evaluate the robustness of defense measures against cross-task generalization and adaptive adversarial attacks, and promote the evolution of prompt injection defense technologies.
PIArena 数据集概述
数据集基本信息
- 数据集名称:PIArena
- 核心定位:一个用于研究提示注入攻击与防御的易用工具箱和综合性基准测试平台。
- 主要功能:
- 即插即用的攻击与防御:便于将先进的防御方案集成到工作流中,以保护LLM系统免受提示注入攻击。也可使用现有攻击策略进行研究。
- 系统性评估基准:提供端到端的评估流程,便于在各种数据集上评估攻击/防御效果。
- 自定义扩展:可轻松将自定义的攻击或防御方法集成到基准测试中,进行系统性性能评估。
数据集内容与组件
可用数据集
- 数据集列表位于:https://huggingface.co/datasets/sleeepeer/PIArena
支持的攻击方法
none:无攻击(基线)direct:使用注入提示直接攻击(默认)combined:基于论文《Formalizing and Benchmarking Prompt Injection Attacks and Defenses》ignore:基于论文《Ignore Previous Prompt: Attack Techniques For Language Models》completion:基于文章《Prompt injection attacks against GPT-3》character:基于文章《Delimiters won’t save you from prompt injection》nanogcg:基于论文《GCG》和项目《nanoGCG》tap:基于论文《TAP: A Query-Efficient Method for Jailbreaking Black-Box LLMs》pair:基于论文《PAIR: Jailbreaking black box large language models in twenty queries》strategy_search:基于防御反馈的策略搜索攻击(在PIArena中引入)
支持的防御方法
none:无防御(基线,默认)datasentinel:基于论文《DataSentinel: A Game-Theoretic Detection of Prompt Injection Attacks》attentiontracker:基于论文《Attention Tracker: Detecting Prompt Injection Attacks in LLMs》piguard:基于论文《PIGuard: Prompt Injection Guardrail via Mitigating Overdefense for Free》promptguard:基于模型《Meta Prompt Guard》secalign:基于论文《SecAlign: Defending Against Prompt Injection with Preference Optimization》(使用《Meta-SecAlign》模型)promptlocate:基于论文《PromptLocate: Localizing Prompt Injection Attacks》promptarmor:基于论文《PromptArmor: Simple yet Effective Prompt Injection Defenses》pisanitizer:基于论文《PISanitizer: Preventing Prompt Injection to Long-Context LLMs via Prompt Sanitization》datafilter:基于论文《Defending Against Prompt Injection with DataFilter》
评估与基准测试
主要评估方式
- 使用
main.py运行基准测试,支持命令行参数或YAML配置文件。 - 支持在多个GPU上并行运行实验。
基于搜索的攻击评估
- 支持迭代式优化注入提示的搜索型攻击(如PAIR, TAP, Strategy Search)。
- 使用
main_search.py运行此类攻击。
智能体基准测试支持
- 支持以下智能体基准测试的集成与评估:
- 提供专门的评估脚本(
main_injecagent.py,main_agentdojo.py)用于在智能体环境中测试防御措施。
扩展与贡献
- 支持用户添加自定义的攻击或防御方法。
- 扩展指南详见:https://piarena.vercel.app/#/docs/extending
相关资源
- 项目主页:https://piarena.vercel.app
- HuggingFace数据集页面:https://huggingface.co/datasets/sleeepeer/PIArena
- 排行榜:https://piarena.vercel.app/#/leaderboard
- 论文:https://arxiv.org/abs/2604.08499
- 攻击文档:https://piarena.vercel.app/#/docs/attacks
- 防御文档:https://piarena.vercel.app/#/docs/defenses
- 策略搜索攻击详情:https://piarena.vercel.app/#/docs/attacks/strategy-search
引用信息
若使用本数据集或相关代码,请引用以下论文: bib @article{geng2026piarena, title={PIArena: A Platform for Prompt Injection Evaluation}, author={Geng, Runpeng and Yin, Chenlong and Wang, Yanting and Chen, Ying and Jia, Jinyuan}, journal={arXiv preprint arXiv:2604.08499}, year={2026} }

- 1PIArena: A Platform for Prompt Injection Evaluation宾夕法尼亚州立大学 · 2026年



