← Lab /Security & privacy

Continual preference optimization cuts prompt injection success up to 6.3×

COPA reduces prompt-injection attack success rates up to 6.3× and 4.4× on average versus prior defenses

Security & privacy arXiv 20 Aug 2026 Defense Prototype evidence Threat model

Published as “COPA: Continual Preference Optimization for Adaptive Prompt Injection Defense”

Why it matters

COPA can be added as a lightweight adapter to existing LLM deployments, providing continual protection against evolving prompt-injection attacks without degrading the model's general reasoning ability.

Summary

COPA reduces prompt-injection attack success to 0.035, up to 6.3× lower than the strongest prior defense, while achieving positive backward transfer (+0.028) and preserving QA accuracy. The evidence comes from experiments on Meta-Llama-3.1-8B and two other backbones, but the paper provides limited scale (≈100 alignment pairs) and reports near-zero backward transfer on some models, indicating modest forgetting in those cases.

What they found 1

  1. COPA achieves the lowest attack success rate of 0.035, up to 6.3× lower than SecAlign and 3.0× lower than LlamaGuard, while preserving utility.

    “COPA achieves the lowest ASR of 0.035, up to 6.3× lower than SecAlign (0.221) and 3.0× lower than the strongest baseline (LlamaGuard, 0.104), while DataSentinel (0.132) remains more vulnerable.”

Caveats 2

  • The backward transfer is near-zero on some backbones, ranging from -0.052 to +0.028, indicating limited retention for certain models.
  • quote: "near-zero BWT (-0.052 to 0.028)"

What’s new here 4

  • Frames prompt-injection defense as a continual learning problem with sequential adaptation to new attack variants.
  • Introduces a margin-weighted replay buffer that prioritizes low-margin (hard) examples using the GRPO preference margin.
  • Applies Group Relative Policy Optimization (GRPO) for online policy updates of a low-rank LoRA adapter, keeping the base model frozen.
  • Demonstrates architecture-agnostic gains across Llama, Mistral, and Qwen backbones.

Threat model stated by the source

Adversaryexternal attacker with only input-interface access, using a surrogate LLM to generate malicious prompts
Capabilitycannot modify the defender's weights, replay buffer, training data, or optimization process
Assumesattack distribution is non-stationary and new variants appear after deployment