Obfuscated prompts work only on target LLM, blocking cross-LLM reuse
PragLocker makes agent prompts non-portable to other LLMs while preserving target performance
AI/ML arXiv 7 May 2026 Method Prototype evidence
Published as “PragLocker: Protecting Agent Intellectual Property in Untrusted Deployments via Non-Portable Prompts”
Why it matters
Deployers of proprietary LLM agents can protect their prompt IP from theft and reuse on competing models without sacrificing task performance.
Summary
PragLocker reduces cross-LLM prompt portability to about 0.2× while keeping target performance essentially unchanged (≈1.01× of original). It works in a pure black-box setting by first converting the prompt into a code-symbol form and then injecting character-level noise guided by target-model feedback, producing prompts that only function on the intended LLM. Experiments on three agents, several benchmarks and three proprietary LLMs show near-zero reuse on other models and only minor degradation on the target, and the scheme resists adaptive attacks such as LLM-assisted recovery. The paper also provides a theoretical existence proof for model-specific, function-preserving obfuscated prompts. Evidence comes from real-world API models; the authors note tokenizer compatibility and prompt-length overhead as practical constraints.
What they found 3
- PragLocker makes stolen prompts largely unusable and cuts portability to 0.2× of the unprotected baseline.
“As shown in Table 2, prompts are highly portable without protection: copying a prompt to a different underlying LLM preserves strong performance (e.g., a HumanEval prompt achieves 98.78 on Gemini 2 and 97.56 on DeepSeek). In contrast, PragLocker makes stolen prompts largely unusable, driving performance close to zero across agents and tasks (e.g., 3.04/1.22), and achieves the lowest relative mean portability (0.2×), compared to 1× without protection.”
- Target-model performance is preserved after protection, with only negligible change.
“As Table 3 shows negligible degradation: protected performance closely matches the original across agents/tasks (relative mean 1.01× vs. 1×).”
- Adaptive LLM-assisted recovery yields only modest improvement over the protected prompt.
“LLM-assisted recovery yields only marginal gains over directly reusing the PragLocker-protected prompt (from 1× to 3.49× in relative mean performance).”
Caveats 5
- Adaptive attacks can increase relative mean performance from 1× to 3.49×, indicating that the protection is not absolute.
- Tokenizer Compatibility. PragLocker injects character-level noise, which requires the target LLM’s tokenizer to have broad character coverage so that perturbed text still maps to valid subword/byte tokens.
- Prompt-Length Overhead. PragLocker can lengthen the system prompt and increase the prefill cost, though caching can amortize the impact.
- Comparison with White-Box Defenses. The work does not extensively compare against methods that assume gradient or model-internal access, limiting direct performance comparison.
- Protection scope. PragLocker only reduces direct cross-model reuse of leaked prompts; it does not prevent other routes to reproducing agent behavior such as imitation or distillation.
What’s new here 4
- First black-box prompt obfuscation that yields model-specific, non-portable prompts without requiring white-box access.
- Two-phase pipeline combining code-symbol initialization with target-feedback-driven noise injection.
- Theoretical existence proof for function-preserving, model-specific obfuscated prompts.
- Demonstrated robustness against adaptive attacks, including LLM-assisted recovery and deobfuscation.