From Prompt Risk to Response Risk: Paired Analysis of Safety Behavior of Large Language Models

Mengya Hu, Qiong Wei, Sandeep Atluri
4/28/2026
cs.CL

Official code: microsoft/PairedSafety (1 star, Python, MIT, last commit 2026-07-10).

Abstract

Safety evaluations of large language models (LLMs) typically report binary outcomes, i.e. attack success rate (ASR), refusal rate, or harmful versus safe classification, which hide how risk changes between prompt and response. We present a paired analysis over human labeled prompt and response records across four harm categories (Sexual, Self harm, Hate and Violence) and ordinal severity levels (Safe, Low, Medium, High).

Show full abstract

61% of responses reduce harm relative to the prompt, 36% preserve severity, and 3% escalate. The escalation splits into two mechanisms: benign prompts triggering unrequested harmful detail, and answers that stay on task at higher severity than the prompt. Category decomposition shows that Sexual content exhibits the highest harm persistence in this sample, driven by compliance at the same severity rather than drift from benign inputs. Joint relevance analysis exposes a helpfulness versus harmlessness tradeoff: compliance escalations remain highly relevant, whereas safe responses include generic refusals with low relevance. A public supporting evaluation over 600 prompts and six models reproduces the framework's measurements and two directional signals, while few-shot LLM graders exhibit a prompt/response detection asymmetry that data calibration does not close. Grader prompts, public-evaluation artifacts, and analysis code are shared at https://github.com/microsoft/PairedSafety.

View on arXivView PDF

Code Implementations(1)

MIT

An repo to share grader with its prompt that used in paper.

11PythonMay 14, 20264 months agoMIT

Similar Papers

Cite this paper

@article{hu2026from,
  title  = {From Prompt Risk to Response Risk: Paired Analysis of Safety Behavior of Large Language Models},
  author = {Mengya Hu and Qiong Wei and Sandeep Atluri},
  year   = {2026},
  eprint = {2604.26052},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.26052v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.26052.svg)](https://codeofpaper.com/paper/2604.26052)

Discussion