RAS: Measuring LLM Safety Through Refusal Alignment

arXiv:2606.25750 · cs.CR, cs.CL, cs.LG · Submitted 2026-06-24 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.

Nadia: We're looking at the paper: "RAS: Measuring LLM Safety Through Refusal Alignment".

Elias: Here's the gist of the paper. Safety evaluation of large language models (LLMs) is commonly performed by querying models with unsafe or jailbreak prompts and judging whether their outputs violate a safety policy.

Nadia: We propose SafeVec, a white-box evaluation procedure that measures safety from internal representations rather than generated outputs.

Elias: The resulting metric, RAS (Refusal Alignment Score), maps representation-level refusal alignment to a calibrated 0–100 safety score.

Nadia: Across Llama, Gemma, and Qwen families, RAS separates aligned models from uncensored and abliterated variants.

Title and authors: Nadia: So, let's talk about who wrote this and what the title actually means when you read "RAS: Measuring LLM Safety Through Refusal Alignment." It seems like the core idea is using internal states to see if the model is aligned with a refusal direction.

Elias: Right. Chang-Chieh Huang, Yan-Lun Chen, Chia-Mu Yu, and Wei-Bin Lee are the authors; they bring different expertise here—they have security researchers, cryptographers, and measurement researchers all involved in this work.

Priya: It's good to see that mix because it suggests they're thinking about both the security aspect of exploitation and the measurement aspect of how we actually interpret those internal states.

Nadia: So what's the big picture here? It’s about creating a way to score safety using internal representations, which they call Refusal Alignment Score, or RAS.

Elias: And that RAS score maps this representation-level alignment onto a calibrated number from zero to one hundred, specifically designed to compare models across different families like Llama, Gemma, and Qwen.

The paper's summary: Nadia: So the paper explains that SafeVec is a five stage procedure. It starts with extracting those refusal directions from a safe reference model and then scores the target model based on how its hidden states match those directions under both unsafe and jailbreak prompts.

Elias: And they detail how they build that signal, starting with calculating layer-wise refusal directions, which involves taking the difference between the mean activations of unsafe versus safe prompts at each layer.

Priya: I see that means it's really looking at how much a model's internal representation shifts in a way that suggests refusal when it sees harmful input. That’s a lot of data to process for one evaluation run.

Nadia: And they also have this calibration model scoring step where they use cosine similarity between the target model's hidden states and the raw scores from those prompts to get the initial RAS values.

Elias: The crucial part is that they then apply a RAS calibration step, using a small set of models with known safety levels—aligned, uncensored, and abliterated variants—to map those raw cosine similarities onto that final zero to one hundred safety score <ref:2606.25750#pg1>.

The paper's improvements: Nadia: So what are the real advantages they're pushing for? They argue that this procedure is substantially faster than judge-based evaluation because it only requires forward passes through the target model and doesn't need long-form generation or external judges.

Elias: That speedup is quite significant; they report an average speedup of two thousand one hundred and three times compared to the slowest judge methods. It’s not just a little bit quicker; it’s a major efficiency gain for auditing.

Priya: I'm interested in how this relates to what the paper claims about actual behavior, because if we can measure internal alignment, does that actually predict whether the model will fail an attack?

Nadia: Yes, they show that RAS correlates strongly with output-level safety behavior; models that score high on RAS generally have low attack success rates. So it suggests this representation signal already reflects real differences in output safety before you even look at the generated text.

Elias: They also address the issue of generalization across different model families by defining an architecture specific severity slope and a global severity slope, which helps account for differences in how activation scales vary between Llama, Gemma, and Qwen.

Conclusion: Nadia: To wrap this up, RAS gives us a representation-level safety metric that's efficient for white-box auditing and posttraining comparison. A high RAS score means stronger refusal alignment based on internal states.

Elias: It’s useful for fast white-box auditing but the authors are careful to state that it doesn't prove the model will refuse every single harmful request; it measures alignment with a reference direction, not guaranteed refusal on any input.

Priya: That limitation is important because we have to remember that if future models use completely different internal mechanisms for safety, they might need to re-estimate or extend that initial refusal direction.

Nadia: So the overall implication is that RAS is a solid tool for comparing model variants internally and quickly assessing safety posture without relying on slow, external judgment calls.

Elias: We have to remember it's calibrated within model families, so when you compare a Llama model to a Qwen model, you need those calibration models for the cross-family comparison to be reliable.

Priya: It’s helpful for getting started with auditing, but the ethical statement is key: we shouldn't just use this to ignore vulnerabilities; it should be part of a pipeline that includes behavioral testing and human review.

Nadia: Exactly. So, in short, this paper on "RAS: Measuring LLM Safety Through Refusal Alignment" gives us a fast way to audit internal alignment across Llama, Gemma, and Qwen using representation data instead of expensive output generation tests.

National Yang Ming Chiao Tung University · Hon Hai Research Institute

cs.CR, cs.CL, cs.LG

Submitted: 2026-06-24

Updated: 2026-11-15

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 88/100

The gist: Safety evaluation of large language models (LLMs) is commonly performed by querying models with unsafe or jailbreak prompts and judging whether their outputs violate a safety policy.

Key concepts

SafeVec
A white-box procedure for measuring safety by analyzing the internal hidden states of a model during a harmful prompt. It works by extracting a 'refusal direction' from a safe model and scoring target models based on how their internal states move along that refusal path when processing unsafe or jailbreak prompts.
Refusal Direction Extraction
The first stage of SafeVec where the direction of refusal is calculated for each layer. This is done by finding the difference between the hidden state vectors of a model under an unsafe prompt and its safe counterpart, creating a vector that represents how a model should internally react to harmful requests.
RAS (Refusal Alignment Score)
The final calibrated safety metric, mapped to a 0-100 scale. It measures the alignment between a target model's internal representations and the established refusal direction. A high RAS score indicates stronger internal alignment with safety protocols, suggesting better refusal behavior.
Architecture-Specific Severity Slope
A factor used in the RAS calculation to account for differences between LLM families. It adjusts the severity of a normalized refusal drop based on how much attack success rates (ASR) increase for a specific architecture, helping to correct for varying internal scales and refusal geometries across models.

Terminology

Summary

Safety evaluation of large language models (LLMs) is commonly performed by querying models with unsafe or jailbreak prompts and judging whether their outputs violate a safety policy. p. 0

Where the paper says it

RAS: Measuring LLM Safety Through Refusal Alignment Chang-Chieh Huang∗ , Yan-Lun Chen∗ , Chia-Mu Yu∗ and Wei-Bin Lee♠ ∗ National Yang Ming Chiao Tung University ♠ Hon Hai Research Institute Abstract Safety evaluation of large language models (LLMs) is commonly performed by querying models with unsafe or jailbreak prompts and judging whether their outputs violate a safety policy. Although useful, output-level evaluation is expensive, sensitive to judge choice, and tied to fixed question banks.

We propose SafeVec, a white-box evaluation procedure that measures safety from internal representations rather than generated outputs. p. 0
Where the paper says it

Although useful, output-level evaluation is expensive, sensitive to judge choice, and tied to fixed question banks. We propose SafeVec, a white-box evaluation procedure that measures safety from internal representations rather than generated outputs.

The resulting metric, RAS (Refusal Alignment Score), maps representation-level refusal alignment to a calibrated 0–100 safety score. p. 0
Where the paper says it

Given a safety-aligned reference model, SafeVec extracts refusal directions and scores a target model according to how strongly its hidden states align with these directions under unsafe and jailbreak prompts. The resulting metric, RAS (Refusal Alignment Score), maps representation-level refusal alignment to a calibrated 0–100 safety score.

Across Llama, Gemma, and Qwen families, RAS separates aligned models from uncensored and abliterated variants. p. 0
Where the paper says it

The resulting metric, RAS (Refusal Alignment Score), maps representation-level refusal alignment to a calibrated 0–100 safety score. Across Llama, Gemma, and Qwen families, RAS separates aligned models from uncensored and abliterated variants, correlates with output-level attack success rate, and is substantially faster than judge-based evaluation.

Pruning redundant reasoning tokens

The paper introduces SafeVec as a white-box procedure for measuring representation-level refusal alignment. This method extracts refusal directions from a safety-aligned reference model and scores target models by the alignment of their hidden states under unsafe and jailbreak prompts. p. 5

Where the paper says it

5 Conclusion We introduced SafeVec, a white-box method for measuring LLM safety via refusal alignment. SafeVec extracts refusal directions from a safetyaligned reference model and scores target models by the alignment of their hidden states under unsafe and jailbreak prompts.

The core idea is that when a safety-aligned model processes a harmful request, its hidden states move along a refusal-related direction. p. 0
Where the paper says it

, 2024; Turner et al. These findings suggest a simple hypothesis: when a safety-aligned model processes a harmful request, its hidden states move along a refusal-related direction; when this representation-level refusal signal is weakened, unsafe compliance becomes more likely.

SafeVec consists of five stages: refusal direction extraction, layer window selection, calibration model scoring, RAS calibration, and target model scoring. p. 2
Where the paper says it

Instead, it is designed as a fast whitebox metric for open-weight model auditing, posttraining comparison, and safety regression testing. 2 SafeVec SafeVec consists of five stages: refusal direction extraction, layer window selection, calibration model scoring, RAS calibration, and target model scoring.

How the training signal is built

The procedure begins with Stage 1: Refusal direction extraction. For each layer l, the layer-wise refusal direction is computed as rl = µunsafe l − µsafe l, rˆl = rl∥rl∥2 + ϵ. p. 2

Where the paper says it

We compute the mean safe and unsafe activations: µ safe l = 1 |S| X s∈S h ref l (s), µunsafe l = 1 |U| X u∈U h ref l (u). The layer-wise refusal direction is: rl = µ unsafe l − µ safe l , rˆl = rl ∥rl∥2 + ϵ .

Stage 2 involves Layer window selection. p. 2
Where the paper says it

2 SafeVec SafeVec consists of five stages: refusal direction extraction, layer window selection, calibration model scoring, RAS calibration, and target model scoring. Stage 1: Refusal direction extraction.

This stage selects a continuous layer window W where the separation gap is sufficiently large and stable, and where the unsafe cosine mean together with the safe suppression score reflects a consistent alignment pattern with the refusal direction. p. 2
Where the paper says it

We also compute the safe suppression score and separation gap: ql = −msafe l , gl = munsafe l − msafe l . We prefer a consecutive layer window, where the separation gap is sufficiently large and stable, and where the unsafe cosine mean together with the safe suppression score reflects a consistent alignment pattern with the refusal direction.

Stage 3 uses calibration models to score raw scores UnsafeScore(M) and JailbreakScore(M) based on cosine similarity. p. 2
Where the paper says it

Stage 3: Calibration model scoring. Given W, we first score each calibration model by measuring its average refusal alignment on unsafe and jailbreak prompts: UnsafeScore(M) = 1 |W||U| X l∈W X u∈U cos(h M l (u), rˆl), JailbreakScore(M) = 1 |W||J | X l∈W X j∈J cos(h M l (j), rˆl).

Stage 4 involves RAS calibration, where the final RAS is mapped to a 0–100 scale using a sigmoid function. p. 3
Where the paper says it

With the familyspecific calibration fixed, we score each target model using the same unsafe and jailbreak cosinesimilarity computation from Stage 3. The resulting combined score s(M) is then mapped through the RAS calibration from Stage 4 to obtain the final target-model RAS.

Where the gains come from

The evaluation demonstrates that RAS reliably distinguishes safety-aligned, uncensored, and abliterated models across Llama, Gemma, and Qwen families. Furthermore, RAS correlates strongly with output-level safety behavior as models with high RAS generally exhibit low attack success rates (ASR). p. 1

Where the paper says it

First, safe and unsafe models exhibit clear separation in refusal-direction alignment under both unsafe and jailbreak prompts. Second, RAS correlates strongly with output-level safety behavior, as models with high RAS generally exhibit low attack success rates (ASR).

The efficiency gain is substantial because RAS requires only forward passes through the target model and does not rely on long-form generation or external judges, resulting in an average speedup of 210. p. 1
Where the paper says it

Third, this relationship remains consistent across different model families after architecture-specific calibration. Fourth, RAS is substantially more efficient than judgebased evaluation because it requires only forward passes and does not rely on long-form generation or external judges.

13× compared to judge-based evaluation. p. 0
Where the paper says it

The resulting metric, RAS (Refusal Alignment Score), maps representation-level refusal alignment to a calibrated 0–100 safety score. Across Llama, Gemma, and Qwen families, RAS separates aligned models from uncensored and abliterated variants, correlates with output-level attack success rate, and is substantially faster than judge-based evaluation.

Generalization across model families

The method is shown to generalize across different LLM families because the same SafeVec procedure applies to all of them, extracting a family-specific refusal direction and selecting a stable layer window. While raw scores are not directly comparable across families, calibrated RAS consistently ranks aligned models above unsafe variants. p. 5

Where the paper says it

Nevertheless, the same SafeVec procedure applies to all of them: extract a family-specific refusal direction, select a stable layer window, compute unsafe and jailbreak alignment, and calibrate RAS. Raw scores are not directly comparable across families, but calibrated RAS consistently ranks aligned models above unsafe variants.

The architecture-specific severity slope is defined as αa and the global severity slope as αglobal to account for family-specific differences. p. 3
Where the paper says it

The architecture-specific severity slope is defined as: αa = medianM∈Vaρ(M). We define the global severity slope as: αglobal = mediana(αa).

Conclusion

RAS provides a representation-level safety metric that is efficient for white-box auditing and posttraining comparison. A high RAS indicates stronger refusal alignment, which is useful for fast whitebox auditing but does not prove that the model will refuse every harmful request. p. 5

Where the paper says it

This is useful for fast whitebox auditing, but it does not prove that the model will refuse every harmful request. Conversely, a low RAS indicates weak refusal alignment and potential safety risk, but output-level confirmation may still be needed in high-stakes deployment.

The metric is also architecture-aware because raw cosine scores require calibration due to differing activation scales and refusal geometries across families. p. 5
Where the paper says it

The metric is also architecture-aware. Because activation scales and refusal geometry differ across families, raw cosine scores require calibration.

Limitations

RAS requires white-box access to hidden states and therefore cannot be directly applied to closed APIs. It is also calibrated within model families, so cross-family comparison depends on the quality of calibration models. p. 6

Where the paper says it

Limitations RAS requires white-box access to hidden states and therefore cannot be directly applied to closed APIs. It is also calibrated within model families, so cross-family comparison depends on the quality of calibration models.

Finally, RAS measures alignment with a reference refusal direction; if future models implement safety through substantially different internal mechanisms, the refusal direction may need to be re-estimated or extended to a multi-directional representation. p. 6
Where the paper says it

It is also calibrated within model families, so cross-family comparison depends on the quality of calibration models. Finally, RAS measures alignment with a reference refusal direction; if future models implement safety through substantially different internal mechanisms, the refusal direction may need to be re-estimated or extended to a multi-directional representation.

Ethics Statement

This work aims to improve LLM safety evaluation by providing a faster white-box metric for detecting weakened refusal behavior. The method does not introduce new jailbreak attacks or optimize prompts for harmful compliance; it measures internal refusal alignment using existing unsafe and jailbreak prompt sets. p. 6

Where the paper says it

Ethics Statement This work aims to improve LLM safety evaluation by providing a faster white-box metric for detecting weakened refusal behavior. The method does not introduce new jailbreak attacks or optimize prompts for harmful compliance; it measures internal refusal alignment using existing unsafe and jailbreak prompt sets.

Since low RAS scores may reveal vulnerable models, results should be reported responsibly, especially for deployed systems. p. 6
Where the paper says it

The method does not introduce new jailbreak attacks or optimize prompts for harmful compliance; it measures internal refusal alignment using existing unsafe and jailbreak prompt sets. Since low RAS scores may reveal vulnerable models, results should be reported responsibly, especially for deployed systems.

We recommend using RAS as part of a broader audit pipeline that also includes behavioral testing, human review, and deployment-specific risk assessment. p. 6
Where the paper says it

Since low RAS scores may reveal vulnerable models, results should be reported responsibly, especially for deployed systems. We recommend using RAS as part of a broader audit pipeline that also includes behavioral testing, human review, and deployment-specific risk assessment.

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Improve safety evaluation by shifting from expensive output-level evaluation to white-box representation-level safety measurement using SafeVec, which measures safety from internal representations rather than generated outputs. This allows for a white-box procedure that is substantially faster than judge-based evaluation.

  2. Enable rapid regression testing of safety models by utilizing the calibrated Refusal Alignment Score (RAS). Since RAS is designed as a fast whitebox metric for open-weight model auditing, posttraining comparison, and safety regression testing, providers can use it to assess changes across finetuned variants efficiently.

  3. Enhance model selection and comparison by using RAS to separate aligned models from uncensored and abliterated variants across Llama, Gemma, and Qwen families. This provides a reliable metric for comparing the internal safety posture of different model architectures based on refusal alignment.

  4. Increase confidence in safety assessments by correlating representation-level signals with actual behavior. The paper demonstrates that RAS correlates strongly with output-level safety behavior, meaning models receiving higher RAS generally exhibit lower attack success rates (ASR), suggesting representation-level refusal alignment already reflects broad differences in output level safety before calibration.

  5. Reduce evaluation time significantly by replacing judge-based scoring with SafeVec. Table 2 shows that RAS is substantially more efficient than judgebased evaluation because it requires only forward passes and does not rely on long-form generation or external judges, leading to speedups ranging from 135 to over 470 times compared to the slowest judge methods.

  6. Provide architecture-aware safety assessment by incorporating a severity multiplier into the RAS calculation. The calculation defines an architecture-specific severity slope and architecture severity multiplier that penalizes normalized refusal drops based on how much ASR increases for a given architecture, accounting for family-specific differences in activation scales and refusal geometry.

Abstract

Repeated safety evaluation of open-weight large language models requires generating and judging responses for many related checkpoints. We introduce RAS (Refusal Alignment Score), a representation-based, reference-relative indicator of harmful-request refusal computed by the five-stage SafeVec procedure. SafeVec extracts layer-wise refusal directions from an aligned reference model, measures their alignment in related targets, and calibrates a score from 0 to 100 using behavioral attack success rates (ASR) from reference and calibration models. Subsequent target scoring uses input forward passes alone. Across 18 held-out variants from the Llama, Gemma, and Qwen families, RAS correlates with 100(1-ASR) (Pearson 0.934, Spearman 0.851) and achieves 83.0% pairwise ordering agreement. Across five prompt configurations for the Llama reference, directions have mean cosine similarity 0.939. With calibration ASR already available, setup-inclusive evaluation of five targets achieves a speedup of 3.2 to 80.5 times over the specified behavioral protocol. These results support refusal alignment as an efficient signal for screening related checkpoints and prioritizing behavioral audits.

Related papers