defense 2026

Step-Wise Refusal Dynamics in Autoregressive and Diffusion Language Models

Eliron Rahimi 1,2, Elad Hirshel 3, Rom Himelstein 1, Amit LeVi 1, Avi Mendelson 1, Chaim Baskin 2

0 citations · 49 references · arXiv (Cornell University)

α

Published on arXiv

2602.02600

Prompt Injection

OWASP LLM Top 10 — LLM01

Key Finding

SRI-based inference-time detectors match or outperform existing jailbreak defenses with over 100× lower inference overhead while generalizing to unseen attacks.

SRI (Step-Wise Refusal Internal Dynamics)

Novel technique introduced


Diffusion language models (DLMs) have recently emerged as a promising alternative to autoregressive (AR) models, offering parallel decoding and controllable sampling dynamics while achieving competitive generation quality at scale. Despite this progress, the role of sampling mechanisms in shaping refusal behavior and jailbreak robustness remains poorly understood. In this work, we present a fundamental analytical framework for step-wise refusal dynamics, enabling comparison between AR and diffusion sampling. Our analysis reveals that the sampling strategy itself plays a central role in safety behavior, as a factor distinct from the underlying learned representations. Motivated by this analysis, we introduce the Step-Wise Refusal Internal Dynamics (SRI) signal, which supports interpretability and improved safety for both AR and DLMs. We demonstrate that the geometric structure of SRI captures internal recovery dynamics, and identifies anomalous behavior in harmful generations as cases of \emph{incomplete internal recovery} that are not observable at the text level. This structure enables lightweight inference-time detectors that generalize to unseen attacks while matching or outperforming existing defenses with over $100\times$ lower inference overhead.


Key Contributions

  • First systematic analytical framework comparing step-wise refusal dynamics between autoregressive and diffusion language models, showing that the sampling mechanism itself — not just learned representations — drives safety behavior.
  • Introduction of the Step-Wise Refusal Internal Dynamics (SRI) signal that captures 'incomplete internal recovery' in harmful generations invisible at the text level.
  • Lightweight inference-time jailbreak detectors built on SRI geometry that match or outperform existing defenses with over 100× lower inference overhead and generalize to unseen attacks.

🛡️ Threat Analysis


Details

Domains
nlp
Model Types
llmtransformerdiffusion
Threat Tags
inference_time
Applications
llm safetyjailbreak detectiondiffusion language model safety