Skip to content

DP-ES: A Differentially Private Evolution Strategy for Prompt OptimizationDP-ES: Differentially Private Evolution Strategies for Prompt Optimization

arXiv· arXiv:2610.06236· Ziniu Liu, Aiping Li, Yue Han, Han Yu, Junjian Zhang, Dong Zhu, Changjian Li, Shiqiang ZhangNational University of Defense Technology; CRRC Zhuzhou Electric Locomotive Research Institute Co., Ltd., China Academy of Railway SciencesIndexed by this site · 21 days ago· Originally publishedDefenses

Quick read

Defenses

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

The authors propose DP-ES: DP prompt optimization where mutation does not touch private data and privacy is spent only on sampling Gaussian scores; the authors state it reaches 88.1% on GSM8K, 38.6 percentage points higher than DP-OPT.

Threat modelA trusted curator holds a private dataset D and publishes only the final prompt with an (ε,δ)-DP guarantee; the privacy unit is a single record; the curator and the model endpoint used for private-data evaluation are trusted processors; the mutation LLM receives only the parent prompt and never touches records or record-derived text; PII memorization in the pretrained model is outside this record-level threat model.

Questions
Automated prompt optimization on sensitive data such as medical and financial data needs to satisfy differential privacy, but the authors state that the existing token-level method DP-OPT is unstable under tight privacy budgets: on GSM8K, over 30 runs, only 49.5±28.5%, with template drift occurring.
Methods
DP-ES maintains a full prompt population: prompts are mutated by an LLM (no access to private data, zero privacy cost), scoring uses the Gaussian mechanism only on sampled batches with RDP accounting, and selection is post-processing.
Experiments and results
Under ε≤1.0, δ=10⁻⁵, DP-ES achieves GSM8K 88.1%, MedQA 99.7%, BANKING77 73.5%, Alpaca 86.8%; on GSM8K it is 38.6 percentage points higher than DP-OPT and 2.5× faster in wall-clock.
Limitations and future work
The authors note: no end-to-end validation on real sensitive, non-saturated data; MedQA is already near ceiling; stress tests only measure exact-match leakage; advantages are concentrated in complex reasoning tasks; no dense privacy budget sweep was performed.
Experimental setupDeepSeek-V3.2 (deepSeek-chat)、Qwen2.5-7B-Instruct · GSM8K、MedQA et al. · accuracy、wall-clock runtime et al.
Evaluated models
DeepSeek-V3.2 (deepSeek-chat)Qwen2.5-7B-Instruct
Benchmarks
GSM8KMedQABANKING77Alpaca
Metrics
accuracywall-clock runtimelogged private-data call groupsexact-match leaked strings
AI summaryThe researchers propose a differentially private evolution strategy, DP-ES, which achieves 88.1% on GSM8K under a privacy guarantee of (ε≤1.0, δ=10^-5), 38.6 percentage points higher than DP-OPT and with a standard deviation about 9 times lower. The paper diagnoses DP-OPT's instability under tight privacy budgets (49.5±28.5% over 30 runs on GSM8K) as a structural consequence of greedily constructing prompts token by token on privacy-aggregated counts; DP-ES instead maintains a full population of prompts, mutates prompts using LLM calls that do not touch the private dataset, spends the privacy budget only on Gaussian sampling evaluation, and treats the selection step as post-processing. DP-ES achieves 99.7%, 73.5%, and 86.8% on MedQA, BANKING77, and Alpaca, respectively, is 2.5 times faster in wall-clock time, and records 3.3 times fewer groups of private data calls; the authors also add selection and population ablations, an implementation-level noise check, and an exact-match memorization stress test with 200 profiles, and note that end-to-end validation on genuinely sensitive, unsaturated deployment data remains future work.

The researchers propose a differentially private evolution strategy, DP-ES, which achieves 88.1% on GSM8K under a privacy guarantee of (ε≤1.0, δ=10^-5), 38.6 percentage points higher than DP-OPT and with a standard deviation about 9 times lower. The paper diagnoses DP-OPT's instability under tight privacy budgets (49.5±28.5% over 30 runs on GSM8K) as a structural consequence of greedily constructing prompts token by token on privacy-aggregated counts; DP-ES instead maintains a full population of prompts, mutates prompts using LLM calls that do not touch the private dataset, spends the privacy budget only on Gaussian sampling evaluation, and treats the selection step as post-processing. DP-ES achieves 99.7%, 73.5%, and 86.8% on MedQA, BANKING77, and Alpaca, respectively, is 2.5 times faster in wall-clock time, and records 3.3 times fewer groups of private data calls; the authors also add selection and population ablations, an implementation-level noise check, and an exact-match memorization stress test with 200 profiles, and note that end-to-end validation on genuinely sensitive, unsaturated deployment data remains future work.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    How to stably perform black-box prompt optimization under a tight differential privacy budget; the authors claim token-level DP-OPT is unstable in this setting.

    Core question: under conditions where the optimization data is sensitive and the model is accessible only as a black-box API, how to perform automated prompt optimization that satisfies (ε,δ)-DP and is robust to DP noise.

    • Setting and motivation: Automated prompt optimization relies on training data; if the data is sensitive content such as medical records or financial logs, the optimizer may memorize and leak privacy (the authors cite membership inference and extraction attacks); therefore the optimization mechanism itself must remain robust under DP noise.
    • Shortcomings of existing methods (per the authors): DP-OPT builds prompts token by token using a histogram plus exponential mechanism; it is effective on simple tasks, but in the authors' GSM8K complex-reasoning setting, over 30 runs it achieves only 49.5±28.5%, and trajectory analysis shows template drift and noise-sensitive irreversible selection (Section 5, Appendix C.2).
    • Core observation: The structural advantage of Private Evolution is that only low-sensitivity evaluations touch private data, while exploration and selection are post-processing; moving this principle from data synthesis to prompt optimization allows mutation to be arbitrarily rich without consuming privacy budget.
    • Proposed in the paper: DP-ES (Differentially Private Evolution Strategies)—an evolutionary DP prompt optimizer that maintains a full prompt population, whose mutation does not access private data and whose privacy is spent only on sampled Gaussian scores, accompanied by a diagnostic analysis of DP-OPT's instability.
    • Threat model (Appendix B.4):
      • Protected object: the private dataset D, with the privacy unit being a single record (xi, yi), and the only release being the final prompt.
      • Trust assumptions: a trusted curator runs DP-ES; the curator and the model endpoint used for private-data evaluation are trusted processors.
      • Mutation isolation: the mutation LLM receives only the parent prompt and never touches records or record-derived text.
      • Out of scope: PII already memorized in pretrained model parameters is not within this record-level threat model, and the authors state it should be handled by provider safety measures.
  2. What related research exists?

    Related work is divided into four groups: non-private prompt optimization, DP training, DP prompt optimization, and Private Evolution; DP-ES is positioned as bringing the PE principle into prompt optimization.

    Non-private prompt optimization

    • APE (Zhou et al., 2023) and OPRO (Yang et al., 2024b): search over discrete prompt candidates using LLM-generated variants; TextGrad (Yuksekgonul et al., 2024) treats LLM feedback as a differentiable signal. The paper notes that both types of methods assume unrestricted access to training data and provide no privacy guarantee, making them unsuitable for sensitive domains such as medical and financial.
    • EvoPrompt (Guo et al., 2024) and PromptBreeder (Fernando et al., 2023): already optimize discrete prompts using LLM-driven mutation and population selection; DP-ES follows this line of evolutionary prompt optimization and introduces record-level DP.

    DP training methods

    • DP-SGD (Abadi et al., 2016) and PATE (Papernot et al., 2018): provide (ε,δ)-DP for continuous model parameters; DP-LoRA (Liu et al., 2024b; Frery et al., 2025) extends this to parameter-efficient fine-tuning. The paper notes that these methods all require access to model weights and cannot be used for black-box API models such as GPT-4 and DeepSeek.

    DP prompt optimization and other directions

    • DP-OPT (Hong et al., 2024): builds prompts token by token from private aggregate counts using a histogram plus exponential mechanism; the paper notes that it is unstable in the authors' GSM8K experiments, exhibiting template drift and noise-sensitive irreversible decisions.
    • Tang et al. (2024)'s DP few-shot generation can only privately select examples and cannot optimize the instruction itself; Koskela et al. (2025)'s private retrieval augmentation protects retrieval queries but is limited by a fixed template; PromptDPSGD (Duan et al., 2023) applies DP-SGD to continuous soft prompts, requires white-box access, and the authors state it struggles on smaller models (Appendix C.3).

    Private Evolution and privacy auditing

    • Private Evolution (Lin et al., 2024; Xie et al., 2024; Lin et al., 2025): a training-free DP framework proposed for API data synthesis in which only low-sensitivity evaluations touch private data; DP-ES adapts this principle to prompt optimization.
    • Nasr et al. (2021), Jagielski et al. (2020): the paper cites their view that empirical attacks and audits cannot prove DP from a finite number of trials, so the authors base the guarantee on mechanism-level RDP accounting, with noise checks and memorization stress tests serving only as supplementary diagnostics.

    Baselines and benchmarks: The comparison baselines are DP-OPT (black-box adapted version), a non-DP baseline (TextGrad implementation), and local PromptDPSGD (Qwen-2.5-7B); the benchmarks are GSM8K, MedQA, BANKING77, and Alpaca. The authors position DP-ES as a black-box DP prompt optimization method that combines evolutionary exploration with sampled Gaussian scoring and post-processing selection (Table 1).

  3. How does the paper address this problem?

    DP-ES decouples exploration from privacy spending: LLM mutation has zero privacy cost, the privacy budget is spent only on sampled Gaussian scoring, and selection is post-processing.

    The overall idea is to instantiate the decoupling principle of Private Evolution as prompt optimization: DP-ES maintains a full prompt population, mutation is performed by an LLM that does not touch private data, and the privacy budget is strictly allocated to sampled Gaussian evaluation.

    Problem formulation

    • Objective: find the prompt p∗ = argmaxp ∈ 𝒫 f(p, D) that maximizes task performance on the private dataset D, while the optimization algorithm satisfies (ε,δ)-DP with respect to D, i.e., the influence of any single record on the output prompt is bounded.
    • The DP definition uses the standard adjacent-dataset (differing by one record) form: Pr[ℳ(D) ∈ S] ≤ eε · Pr[ℳ(D′) ∈ S] + δ.

    Privacy-independent mutation

    • The mutation LLM receives only public or already privatized parent prompts, not records in D or record-derived feedback; the authors give Proposition 1 (mutation has zero privacy cost) and Proposition 2 (privacy loss depends only on sampled Gaussian scoring, independent of the number and strength of mutations), with proofs in Appendix D.
    • Three mutation modes are implemented: EXPLORE (semantically diverse variants), EXPLOIT (small improvements to successful prompts), and BALANCED (a mix); experiments use BALANCED by default. Appendix A.5 gives the mutation prompt templates.

    Sampled Gaussian evaluation and accounting

    • Each candidate is scored on a batch B (size b) sampled uniformly without replacement: the per-record utility ui(p) is whether the model's answer equals yi, clipped to [0, Cclip] (Cclip=1.0) and then averaged, with Gaussian noise added, noise standard deviation σ = z·Cclip/b.
    • RDP accounting is done under uniform sampling without replacement (sampling rate q=b/n), with at most T·K scoring releases composed, then converted to (ε,δ)-DP (using AutoDP).
    • Reported run parameters: n=200, b=10, z=10, K=6, M=2, T=3; AutoDP gives ε≤0.71 at δ=10⁻⁵, and the authors report uniformly under the conservative upper bound ε≤1 (Table 5).

    Selection and end-to-end guarantee

    • Both selectors act only on already privatized scores and are post-processing: Option A (default) adds a fixed, data-independent Gumbel(0,β) perturbation for smoothing; Option B is deterministic top-M (i.e., the special case β=0). The Gumbel perturbation is used only to smooth rank reversals caused by noise, not as a second privacy mechanism.
    • RDP composition of at most T·K sampled Gaussian releases gives the end-to-end (ε,δ)-DP of Algorithm 1 (Theorem 3, Appendix D).

    Implementation and diagnostics

    • All experiments use the DeepSeek-V3.2 API; the initial prompt is the generic "Answer the following question carefully."; hyperparameters are not selected based on task utility.
    • Privacy diagnostics: 1,000 noise-injected samples are recorded, and a Kolmogorov–Smirnov test checks that the standardized distribution matches the configured Gaussian mechanism; the authors explicitly state that these diagnostics cannot be treated as empirical ε, and the formal guarantee comes from mechanism-level RDP accounting.
  4. What experiments did the paper conduct?

    Comparison of DP-OPT and non-DP baselines on four tasks, plus DP-OPT trajectory diagnostics, efficiency breakdown, local Qwen2.5-7B validation, selector and population ablations, and a memorization stress test.

    Experimental setup

    • Models tested: main experiments use the DeepSeek-V3.2 API; local validation uses Qwen2.5-7B-Instruct (Appendix C.3).
    • Datasets: GSM8K (200-example optimization set, 1,319-example official test set), MedQA (200-question subset, due to API cost constraints), BANKING77 (200 examples), Alpaca (200 instructions).
    • Baselines: DP-OPT (black-box adapted version; the authors note it is not an exact reproduction of the original Vicuna implementation), non-DP baseline (TextGrad implementation; the authors note it is a reference rather than a formal upper bound), PromptDPSGD (local Qwen-2.5-7B).
    • Metrics and judging: GSM8K/MedQA/BANKING77 use accuracy; Alpaca is judged by DeepSeek-Chat as an LLM judge (temperature 0.0), scored on a [0,1] scale and converted to a percentage.
    • Privacy settings: δ=10⁻⁵; DP-OPT is reported under its stated ε=1 setting, DP-ES's recomputed RDP upper bound is ≤0.71, stated uniformly as ε≤1.
    • Repetitions: GSM8K stability analysis 30 runs; selector ablation 5 seeds; other validation studies 3 seeds ([42, 123, 456]).

    Main results

    According to Table 3 (mean ± std; GSM8K is 30 runs, other tasks 3 seeds; Alpaca is LLM judge scores converted):

    Swipe horizontally to read the table

    MethodGSM8KMedQABANKING77Alpaca
    Non-DP95.0±0.9100.0±0.075.0±2.891.7±0.6
    DP-OPT49.5±28.593.5±12.075.3±2.887.1±1.4
    DP-ES88.1±3.299.7±0.573.5±2.286.8±0.8
    • The authors state that DP-ES is 38.6 percentage points higher than DP-OPT on GSM8K with about 9× lower standard deviation, and 6.2 percentage points higher on MedQA.
    • On BANKING77 and Alpaca the two methods are close (DP-ES lower by 1.8 and 0.3 percentage points respectively), which the authors interpret as DP-ES tying on well-structured tasks and excelling on complex reasoning tasks.
    • The authors note that Non-DP is already saturated on MedQA (100.0±0.0), so this subset has limited discriminative power.

    DP-OPT instability and trajectory analysis

    • What was measured: distribution statistics over 30 GSM8K runs, plus the actual search trajectory of one high-scoring seed (seed 42, final 91%) (Figure 3, Table 8).
    • Results: in that trajectory, 21/33 candidate prompts and 2/3 selected prompts lost the {question} placeholder; the evaluator automatically fills in the question text when the placeholder is missing, so the authors treat this as a diagnostic of template drift rather than a failure label.
    • Authors' interpretation: token-level greedy construction lacks a global consistency check and is not backtrackable, so early noise-induced rank reversals propagate through later iterations; DP-ES's full prompt population retains multiple recoverable candidates when noise perturbs rankings.

    Efficiency and local validation

    • Efficiency (Tables 6, 7): on the DeepSeek API, GSM8K wall-clock 17.9 hours vs DP-OPT 45.7 hours (2.5×), MedQA 7.0 vs 18.4 hours (2.6×); in the representative GSM8K run (seed 42), private-data call groups 10 vs 33 (3.3×), but DP-ES total token usage is about 2.8×. The authors state the advantage is in wall-clock and private-data round trips, not uniformly lower vendor cost.
    • Local Qwen2.5-7B (Table 9, ε≤1, three seeds): on GSM8K, DP-ES 53.8±6.1% vs DP-OPT 37.4±11.6%; on MedQA the two are close (81.2±1.3% vs 83.0±2.1%); PromptDPSGD is 20.0±5.8% and 34.8±19.0%. The authors state this reproduces the task-dependent trend rather than being API-specific.

    Privacy diagnostics and memorization stress test

    • Noise check: 1,000 standardized noise-injected samples each for GSM8K and MedQA, consistent with the configured Gaussian distribution under a Kolmogorov–Smirnov test; output-distance statistics on adjacent datasets degrade on near-saturated MedQA, and the authors explicitly do not report it as an observed privacy parameter.
    • Stress test (Figure 4): 200 synthetic customer profiles, 1,200 sensitive strings; 0 detected in DP-ES final prompts, while the deliberately adversarialized non-DP control (given the raw records directly and asked to embed the catalog) contains 40 (3.33%). The authors state this is a targeted sanity check, does not test semantic leakage, and cannot replace the formal guarantee.

    Other ablations and analyses

    • Selector ablation (Table 4, GSM8K, 5 seeds): Gumbel smoothing 88.8±3.4% vs deterministic top-M 88.6±2.9%, mean difference 0.2 percentage points, with the same privacy guarantee for both.
    • Population size ablation (Table 10, K×T≤24): K=6, T=3 gives 86.5%; K=3, T=4 gives 78.5%; K=9 or 12, T=2 both give 82.0%.
    • Population diversity (Figure 2 right): measured by mean pairwise cosine distance of all-mpnet-base-v2 embeddings, about 0.15 in early iterations, then converging; the authors state this provides multiple hypotheses when noise perturbs scores.
  5. What are some points that can be further explored?

    The authors list six limitations (no deployment validation on sensitive data, MedQA saturation, narrow attack coverage, task diversity, task-dependent advantages, no budget sweep) and give future directions.

    Limitations and future directions noted by the authors

    • No deployment validation on sensitive data (Limitations): the experiments only establish that DP-ES is more robust than token-level methods on benchmarks where prompt structure matters, and do not provide end-to-end validation on real sensitive, non-saturated data (e.g., real medical records, financial logs); the authors state this requires benchmarks with both record-level sensitivity and non-trivial semantic reasoning, and is future work.
    • MedQA ceiling effect (Limitations): DP-ES reaches 99.7% on the 200-question subset, and Non-DP saturates at 100.0±0.0, limiting MedQA's discriminative power for studying the privacy-utility trade-off at ε=1.0; the authors state the 6.2 percentage point improvement over DP-OPT should not be over-interpreted.
    • Narrow privacy attack coverage (Limitations): the 200-profile stress test only tests exact or near-verbatim leakage, not paraphrased memorization, rare-attribute disclosure, record reconstruction, or membership inference; the mutation LLM may reproduce information already in its parametric memory, and DP-ES bounds the incremental influence of the private optimization dataset rather than pretraining-inherited memorization; the authors state that a direct empirical attack suite against DP-ES and DP-OPT under matched budgets is future work.
    • Scope of efficiency reporting (Limitations): the cost breakdown by call purpose comes from a single-seed representative run on the 200-sample validation set; token-level and call-purpose breakdowns at the full 1,319 test-set scale have not been released, and the authors list this as future work.
    • Task diversity and task-dependent advantage (Limitations): only four tasks were evaluated; DP-ES's largest advantage is on complex reasoning tasks (GSM8K +38.6 pp, MedQA +6.2 pp), while on BANKING77 and Alpaca the two are close, and the authors believe population exploration is most beneficial when the search space is large and structured prompts are critical.
    • Privacy budget sweep and theory (Limitations): the experiments establish a common conservative upper bound ε≤1, not a densely sampled privacy-utility frontier; the authors also state that a formal theory linking prompt search-space characteristics to privacy budget requirements is needed. Future directions also include adaptive population size, multi-objective optimization, and federated DP-ES (Future Work).

    Scope of experimental coverage

    • Models tested: DeepSeek-V3.2 (main API experiments) and Qwen2.5-7B-Instruct (local validation), 2 in total; the Alpaca judge model is DeepSeek-Chat.
    • Benchmarks: GSM8K, MedQA (200-question subset), BANKING77, Alpaca, 4 in total, each with an optimization set of 200; the GSM8K test set has 1,319 examples.
    • Comparison methods: DP-OPT (black-box adapted version), a non-DP reference implemented with TextGrad, and local PromptDPSGD; the authors note that the DP-OPT adapted version is not an exact reproduction of the original implementation.
    • Repetitions: GSM8K 30 runs, selector ablation 5 seeds, the rest 3 seeds; privacy setting δ=10⁻⁵, DP-ES recomputed upper bound ε≤0.71.
    • The paper does not report whether the specific auxiliary model used for mutation differs from the main evaluation model (both mutation and evaluation go through the DeepSeek-V3.2 API), nor does it report comparison numbers for the original white-box DP-OPT implementation.
  6. Summarize the main content of the paper

    DP-ES uses privacy-independent LLM mutation plus sampled Gaussian scoring for DP prompt optimization; the authors claim it is more stable and faster than DP-OPT under tight budgets.

    A diagnostic-plus-method paper on differentially private prompt optimization, targeting scenarios where the optimization data is sensitive and the model is accessible only as a black-box API.

    • Problem: The authors state that token-level DP-OPT is unstable under tight privacy budgets—on GSM8K, over 30 runs, 49.5±28.5%; in the trajectory of one high-scoring seed, 21/33 candidates lost the {question} placeholder, which the authors diagnose as template drift and noise-sensitive irreversible selection.
    • Method: DP-ES maintains a full prompt population; mutation is performed by an LLM that receives only the parent prompt (zero privacy cost); the privacy budget is spent only on Gaussian scoring over sampled batches (RDP accounting, at most T·K releases); both Gumbel smoothing and deterministic top-M selection are post-processing; the reported configuration is n=200, b=10, z=10, K=6, T=3, with a recomputed upper bound of ε≤0.71, stated uniformly as ε≤1, δ=10⁻⁵.
    • Main results (Table 3): GSM8K 88.1±3.2% (38.6 percentage points higher than DP-OPT), MedQA 99.7±0.5% (+6.2 pp), BANKING77 73.5±2.2% (−1.8 pp), Alpaca 86.8±0.8% (−0.3 pp).
    • Efficiency and validation: On GSM8K, wall-clock 17.9 vs 45.7 hours (2.5×), private-data call groups 10 vs 33 (3.3×), but token usage about 2.8×; on local Qwen2.5-7B, GSM8K 53.8±6.1% vs DP-OPT 37.4±11.6%, and the authors state the trend is not API-specific.
    • Privacy evidence: 1,000 noise-injected samples pass a Kolmogorov–Smirnov check; in an exact-match stress test with 200 profiles and 1,200 strings, DP-ES leaked 0 and the adversarially constructed non-DP control leaked 40 (3.33%); the authors emphasize that the formal guarantee comes from mechanism-level RDP accounting, and the diagnostics are only supplementary.
    • Authors' conclusion: Under ε≤1, DP-ES matches or exceeds DP-OPT on four tasks, with the advantage concentrated in complex reasoning tasks; end-to-end validation on real sensitive non-saturated data, a broader attack suite, and a privacy-budget sweep are left for future work.
Read originalarxiv.org