Skip to content

SABER: Semantically Anchored Prompt Obfuscation Optimizer for Practical LLM Privacy and Intellectual Property ProtectionSABER: Semantics-Anchored Prompt Obfuscation Optimizer Toward Practical LLM Privacy and IP Protection

Yaxin Li, Pai Zheng, Jiayu Li, Haoran Yan, Diwen Xue, Yan Long
The Hong Kong University of Science and Technology (Guangzhou); The Chinese University of Hong Kong; The Hong Kong University of Science and Technology
arXivarXiv:2612.03659Originally published Indexed by this site · 2 hr agoDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose the prompt obfuscation method SABER and a benchmark of 160 prompts; on Meta-Llama-3.1-8B-Instruct, the average text/functional utility is 0.95/0.92, but privacy is weaker than Pape et al.

Threat modelThe defender needs white-box access to the target LLM, obfuscates the system prompt p into p̂, and then deploys it. Attackers extract it through prompt injection, or obtain p̂ by purchasing it on a marketplace or intercepting it through an API relay, and then reconstruct it with an external LLM, with the goal of recovering the original source or reproducing the task behavior.

Questions
System prompts, commercial skills, and content transmitted through third-party APIs may be extracted, copied, or reconstructed. The authors believe that existing obfuscation methods have gaps in task coverage, task-specific leakage control, and measurement of functional recovery, making it difficult to maintain both utility and privacy.
Methods
SABER first ranks by the output loss increment after deleting a token, then performs multilingual replacement and random character perturbation; the latter two steps are simultaneously constrained by the CE+KL output loss and the last-layer hidden-state cosine distance. The authors additionally build a benchmark of 160 prompts across four task types, measuring textual and functional utility and leakage separately.
Experiments and results
On Meta-Llama-3.1-8B-Instruct, SABER's average textual/functional utility is 0.95/0.92, higher than the two baselines; under injection attacks the average exact/approximate extraction rates are 0.03%/1.02%. However, Pape et al. has a higher privacy score, and GPT-5 can still recover part of the functionality.
Limitations and future work
The authors point out that utility transfer does not equal privacy protection, functional recovery cannot be reduced to zero, and real-time user input still requires lower latency. The cross-model experiments report only utility on five unseen targets and do not evaluate their textual and functional recovery; the white-box extension experiments use only 20 prompts per model.
Experimental setupMeta-Llama-3.1-8B-Instruct、Qwen2.5-7B et al. · 160-prompt benchmark、Prompts.chat et al. · Textual Utility、Functional Utility et al.
Metrics
Textual UtilityFunctional UtilityTextual PrivacyFunctional Privacyexact extraction success rateapproximate extraction success rateWRROUGE-LMETEORCERBERTScoresentence-embedding cosine similarity
AI summaryResearchers propose a prompt obfuscation optimization method, SABER, to protect privacy and intellectual property in LLM prompts. Addressing the problems that existing research benchmarks use a single task, provide insufficient control of task-related leakage, and measure only output lexical similarity while ignoring behavioral reproduction, SABER uses token-level task relevance and model hidden-state information in optimization and introduces previously neglected semantic entropy; the authors also develop the first dedicated prompt obfuscation benchmark, covering diverse real tasks and measuring both textual and functional leakage. In experiments on 160 prompts across four types of real tasks, SABER on average preserves 95% of the original prompt's utility, improves by 60.1% over the strongest existing method on complex tasks, and reduces exact and approximate prompt extraction rates from 17.53% and 42.68% to 0.03% and 1.02%, respectively. The authors note remaining challenges include speeding up optimization and extending obfuscation from persistent system prompts and skills to real-time user input.

Researchers propose a prompt obfuscation optimization method, SABER, to protect privacy and intellectual property in LLM prompts. Addressing the problems that existing research benchmarks use a single task, provide insufficient control of task-related leakage, and measure only output lexical similarity while ignoring behavioral reproduction, SABER uses token-level task relevance and model hidden-state information in optimization and introduces previously neglected semantic entropy; the authors also develop the first dedicated prompt obfuscation benchmark, covering diverse real tasks and measuring both textual and functional leakage. In experiments on 160 prompts across four types of real tasks, SABER on average preserves 95% of the original prompt's utility, improves by 60.1% over the strongest existing method on complex tasks, and reduces exact and approximate prompt extraction rates from 17.53% and 42.68% to 0.03% and 1.02%, respectively. The authors note remaining challenges include speeding up optimization and extending obfuscation from persistent system prompts and skills to real-time user input.

Related events and news

1 events · 0 news mentions

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors study how to make prompt obfuscation balance utility and privacy in real tasks, and to fill the gap in functional leakage evaluation.

    The core question is how to turn prompt obfuscation into a deployable means of privacy and IP protection while preserving the original prompt's task behavior.

    • Application risks: The authors discuss proprietary system prompts in production systems, prompt and skill marketplaces, and private conversations in third-party API relays; plaintext may be extracted via injection, forwarded after purchase, or read by the relaying party.
    • Existing gaps: The authors classify the problem into a benchmark gap (narrow coverage of task types), an algorithm gap (lack of task-specific leakage control), and a metric gap (emphasis on lexical similarity, ignoring functional recovery). Figure 3 gives cases of format failure, poor utility–privacy trade-offs, and low lexical overlap but recoverable functionality.
    • Core hypothesis: The authors believe the common cause is insufficient semantic awareness; aligning only CE and KL output distributions may let task semantics drift, so token importance and hidden-state information at output positions need to be used.
    • Proposed approach: The paper proposes SABER (Semantics-Anchored Obfuscation Optimizer) and builds a benchmark of 160 prompts from real sources across four task types, evaluating textual/functional utility and textual/functional leakage separately.
    • Threat model:
      • Defender's goal: Replace the system prompt p with p̂, reducing information leakage from p while maintaining consistent task behavior under normal queries.
      • Defender's knowledge and capabilities: As in Pape et al., optimization requires white-box access to the target LLM M; reference responses, distributions, and hidden states can be cached.
      • Attack path one: The attacker performs prompt-injection-based extraction through the query interface of the deployed service and cannot directly observe p, p̂, or model parameters.
      • Attack path two: The attacker obtains p̂ through marketplace purchase, public prompt access, or API relay interception, and performs direct deobfuscation with an external LLM; the targets include lexical recovery and functional recovery.
  2. What related research exists?

    Related work is divided into non-obfuscated protection, non-natural-language representations, and prompt obfuscation; this paper directly compares two obfuscation methods.

    Non-obfuscation prompt protection

    • Differential privacy: InferDPT, Prϵϵmpt, Cape, DP3, etc. reduce information exposure through perturbation or sensitive-content substitution; the paper points out that these perturbations may affect the correct execution of instructions.
    • Homomorphic encryption and secure inference: THE-X, EncryptedLLM, BOLT, Iron, etc. protect inputs during computation; the paper points out that they usually require specialized protocols and inference infrastructure, and increase computational and communication overhead.
    • Watermarking and fingerprinting: PromptCARE, PromptCOS, PROMPRINT, etc. are used for ownership verification or detection of unauthorized use; the paper considers that they mainly help identify infringement rather than directly prevent prompts from being read or recovered.

    Non-natural-language representations and early uses of obfuscation

    • Jailbreak research: Wei et al.'s Base64, CipherChat, and CodeChameleon study model understanding of encoded, cipher, or code-transformed inputs; the paper points out that their goal is to bypass safety restrictions, not to protect prompt privacy and IP.
    • ProxyPrompt: optimizes proxy representations in continuous embedding space, maintaining utility under normal queries and producing different semantic content under extraction attacks; the paper points out that its deployment requires support for continuous embedding inputs, making it difficult to use directly with conventional text APIs.

    Prompt obfuscation for privacy and IP

    • EmojiPrompt: converts private user data into emoji, abbreviations, and mathematical or logical symbols; the paper considers that symbolic representations may be insufficient to express detailed instructions and complex logical relationships.
    • Pape et al. (PromptObfuscation): starts from a fixed-length random token sequence and uses white-box GCG with CE and KL losses to search for substitutions; the paper criticizes its fixed-length search for limited flexibility with complex instructions, and its evaluation focuses on style control tasks.
    • PragLocker: first rewrites instructions into a code-style symbolic structure, then uses target model feedback to inject character noise, reducing cross-model transferability; the paper points out that it relies on feedback from a limited number of training queries, and utility preservation on unseen queries remains uncertain.

    Baselines and data: The main experimental baselines are Pape et al. and PragLocker; the authors additionally use Prompts.chat, System-Prompt-Library, Off-Topic dataset, and PUPA to construct a 160-prompt benchmark, and adopt the 105 extraction attack queries released by Zhang et al.

    The authors position SABER as introducing task semantics simultaneously into the benchmark, optimization, and evaluation: in Table 1, compared with the two baselines, SABER adds hidden-state alignment and reports both response similarity and functional recovery; the authors call it the first dedicated prompt obfuscation benchmark.

  3. How does the paper address this problem?

    SABER uses importance ranking to guide multilingual replacement and character perturbation, with dual constraints from the output distribution and the last-layer representation.

    The overall idea is SABER's three-stage forward search: first handle lexical units that have a large impact on the output, then gradually reduce lexical overlap; all candidates use the original prompt as a fixed semantic anchor and require no backpropagation.

    Problem formulation and semantic anchor

    • The defense goal is to limit functional deviation over the normal query distribution while reducing the lexical and semantic similarity between p and p̂; the attacker respectively maximizes lexical recovery and functional recovery (Eqs. 1–3).
    • For calibration queries U, first cache the reference responses under the original prompt, and perform teacher forcing at the same response positions. Each query scores at most X=20 valid output tokens, to align prediction positions under different tokenizations.
    • The core output objective is Lout(a)=1/N∑q∈ U∑t=1T′q[−log Pa,q,t(yq,t)+DKL(Pp,q,t|Pa,q,t)], i.e., equally weighted CE and original-to-candidate KL; additionally, Dstate(a)=1/N∑q∈ U∑t=1T′q[1−cos(hp,q,t,ha,q,t)] measures the last-layer representation deviation.
    • The output budget is calibrated by the Original–Blank loss gap; the multilingual stage uses ρout=0.05 and ρstate=0.10, and the character stage uses 0.10 and 0.15 respectively, corresponding to minimum average cosine similarities of 0.90 and 0.85 (Table 9). The two thresholds are independent and cannot compensate for each other.

    Importance ranking and multilingual replacement

    • After deleting original token i, task sensitivity is measured by the output loss increment Ii; a lexical unit takes the maximum over its constituent tokens, ranking is done only once, and deletion itself is not an accepted edit nor a measure of privacy sensitivity.
    • Each eligible unit considers five translations in order—French, Spanish, Chinese, Korean, Japanese—and retains previous replacements; untranslatable fragments and protected special tokens are skipped.
    • Candidates are re-tokenized and illegal special tokens are excluded, then they pass the output gate and then the state gate; feasible candidates are selected in lexicographic order of WR, Lout, Dstate, prioritizing reduction of unique-word recall, and if there is no feasible candidate the original unit is kept.

    Random character perturbation and search procedure

    • Starting from the multilingual result, each round samples ten different character boundaries and generates one candidate at each boundary by inserting one of 94 printable, non-whitespace ASCII characters.
    • Candidates must satisfy both the character-stage output and state constraints; the main text says feasible candidates are selected in lexicographic order of WR, Lout, Dstate, whereas Appendix B.3 says the one with the lowest output loss is accepted, with WR and cosine similarity used only to break ties.
    • The character search has a budget of 30 minutes per prompt, resampling if there is no feasible candidate; it returns the last accepted prompt, or the multilingual result if no insertion was accepted, and is frozen before held-out evaluation.
    • Candidate scoring uses cached references, fixed teacher prefixes, and batched forward inference; it computes no token gradients and does not regenerate autoregressively for each candidate.

    Benchmark construction and evaluation criteria

    • 160 prompts were collected or rewritten from public skill collections, Prompts.chat, System-Prompt-Library, Off-Topic, and PUPA; Keyword Utilization, Logical Reasoning, Format Control, and Role Control each have 40 (Table 2).
    • Each prompt is paired with 100 training queries and 50 held-out test queries, for a total of 16,000 training and 8,000 test prompt-query pairs; when source queries are insufficient, an LLM supplements them, and some queries are shared across prompts.
    • Textual utility uses ROUGE-L, METEOR, CER, BERTScore, and sentence-embedding cosine; functional utility is judged 0/1 by a Llama-3.1-8B judge based on the original prompt, query, and reference response, and Appendix E.2 gives the full judging prompt.
    • Textual leakage uses WR; functional leakage compares the behavior of the recovered prompt and the original prompt on shared test queries. Injection attacks additionally report exact extraction (each sentence of the original prompt appears verbatim) and approximate extraction (token-level LCS coverage of at least 90%, i.e., ROUGE-L recall of at least 0.9).
  4. What experiments did the paper conduct?

    Experiments show that SABER has higher utility than the two baselines and a lower injection extraction rate, but its reconstruction privacy is not better than Pape et al.

    Experimental setup

    • Main optimization model: SABER runs on Meta-Llama-3.1-8B-Instruct; the main results cover 160 prompts, 40 per each of four task types, with baselines Pape et al. and PragLocker.
    • Other evaluated models: Cross-model transfer is evaluated on Qwen2.5-7B, Llama-3.2-3B, GPT-4o, Gemini-2.5-Flash, and DeepSeek-V3; the white-box extension additionally optimizes independently on Qwen2.5-7B and Llama-3.2-3B.
    • Attack models and protocol: Injection uses Zhang et al.'s 105 queries, sampling five responses per independent session, filtered by a fine-tuned DeBERTa-v3-large classifier; direct reconstruction uses GPT-5, generating one p′ per p̂.
    • Generation parameters: In the injection experiments, Llama-3.1-8B-Instruct uses temperature 0.7, top-p 0.9, top-k 100, seed 42; reference responses use seed 42, normal utility evaluation uses another seed, and Appendix C.3 states that the Original control includes seeds 42 and 43.
    • Metrics: Textual Utility in Table 5 is the average of normalized ROUGE-L, METEOR, CER, BERTScore, and sentence-embedding cosine; Textual/Functional Privacy are 1−WR and 1−recovery task performance, respectively, not probabilities of secrecy.
    • Samples and timing: The white-box extension selects 20 prompts from the benchmark, 5 per task type; SABER and Pape et al. are timed on the same NVIDIA A800. The paper does not report the number of repeated optimizations or statistical significance tests for the main results.

    Main results

    According to Table 5; utility and privacy are averages over the four task types, higher is better, and time is obfuscation time per 10 tokens.

    Swipe horizontally to read the table

    SettingMetricSABERPape et al.PragLocker
    ObfuscationTime9.8 min4h–
    Normal UseTextual Utility0.950.750.81
    Normal UseFunctional Utility0.920.380.68
    Prompt InjectionTextual Privacy0.610.900.66
    Prompt InjectionFunctional Privacy0.610.820.60
    LLM ReconstructionTextual Privacy0.490.880.38
    LLM ReconstructionFunctional Privacy0.500.740.48
    • Utility–privacy trade-off: The authors state that SABER provides higher retained utility and shorter optimization time, but it is not best on every privacy metric; Pape et al. has higher privacy along with lower functional utility.
    • Relative to PragLocker: Under injection, SABER has lower textual privacy and slightly higher functional privacy; under GPT-5 reconstruction, both privacy metrics are higher. The authors interpret the overall results as a trade-off among utility, privacy, and computational cost.
    • Speed basis: The authors report a 24.5× speedup relative to the white-box baseline for prompts of the same length; this total time includes reference preparation, ranking, replacement, and character search, and the 30-minute budget covers only the character stage.

    Injection extraction and functional leakage

    • Extraction rates: In Table 4, Original's average exact/approximate extraction is 17.53%/42.68%, and SABER's is 0.03%/1.02%; SABER's exact rate is 0.00% for Keyword Utilization, Logical Reasoning, and Format Control, and 0.12% for Role Control.
    • Per-type exceptions: In Table 10, under GPT-5 reconstruction, SABER's Functional Privacy for Role Control is 0.135, lower than Pape et al.'s 0.309 and PragLocker's 0.148; under injection, SABER and PragLocker both have 0.325 on this item.
    • Authors' interpretation: The authors believe that a small amount of role or style cues may also let an attacker recover functionality using priors, so low lexical leakage cannot rule out functional leakage; Table 6 gives corresponding examples.

    Cross-model transfer and different white-box models

    • Five unseen targets: When optimizing only on Meta-Llama-3.1-8B-Instruct without target adaptation, the five-model average utility in Figure 10 is SABER 0.586, PragLocker 0.510, and Pape et al. 0.442; the authors state that SABER exceeds both baselines on every target.
    • Closed-source targets: The main text reports SABER's average utility on GPT-4o, Gemini-2.5-Flash, and DeepSeek-V3 as approximately 0.63, 0.60, and 0.57; the bars in Figure 10 show 0.63, 0.60, and 0.57 respectively.
    • White-box extension: In Table 7, Textual/Task-Specific Retention is 0.958/0.941 for Llama-3.1-8B, 0.929/0.911 for Qwen2.5-7B, and 0.942/0.833 for Llama-3.2-3B; each model uses only the selected 20 prompts.

    Reconstruction models and ablation

    • Reconstruction capability: Figure 9 reports average functional leakage across five reconstruction models, from 0.247 for Llama-3.2-3B to 0.619 for GPT-5; the authors state that textual leakage has no consistent model ordering, while functional leakage generally increases with capability.
    • Component ablation: In Table 8, under LLM-based reconstruction, full SABER's Task Utility/WR/Reconstructed Functional Recovery is 0.943/0.396/0.764; removing hidden-state alignment gives 0.809/0.417/0.799.
    • Remaining variants: w/o Ranking is 0.917/0.495/0.879, w/o Multilingual Replacement is 0.945/0.495/0.855, and w/o Character Perturbation is 0.823/0.487/0.855 (metric order as in Table 8). The authors conclude from this that all three text-processing components help resist textual and functional reconstruction.
  5. What are some points that can be further explored?

    The authors list functional recovery, transfer reliability, and real-time obfuscation as follow-up questions; the existing cross-model evidence mainly covers utility.

    Limitations and future directions noted by the authors

    • Transfer is not privacy: Section 6.1 states that utility transfer alone does not establish privacy protection; future work can use multiple surrogates to improve transfer and evaluate textual and functional recovery on the target model.
    • Functional recovery cannot be reduced to zero: Section 6.2 states that normal inputs and outputs themselves expose some rules, prompt protection cannot reduce functional recovery to zero, and the focus should instead be on reducing the additional leakage caused by exposing p̂.
    • Protection strength varies by task: Section 6.2 states that simple role-play is easily guessed from a few cues; the authors believe obfuscation is more effective for complex proprietary instructions, and limiting functional recovery remains a necessary step before practical deployment (Section 7).
    • Real-time input is still latency-constrained: Section 6.3 states that real-time user input in third-party API relays requires lower latency than iterative search; the authors propose studying training a single-pass lightweight model on offline (p,p̂) pairs, or obfuscating only sensitive personal entities in real-time queries.
    • Offline speedup does not equal real-time applicability: Section 5.1.1 states that faster offline optimization alone does not prove suitability for real-time obfuscation of individual user requests; persistent systems and skill prompts can amortize preparation cost over repeated use.

    Scope of experimental coverage

    • The main experiments on Meta-Llama-3.1-8B-Instruct cover 160 prompts across four task types; each has 100 training queries and 50 held-out test queries, with some queries shared.
    • Defense comparisons include Pape et al. and PragLocker; attack evaluations include 105 prompt-injection queries and GPT-5 direct deobfuscation, and no adaptive attack experiments are reported.
    • The cross-model part reports utility on five unseen targets; Section 6.1 lists textual and functional recovery on the target model as future evaluation, and the current transfer results do not provide these privacy measurements.
    • The white-box extension independently optimizes 20 prompts on each of three models; functional judging uses Llama-3.1-8B, and the paper does not report the agreement between this judge and human judgment.
    • The paper reports obfuscation time on the same A800 and the formula for counting candidate scorings, but does not report the total number of queries, the number of repeated optimizations, or statistical significance tests for the main experiments.
  6. Summarize the main content of the paper

    SABER uses semantic-anchored obfuscation to improve utility on real tasks, but the results simultaneously present trade-offs among privacy, utility, and cost.

    This is a defense study aimed at system prompt privacy and IP protection, and it also provides an optimization method and a task-structured evaluation benchmark.

    • Problem: The authors focus on injection extraction in deployed services, and on external LLM reconstruction after prompts are exposed through marketplaces or API relays; existing evaluations that look only at lexical overlap may miss cases where task functionality has already been recovered.
    • Method: SABER ranks lexical units by the output loss increase after deletion, then performs multilingual substitution and random character perturbation; candidates are constrained simultaneously by the CE+KL output loss and the cosine distance of the last-layer hidden state, and forward scoring with a cached reference is used throughout.
    • Benchmark: 160 prompts are divided into Keyword Utilization, Logical Reasoning, Format Control, and Role Control, with 40 each; evaluation distinguishes textual/functional utility and textual/functional leakage.
    • Main results: On Meta-Llama-3.1-8B-Instruct, SABER's average Textual/Functional Utility is 0.95/0.92, higher than Pape et al.'s 0.75/0.38 and PragLocker's 0.81/0.68 (Table 5).
    • Attack results: Under injection, the average exact/approximate extraction drops from 17.53%/42.68% for Original to 0.03%/1.02% for SABER (Table 4); however, under GPT-5 reconstruction, SABER's textual/functional privacy is 0.49/0.50, lower than Pape et al.'s 0.88/0.74.
    • Transfer and conclusion: After optimization only on the local Meta-Llama-3.1-8B-Instruct, the average utility on five unseen targets is 0.586 (Figure 10). The authors believe that local surrogate optimization may support black-box deployment, but utility transfer does not prove privacy; reducing functional recovery, improving transfer reliability, and achieving real-time obfuscation still require further research.

Research lineage

Connected via shared benchmarks in library
Explore in knowledge graph →

Related papers

Read originalarxiv.org