Skip to content

Proactively hardening LLM defenses with HASTEProactive Hardening of LLM Defenses with HASTE

arXiv· arXiv:2601.19051· Henry Chen, Victor Aranda, Samarth Keshari, Ryan Heartfield, Nicole Nichols·Indexed by this site · 2026-10-12· Originally publishedDefenses

Quick read

Defenses

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

HASTE mines hard negatives to retrain the detector; without retraining, the in-loop HM-Max+Sem iteration accuracy drops to 31.76%.

Threat modelThe adversarial goal is to construct hard negatives that continuously bypass the current detector. The paper does not specify white-box/black-box; the closed loop uses detector misclassifications for retraining. The victim component is a malicious prompt detection model that runs before or in parallel with inference; in the experiments it is ProtectAI DeBERTa. HASTE is for defenders to proactively stress-test, or to imitate new attacks to fill coverage gaps.

Questions
The input space of prompt attacks is unbounded, detectors depend on the training distribution, and new attacks are hard to cover in time once they appear. HASTE aims to continuously generate hard negatives that bypass the current detector and retrain the detection model on them at runtime.
Methods
Six-stage closed-loop replaceable components. GPT-4o expands adversarial prompts from seeds, JailJudge scores them on a 1–10 scale, with the threshold set to 2 in the method section; optional semantic, syntactic, or format fuzzing. After balancing with an equal number of benign samples, DeBERTa is fine-tuned at rounds 5 and 10, and misclassified samples are injected into the next round.
Experiments and results
Without retraining, HM-Max+Sem in-loop iterative accuracy It10 was 31.76% (It0 was 95.91%). After retraining, held-out H accuracy: M0 was 82.12%, HM-Bal+All's M10 was 94.44%, and Base's M5 was 81.06%.
Limitations and future work
In Future Work, the authors believe existing benchmarks may not be sensitive enough and plan to add multi-turn dialogue, similarity metrics, explanation methods, and submodule evaluation. The retrained detector in the experiments is one model, ProtectAI DeBERTa; the paper does not report the number of repetitions or reviewer-human agreement.
Experimental setupProtectAI/deberta-v3-base-prompt-injection · seed adversarial prompts(约 4,500,含 1,000 hold-out)、benign corpus(约 40,000) et al. · iteration accuracy、H accuracy et al.
Evaluated models
ProtectAI/deberta-v3-base-prompt-injection
Benchmarks
seed adversarial prompts(约 4,500,含 1,000 hold-out)benign corpus(约 40,000)in-loop test partitionout-of-loop evaluation set
Metrics
iteration accuracyH accuracycategory accuracyJailJudge maliciousness score (1-10)
AI summaryThe researchers propose the HASTE (Hard-negative Attack Sample Training Engine) framework, which iteratively generates highly evasive prompts to continuously harden LLM defenses and guardrails against prompt attacks. Experiments show that hard-negative mining can bypass baseline detectors, reducing malicious prompt detection by approximately 64%; however, when combined with retraining the detection model, it optimizes prompt detection performance with fewer iterations than baseline strategies. The framework does not depend on specific synthetic data generation methods, can be generalized to evaluate prompt injection detection effectiveness, and supports both active stress testing and passive coverage completion for detection.

The researchers propose the HASTE (Hard-negative Attack Sample Training Engine) framework, which iteratively generates highly evasive prompts to continuously harden LLM defenses and guardrails against prompt attacks. Experiments show that hard-negative mining can bypass baseline detectors, reducing malicious prompt detection by approximately 64%; however, when combined with retraining the detection model, it optimizes prompt detection performance with fewer iterations than baseline strategies. The framework does not depend on specific synthetic data generation methods, can be generalized to evaluate prompt injection detection effectiveness, and supports both active stress testing and passive coverage completion for detection.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    HASTE uses replaceable generation and fuzzing to mine hard negatives, then retrains the prompt detector.

    How to continuously generate adversarial prompts that bypass the current detector and use them at runtime to strengthen detection of prompt-based attacks.

    • Scenario: The authors argue that the input space of large models is theoretically infinite, that trusted and untrusted inputs are both processed as natural language, and that maliciousness has no closed-form judgment; defenses therefore need to be as adaptive as prompt attacks. The authors also note that zero-day or newly merged sparse behaviors need rapid adaptation before manual rule updates.
    • Existing gaps: The authors say prevention and detection have progressed, but scalable, adaptive defenses are still lacking. Detection performance is tightly coupled to the training distribution; the analyses the authors cite say detection models often struggle on emerging or out-of-distribution attacks relative to the original training data.
    • Approach assumption: Treating adversarial prompts that continuously bypass the current detector as hard negatives and injecting them into subsequent training can improve detection and increase attack diversity in a closed loop. The authors say the process is not tied to any one synthetic-data method.
    • Proposed in this paper: HASTE (Hard-negative Attack Sample Training Engine). On the proactive side, developers use it to stress-test prompt-injection detection; on the reactive side, it imitates newly observed attack types so the optimized detection model can recognize them.
    • Threat model:
      • Goal: On the adversarial side, malicious prompts should be consistently misclassified by the current detector (hard negatives); on the defensive side, detection of such prompts should improve.
      • Knowledge: The paper does not state white-box, black-box, or gray-box. The closed loop uses the detector's misclassifications to select samples for reinjection.
      • Capability: Generates from seed adversarial prompts, mutates them, and mixes hard negatives in by ratio; can also imitate newly observed attack types. The authors say they do not provide the specific generation prompts.
      • Victim system: Malicious-prompt detection models in LLM applications, before or in parallel with inference. In the experiments, the model retrained and scored is ProtectAI's DeBERTa detector.
  2. What related research exists?

    The authors distinguish HASTE from embedding-space negative mining, GPTFuzzer, and detection evaluations without a taxonomy.

    The paper organizes related work by taxonomy, hard-negative mining, defense techniques, and benchmarks, and uses Base and an unretrained detector as controls in experiments.

    Prompt and attack taxonomies

    • Existing taxonomies: Schulhoff et al. (2024) categorize prompting techniques; Liao et al. (2025) and Chowdhury et al. (2024) survey attacks and defenses; Rossi et al. (2024) covers only prompt injection. Reference [11] separates functional impact and technique into two axes.
    • Classes used in this paper: The authors choose role play, objective manipulation, obfuscation, and other, to evaluate generation methods and detection coverage. The authors say the seed set contains no repeated tokens, but the framework can swap in any taxonomy.

    Synthetic data and hard negatives

    • Embedding-space mining: FaceNet (Schroff et al., 2015) and Musgrave et al. (2020) do hard or semi-hard mining on continuous embeddings. The authors note this differs from discrete instruction-style prompts.
    • GPTFuzzer: Mutates prompts and uses a judge model to keep high-success variants, aiming to improve jailbreak success against base-LLM guardrails. The authors note it lacks a hard-negative closed loop, taxonomy coverage, and cross-iteration temporal evaluation.
    • Adjacent uses: Defensive Distillation (Papernot et al., 2016) augments training with adversarial perturbations; Bartolo et al. (2021) and Qiao et al. (2023) use hard negatives in question answering and knowledge graphs, respectively. The authors note neither has multi-round hard-negative mining with taxonomy classes.

    Detectors, guardrails, and benchmarks

    • Detectors: LlamaGuard classifies by policy; ProtectAI DeBERTa is fine-tuned on injection and jailbreak corpora; ToxicDetector trains an MLP on internal-layer embeddings. The analyses the authors cite say these models often struggle on emerging or out-of-distribution attacks.
    • Guardrails and benchmarks: NeMo Guardrails (Rebedea et al., 2023) and similar are described as multi-layer controls that can be proactive or reactive. JailbreakBench, HarmBench, and JailbreakEval focus mainly on attack success or refusal. The authors say that without a taxonomy, it is hard to explain detector behavior by attack family.

    Experimental baselines and data

    • Controls: Base does only generation, without hard-negative mining or fuzzing; the detector baseline is protectai/deberta-v3-base-prompt-injection without retraining in the first round. There are also semantic, syntactic, format, and all fuzzing variants.
    • Data: Seeds come from internal and public adversarial prompts, with a separate corpus for benign samples. The paper mentions JailbreakBench and others but does not report experimental results on those benchmarks.

    The authors say that, to their knowledge, recent LLM attack surveys do not describe an iterative, taxonomy-aware, generation-driven hard-negative mining framework for prompt-injection detection. HASTE is positioned as an extension that combines generation, fuzzing, taxonomy, and temporal retraining.

  3. How does the paper address this problem?

    The closed loop sequentially collects, generates, reviews, fuzzes, and balances, with retraining at rounds 5 and 10.

    HASTE chains generation, review, fuzzing, and retraining into a closed loop of replaceable components: misclassified samples return to the next round, and the detector is updated at rounds 5 and 10.

    Setup and hold-out set

    • Object: The prompt-based attack detector is what is optimized, not the protected generation model directly. The technique categories are role play, objective manipulation, obfuscation, other. The authors state that the harm domains correspond to OWASP and others, but details are out of scope for this paper.
    • Hold-out: Before experiments, an evaluation set is set aside and does not participate in fuzzing, synthesis, or hard-negative mining. The detector's performance after retraining is measured against this out-of-loop set.
    • Hard samples: Both false negatives and false positives can be re-injected. In this paper's experiments, the Seed:HM ratio controls the amount of hard negatives used.

    Collection and generation

    • Seeds: Sourced from wild jailbreaks, public benchmarks, internal discoveries, and CTF-style challenges, deduplicated and labeled according to a taxonomy. Figure 2 shows the seed tactic distribution; the main text does not give counts per category. IV-B states seeds are approximately 4,500, with 3,500 used for iterative generation and 1,000 as hold-out.
    • Generation: Pluggable. This paper uses G1 and G2, which differ mainly in the prompt given to the model; the authors state the prompts are not provided to avoid misuse, and that the two are only to demonstrate the evaluation pipeline, not to claim novelty in generation prompts. Systematic comparison of different prompts is out of scope.
    • Implementation parameters: Samples are drawn from seeds, and the model expands or mutates them with different roles and styles, outputting 1 synthetic sample per run. The generation backbone is GPT-4o. Each run generates 500 samples, distributed across the four attack categories.

    Review and refinement

    • Review: Synthetic prompts are first given to a model to obtain a response, then the prompt-response pair is given to a reviewer. The responder is GPT-4o; the reviewer is usail-hkust/JailJudge-guard, scoring 1–10 with a rationale. A score of 1 includes both benign prompts that should not elicit malicious responses and clearly malicious prompts that are immediately rejected, because a refusal is treated as a benign response. Higher scores indicate malicious outputs that were not blocked.
    • Threshold: In the Base data, 65% of samples in the first round score 1, and III-C conservatively sets the threshold to 2. The same section states that changing the threshold, target model, or reviewer model is left for future work. IV-B's refinement filter also writes maliciousness_threshold = 1, to retain adversarial samples of varying severity. The paper does not explain how these two thresholds are used together.
    • Fuzzing: Optional. Semantic changes wording while preserving meaning; the experiment uses humarin/chatgpt_paraphraser_on_T5_base. Syntactic changes case, spaces, and punctuation; the experiment uses replacement, 5% mutation. Format places the prompt into other structures; III-D gives examples JSON, YAML, Markdown, XML, IV-B writes YAML, Markdown, plaintext, and Table I's format variants write markdown. When enabled, benign samples are also fuzzed to prevent the model from associating fuzzing features with a particular label.

    Balancing, training, and configuration

    • Balancing: The generation-to-refinement stage only expands malicious behavior. This stage samples an equal number from approximately 40,000 deduplicated benign samples based on the number of effective malicious samples in the current round, yielding 50/50. GPT-4o labels with a fixed taxonomy prompt. Then an 80:20 stratified split is made.
    • Training: The classifier is protectai/deberta-v3-base-prompt-injection. The first round does not retrain. Retraining occurs at rounds 5 and 10, denoted M5 and M10, then evaluated on the hold-out set. Misclassified samples on the in-loop test split return to generation and refinement.
    • Configuration as ablation: In Table I, Base is Seed:HM = 5:0, no fuzzing. HM-Max is 0:5, where the next round's seeds are only hard negatives found by the classifier. HM-Bal is 3:2. Sem, Syn, Form, All add the corresponding fuzzing. The authors state that turning off fuzzing removes Refinement, and Base removes Hard-Mining. In Table I, Base+Syn, Base+Form, and Base+All have 5 iterations; the rest have 10.
  4. What experiments did the paper conduct?

    Without retraining, in-loop HM-Max+Sem is 31.76% at It10; out-of-loop HM-Bal+All is 94.44% at M10.

    Experimental setup

    • Detector: protectai/deberta-v3-base-prompt-injection. Used as-is in the first round; retrained at rounds 5 and 10 as M5 and M10.
    • Other models: GPT-4o for generation and labeling; usail-hkust/JailJudge-guard for judging; humarin/chatgpt_paraphraser_on_T5_base for semantic fuzzing. The paper does not report the number of repetitions.
    • Data scale: Seeds are about 4,500 (3,500 for iterative generation, 1,000 held out); benign samples are about 40,000; each run has 500 samples across four types. Split is 80:20. Per-type counts are not given.
    • Configurations: Table I includes Base, semantic/syntactic/format/All, and HM-Max, HM-Bal with Sem/All. V-A omits Base+Syn and Base+Form because Base+Sem bypasses more strongly.
    • Metrics: Iteration accuracy is the accuracy of the static detector on the in-loop test split before retraining; lower means the synthetic prompts bypass the detector more (Tables II, III). H accuracy is the accuracy on the out-of-loop evaluation set after retraining (Table IV). Tables V and VI are out-of-loop classification accuracies after what the text calls round-5 retraining.
    • Judging: JailJudge scores range 1–10. The threshold is 2 in III-C; IV-B writes the refinement threshold as 1. The paper does not report judge–human agreement.

    Main results

    The table below shows out-of-loop H accuracy (Table IV). M0 is 82.12% for all configurations. HM-Max+All is omitted (M5 92.93%, M10 93.03%).

    ConfigurationM5M10
    Base81.06%92.80%
    Base+All92.22%93.13%
    Base+Sem93.94%94.14%
    HM-Bal92.82%93.74%
    HM-Bal+All93.74%94.44%
    HM-Bal+Sem93.94%93.84%
    HM-Max93.62%93.96%
    HM-Max+Sem93.23%94.24%
    • Convergence claims: The authors say Base improves little at M5 and only matches the gains of hard-negative mining by M10; in the table, Base's M5 is 81.06% and M0 is 82.12%. The authors also write at least 5 times the iterations, saving half the rounds, 50% faster convergence, and at least a 50% reduction in the iteration loop. The abstract says fewer loops. The paper does not report statistical tests for these comparisons.
    • M5 vs. M10: The authors say most of the gains for the six hard-mining configurations occur at M5, with little added at M10. In the table, the highest M10 is HM-Bal+All at 94.44%; HM-Bal+Sem goes from 93.94% to 93.84%. The authors say HM-Bal+All has the highest H accuracy, even though its iteration accuracy across rounds is only mid-range.
    • Training signal: The authors say Base+Sem and HM reach similar final accuracies but with different signals. In Table III, Base-Sem (i.e., Base+Sem) is 66.16% at It10, and HM-Max+Sem is 31.76%. The authors believe the latter returns to high accuracy even on harder samples, making its robustness more durable. The conclusion is written as 31% vs. 66%.

    Bypass without retraining

    • Fuzzing: In Table II, in-loop, It0 is 95.91% for all. Base+Sem is 65.26% at It2 and 65.87% at It5; the authors say semantic rewriting best produces malicious prompts that bypass the detector. Base ranges from 95.54% to 95.73% across It1 to It5. Base+Syn, Base+Form, and Base+All are 71.62%, 71.23%, and 71.08% at It5. The authors say peaks mostly occur at the second round and suggest syntactic and format fuzzing may offset semantic fuzzing; this interaction is beyond the scope of the paper.
    • Hard mining: Table III, without retraining, in-loop. HM-Max+Sem is 37.00% at It1 and 31.76% at It10. The authors say the main gains occur within one round, with only about a 5% further drop by round 10, and that strategies plateau almost after the first round. Base is 93.49% at It10, HM-Max 55.21%, HM-Bal 83.54%, Base-All 71.81%, HM-Bal+All 70.47%, and HM-Max+All 61.35%. The authors say any degree of hard-negative sampling is lower than the corresponding Base, Base-Sem, or Base-All. The abstract says detection drops by about 64%.
    • Sampling ratio: The authors say HM-Bal (3:2) is 81.62% at It1, proportional to Base's 95.68% at It1 and HM-Max's 58.60% at It1. Table I writes the number of iterations for Base+All as 5, while Table III still gives values through It10. The paper does not explain this discrepancy.

    Per-class accuracy

    • Table V: Out-of-loop, what the text calls after round-5 retraining. ProtectAI deberta's Benign, Obfuscation, Objective Manipulation, Other, and Role Play are 70.4%, 92.8%, 95.3%, 94.5%, and 97.6%. Relative to that row, HM-Bal and HM-Bal+All are both +19.9 on Benign, and Base is -6.9 on Benign and -1.6 on Other.
    • Author interpretation: The authors say benign improves the most, up to 19.9 percentage points; other classes improve less, but start from already high levels. The authors believe configuration differences are more comparable when there are more low-performing subclasses.
    • Table VI: Out-of-loop with All-type fuzzing. ProtectAI's five classes are 27.6%, 94.8%, 97.3%, 92.1%, and 98.4%. HM-Bal and HM-Bal+All are +62.7 on Benign and -4.1, -6.0, -10.2, and -10.2 on the four attack classes. Base+All is +59.8 on Benign and -1.0, -4.0, -4.7, and -5.1 on the attack classes. This paragraph does not separately explain these negative changes.

    Other ablations and analyses

    • Base+Syn is 71.62% at both It2 and It5, and Base+Form is 70.86%/71.23% at It2/It5 (Table II).
    • HM-Bal+Sem is 57.74%/57.18% at It1/It10 (Table III).
    • HM-Max+All is 92.93%/93.03% at M5/M10 (Table IV).
    • 65% of first-round Base samples receive a JailJudge score of 1; the threshold is 2 in III-C, and the refinement threshold is written as 1 in IV-B.
    • The authors' example 95% confidence intervals: 0.6257–0.6794 at It2 and 0.6417–0.6757 at It5.
    • Figure 9 has no numbers in the text; the authors say a false positive has different SHAP after fuzzing, with uppercase in words, unusual spaces, and special characters appearing most sensitive.
  5. What are some points that can be further explored?

    The authors plan to add multi-turn and submodule evaluations and believe the current evaluation may not be sensitive enough.

    Limitations and future directions noted by the authors

    • Evaluation sensitivity (VI): When final accuracies are close, the authors believe the current benchmark may not be sensitive enough to capture the deeper robustness brought by harder samples.
    • Interpretability (VI): SHAP or attention visualization could strengthen the generation component and benefit classifier retraining.
    • Similarity (VI): Prompt similarity in natural language or embedding space could guide hard-negative selection; the authors point to example-selection practices in knowledge graphs.
    • Multi-turn (VI): Extending the framework to multi-turn prompt-response, iteratively refining entire sequences, so the classifier can target turning points rather than only single prompts.
    • Submodules (VI): The authors plan to evaluate submodules more systematically, including but not limited to fixed mutation rates, replacement and Markdown fuzzing, changing the LLM-as-a-Judge threshold, and evaluating multiple base classifier architectures.
    • Overall direction (VI): Extending in both directions—toward framework extensions (including more evaluation metrics) and finer submodule effects—to cover more adversarial behaviors, produce harder-to-detect prompts, and understand which prompts become potent hard negatives.

    Experimental coverage

    • The detector whose scores are reported is protectai/deberta-v3-base-prompt-injection; retraining points are rounds 5 and 10 (IV-B, Table IV).
    • GPT-4o is used for generation and labeling, usail-hkust/JailJudge-guard for judging, and humarin/chatgpt_paraphraser_on_T5_base for semantic fuzzing (IV-B).
    • Seeds are about 4,500, of which 1,000 are held out; benign samples are about 40,000; each run has 500 samples across four attack types. Iteration accuracy is on the in-loop test split; H accuracy and Tables V and VI are on the out-of-loop set.
    • Table I includes Base, semantic/syntactic/format/All, and combinations of HM-Max, HM-Bal with Sem and All. V-A states that subsequent comparisons no longer include Base+Syn and Base+Form.
    • The paper gives one SHAP example (Figure 9) and one set of 95% confidence interval examples. It does not report the number of repetitions, per-class sample sizes, or agreement between judge scores and human judgments.
  6. Summarize the main content of the paper

    HASTE retrains the detector with hard negatives; without retraining, HM-Max+Sem's It10 is 31.76%.

    HASTE is a closed-loop hardening framework on the detector side: it continuously constructs adversarial prompts that bypass the current detector and uses them to update the malicious-prompt classifier.

    • Problem: The prompt space is unbounded, detection is tied to the training distribution, and sparse new attacks are hard to cover in time with manual rules.
    • Pipeline: GPT-4o expands the training portion of about 4,500 seeds; JailJudge filters on a 1–10 scale; optional semantic, syntactic, or format fuzzing. After balancing with an equal number of benign samples, ProtectAI DeBERTa is fine-tuned. Hard negatives return to the next round at 0:5 or 3:2. The 1,000 held-out samples do not enter the loop.
    • Bypass: Without retraining, in-loop, HM-Max+Sem is 37.00% at It1, 31.76% at It10, and 95.91% at It0 (Table III). Base-Sem is 66.16% at It10. The authors say in the abstract that detection drops by about 64%, and in the conclusion write it as 31% vs. 66%.
    • Retraining: Out-of-loop H accuracy is 82.12% at M0. HM-Bal+All is 94.44% at M10, Base+Sem 94.14%, and Base is 81.06% at M5 and 92.80% at M10 (Table IV). The authors say hard mining obtains its main gains in fewer iterations.
    • Classes and conclusions: After round 5, out-of-loop Benign changes by +19.9 percentage points for HM-Bal relative to 70.4% (Table V). Under All-type fuzzing, ProtectAI's Benign is 27.6%, with several attack classes changing negatively (Table VI). The authors say this prototype enhances prompt-based attack detection through fuzzing, hard-negative mining, and temporal sampling.
Read originalarxiv.org