Skip to content

OpenAI releases GPT-Red: training automated red-teaming agents through self-playGPT-Red: Automated Red Teaming via Self-Play at Scale

Paper Tracker· arXiv:2607.26115· Eric Wallace, Christopher A. Choquette-Choo, Nikhil Kandpal, Sam Toyer, Dylan Hunn, Stephanie Lin, Yuxin Wen, Xiangyu Qi, Christopher Wolff, Zizhao Wang, Milad Nasr, Sicheng Zhu, Chuan Guo, Juan Felipe Cerón Uribe, Kaiwen Wang, Aiden Low, Kai Xiao, Kai Chen·Indexed by this site · 2026-10-03· Originally publishedSelected AttacksSelectedAttention43

Quick read

Attacks

Based on the paper PDF (generated by Gemini); refer to the original

The authors train the red-team agent GPT-Red via self-play reinforcement learning, achieving 95.9% robustness for GPT-5.6 under Fake CoT prompt injection.

Threat modelThe attacker can only modify a single tool response or non-privileged files in the defender's trajectory, has black-box query access with a limited number of queries, and is subject to automatic validation via code rules and LLM checks; attack objectives include data exfiltration and jailbreaks.

Questions
Large language models face prompt injection and jailbreak threats in agentic deployments, while existing adversarial training data based on human or fixed prompts is limited in scale and diversity, prone to overfitting, and struggles to resist adaptive attacks.
Methods
Proposes training a red-team agent GPT-Red via large-scale self-play reinforcement learning, equipped with a terminal and defender model interface for inference-time search, using a population of multiple defenders for adversarial evolution, and using the generated adversarial examples for model adversarial training.
Experiments and results
On the IPI held-out indirect injection challenge, GPT-Red's attack success rate surpasses human red teams and baselines; adversarial training with its samples improves GPT-5.6's robustness under Fake CoT attacks from 5.2% to 95.9% (Figure 13).
Limitations and future work
The authors note that GPT-Red is less trained on multimodal, multi-turn attacks, and content policy jailbreaks; human experts may still discover new scenarios not covered; system-level mitigations were not enabled in held-out evaluations, and quantitative evaluation focused on specific agent tool tasks.
Experimental setupGPT-5.6、GPT-5.5 et al. · IH-Challenge、2025 Q4 Indirect Prompt Injection Challenge et al. · Attack Success Rate (ASR)、IH Robustness (%) et al.
Evaluated models
GPT-5.6GPT-5.5GPT-5.4GPT-5.3GPT-5.2GPT-5.1GPT-5.4 miniGPT-5 Mini
Benchmarks
IH-Challenge2025 Q4 Indirect Prompt Injection ChallengeTensorTrustVendy Vending MachineInternal Data-Exfiltration Tasks
Metrics
Attack Success Rate (ASR)IH Robustness (%)Defender Robustness (%)
AI summaryand selection rationaleOpenAI proposes GPT-Red, an automated red-teaming agent trained via self-play reinforcement learning, used to discover prompt injection attacks against frontier large models. The attacker competes against a group of simultaneously trained defender agents; the attacker is rewarded for inducing effective failures, while defenders are rewarded for resisting attacks and completing tasks. GPT-Red reliably breaks GPT-5.5 and earlier models, finds more successful attacks than human red teams in the 2025 Q4 indirect prompt injection challenge scenarios, and generalizes to unseen environments, defense models, and harnesses. It also successfully achieved three goals against the AI vending machine system in OpenAI's office: changing prices, placing orders, and canceling orders. OpenAI used GPT-Red to generate adversarial training prompts to train GPT-5.6, claiming improved performance on multiple robustness evaluations, such as defense success rate against fake chain-of-thought attacks rising from 5.2% to 95.9%.

OpenAI proposes GPT-Red, an automated red-teaming agent trained via self-play reinforcement learning, used to discover prompt injection attacks against frontier large models. The attacker competes against a group of simultaneously trained defender agents; the attacker is rewarded for inducing effective failures, while defenders are rewarded for resisting attacks and completing tasks. GPT-Red reliably breaks GPT-5.5 and earlier models, finds more successful attacks than human red teams in the 2025 Q4 indirect prompt injection challenge scenarios, and generalizes to unseen environments, defense models, and harnesses. It also successfully achieved three goals against the AI vending machine system in OpenAI's office: changing prices, placing orders, and canceling orders. OpenAI used GPT-Red to generate adversarial training prompts to train GPT-5.6, claiming improved performance on multiple robustness evaluations, such as defense success rate against fake chain-of-thought attacks rising from 5.2% to 95.9%.

Why it was selectedOpenAI has published the self-play training method and attack effectiveness of an automated red-team agent, providing insight into attack surface expansion and new paths for adversarial training.

Related events and news

1 events · 4 news mentions

News that mentions this paper

OpenAI用自动化红队训练GPT-6 Astra抗越狱

Show 1 more news items

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Address the problem that existing adversarial training data is insufficient in scale and diversity, causing models to overfit and struggle to resist adaptive prompt injection and jailbreak attacks.

    The core problem is that existing reinforcement learning-based adversarial training is prone to overfitting due to the limited scale and diversity of attack datasets, and struggles to resist adaptive attacks; there is a need for autonomous red team agents that can generate high-quality adversarial examples at scale.

    • Application scenario and importance: Large language models face prompt injection and safety jailbreak threats in agentic deployments. As model capabilities and use cases expand, the attack surface continues to grow, and it is necessary to defend against malicious manipulation targeting system behavior.
    • Limitations of existing methods: The authors state that existing human red teaming, prompt-driven LLMs, or real production attack data are limited in scale, adversarial training tends to overfit to specific attack patterns and is less robust against adaptive adversaries; discrete optimization-based adversarial suffix methods typically require white-box access and transfer poorly.
    • Core observation and hypothesis: The authors believe that a trained red team agent can scale along three dimensions: inference-time computation, environment diversity, and training compute; through attack-defense self-play reinforcement learning, a stronger defender prompts the attacker to discover new attack strategies, thereby providing the defender with a more challenging training curriculum.
    • Proposed approach: They built an autonomous red team agent, GPT-Red, trained via inference-time compute scaling (an environment with a defender_model tool), construction of a large-scale red team reinforcement learning environment, and self-play reinforcement learning against a diverse population of defenders; the resulting attack samples were used for adversarial training of GPT-5.6.
    • Threat model:
      • Attack surface: The attacker can only modify a single tool response or a set of non-privileged files in the defender's execution trajectory (e.g., replacing a single web search result or modifying non-critical files), and cannot modify privileged files or tool responses (e.g., the user's AGENTS.md).
      • Knowledge and access: The attacker has black-box query access to the target defender model (with a limited number of queries), can observe partial information about the defender's execution (the most recent user message and original tool responses/files), and after a query may sometimes observe the full execution trajectory after injection along with associated token log-likelihoods.
      • Rule constraints: Code-based rule checking and LLM-based checking automatically reject non-compliant attacks, penalizing attempts that do not conform to tool response format or length constraints.
      • Attack objectives: Cover indirect prompt injection goals such as leaking simulated sensitive/private data, executing untrusted code, and executing destructive code operations, as well as direct prompt injection and safety refusal jailbreaks.
  2. What related research exists?

    Covers related research including optimization-based adversarial attacks, instruction-level defenses, prompt-driven LLM red-teaming, and multi-agent adversarial games.
    • Prompt injection and instruction hierarchy:
      • Willison (2022), Schulhoff et al. (2023), Toyer et al. (2024)—studied direct and indirect prompt injection that induces models to violate developer or user intent.
      • Wallace et al. (2024)—proposed the Instruction Hierarchy (IH), defining privilege levels for system, developer, user, and tools, and training models to follow constraints to resist injection attacks.
    • Optimization-based adversarial attacks:
      • Zou et al. (2023), Yu et al. (2023), Liu et al. (2023a), Chao et al. (2023), Mehrotra et al. (2023), Anil et al. (2024), Carlini et al. (2023)—used discrete optimization to generate adversarial suffixes for safety policy jailbreaks.
      • Greshake et al. (2023), Liu et al. (2023b), Chaudhari et al. (2024)—extended adversarial optimization to prompt injection. The authors state such methods typically require white-box access and many queries, and struggle to transfer to new models or scenarios, complementing this paper's LLM-based automated approach.
    • LLM-based automated red teaming:
      • Perez et al. (2022), Beutel et al. (2024), Ge et al. (2023), Yin et al. (2026), Shi et al. (2025)—early work used prompt-driven attack models or trained attackers on narrow goals in few environments.
      • Xu et al. (2024), Wang et al. (2025), Syros et al. (2026)—explored test-time compute scaling independent of model training.
      • Ma et al. (2023), Liu et al. (2025), Deng et al. (2025)—closest to this work. The authors state that compared to Ma et al. (2023) and Liu et al. (2025), this work scales environment diversity and adversarial objective size; Deng et al. (2025) only considered defending classifiers rather than general large models.
    • Baseline methods and benchmarks used:
      • Baselines include human red-team experts, single-generation GPT-5.5 without defender access, GPT-5.5 with defender_model tool scaffolding, Best-of-N independently sampled attackers, and GPT-5.1 without self-play adversarial training.
      • Benchmarks used include the 2025 Q4 IPI Challenge (Dziemian et al., 2026), IH-Challenge (Guo et al., 2026), TensorTrust (Toyer et al., 2024), among others.
    • Positioning of this work: The authors position this work as large-scale automated red teaming and adversarial training research that scales attack targets and training environment realism, training and inference compute, and multi-defender self-play algorithm design.
  3. How does the paper address this problem?

    Build an agent scaffolding with a defender query interface, and train via self-play reinforcement learning based on a large-scale safety environment and a population of multiple defenders.

    The paper proposes an automated red-teaming framework GPT-Red based on large-scale self-play reinforcement learning, jointly scaling inference-time compute, red-team environment diversity, and training compute. It discovers new attack strategies through simultaneous training of attacker and defender populations, and incorporates the generated adversarial examples into high-intensity adversarial training of the production model.

    Inference-time compute scaling and tool scaffolding

    • Dual-tool interface design: The attacker agent is equipped with a general terminal tool (terminal) and a defender model tool (defender_model). The attacker can write attack files in a virtual file system and send file paths to the system via defender_model; the system inserts the attack payload at a predetermined location and samples the defender.
    • Feedback and context retention: The defender_model tool returns the defender's execution trajectory, token log-likelihoods, and reviewer model feedback signals to the attacker; the attacker can edit files in a single interaction to save tokens, and can write Python scripts to call the direct interface for batch testing.
    • Structured search mechanism: The attacker uses the terminal to execute code, exploring the attack space via template filling, string concatenation, or parallel variant testing, and submits the final attack path when satisfied or when time runs out.

    Multi-defender self-play reinforcement learning algorithm

    • Model initialization and flow: Both attacker and defender models are initialized with large models capable of chain-of-thought (CoT) reasoning; GPT-Red's weights are initialized from GPT-5.5.
    • Single-step self-play iteration:
      1. Sample a reinforcement learning environment, including contextual dialogue, initial file system state, and a selected defender model;
      2. Select an appropriate attack insertion point and attack target, and provide task-relevant adversarial knowledge;
      3. The attack model generates and interacts; intermediate calls to defender_model are discarded, and only the submitted final attack is retained;
      4. Validate the legality of the attack and environment; non-compliant attacks are assigned reward 0;
      5. Insert the attack into the defender's runtime location and resume defender execution;
      6. Compute the asymmetric environment reward, evaluating whether the attacker achieved its goal and whether the defender completed the original task;
      7. Update the attacker and defender using a reinforcement learning algorithm based on trajectories and rewards.
    • Defender population mechanism: A population of defenders with different robustness characteristics is introduced to prevent the attacker from mode-collapsing into a single narrow attack type, encouraging it to probe specific weaknesses of different defenders.
    • Objective formalization: Let the attacker policy be Aθ and the defender policy be Dϕ; under environment distribution ℰ, the attacker maximizes the adversarial objective reward 𝔼(e, D)∼ℰ [RA(Aθ, D)] via reinforcement learning, while the defender maximizes the reward for safely completing the original task.

    Realistic red-team reinforcement learning environment construction

    • Capability task transformation: Production capability tasks are directly transformed into adversarial training environments, inserting adversarial content into defender tool-call outputs or modifying non-privileged local files.
    • Covered task categories:
      • Direct prompt injection (IH-Challenge extension): Under developer or system instructions, the attacker edits low-privilege user or developer messages, testing whether preset constraints are broken.
      • Indirect prompt injection: Covers web browsing (instant search and deep research), connectors (e.g., reading Gmail emails or calendars), general function calling (simulated developer APIs), and code agents (modifying local non-privileged files).
      • Multimodal prompt injection: Connects to the OpenAI Images 2.0 API; the attacker generates rendered images to test computer-using agents (CUA) or browsing retrieval.
      • Safety policy jailbreak: Includes single-turn and multi-turn jailbreaks, using scoring criteria to measure how close outputs are to harmful answers, and automated filters to remove meaningless rewrites and unnatural dialogue.
  4. What experiments did the paper conduct?

    Comprehensively evaluated on real agents, challenge benchmarks, and held-out domains; GPT-Red surpasses old models and improves GPT-5.6's robustness under Fake CoT to 95.9%.

    Experimental Setup

    • Models under test:
      • As defenders/target models: GPT-5.1, GPT-5.2, GPT-5.3, GPT-5.4, GPT-5.4 mini (Codex CLI agent), GPT-5.5, GPT-5.6, internal small GPT-5 series models, internal helpful-only models, and Models A through I in the multi-defender experiments.
      • As attackers: GPT-Red, GPT-5.5 (with/without defender_model tool), internal helpful-only models, human red-team experts.
    • Datasets and benchmarks: Indirect prompt injection includes the 2025 Q4 Indirect Prompt Injection (IPI) Challenge (Dziemian et al., 2026), 10 internal data exfiltration tasks, Andon Labs Vendy vending machine system; direct prompt injection includes IH-Challenge (Guo et al., 2026), TensorTrust (Toyer et al., 2024), Fake CoT attack set, System Override attack set, Multi-Defender attack set, Edge Case attack set, Assorted Attack Categories comprehensive set; plus held-out datasets, held-out domains, and held-out attack evaluation sets.
    • Baseline methods: Human Red-Teamers, single-shot GPT-5.5 without defender access, GPT-5.5 with defender_model tool scaffolding, Best-of-N independent sampling attackers, and GPT-5.1 without self-play adversarial training.
    • Evaluation metrics and judging: Primary metrics are Attack Success Rate (ASR) and instruction hierarchy robustness (IH Robustness (%) / Defender Robustness (%)). Judging uses code-based automatic verification (e.g., whether a specific PIN is output, whether a specific tool call is executed, regex matching, JSON validity checks, etc.) combined with predefined rubrics; all models are evaluated at roughly the high reasoning setting.
    • Sample sizes and repetitions: Internal data exfiltration tasks use 3 independent runs to compute mean and min-max ranges; multi-defender transfer experiments cross-test across 9 models; IPI Challenge uses the full competition evaluation scenario.

    Main Results

    Swipe horizontally to read the table

    ModelBenchmark / Attack TypeMetricValueSource
    GPT-5.1Fake CoT attackIH Robustness (%)5.2%Figure 13
    GPT-5.6 w/ Self-PlayFake CoT attackIH Robustness (%)95.9%Figure 13
    GPT-5.1System Override attackIH Robustness (%)66.0%Figure 13
    GPT-5.6 w/ Self-PlaySystem Override attackIH Robustness (%)99.5%Figure 13
    GPT-5.1Multi-Defender attackIH Robustness (%)0.4%Figure 13
    GPT-5.6 w/ Self-PlayMulti-Defender attackIH Robustness (%)94.3%Figure 13
    GPT-5.1TensorTrustIH Robustness (%)89.0%Figure 13
    GPT-5.6 w/ Self-PlayTensorTrustIH Robustness (%)98.3%Figure 13
    • Direct injection robustness improvement: The authors report that compared with GPT-5.1 without self-play adversarial training, GPT-5.6 adversarially trained with GPT-Red samples performs better in robustness across benchmarks, with robustness rising from 5.2% to 95.9% under Fake CoT attacks, and from 0.4% to 94.3% under Multi-Defender attacks (Figure 13).
    • Held-out evaluation generalization: In evaluations on completely unseen held-out attacks, held-out datasets, and held-out domains, GPT-5.6's defender robustness reaches 72.0%, 56.1%, and 89.1%, respectively (Figure 11).
    • Historical model evolution comparison: In the indirect prompt injection challenge, GPT-5.6's ASR is below 4.0% (GPT-5.3 about 6.7%, GPT-5.4 about 6.3%, GPT-5.5 about 4.0%); in the direct prompt injection setting, GPT-5.6's ASR is about 0.08% (GPT-5.3 about 0.37%) (Figure 12). On the human attack benchmark IPI 2025 Challenge, GPT-5.6 achieves 100% robustness (except for 1 case of human-scored misjudgment, page 12).

    Real Agent and Internal Red-Team Evaluation

    • What was tested: GPT-Red was tested in a simulated environment of a real AI vending machine system Vendy developed by Andon Labs inside OpenAI's office, with goals including lowering the price of high-priced items to $0.50, ordering new items over $100 and pricing them at $0.50, and canceling other customers' orders.
    • Results: GPT-Red achieved all three goals by forging metadata from a trusted administrator to deceive the system (Figure 9, page 11).
    • Authors' interpretation: The authors believe this demonstrates the ability of a red-team agent to achieve targeted malicious goals against a real agent system without fully understanding the underlying model and operating framework.

    Multi-Defender Transfer and Self-Play Dynamics Analysis

    • What was tested: In training against 9 different defender models (A through I), the transfer of attacks discovered on one model to other models was re-evaluated (Figure 7); also tracked the attacker's ASR on the training set and checkpoint-breaking capability during self-play (Figures 4, 6).
    • Results: Attack transfer rates vary across models (e.g., attacks against model A have an ASR of 25% on model I but 97% on model A; attacks against model I have an ASR of 81% on model I but 75% on model F, Figure 7); later attacker checkpoints show almost monotonically increasing capability to break all earlier defender checkpoints (Figure 6).
    • Authors' interpretation: The authors believe this indicates that the attacker did not collapse to a single attack method, but learned to tailor attack strategies to specific defenders, and self-play exhibits an attack-defense co-adaptive training dynamic.

    Other Ablations and Analyses

    • On IH tasks, an attacker using defender_model sequential iteration reaches an ASR of about 90% at 50 calls, while independent Best-of-N sampling reaches an ASR of about 64% at the same number of calls (Figure 3).
    • Attackers against GPT-5 generate simple attacks like system message overrides early in training, while complex attacks like Fake CoT emerge later in training (page 6).
    • Attacks generated by GPT-Red have significantly higher success rates on early GPT-5 models than on newer models, with success rates nearly double on models before GPT-5.2 (page 10).
    • The 5th attacker checkpoint breaks the 1st defender checkpoint with an ASR of 78%, and breaks the 5th defender checkpoint with an ASR of 29% (Figure 6).
    • On simpler prompt injection tasks, GPT-Red performs similarly to GPT-5.5 without red-team fine-tuning (Figure 10 note).
    • Single-model self-play tends to cause mode collapse in attacker strategies, and is only effective against the trained defender, with degraded performance on held-out models (page 7).
  5. What are some points that can be further explored?

    The authors note that training on multimodal and multi-turn scenarios is relatively insufficient, and that evaluation mainly focuses on specific agent tool tasks and omits system-level mitigations.

    Limitations and Future Directions Noted by the Authors

    • Insufficient training on multimodal and multi-turn scenarios: The authors note in Section 9 that GPT-Red is currently relatively less trained on multimodal environments, multi-turn attack scenarios, and content policy jailbreaks, and future plans include expanding coverage in these areas.
    • Irreplaceability of human red teams: The authors note in Section 10, footnote 2, that the evaluation results do not imply that GPT-Red is comprehensively superior to human red teams; human experts may discover new scenarios or attack categories that GPT-Red has not considered.
    • Continued expansion of the self-play flywheel: The authors note in Section 9 that future plans include continuing to expand computational scale, data diversity, and self-play training scale to adapt to expanding model capabilities, more complex environment scenarios, and stronger adaptive adversaries.

    Experimental Coverage

    • Target model scope: The experiments mainly cover OpenAI's internal GPT-5 series models (including GPT-5.1, GPT-5.2, GPT-5.3, GPT-5.4, GPT-5.5, GPT-5.6, GPT-5.4 mini, and internal small GPT-5 models) and the 9 defender population models used in training; the paper does not report attack evaluations on external open-source or commercial frontier models from other organizations as victim targets.
    • Attack type coverage: Quantitative core experiments focus on direct and indirect prompt injection (especially instruction hierarchy violations and tool data exfiltration); multimodal injection and content policy jailbreaks mainly demonstrate qualitative environment construction and examples; the paper does not report systematic quantitative ablations on large-scale benchmarks.
    • Evaluation protocol and sample sizes: Internal data exfiltration experiments use 10 tasks with 3 repetitions each; multi-defender transfer experiments are conducted across 9 fixed models; human attack benchmarks mainly use the 2025 Q4 IPI Challenge and TensorTrust; for direct injection evaluations, the paper does not report in detail the sample sizes and specific numbers of examples for some benchmarks.
    • System-level defenses not included: The authors explicitly state in Section 12 that system-level mitigations were not enabled in the held-out red-team tests for GPT-5.3 through GPT-5.6, so the reported attack success rates are higher than the actual success rates faced by real attackers.
  6. Summarize the main content of the paper

    Through multi-defender self-play training, the autonomous red-team agent GPT-Red discovers complex vulnerabilities and improves GPT-5.6's robustness under Fake CoT to 95.9%.
    • One-sentence positioning: Proposed GPT-Red, an autonomous red team agent trained via large-scale self-play reinforcement learning, and used it for adversarial robustness training of the frontier model GPT-5.6.
    • Problem to solve: Existing adversarial training for LLMs relies on limited-scale and static human- or prompt-driven attack data, is prone to overfitting, and can be bypassed by adaptive attacks; there is an urgent need for an automated red team generation system with adaptive search and continuous evolution capabilities.
    • Method highlights: Provides the attacker with terminal and stateful defender_model tools to support inference-time search; builds a realistic red team reinforcement learning environment covering tool calls, local files, web browsing, and multimodal rendering; uses self-play reinforcement learning with a population of multiple defenders, driving co-evolution of both attacker and defender through asymmetric rewards and preventing policy collapse.
    • Core experimental results:
      1. On the IPI Challenge held-out indirect prompt injection task, GPT-Red achieves an ASR above 80% at 100x compute, higher than human red teams and the GPT-5.5 baseline (Figure 1);
      2. Against Vendy, a real AI vending machine system inside OpenAI's office, GPT-Red achieved three real malicious objectives: changing prices to low values, placing orders for new high-priced items, and canceling orders (Figure 9, page 11);
      3. Adversarial training with GPT-Red samples improves GPT-5.6's defense robustness under Fake CoT attacks from 5.2% for GPT-5.1 to 95.9% (Figure 13), with robustness on held-out attacks, datasets, and domains reaching 72.0%, 56.1%, and 89.1%, respectively (Figure 11).
    • Authors' conclusions and implications: The authors believe attack-defense self-play provides a self-improvement path for model safety, but multimodal, multi-turn adversarial interactions and defending against new attack categories that humans might uncover remain directions for continued future exploration.

Related papers

Show 3 more papers
Read originalarxiv.org