CorrectGuard proposes a view-free correctness estimation framework for black-box safety guardrailsCorrectGuard: Eyes-Off Correctness Estimation for Black-Box Security Guardrails
CorrectGuard uses an external model to estimate whether black-box guardrail decisions are correct; on Granite, ICL's LODO macro-average improvement is +0.258.
- Offline benchmarks for black-box safety guardrails may not represent the production distribution, and privacy constraints often prevent inspection of production inputs, sometimes preventing the model from seeing the original text or invertible embeddings. Operators can see decisions but cannot directly judge whether they are correct.
- CorrectGuard trains an independent correctness model on labeled eyes-on data from other distributions, without reading the guardrail's internals, to estimate whether decisions are correct. Human eyes-off can use text or embeddings; machine eyes-off uses BinaryShield fingerprints. LODO is run on 13 datasets, comparing ICL, embedding MLP, and LoRA fine-tuning.
- Across three open-source guardrails, Granite's ICL macro-average lift is +0.258 (Table II). The discussion states the best ranking reduces AURC from 0.330–0.438 to 0.170–0.217. The authors state calibration degrades under shift, and results from binary fingerprint experiments are mixed.
- The authors note that ICL uses only GPT 5.4, fine-tuning uses small and medium models, the guardrails are open-source proxies rather than closed-source systems, and LoRA is used; BinaryShield uses only sparse vectors, with utility demonstrated within the guardrail scope. The experiments cover 3 guardrails, 13 datasets, and LODO; the paper does not report the number of repetitions or calibrated metrics.
- Evaluated models
- Granite Guardian 3.1 2BQwen3Guard 8BGPT-OSS-Safeguard-20BGPT-5.4Phi-4-14BQwen2.5-7BLlama-3.1-8B
- Benchmarks
- advbenchharmbenchwildjailbreakbipiabipia_codespikeeinjecagentllmailsafeguarddeepsetgandalfpiguardopenorca
- Metrics
- Corr. acc.∆F1wrongECEAUROCAURCcoverageselective risk
The researchers propose CorrectGuard, a view-free correctness estimation framework for black-box safety guardrails, to evaluate guardrail performance in two scenarios: human-unviewable user inputs and machine-unviewable inputs. The method trains an independent model evaluator only on labeled viewable data to predict whether the guardrail's decision on inaccessible inputs is correct, without accessing the guardrail internals. The study evaluates three types of correctness models—in-context learning, embedding vectors, and fine-tuning—using leave-one-dataset-out across 13 safety datasets covering harmful content, jailbreaks, prompt injection, and extraction, treating open-weight guardrails uniformly as black boxes. Results show that in-context learning-based correctness classifiers significantly improve error identification in both scenarios, with macro accuracy improving by up to 25 percentage points, and fine-tuning-based methods improving by nearly 15 percentage points, but with notable variation across guardrails and held-out datasets.
Related events and news
1 events · 1 news mentions
News that mentions this paper
Adversa AI 11月精选24项GenAI安全资源
- Adversa AIcites the paper's id or linkGenAI 安全资源精选(2026 年 11 月)
CorrectGuard: eyes-off correctness estimation for black-box security guardrails
Paper analysis
What problem does this paper attempt to solve?
Estimating whether black-box safety guardrail decisions are correct when production inputs cannot be inspected.
How to determine whether a black-box safety guardrail's decision is correct when production inputs cannot be manually inspected and the guardrail's internals cannot be read.
- Scenario: The authors state that AI services rely on black-box guardrails to detect harmful content, jailbreaks, and prompt injection, but offline benchmarks vary with dataset, attack strategy, and application scenario, and may not represent the production distribution. Privacy policies, contracts, and zero-retention constraints often prohibit manual inspection of production inputs.
- Gap: The authors state that commercial guardrails mostly give only discrete decisions, without internal state or calibrated confidence. Existing online audits use researcher-constructed probes, characterizing a controlled probe distribution rather than shifted production traffic.
- Access settings: Human eyes-off prohibits humans from viewing inputs, while the model can still use inputs at inference time; machine eyes-off additionally prohibits natural language and dense representations that can be inverted to recover the original text. The evaluator is trained only on labeled eyes-on data from other distributions.
- CorrectGuard: An independent model estimates the probability that a guardrail decision is correct, without accessing the guardrail's internals. The authors use it to examine error identification on unseen distributions, discrimination and calibration under shift, ranking, and decision abstention.
What related research exists?
Related work is divided into guardrail evaluation, failure prediction, and calibration; the authors position this paper on guardrail estimation without target-domain labels.
Guardrail evaluation and monitoring
- Content and safety guardrails: The authors cite OpenAI Moderation, Azure AI Content Safety, Llama Guard, and Meta Prompt Guard as examples of moderation or safety guardrails, and state that such systems are typically evaluated offline on labeled benchmarks.
- Offline benchmarks: GuardBench, WildGuard, HarmBench, JailbreakBench, and others are used to show that guardrail performance varies with evaluation distribution, attack type, and application scenario. The authors state this limits the transfer of benchmark results to production environments.
- Online probes: Dai et al. and related audits repeatedly probe online black-box systems, or use researcher-constructed probes. The authors state these works characterize a controlled probe distribution; this paper studies distribution shift when labels are unavailable and humans cannot inspect inputs.
Failure prediction and correctness models
- Internal model signals: The authors state that methods using output probabilities or hidden representations to estimate correctness or uncertainty typically require gray-box or white-box access. Black-box routes elicit confidence, multiple samples, or measure answer consistency.
- External proxy models: Shrivastava et al. and Kapoor et al. use proxy or external models to predict whether a target model is correct. Related work is only cited, with no numerical comparison to this paper.
- Xiao et al.: Train generalized correctness models on question-answer pairs across multiple LLMs that transfer across target models, and report worse calibration under shift and benefit from target-domain data. The authors state this paper instead turns to safety and safety guardrails, with no target-domain labels for training or recalibration, and the evaluator needs no privileged access to the guardrail.
Calibration and learned evaluators
- Confidence calibration: Existing work calibrates LLM confidence using token probabilities, hidden representations, verbalized confidence, or additional training.
- Verifiers and LLM judges: Learned verifiers and LLM judges are used for correctness or answer-quality evaluation in selection, ranking, or reinforcement learning. The authors state this paper uses an external evaluator to estimate whether a fixed black-box guardrail's decisions are correct under distribution shift; systematic error in correctness probabilities feeds directly into overall performance estimates.
Baseline methods and benchmarks
- Experimental comparison: The accuracy baseline is "always trust the guardrail," whose accuracy equals the guardrail's own accuracy. The abstention experiments additionally use an unranked selector, whose risk equals the error rate at full coverage. Data are the 13 datasets in Table I, and the protocol is leave-one-dataset-out (LODO).
The authors position this paper as guardrail correctness estimation under asymmetric access: without guardrail internals and without labels on the target distribution.
How does the paper address this problem?
CorrectGuard uses an external correctness model, learned from eyes-on data, to estimate whether decisions on unviewable inputs are correct.
The overall idea is CorrectGuard: an independent correctness model (CM) trained only on labeled eyes-on data from other distributions, which then estimates whether black-box guardrail decisions are correct on inputs that are human-unviewable and sometimes machine-unviewable.
Problem formulation
After deployment, guardrails are evaluated under eyes-off: humans cannot view user prompts and AI responses; in some settings, machines also cannot view the original text. Input x has binary safety label y, and the black-box guardrail gives ŷ = g(x). Decision correctness is defined as C = 1{y = ŷ}. At inference, the evaluator sees (x, ŷ) or a privacy-transformed t(x) and estimates cθ(x, ŷ) = P(y = ŷ ∣ x, ŷ). cθ is learned entirely from external labeled data. y = 1 indicates the input should be flagged by the guardrail.
Data and LODO
- 13 datasets: Table I covers harmful content, jailbreaks, indirect prompt injection, information extraction, and benign or mixed inputs. Larger datasets are sampled to 6,000 entries and fixed; those with fewer than 6,000 use all entries. #Records in the table is the number used in experiments.
- Correctness tuples: Native annotations are mapped to binary safety labels. Each guardrail runs on all inputs, saving (x, ŷ, c), so each guardrail has one correctness dataset (Figure 1).
- Input representations: Text x, or OpenAI text-embedding-3-large embeddings. The machine eyes-off ablation uses BinaryShield: first remove PII, then embed, binarize, and add noise, yielding binary vectors with differential-privacy-style protection.
- LODO: Each fold completely holds out one dataset for evaluation; the remaining datasets form the source pool for training, optimization, and validation, then the held-out set rotates. The authors state this avoids same-dataset overlap inflating estimates.
Guardrails and three types of CMs
Three open-source guardrails are treated as black-box proxies: Granite Guardian 3.1 2B, Qwen3Guard 8B, and GPT-OSS-Safeguard-20B. CMs receive only x and ŷ. CMs are trained separately per guardrail because the distribution of correct and incorrect decisions differs on the same input.
- ICL: All use GPT-5.4, with 10 labeled examples per fold drawn only from source data. Variants are fixed instructions with examples balanced by outcome type, DSPy optimizing both instructions and examples, and Hybrid (fixed instructions, DSPy-optimized examples). The source pool is split into 65% example selection, 20% prompt optimization, and 15% validation. Text decisions are parsed into binary predictions; this endpoint does not provide token probabilities for these decisions. Appendix A gives full prompts and states temperature 1.0 and a maximum of 5 completion tokens.
- Embedding MLP: Dense-MLP uses 3,072-dimensional embeddings; Binary-MLP uses 3,072-bit fingerprints, sign-quantized and noised with α = 2. PII is removed before fingerprinting using Microsoft Presidio with language detection. Representations are concatenated with the guardrail's binary prediction. Within source datasets, 80% fit and 20% validation. Hidden layers are 256 and 128, ReLU, dropout 0.2. AdamW, learning rate 10−3, weight decay 10−4, batch size 256, up to 50 epochs; early stopping on validation Brier score with patience 5. On the validation set, a threshold between 0.01 and 0.99 is selected to maximize error-detection F1.
- Fine-tuning: LoRA on Qwen2.5-7B, Llama-3.1-8B, and Phi-4-14B. Input is x and ŷ, target is whether the decision is correct. At inference, logits for tokens corresponding to "correct" and "incorrect" are normalized. Source pool is split 60% fine-tuning, 15% validation, 25% post-hoc calibration. LoRA r = 16, α = 32, dropout 0.05, learning rate 2×10−5. Calibration fits temperature scaling, Platt scaling on raw log odds, and isotonic regression only on the calibration split, then applies them unchanged to unseen test sets. The authors state scale choices relate to available compute and ongoing serving costs.
Ranking and abstention computation
- Correctness lift: CM correctness minus the correctness of "always trust the guardrail"; the latter equals guardrail accuracy, denoted ∆.
- Quintile ranking: Each held-out set is split into five groups by predicted correctness probability; the difference in actual correctness between the highest and lowest groups indicates whether ranking is useful.
- Abstention: If predicted correctness probability is at least τ, accept the decision; otherwise abstain. Retain by descending score; coverage is the retention ratio, selective risk is the error rate of the retained set, and AURC is the discrete area under the risk–coverage curve. The authors state that lower AURC means low scores concentrate more on actually incorrect decisions.
What experiments did the paper conduct?
Under LODO, ICL macro-average lift on Granite is +0.258; ranking reduces AURC, but calibration remains biased.
Experimental setup
- Guardrails: Granite Guardian 3.1 2B, Qwen3Guard 8B, GPT-OSS-Safeguard-20B, all treated as black-box proxies; CM receives only inputs and binary decisions, and is trained separately per guardrail. Table II accuracies are 0.58, 0.68, 0.69; FPRs are 0.10, 0.07, 0.06; FNRs are 0.59, 0.46, 0.49.
- Data: Table I lists advbench 520, harmbench 400, wildjailbreak 6,000, bipia 6,000, bipia_code 6,000, spikee 986, injecagent 1,054, llmail 6,000, safeguard 6,000, deepset 546, gandalf 999, piguard 6,000, openorca 6,000. Categories are Harmful, Jailbreak, Indirect prompt injection, Extraction, Mixed, Benign. 6,000 is a fixed sampling cap.
- Protocol: LODO, leaving out one dataset per fold. Macro-averaging weights each dataset equally regardless of size. ICL source pool is 65/20/15; embedding models are 80/20 within source datasets; fine-tuning is 60/15/25, with a separate calibration split.
- CM: ICL on GPT-5.4, DSPy hybrid, DSPy pure; Dense MLP and Binary MLP; LoRA fine-tuned Qwen2.5-7B, Llama-3.1-8B, Phi-4-14B. Table II writes the latter three as Qwen-7B, Llama-8B, Phi-4-14B. Embeddings come from text-embedding-3-large.
- Metrics: Corr. acc. is the accuracy of judging whether a guardrail decision is correct; Δ is relative to "always trust the guardrail." Pwrong, Rwrong, F1wrong target incorrect decisions. Probability analysis uses 0.5-threshold accuracy, ECE macro-averaged over 10 equal-width bins per fold, and AUROC macro-averaged only over held-out sets containing both correct and incorrect decisions. Abstention uses coverage, selective risk, and AURC. ICL is parsed from text; the paper does not use a separate review model.
- Not specified: The paper does not report the number of repetitions, nor agreement with human judgments.
Main results
The table below gives LODO macro-averaged accuracy, with Δ and the number of folds with Δ>0 in parentheses, per Table II. Decimals in column headers are that table's guardrail accuracies.
| CM | Granite (0.58) | Qwen3Guard (0.68) | GPT-OSS (0.69) | | ICL | 0.840 (+0.258, 11/13) | 0.761 (+0.085, 6/13) | 0.815 (+0.125, 10/13) | | DSPy hybrid | 0.825 (+0.243, 11/13) | 0.789 (+0.112, 6/13) | 0.827 (+0.136, 9/13) | | DSPy pure | 0.819 (+0.237, 10/13) | 0.777 (+0.101, 8/13) | 0.811 (+0.121, 10/13) | | Dense MLP | 0.726 (+0.144, 9/13) | 0.706 (+0.030, 6/13) | 0.703 (+0.012, 7/13) | | Binary MLP | 0.591 (+0.009, 6/13) | 0.671 (−0.005, 5/13) | 0.721 (+0.031, 7/13) | | Qwen-7B | 0.72 (+0.132, 8/13) | 0.697 (+0.017, 7/13) | 0.714 (+0.021, 7/13) | | Phi-4-14B | 0.734 (+0.148, 9/13) | 0.761 (+0.082, 8/13) | 0.762 (+0.068, 7/13) | | Llama-8B | 0.643 (+0.060, 8/13) | 0.652 (−0.023, 7/13) | 0.684 (−0.009, 9/13) |
- The authors state that external CMs can identify errors on unseen distributions, but this depends on the protocol and the upstream guardrail. The Figure 2 caption states that lift decreases as the guardrail becomes stronger, with ICL giving the largest gain. The text also gives an ICL lift range of +0.101 to +0.258, and a protocol-level average ICL lift of +15.8 percentage points.
- The authors state that DSPy hybrid has the highest accuracy on all three guardrails. In Table II's Granite column, ICL is higher than DSPy hybrid, inconsistent with the latter claim. The authors state that the two methods show no improvement on llmail and openorca; in Table II, 11/13 appears only for Granite's ICL and DSPy hybrid, and the paper does not give per-guardrail Δ for these two datasets.
- The abstract writes up to 25 percentage points under both eyes-off settings and nearly 15 percentage points for fine-tuning. In Table II, the largest positive lift comes from text-based ICL and fine-tuning, not Binary MLP. The introduction states that machine eyes-off (traditional classifiers fed only binary fingerprints) gives mixed results; in Table II, Binary MLP is not positive for every guardrail.
Calibration and discrimination
- What was measured: Table III reports accuracy at a 0.5 threshold, ECE, and AUROC for raw correctness probabilities. ECE is computed with 10 equal-width bins per fold, then macro-averaged over 13 datasets. AUROC is macro-averaged only over held-out sets containing both classes of decisions. ICL is not in this analysis. Always correct sets the correctness probability of every decision to 1.
- Results: The authors state that the best ECE is 0.206 for Phi-4 with Granite. In Table III, 0.206 is Phi-4 with GPT-OSS Safeguard 20B; Phi-4 with Granite Guardian 3.1-2B has an ECE of 0.230. The table's highest AUROC is Phi-4 against GPT-OSS at 0.781, and the lowest is Llama-3.1-8B against Qwen3Guard 8B at 0.554. Llama-3.1-8B's accuracy on GPT-OSS is 0.684, below Always correct's 0.693; on Qwen3Guard, Llama-3.1-8B is 0.650 and BinaryShield MLP is 0.675, both below 0.679.
- Authors' interpretation: The authors state that every CM outperforms Always correct and that none is well calibrated under shift, with 0.206 still having a 20-percentage-point mismatch between confidence and empirical accuracy; they also state that AUROC is high across CMs and guardrails. The first two statements are inconsistent with some rows of Table III. Table III's Always correct accuracies are 0.693, 0.583, 0.679, differing in decimal places from Table II's guardrail accuracies 0.69, 0.58, 0.68; the paper does not explain this.
Ranking utility
- What was measured: Each held-out set is split into five roughly equal parts by correctness probability, comparing the difference in actual accuracy between the highest and lowest parts, ΔQ5−Q1. In Figure 3, each subplot is a guardrail–CM pair; the x-axis is five bins from low to high score, and the y-axis is the percentage of decisions that are actually correct. The following numbers come from the text's description of Figure 3; the text does not list coordinates per bin.
- Results: The authors state that all pairs show increasing curves, with 9 of 15 monotonically increasing. The authors state that Phi-4 increases monotonically on all three guardrails, with ΔQ5−Q1 around 37% when paired with GPT-OSS; Embedding MLP's average ΔQ5−Q1 is about 28 percentage points, and Phi-4's about 29 percentage points.
- Authors' interpretation: The authors state that embedding MLP already has enough ranking signal to support correctness estimation under compute constraints. This analysis does not include ICL.
Decision abstention
- What was measured: Test samples from the 13 held-out sets are pooled and retained in descending order of predicted correctness probability. Figure 4 shows risk–coverage curves, including an unranked selector; the curves start from the whole-threshold operating point at 0.5% coverage. Lower AURC is better.
- Results: The discussion states that the best ranking reduces AURC from an unranked baseline of 0.330–0.438 to 0.170–0.217, retaining 23.8–36.1% of decisions at no more than 10% observed risk. The abstract writes the baseline 0.33–0.44 reduced to 0.17–0.22, retaining 37.5–52.0% at 15% observed risk. The authors state that if the production guardrail is Qwen3Guard, a Qwen correctness model can let about 36% of decisions pass directly at 10% risk and retain 60% at 20% risk. The authors state that BinaryShield MLP reduces baseline AURC by 18–35%, but at 10% risk retains only 14.4% of GPT-OSS decisions, and under 2% for Granite and Qwen3Guard.
- Authors' interpretation: The authors state that Qwen is the strongest selector; Phi-4 against GPT-OSS has an overall-best AURC reduction of 18–35%, and the paper does not give the original AURC value for that reduction. The authors state that Embedding MLP has the best AURC when paired with Granite, but is worse than fine-tuned models on GPT-OSS, and that AURC alone should not be the only consideration. The authors believe binarization discards magnitude information, and direction information may suffice for ranking but not for abstention. The authors state that absolute probabilities should not be taken directly as production accuracy.
Other ablations and analyses
- Among all F1wrong values in Table II, the highest is Granite's ICL at 0.743, and the lowest is Qwen3Guard's Llama-8B at 0.180.
- The text reports an ICL lift range of +0.101 to +0.258; the protocol-level average ICL lift is +15.8 percentage points.
- The authors state there is no improvement on llmail and openorca; the paper does not give per-dataset Δ for these two held-out sets.
- The methods section fits temperature, Platt, and isotonic, but the results section reports only raw probabilities; the paper does not report calibrated ECE or accuracy.
- For Figure 3, the authors state Embedding MLP's average ΔQ5−Q1 is about 28 percentage points and Phi-4's about 29 percentage points.
- The introduction states that machine eyes-off has modest accuracy gains and ranking utility; in Table II, Qwen3Guard's Binary MLP Δ is −0.005.
What are some points that can be further explored?
The authors note that ICL uses only GPT 5.4, fine-tuning uses small and medium models, and no true closed-source guardrails are used.
Limitations and future directions noted by the authors
- ICL base: All ICL experiments use the same base LLM, namely GPT 5.4 (Section VI).
- Fine-tuning scale: All fine-tuning experiments use small or medium LLMs, which the authors attribute to compute constraints (Section VI).
- Guardrail type: Use proxy models of black-box models, not actual closed-source guardrails (Section VI).
- LoRA: Using LoRA is listed as a limitation; the authors plan to compare with full fine-tuning in future work (Section VI).
- BinaryShield: Experiments only use sparse vectors as input. The authors plan to conduct experiments based on KNN and approximate recovery of unbinarized original text, and state that BinaryShield's authors have shown this approach to be effective (Section VI).
- Scope of application: CM's utility is demonstrated within the scope of guardrails; the authors state that a more cross-domain approach is needed to demonstrate its overall utility (Section VI).
Experimental coverage
- The tested guardrails are Granite Guardian 3.1 2B, Qwen3Guard 8B, and GPT-OSS-Safeguard-20B, 3 in total, all treated as black-box (Section III-C, Table II).
- Data consists of the 13 datasets in Table I, with the LODO protocol; larger datasets are fixed to sample 6,000 entries, and fewer than that use all entries.
- CM includes three ICL variants on GPT-5.4, Dense MLP, Binary MLP, and LoRA fine-tuning of Qwen2.5-7B, Llama-3.1-8B, and Phi-4-14B. Machine eyes-off is implemented with BinaryShield fingerprints.
- The probability analyses in Table III, Figure 3, and Figure 4 exclude ICL because the GPT-5.4 endpoint does not provide token probabilities for these judgments.
- The paper does not report the number of repetitions, agreement with human judgments, or ECE or accuracy after post-hoc calibration is applied to a held-out set.
Summarize the main content of the paper
CorrectGuard uses an external model to estimate whether black-box guardrail decisions are correct; ranking and abstention are usable, but calibration degrades under distribution shift.
CorrectGuard targets black-box safety guardrails where production inputs cannot be manually inspected and no production labels exist. It uses an external model to estimate whether each individual decision is correct, and ranks and abstains based on that.
Offline benchmarks vary with data and attacks and may not represent the production distribution; privacy constraints may also prohibit the model from viewing the original text or invertible dense embeddings. The evaluator is trained only on eyes-on annotations from other distributions and does not read the guardrail internals.
Experiments treat three open-source guardrails as black-box proxies and perform LODO on 13 safety datasets. CMs include GPT-5.4 in-context learning, an MLP on embeddings, and LoRA fine-tuning of three open-source models; machine eyes-off uses BinaryShield binary fingerprints.
- Granite Guardian-3.1-2B has guardrail accuracy 0.58; ICL LODO macro-average correctness is 0.840, with lift +0.258 (Table II). The abstract writes the highest improvement as 25 percentage points.
- On the same guardrail, Phi-4-14B has lift +0.148; the abstract writes fine-tuning improves by nearly 15 percentage points. Llama-8B has ∆ of −0.023 and −0.009 on Qwen3Guard-8B and GPT-OSS-Safeguard-20B.
- The discussion states the best ranking reduces AURC from 0.330–0.438 to 0.170–0.217; the abstract states that at 15% observed risk, 37.5–52.0% of decisions can be retained.
- In Table III, at threshold 0.5, Phi-4 on GPT-OSS has ECE 0.206. The authors state calibration degrades under shift. On Qwen3Guard, Binary MLP has ∆ −0.005.
The authors conclude that an external correctness model can expose systematic failures and support abstention without privileged access, but effectiveness varies with guardrail, training method, and held-out distribution; it is better suited for ranking and abstention than for directly estimating overall accuracy. The authors plan to release code during the review period.