{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2604-08499","title":"PIArena: A Platform for Prompt Injection Evaluation","arxiv_id":"2604.08499","date":"2026-04-09","proceeding":null,"authors":["Runpeng Geng","Chenlong Yin","Yanting Wang","Ying Chen","Jinyuan Jia"],"abstract":"Prompt injection attacks pose serious security risks across a wide range of real-world applications. While receiving increasing attention, the community faces a critical gap: the lack of a unified platform for prompt injection evaluation. This makes it challenging to reliably compare defenses, understand their true robustness under diverse attacks, or assess how well they generalize across tasks and benchmarks. For instance, many defenses initially reported as effective were later found to exhibit limited robustness on diverse datasets and attacks. To bridge this gap, we introduce PIArena, a unified and extensible platform for prompt injection evaluation that enables users to easily integrate state-of-the-art attacks and defenses and evaluate them across a variety of existing and new benchmarks. We also design a dynamic strategy-based attack that adaptively optimizes injected prompts based on defense feedback. Through comprehensive evaluation using PIArena, we uncover critical limitations of state-of-the-art defenses: limited generalizability across tasks, vulnerability to adaptive attacks, and fundamental challenges when an injected task aligns with the target task. The code and datasets are available at https://github.com/sleeepeer/PIArena.","url_abs":"https://arxiv.org/abs/2604.08499","url_pdf":"https://arxiv.org/pdf/2604.08499","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2604.08499","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2604.08499"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/sleeepeer/PIArena","reach":null}],"summary":{"unverified":10},"by_repo_kind":{"found_in_text":{"samples":10,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"99625ed919297229","entry":"completion","repo":"sleeepeer/PIArena","repo_kind":"found_in_text","path":"piarena/attacks/attack_heuristic.py","file_url":"https://github.com/sleeepeer/PIArena/blob/HEAD/piarena/attacks/attack_heuristic.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"99625ed919297229"}},{"code_sha256_prefix":"c29519b91c75f744","entry":"contexts_to_paragraphs","repo":"sleeepeer/PIArena","repo_kind":"found_in_text","path":"piarena/utils.py","file_url":"https://github.com/sleeepeer/PIArena/blob/HEAD/piarena/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c29519b91c75f744"}},{"code_sha256_prefix":"e7d9c55ee6d15033","entry":"direct","repo":"sleeepeer/PIArena","repo_kind":"found_in_text","path":"piarena/attacks/attack_heuristic.py","file_url":"https://github.com/sleeepeer/PIArena/blob/HEAD/piarena/attacks/attack_heuristic.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e7d9c55ee6d15033"}},{"code_sha256_prefix":"5f69123a5c7e7f00","entry":"find_indices","repo":"sleeepeer/PIArena","repo_kind":"found_in_text","path":"piarena/utils.py","file_url":"https://github.com/sleeepeer/PIArena/blob/HEAD/piarena/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5f69123a5c7e7f00"}},{"code_sha256_prefix":"8d2d2cdd2192c834","entry":"get_openai_completion_with_retry","repo":"sleeepeer/PIArena","repo_kind":"found_in_text","path":"piarena/llm.py","file_url":"https://github.com/sleeepeer/PIArena/blob/HEAD/piarena/llm.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8d2d2cdd2192c834"}},{"code_sha256_prefix":"f92e07d410dd5396","entry":"ignore","repo":"sleeepeer/PIArena","repo_kind":"found_in_text","path":"piarena/attacks/attack_heuristic.py","file_url":"https://github.com/sleeepeer/PIArena/blob/HEAD/piarena/attacks/attack_heuristic.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f92e07d410dd5396"}},{"code_sha256_prefix":"6975c261662e8360","entry":"load_gpt_model","repo":"sleeepeer/PIArena","repo_kind":"found_in_text","path":"piarena/llm.py","file_url":"https://github.com/sleeepeer/PIArena/blob/HEAD/piarena/llm.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6975c261662e8360"}},{"code_sha256_prefix":"ed4e52fc66e57123","entry":"load_json","repo":"sleeepeer/PIArena","repo_kind":"found_in_text","path":"piarena/utils.py","file_url":"https://github.com/sleeepeer/PIArena/blob/HEAD/piarena/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ed4e52fc66e57123"}},{"code_sha256_prefix":"5f10378e01d98c6d","entry":"parse_attacker_feedback","repo":"sleeepeer/PIArena","repo_kind":"found_in_text","path":"piarena/attacks/utils.py","file_url":"https://github.com/sleeepeer/PIArena/blob/HEAD/piarena/attacks/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5f10378e01d98c6d"}},{"code_sha256_prefix":"eef78c4115fd4082","entry":"refinement_judge","repo":"sleeepeer/PIArena","repo_kind":"found_in_text","path":"piarena/attacks/utils.py","file_url":"https://github.com/sleeepeer/PIArena/blob/HEAD/piarena/attacks/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"eef78c4115fd4082"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}