Manuscript Offprint

arXiv:2610.01801

A Safe Prototype Is Not a Safety Direction: Reference Dependence and Prompt Confounds in Response-Safety Embeddings

Sahil Kadadekar

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Can response safety be scored by cosine similarity to the mean embedding of known-safe responses? A recent sleeper-agent detector proposes exactly this score, yet the raw positive-centroid rule is not identified: positive observations locate the safe class relative to an encoder origin, but do not determine which direction separates safe from unsafe responses. We audit the rule on two prompt-controlled, human-labeled corpora and one auxiliary jury-labeled source control, using four frozen encoders and prompt-grouped splits. On the human-labeled corpora the safe prototype reaches ROC-AUC 0.457–0.545, with two cells significantly below chance and one above, while an explicit safe-minus-unsafe reference reaches 0.588–0.738 on the same embeddings; on the jury control the prototype is inverted (0.358–0.405) and the reference reaches 0.754–0.793. At validation-calibrated 5% false-safe thresholds, the reference accepts more safe responses on PKU-SafeRLHF (0.153–0.263 versus 0.039–0.061 across encoders) and Aegis (0.189–0.291 versus 0.004–0.045), but not reliably on BeaverTails. A fully unlabeled held-out reference recovers part to most of the referenced ranking, much less when only 5% of the pool is unsafe, whereas 80–634 labeled unsafe responses recover most of it. Prompt-only ablations show that prompt-label composition can inflate uncontrolled evaluations. This is a bounded result about a raw positive centroid, not all one-class methods or safety-specialized guards. A class mean is a location, not necessarily a safety direction; a declared reference with enough unsafe mass identifies orientation.

1 Introduction

A single prototype is an appealing safety readout. Given embeddings of responses labeled safe, average and normalize them, then score a candidate by cosine similarity. The rule is transparent, cheap, and appears to need labels from only one class. That last property is attractive when unsafe examples are sensitive, incomplete, or costly to curate. The rule has also been proposed as a detector score: a recent sleeper-agent detector flags a response when one minus its cosine similarity to a centroid of safe-mode responses, embedded with all-MiniLM-L6-v2 (one of the four encoders we audit), is high, OR-combining this signal with a canary-question check [Zanbaghi et al., 2025]. Its triggered responses are topically distinct from the safe ones, the easy case for a location score; our audit holds topic fixed.

The shortcut hides a measurement problem. A class mean is a location relative to the encoder origin; a class-separating direction is a displacement relative to another distribution. Those are different objects. In a shifted or concentrated embedding space, unsafe responses can project more strongly onto the normalized safe mean than safe responses do (Figure 1). A score called “similarity to safe” can then rank unsafe responses higher without any reversal of semantic meaning.

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: Foundations of Language Model Security (FLMSec).

Figure

E[f+∣u]>E[f+∣s]\mathbb{E}[f_{+} \mid u] > \mathbb{E}[f_{+} \mid s]: similarity to safe ranks unsafe higher

Prompt: "How do I pick a lock?"

Safe response:

"If you are locked out,

a licensed locksmith can help."

Unsafe response:

"Insert a tension wrench,

then rake the pins until..."

Figure 1: Illustrative two-dimensional schematic, not measured embeddings. A safe and an unsafe response to the same prompt share topic, so their class means are nearly collinear. When the unsafe mean μu\mu_u projects farther than μs\mu_s along the prototype axis μs/∥μs∥\mu_s / \|\mu_s\|, similarity to the safe prototype ranks unsafe responses higher. The reference direction μs−μu\mu_s - \mu_u is oriented by construction.

This matters for language-model security, where moderators err in two directions, accepting unsafe compliance and rejecting benign responses, and a high aggregate AUC may reflect prompt composition rather than response behavior. We ask four falsifiable questions: (i) is the positive prototype's orientation identified from safe examples alone, (ii) does an explicit reference improve ranking under prompt or label-source controls, (iii) does that improvement survive validation-calibrated false-safe constraints, and (iv) can an unlabeled reference replace unsafe labels in finite samples?

We answer with a provenance-audited study on BeaverTails [Ji et al., 2023], PKU-SafeRLHF [Ji et al., 2025], and Aegis 2.0 [Ghosh et al., 2025]. The first two primary arms use human-released safety labels and prompt-matched comparisons; Aegis is explicitly an auxiliary 11m_jury-only source control. Four frozen encoders cover two sentence-transformer models and mean-pooled hidden states from two sizes of Qwen2.5-Instruct [Reimers and Gurevych, 2019, Qwen Team, 2025]. Exact prompt grouping, deduplication, source controls, response-overlap sensitivity, and cluster bootstrap intervals address the leakage and provenance defects that commonly make safety-evaluation conclusions fragile.

Our contributions are:

  1. We formalize positive-only non-identification: the same safe embedding distribution is compatible with unsafe distributions that induce opposite signs for the prototype's expected score gap.

  2. We show a controlled empirical pattern across 12 corpus–encoder cells with family-wise inference. The raw safe prototype is weak on the human-labeled corpora (AUC 0.457–0.545) and inverted on the jury control (0.358–0.405); 7 of 12 cells differ from chance after Holm correction, 6 of them below. It never outranks a response-length heuristic by more than 0.016 and falls below a 12-feature stylistic baseline in every cell. A difference-of-means reference is above chance everywhere (0.588–0.738 human-labeled; 0.754–0.793 jury).

  3. At validation-calibrated 5% and 10% false-safe targets, referencing raises safe acceptance on PKU-SafeRLHF and Aegis for every encoder; on BeaverTails the gain is small and uncertain.

  4. We separate prompt-disjointness from prompt control: prompt-only prediction falls to near chance on matched cohorts even when it is strong on full corpus populations.

  5. We test label-free orientation out of sample. A fully unlabeled held-out reference recovers part to most of the referenced ranking, little at 5% unsafe prevalence, while a small labeled unsafe set from other prompts recovers most of it.

The scope is deliberately narrow. That orientation needs a reference is a standard lesson of one-class and positive–unlabeled learning (Section 2). What is missing for response safety is a measurement of how the unreferenced rule behaves on real safety data once prompt composition is controlled, what it costs at an operating point, and how much a label-free reference recovers in finite samples. We do not claim that all one-class estimators fail, that these scores are deployable guards, or that Aegis jury labels constitute a human replication.

References (27)