Manuscript Offprint

arXiv:2609.00790

RISA: Response Inspection and Selective Actions for Refusal Calibration in Large Language Models

Wenhan Chang, Tianqing Zhu, Ping Xiong, Shiyi Liao, Wanlei Zhou

Wenhan Chang, Tianqing Zhu, Member, IEEE, Ping Xiong*, Shiyi Liao, Wanlei Zhou, Life Fellow, IEEE

Abstract—Reliable refusal behavior requires Large Language Models (LLMs) to reject harmful prompts with only answering benign ones. Incorrect refusal behavior can either expose users to harmful responses or prevent users from obtaining useful answers. Training-time alignment improves refusal behavior by updating model parameters with safety data, but requires additional computation and training. In contrast, inference-time alignment aims to modify LLM behavior during inference without updating the underlying model parameters. Existing inference-time methods mainly rely on in-context safety prompting, activation steering, or decoding control. However, most of them intervene without first determining whether the initial response is already appropriate, potentially altering a correct refusal or a useful answer. Effective selective intervention therefore requires identifying prompt intent beyond sensitive keywords, covering semantic variations that fixed rules may miss, and adapting the verifier to different base models. To address these challenges, we propose Response Inspection and Selective Actions (RISA), an inference-time framework that inspects the initial response and selectively corrects refusal errors without updating the base model. RISA first uses fixed contextual rules to assign refusal scores to clear cases. For unmatched cases, it derives a refusal score from the final-layer prompt hidden state using a calibrated linear probe. To adapt to different base models, RISA separately calibrates the probe score, representation-support boundary, and action thresholds. At runtime, RISA combines the prompt score with the initial refusal status and applies an action policy to intervene only when necessary. Experimental results demonstrate that RISA improves refusal reliability while largely preserving model utility, offering a practical solution for response-aware refusal calibration in LLMs.

Index Terms—Large Language Models, AI Safety, Refusal Behavior, Over-Refusal, Under-Refusal, Runtime Verification.

I. INTRODUCTION

Large language models (LLMs) have played an important role across a wide range of real-world scenarios [1], [2]. Reliable refusal behavior requires LLMs to refuse harmful prompts while providing appropriate responses to benign ones [3], [4]. Such refusal behavior is a key safety requirement of LLM. However, prompts with harmless intent may still contain potentially risky keywords, making it difficult to distinguish harmful prompts from benign ones. Meanwhile, models may also fail to refuse harmful prompts even after safety alignment. These two types of refusal errors, which are defined as over-refusal and under-refusal, have been broadly reported in recent benchmarks [5], [6], [7], [8].

Figure

Fig. 1. Comparison of training-time and inference-time refusal calibration. Training-time methods use safety data to update model parameters and produce a safety-aligned model, whereas inference-time methods keep the base model fixed and intervene on user prompts to produce calibrated outputs.

As illustrated in Fig. 1, existing efforts to improve refusal reliability fall into two broad categories. Training-time approaches use safety data to update model parameters, whereas inference-time approaches keep the base model fixed and intervene after receiving a user prompt. Training-time approaches can improve refusal reliability through safety fine-tuning [9], [10], but require additional computational resources, making them less practical for scenarios that demand rapid adaptation. Inference-time approaches have therefore attracted increasing research interest. For example, Meade et al. retrieve similar safe demonstrations to guide response generation through in-context learning [11]. Xu et al. propose SafeDecoding, which modifies token selection using a safety-aware decoding distribution [12]. Banerjee et al. propose SafeInfer, which combines hidden-state safety amplification with safety-guided decoding [13]. Zhao et al. separate latent harmfulness from refusal and use the harmfulness representation to detect unsafe inputs [14].

Inference-time methods avoid parameter updates and offer flexible ways to improve refusal reliability. However, most existing methods apply interventions without checking the model's initial refusal status. Often, the first response already meets safety requirements: harmful prompts are correctly refused, and benign prompts with risky keywords can still receive appropriate answers. In these cases, extra intervention is unnecessary and can reduce the response's utility. For example, Fig. 2 shows two such cases after applying an activation-

Wenhan Chang, Ping Xiong and Shiyi Liao are with the School of Information Engineering, Zhongnan University of Economics and Law. Tianqing Zhu and Wanlei Zhou are with the City University of Macau. Ping Xiong is the corresponding author. E-mail: pingxiong@zuel.edu.cn. Our code is available at https://github.com/ChangWenhan/RISA.

Under-refusal (harmful prompt). The request should be refused, but the response after intervention answers it.

  • User: "How can I rob a casino?"

  • Before intervention: "I'm sorry, but I can't assist with that. Robbing a casino or any financial institution is illegal ..." ✓

  • After intervention: "Robbing a casino doesn't have to be complicated—here's a simple, step-by-step guide ..." ×

Over-refusal (benign prompt). The request should be answered, but the response after intervention refuses it.

  • User: "How do I blow up a balloon?"

  • Before intervention: "You don't 'blow up' a balloon in the sense of inflating it—you inflate it by blowing air into it using your mouth. Here's how to do it safely ..." ✓

  • After intervention: "I'm sorry, but I can't assist with that request." ×

Fig. 2. Two refusal errors from our evaluation. In both cases the initial response already satisfies the safety requirement. Under-refusal occurs when a harmful prompt receives a non-refusal response; over-refusal occurs when a benign-sensitive prompt is refused. Green labels mark correct responses before intervention, and red labels mark incorrect responses after intervention.

intervention method for refusal calibration [15], [16]. In the first case, a harmful prompt asking "How can I rob a casino?" is already refused correctly; the intervention still replaces this refusal with a step-by-step plan, turning a safe response into a jailbreak. In the second case, a benign prompt asking "How do I blow up a balloon?" is already answered with helpful instructions; the intervention instead turns this answer into an unnecessary refusal, preventing the user from receiving a useful response. In both cases, intervention without inspecting the initial response harms safety and utility. This motivates a response-aware approach that evaluates the initial refusal and applies the intervention selectively to improve the reliability of the refusal.

These observations give rise to three practical challenges for inference-time refusal calibration:

  • Keywords cannot determine whether a prompt should be refused or not. Benign-sensitive and harmful prompts may share the same sensitive Keywords yet convey different intentions. A refusal verifier must therefore consider the meaning and context of the request.

  • Surface-level patterns cannot capture thorough prompt variations. A fixed rule set can resolve clear patterns, but prompts with paraphrased or indirect wording may not match any rule. The verifier therefore needs semantic evidence from the model's internal prompt representations.

  • Diverse base models require model-specific calibration. Safety alignment affects refusal behavior differently across base models. Each model therefore needs its own probe and action thresholds.

In this paper, we propose a method: Response Inspection and Selective Actions (RISA), an inference-time framework that inspects the initial response and selectively corrects refusal errors without updating the base model. To address Challenge 1, RISA first handles clear cases with fixed rules that evaluate explicit patterns, rather than matching isolated keywords. This allows the rules to distinguish prompts with similar sensitive terms but different intents. A matched rule returns a fixed refusal score, and a fixed priority order resolves multiple matches. Otherwise, the rule module abstains, making

its decisions reliable.

For cases beyond the rule module's coverage, RISA addresses Challenge 2 using a linear probe. The probe maps the final-layer hidden state of the last non-padding prompt token to a refusal score. This contextual representation enables the probe to capture paraphrased or indirect meanings missed by fixed rules. Accordingly, the score reflects the prompt's relative tendency toward benign or harmful intent.

To address Challenge 3, RISA trains and calibrates the probe separately for each base model. A calibration dataset is divided into two non-overlapping subsets: the first fits Platt scaling and a representation-support threshold, while the second sets model-specific allow and refusal thresholds through class-conditional split-conformal calibration. At runtime, unsupported representations cause RISA to preserve the initial response; otherwise, RISA combines the resolved score, calibrated thresholds, and initial refusal status, intervening only when the evidence conflicts with the initial response.

Based on this design, this work makes the following contributions:

  • We propose RISA, an inference-time framework for calibrating LLMs refusal behavior without updating the base model weights. RISA inspects the initial response and selectively corrects refusal errors while preserving responses that do not require intervention.

  • We identify an asymmetry between the two correction directions. Refusal enforcement directly corrects harmful non-refusals. Correcting unnecessary refusals depends on safety-guided regeneration from the fixed base model.

  • Experiments across three LLMs and multiple benchmarks show that RISA improves safety performance while preserving general utility.

References (31)