为什么越狱攻击在扩散语言模型中成功:一种能量景观分析
摘要
本文引入了一个能量景观框架,以分析越狱攻击为何在基于扩散的语言模型中成功,并推导出三种互补的、无需训练的检测信号,用于安全对齐。
arXiv:2609.30841v1 Announce Type: new
Abstract: Existing attacks and defenses for diffusion-based large language models (dLLMs) target specific vulnerabilities but lack a shared framework explaining why attacks succeed. We propose one by interpreting safety alignment as shaping the denoising energy landscape: a well-aligned model routes harmful queries toward safe outputs through an energy barrier that separates the two regions. Current jailbreak attacks reduce to two strategies for circumventing this barrier: obscuring the query's safety disposition at initialisation, or intervening mid-trajectory to force the denoising path across the energy barrier. From this perspective and the result that masked diffusion models minimise kinetic energy during denoising, we derive three complementary, training-free detection signals: a step-0 ratio that reads the initial safety disposition from the logit distribution before generation begins, and two trajectory-velocity signals that track kinetic energy in complementary subspaces of the logit space. An attack must either reveal its intent at initialisation or expend kinetic energy to cross the barrier in at least one monitored subspace, so the three signals cover each other's blind spots in the energy budget by construction. Evaluation across three dense dLLMs (LLaDA-8B, LLaDA-1.5, Dream-7B) and a sparse mixture-of-experts dLLM (LLaDA-MoE-7B) confirms this complementarity. In stress tests of known attacks, every configuration that evades detection also fails to produce harmful content, suggesting that the detection and barrier-crossing thresholds are hard to separate.
查看缓存全文
缓存时间: 2026/09/28 09:50
# Why Jailbreaks Succeed in Diffusion Language Models: An Energy Landscape Analysis
Source: [https://arxiv.org/html/2609.30841](https://arxiv.org/html/2609.30841)
Thong Bach††thanks:t\.bach@deakin\.edu\.auDung NguyenAffiliation:Applied Artificial Intelligence Initiative \(A2I2\), Deakin UniversityThao Minh LeAffiliation:Pennsylvania State UniversityTruyen TranAffiliation:Applied Artificial Intelligence Initiative \(A2I2\), Deakin University
###### Abstract
Existing attacks and defenses for diffusion\-based large language models \(dLLMs\) target specific vulnerabilities but lack a shared framework explaining why attacks succeed\. We propose one by interpreting safety alignment as shaping the denoising energy landscape: a well\-aligned model routes harmful queries toward safe outputs through an energy barrier that separates the two regions\. Current jailbreak attacks reduce to two strategies for circumventing this barrier: obscuring the query’s safety disposition at initialisation, or intervening mid\-trajectory to force the denoising path across the energy barrier\. From this perspective and the result that masked diffusion models minimise kinetic energy during denoising, we derive three complementary, training\-free detection signals: a step\-0 ratio that reads the initial safety disposition from the logit distribution before generation begins, and two trajectory\-velocity signals that track kinetic energy in complementary subspaces of the logit space\. An attack must either reveal its intent at initialisation or expend kinetic energy to cross the barrier in at least one monitored subspace, so the three signals cover each other’s blind spots in the energy budget by construction\. Evaluation across three dense dLLMs \(LLaDA\-8B, LLaDA\-1\.5, Dream\-7B\) and a sparse mixture\-of\-experts dLLM \(LLaDA\-MoE\-7B\) confirms this complementarity\. In stress tests of known attacks, every configuration that evades detection also fails to produce harmful content, suggesting that the detection and barrier\-crossing thresholds are hard to separate\.
## 1Introduction
Safety research in dLLMs is nascent\. A handful of models exist, primarily LLaDA and Dream variants \(LLaDA\[[16](https://arxiv.org/html/2609.30841#bib.bib6)\], LLaDA\-1\.5\[[31](https://arxiv.org/html/2609.30841#bib.bib12)\], Dream\[[27](https://arxiv.org/html/2609.30841#bib.bib10)\]\), and a small but growing set of attacks has emerged\. These attacks exploit two distinct surfaces of the denoising process\. Template attacks modify the initial state: PAD\[[30](https://arxiv.org/html/2609.30841#bib.bib11)\]distributes structural connectors throughout the response region, and DIJA\[[23](https://arxiv.org/html/2609.30841#bib.bib8)\]interleaves harmful tokens with mask spans, both exploiting bidirectional attention\. Anchoring attacks\[[25](https://arxiv.org/html/2609.30841#bib.bib2)\]instead intervene mid\-trajectory, replacing model predictions with harmful tokens at an intermediate denoising step\. On the defense side, DiffuGuard’s Safety Divergence \(SD\) detector\[[13](https://arxiv.org/html/2609.30841#bib.bib3)\]identifies template injection via representational divergence between the attack input and a clean baseline\. Each contribution targets a specific vulnerability, but the literature lacks an analysis that explains why these attacks succeed, how they relate to one another, and what they reveal about the structure of safety in diffusion language models\. Attacks built for autoregressive models, such as GCG\[[33](https://arxiv.org/html/2609.30841#bib.bib16)\], optimise against causal next\-token decoding and do not transfer to diffusion without new work, so an account that also constrains attacks not yet designed is especially valuable here\.
We propose such an analysis through the lens ofenergy landscape dynamics\[[7](https://arxiv.org/html/2609.30841#bib.bib23)\], which proved that masked diffusion models minimise kinetic energy during denoising, following geodesics from the masked state to the output distribution\. We interpret safety alignment as reshaping this landscape into basins separated by an energy barrier, and show that every known attack maps onto one of two strategies for circumventing it\. Throughout, “energy,” “barrier,” and “basin” refer to per\-token\-factorised log\-odds in a Fisher\-metrised probability simplex \(§[3](https://arxiv.org/html/2609.30841#S3)\)\. Concretely, the quantity we read is the ratio of refusal\-token mass to compliance\-token mass in the model’s logit distribution, first at the fully masked state before any token is decoded, and then as it changes during denoising\. The token sets are a measured property of the model rather than a design choice: a set derived automatically from held\-out prompts, with no human selection, performs as well as a hand\-written one \(§[3\.1](https://arxiv.org/html/2609.30841#S3.SS1)\)\. Figure[2](https://arxiv.org/html/2609.30841#S3.F2)previews the core finding by plotting the log of this ratio over the denoising steps: harmful queries remain in the safe basin as the model refuses, template attacks start near the barrier with obscured intent, and anchoring attacks show partial or failed recovery depending on the intervention timing\. From this decomposition, we derive three training\-free, logit\-space detection signals, each monitoring a different component of the energy budget\.
Contributions\.\(1\) An energy\-based analysis of dLLM safety that unifies current attacks as strategies for circumventing the energy barrier separating safe from harmful outputs \(§[3](https://arxiv.org/html/2609.30841#S3)\)\. \(2\) Three complementary, training\-free detection signals derived from the energy landscape: a step\-0 ratio measuring the initial safety disposition \(§[3\.1](https://arxiv.org/html/2609.30841#S3.SS1)\) and two trajectory\-velocity signals measuring kinetic energy in complementary subspaces via a Fisher velocity decomposition; together they cover the full energy budget by construction \(§[3\.2](https://arxiv.org/html/2609.30841#S3.SS2)\)\. \(3\) Evaluation across LLaDA\-8B and Dream\-7B using standard benchmarks \(HarmBench, AdvBench, AlpacaEval, XSTest; §[2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3)\), with further checks on LLaDA\-1\.5, a sparse mixture\-of\-experts dLLM, Chinese prompts, and generation and block lengths, including comparison with DiffuGuard\-SD111We compare against DiffuGuard’s Safety Divergence detection component\[[13](https://arxiv.org/html/2609.30841#bib.bib3)\]; generation\-time defenses fall outside our detection\-only scope\.and parametric stress testing showing that no tested attack configuration evades all three signals while still inducing harmful generation \(§[4](https://arxiv.org/html/2609.30841#S4)\)\.
## 2Background and Experimental Setup
#### Masked diffusion language models\.
MDLMs generate text by reversing a forward masking process\[[21](https://arxiv.org/html/2609.30841#bib.bib13),[15](https://arxiv.org/html/2609.30841#bib.bib14),[9](https://arxiv.org/html/2609.30841#bib.bib15)\]\. Fort∈\[0,1\]t\\in\[0,1\], each token is independently masked with probabilitytt, and the reverse process recovers the data distribution by iteratively predicting masked tokens\. The core component is a*mask predictor*pθ\(⋅\|xt\)p\_\{\\theta\}\(\\cdot\|x\_\{t\}\), a bidirectional Transformer that takes a partially masked sequencextx\_\{t\}and predicts all masked positions simultaneously\. Training minimises the cross\-entropy loss on masked tokens, upper\-bounding the negative log\-likelihood\[[16](https://arxiv.org/html/2609.30841#bib.bib6)\]\. The bidirectional architecture enables flexible generation order but also creates the attack surface we analyse\.
#### MDMs as energy minimisation\.
Work by\[[7](https://arxiv.org/html/2609.30841#bib.bib23)\]proved that MDMs can be interpreted as minimising energy functionals over discrete probability flows, with kinetic energy
Ek=∫01γ˙t−1∑xp˙t\(x\)2pt\(x\)𝑑t,E\_\{k\}=\\int\_\{0\}^\{1\}\\dot\{\\gamma\}\_\{t\}^\{\-1\}\\sum\_\{x\}\\frac\{\\dot\{p\}\_\{t\}\(x\)^\{2\}\}\{p\_\{t\}\(x\)\}\\,dt,\(1\)whereptp\_\{t\}is the distribution at stepttandγt\\gamma\_\{t\}an interpolation schedule\. MinimisingEkE\_\{k\}means the denoising trajectory follows a*geodesic*from the masked statep0p\_\{0\}to the output distributionpTp\_\{T\}\. In §[3](https://arxiv.org/html/2609.30841#S3)we extend this interpretation to safety\.
#### Experimental setup\.
Every quantitative result in the main text is computed with the following setup \(full details in Appendix[B](https://arxiv.org/html/2609.30841#A2)\)\.*Models\.*Detection is evaluated on LLaDA\-8B\-Instruct\[[16](https://arxiv.org/html/2609.30841#bib.bib6)\]and Dream\-v0\-Instruct\-7B\[[27](https://arxiv.org/html/2609.30841#bib.bib10)\]; LLaDA\-1\.5\[[31](https://arxiv.org/html/2609.30841#bib.bib12)\]enters the step\-0 analysis, and a sparse mixture\-of\-experts model, LLaDA\-MoE\-7B\-A1B\-Instruct\[[32](https://arxiv.org/html/2609.30841#bib.bib28)\], is evaluated in Appendix[D\.5](https://arxiv.org/html/2609.30841#A4.SS5)\. Generation uses greedy confidence\-based remasking at temperature 0 with response lengthL=128L=128, one token per step\.*Data\.*Harmful prompts are the 400 standard HarmBench behaviors\[[14](https://arxiv.org/html/2609.30841#bib.bib5)\]and the 520 AdvBench behaviors\[[33](https://arxiv.org/html/2609.30841#bib.bib16)\]; benign prompts are 200 AlpacaEval instructions\[[12](https://arxiv.org/html/2609.30841#bib.bib4)\]and the 250 safe XSTest prompts\[[20](https://arxiv.org/html/2609.30841#bib.bib7)\]\. Each model is run under seven conditions \(clean, XSTest, harmful direct, PAD, anchoring att=1t\{=\}1andt=8t\{=\}8, DIJA\), giving 5,050 prompt–condition pairs per model and 10,100 in total\.*Attacks\.*Each attack follows its original implementation: PAD insertsnc=2n\_\{c\}\{=\}2structural connectors at evenly spaced response positions\[[30](https://arxiv.org/html/2609.30841#bib.bib11)\]; anchoring replaces the model’s predictions at steptintert\_\{\\text\{inter\}\}with tokens of a harmful response and re\-masks\[[25](https://arxiv.org/html/2609.30841#bib.bib2)\]; DIJA fills templates that interleave harmful tokens with mask spans\[[23](https://arxiv.org/html/2609.30841#bib.bib8)\]\.*Protocol\.*All three signals are read from the logits the model already computes, with no training\. AUROC measures how well a signal ranks each attack condition above the benign pool \(AlpacaEval∪\\cupXSTest\)\. For threshold\-level detection, each signal is thresholded at a benign quantile, and the OR\-detector usesα/3\\alpha/3per signal so that by the union bound its benign false\-positive rate is at mostα\\alpha\(Appendix[F](https://arxiv.org/html/2609.30841#A6)\)\.
## 3The Energy Landscape of Safety
We interpret safety alignment as shaping the denoising energy landscape into basins of attraction separated by an energy barrier, and show that all known attacks map onto one of two strategies: obscuring the query’s safety disposition at initialisation, or intervening to force the trajectory across the barrier mid\-denoising\. The detection signals follow from this decomposition: §[3\.1](https://arxiv.org/html/2609.30841#S3.SS1)derives the step\-0 ratio from basin structure, §[3\.2](https://arxiv.org/html/2609.30841#S3.SS2)derives two velocity signals from the kinetic energy cost of barrier crossing, and §[3\.3](https://arxiv.org/html/2609.30841#S3.SS3)tests the combined detector against every attack and against DiffuGuard\-SD\.
### 3\.1Basin Structure and the Step\-0 Ratio
*Question: can the safety disposition of a query be read before any token is generated?*
#### How alignment shapes the energy landscape\.
Previous work\[[7](https://arxiv.org/html/2609.30841#bib.bib23)\]proved that the denoising trajectory in masked diffusion models minimises a kinetic energy functionalEkE\_\{k\}\(Eq\. \([1](https://arxiv.org/html/2609.30841#S2.E1)\), §[2](https://arxiv.org/html/2609.30841#S2)\)\. This geodesic structure depends entirely on the model parametersθ\\theta, so alignment training reshapes it: Supervised Fine\-Tuning \(SFT\) on safety data assigns high probability to refusal tokens at the fully masked state, and the energy\-minimising path for harmful queries then routes entirely through safe outputs\. We formalise this by partitioning the sequence space𝒳=𝒮∪ℋ\\mathcal\{X\}=\\mathcal\{S\}\\cup\\mathcal\{H\}into safe responses𝒮\\mathcal\{S\}\(refusals, harmless completions\) and harmful responsesℋ\\mathcal\{H\}\(compliant harmful content\)222When working at a single masked position \(e\.g\., Eq\. \([6](https://arxiv.org/html/2609.30841#S3.E6)\)\) we reuse𝒮,ℋ\\mathcal\{S\},\\mathcal\{H\}for the corresponding token\-level sets, so𝒱ref⊆𝒮\\mathcal\{V\}\_\{\\text\{ref\}\}\\subseteq\\mathcal\{S\}and𝒱comp⊆ℋ\\mathcal\{V\}\_\{\\text\{comp\}\}\\subseteq\\mathcal\{H\}\. The safe basin contains harmless completions as well as refusals; the signals below weight refusals only because they are its most observable part, and our scope is detecting a query rather than shaping the response, so a flagged query can be regenerated or routed to a stronger filter rather than refused\.
Alignment funnels probability toward𝒮\\mathcal\{S\}, so the denoising trajectory of a harmful query carries little probability flow across the boundary between the two basins \(Appendix[A\.1](https://arxiv.org/html/2609.30841#A1.SS1)makes this precise with a flow decomposition ofEkE\_\{k\}\), and a jailbreak succeeds when it forces the trajectory across that boundary intoℋ\\mathcal\{H\}\. To monitor basin membership at each step, we define:
###### Definition 1\(Safety Energy Gap\)\.
Given a harmful queryqqand denoising statextx\_\{t\}at steptt, the Safety Energy Gap is the log\-odds ratio between the probability that the final outputx^\\hat\{x\}lands in the safe basin𝒮\\mathcal\{S\}versus the harmful basinℋ\\mathcal\{H\}:
ΔE\(xt,q,t\)=logp\(x^∈𝒮∣q,xt\)p\(x^∈ℋ∣q,xt\)\.\\Delta E\(x\_\{t\},q,t\)=\\log\\frac\{p\(\\hat\{x\}\\in\\mathcal\{S\}\\mid q,x\_\{t\}\)\}\{p\(\\hat\{x\}\\in\\mathcal\{H\}\\mid q,x\_\{t\}\)\}\.\(2\)
whereΔE\>0\\Delta E\>0indicates the safe basin,ΔE<0\\Delta E<0the harmful basin, andΔE=0\\Delta E=0the basin boundary\. Herex^\\hat\{x\}denotes the \(random\) clean output produced by denoising, whilextx\_\{t\}denotes the partially\-masked state at steptt; we reservex0=\(\[MASK\]\)Lx\_\{0\}=\(\\texttt\{\[MASK\]\}\)^\{L\}for the fully masked initial state \(step 0, no decoding performed\)\. Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1)shows that drivingΔE\\Delta Efrom positive to negative requires a minimum kinetic energy expenditure\. The*energy barrier*is the minimum value ofΔE\\Delta Ealong the unperturbed denoising trajectory \(i\.e\., generation without attack intervention\); a jailbreak succeeds when it drivesΔE\\Delta Ebelow zero at any step\.
#### From sequence\-level to per\-position gap\.
The sequence\-levelΔE\\Delta E\(Eq\. \([2](https://arxiv.org/html/2609.30841#S3.E2)\)\) requires summing over exponentially many sequences and is intractable\. Masked diffusion models are*trained*under per\-token factorisation: the cross\-entropy loss decomposes over positions, and the mask predictor outputs independent per\-position distributionspθ\(x^i∣xt\)p\_\{\\theta\}\(\\hat\{x\}\_\{i\}\\mid x\_\{t\}\)\. We therefore define a per\-position surrogate over the set of masked positionsMt=\{i:xt,i=\[MASK\]\}M\_\{t\}=\\\{i:x\_\{t,i\}=\\texttt\{\[MASK\]\}\\\}that the model can natively compute\.
###### Definition 2\(Factorised Safety Energy Gap\)\.
The factorised Safety Energy Gap is the sum of per\-position log\-odds:
ΔEF\(xt,q,t\):=∑i∈Mtlog∑v∈𝒱refpθ\(v∣q,xt\)i∑v∈𝒱comppθ\(v∣q,xt\)i⏟ΔEi\(xt,q,t\),\\Delta E\_\{\\text\{F\}\}\(x\_\{t\},q,t\):=\\sum\_\{i\\in M\_\{t\}\}\\underbrace\{\\log\\frac\{\\sum\_\{v\\in\\mathcal\{V\}\_\{\\text\{ref\}\}\}p\_\{\\theta\}\(v\\mid q,x\_\{t\}\)\_\{i\}\}\{\\sum\_\{v\\in\\mathcal\{V\}\_\{\\text\{comp\}\}\}p\_\{\\theta\}\(v\\mid q,x\_\{t\}\)\_\{i\}\}\}\_\{\\Delta E\_\{i\}\(x\_\{t\},q,t\)\},\(3\)wherevvdenotes individual vocabulary tokens,𝒱ref\\mathcal\{V\}\_\{\\text\{ref\}\}contains high\-frequency refusal tokens \(e\.g\.,*sorry*,*cannot*,*refuse*; 36 tokens\) and𝒱comp\\mathcal\{V\}\_\{\\text\{comp\}\}contains compliance tokens \(e\.g\.,*sure*,*here*,*step*; 32 tokens\)\. Full token lists are in Appendix[B](https://arxiv.org/html/2609.30841#A2)\.ΔEi\\Delta E\_\{i\}is the per\-position contribution\. The sets need not be hand\-written: ranking tokens by mean step\-0 mass on held\-out harmful and benign prompts and keeping the top ten per class, with no human selection, matches the curated sets within0\.050\.05AUROC on the LLaDA family and exceeds them on Dream\-7B \(Appendix[D\.2](https://arxiv.org/html/2609.30841#A4.SS2)\)\.
Because the sum runs over masked positions, the raw value ofΔEF\\Delta E\_\{\\text\{F\}\}grows with the number of positions still masked, and hence with the generation lengthLL\. Whenever values are compared across lengths we therefore report the per\-token gapΔEF/\|Mt\|\\Delta E\_\{\\text\{F\}\}/\|M\_\{t\}\|; at fixedLLthis rescaling leaves every AUROC in the paper unchanged \(Appendix[D\.4](https://arxiv.org/html/2609.30841#A4.SS4)\)\.
###### Proposition 1\(Properties of the factorised gap\)\.
ΔEF\\Delta E\_\{\\text\{F\}\}satisfies three properties\.*\(i\) Additive decomposition:*ΔEF\\Delta E\_\{\\text\{F\}\}decomposes exactly as a sum of independent per\-position terms\.*\(ii\) Per\-position attackability:*an adversary who controls a single positionjjcan driveΔEF\\Delta E\_\{\\text\{F\}\}below zero by injecting a token that makesΔEj<−∑i≠jΔEi\\Delta E\_\{j\}<\-\\sum\_\{i\\neq j\}\\Delta E\_\{i\}\.
*\(iii\) Approximation of the sequence\-level gap:*under per\-token factorisation,ΔEF\\Delta E\_\{\\text\{F\}\}differs fromΔE\\Delta Eby an additive term that is at most linear in\|Mt\|\|M\_\{t\}\|and vanishes as𝒱ref\\mathcal\{V\}\_\{\\text\{ref\}\}and𝒱comp\\mathcal\{V\}\_\{\\text\{comp\}\}capture the dominant modes of refusal and compliance \(Eq\. \([21](https://arxiv.org/html/2609.30841#A1.E21)\), Appendix[A\.3](https://arxiv.org/html/2609.30841#A1.SS3)\)\.
Figure 1:Step\-0 ratio separates harmful from benign queries\.Distribution ofR0R\_\{0\}values across three dLLM families, harmful direct queries \(HarmBench, AdvBench\) against benign queries \(AlpacaEval, XSTest\)\. Harmful queries produce consistently higher ratios than benign queries, confirming basin separation\.The proof is in Appendix[A\.3](https://arxiv.org/html/2609.30841#A1.SS3)\. Property \(ii\) creates the per\-position attack surface exploited by template attacks: in a bidirectional transformer, an injected tokenτ\\taushiftsΔE\\Delta Eat all remaining masked positions simultaneously \(no causal masking\), with the total shift scaling linearly in\|Mt\|\|M\_\{t\}\|\(Lemma[1](https://arxiv.org/html/2609.30841#Thmlemma1), Appendix[A\.4](https://arxiv.org/html/2609.30841#A1.SS4)\)\. This linear scaling explains why DIJA’s feedback loop strengthens as each newly committed harmful token shiftsΔE\\Delta Eat all remaining positions, and why anchoring att=8t\{=\}8\(fewer positions masked but more tokens committed\) creates a larger cumulative shift than att=1t\{=\}1\. The sequence\-level energy correction of\[[24](https://arxiv.org/html/2609.30841#bib.bib22)\]would introduce non\-decomposable interaction terms that close this per\-position vulnerability, but current dLLMs do not use it\.
#### The step\-0 ratio\.
At the fully masked initial statex0=\(\[MASK\]\)Lx\_\{0\}=\(\\texttt\{\[MASK\]\}\)^\{L\}, whereLLis the response length, the model has not yet committed any token\. All masked positions are identically conditioned onqq, so the per\-position log\-ratios in Eq\. \([3](https://arxiv.org/html/2609.30841#S3.E3)\) are exchangeable and the factorised Safety Energy Gap reduces to\|M0\|\|M\_\{0\}\|identical terms\. WritingPref\(q\)=∑v∈𝒱refpθ\(v∣q,x0\)P\_\{\\text\{ref\}\}\(q\)=\\sum\_\{v\\in\\mathcal\{V\}\_\{\\text\{ref\}\}\}p\_\{\\theta\}\(v\\mid q,x\_\{0\}\)andPcomp\(q\)P\_\{\\text\{comp\}\}\(q\)likewise for𝒱comp\\mathcal\{V\}\_\{\\text\{comp\}\}:
ΔEF\(x0,q,0\)=\|M0\|log\(Pref\(q\)/Pcomp\(q\)\)\.\\Delta E\_\{\\text\{F\}\}\(x\_\{0\},q,0\)=\|M\_\{0\}\|\\log\\bigl\(P\_\{\\text\{ref\}\}\(q\)/P\_\{\\text\{comp\}\}\(q\)\\bigr\)\.\(4\)The per\-position log\-ratio is directly observable\. We define thestep\-0 ratio:
R0\(q\)=∑i∈M0Pref,i\(q\)/∑i∈M0Pcomp,i\(q\),R\_\{0\}\(q\)=\\textstyle\\sum\_\{i\\in M\_\{0\}\}P\_\{\\text\{ref\},i\}\(q\)\\big/\\sum\_\{i\\in M\_\{0\}\}P\_\{\\text\{comp\},i\}\(q\),\(5\)wherePref,iP\_\{\\text\{ref\},i\}andPcomp,iP\_\{\\text\{comp\},i\}are the masses at positionii\.
###### Proposition 2\(R0R\_\{0\}as sufficient statistic for initial safety disposition\)\.
Under per\-token factorisation at the fully masked statex0=\(\[MASK\]\)Lx\_\{0\}=\(\\texttt\{\[MASK\]\}\)^\{L\}:*\(i\) Exactness:*logR0\(q\)=ΔEF\(x0,q,0\)/\|M0\|\\log R\_\{0\}\(q\)=\\Delta E\_\{\\text\{F\}\}\(x\_\{0\},q,0\)/\|M\_\{0\}\|, i\.e\., the step\-0 ratio is the per\-position factorised Safety Energy Gap at initialisation\.*\(ii\) Optimality:*any statistic that separates𝒮\\mathcal\{S\}fromℋ\\mathcal\{H\}using step\-0 logits must be a monotone function ofR0R\_\{0\}when restricted to𝒱ref∪𝒱comp\\mathcal\{V\}\_\{\\text\{ref\}\}\\cup\\mathcal\{V\}\_\{\\text\{comp\}\}\.*\(iii\) Approximation bound:*the error from projecting onto𝒱ref∪𝒱comp\\mathcal\{V\}\_\{\\text\{ref\}\}\\cup\\mathcal\{V\}\_\{\\text\{comp\}\}satisfies
\|logR0\(q\)−ΔEfull\(x0,q,0\)\|M0\|\|≤log11−ϵref\(q\)\+log11−ϵcomp\(q\),\\left\|\\log R\_\{0\}\(q\)\-\\frac\{\\Delta E\_\{\\text\{full\}\}\(x\_\{0\},q,0\)\}\{\|M\_\{0\}\|\}\\right\|\\leq\\log\\frac\{1\}\{1\-\\epsilon\_\{\\text\{ref\}\}\(q\)\}\+\\log\\frac\{1\}\{1\-\\epsilon\_\{\\text\{comp\}\}\(q\)\},\(6\)whereϵref\(q\)=1−∑v∈𝒱refpθ\(v∣q,x0\)/∑v∈𝒮pθ\(v∣q,x0\)\\epsilon\_\{\\text\{ref\}\}\(q\)=1\-\\sum\_\{v\\in\\mathcal\{V\}\_\{\\text\{ref\}\}\}p\_\{\\theta\}\(v\\mid q,x\_\{0\}\)\\big/\\sum\_\{v\\in\\mathcal\{S\}\}p\_\{\\theta\}\(v\\mid q,x\_\{0\}\)measures coverage loss \(with𝒮\\mathcal\{S\}here interpreted at the token level; cf\. §[3\.1](https://arxiv.org/html/2609.30841#S3.SS1)\), andϵcomp\(q\)\\epsilon\_\{\\text\{comp\}\}\(q\)is defined symmetrically\.
The proof is in Appendix[A\.5](https://arxiv.org/html/2609.30841#A1.SS5)\. Part \(i\) showsR0R\_\{0\}computes a specific quantity \(the per\-position energy gap\) rather than a loose keyword correlation; part \(ii\) is a*conditional*optimality statement:R0R\_\{0\}is the most powerful testwithin the projection𝒱ref∪𝒱comp\\mathcal\{V\}\_\{\\text\{ref\}\}\\cup\\mathcal\{V\}\_\{\\text\{comp\}\}, not the most powerful step\-0 detector overall\. A learned classifier on the full step\-0 logit distribution \(or a richer vocabulary projection\) could in principle outperformR0R\_\{0\}; we adopt the projection because of its computational simplicity and interpretability, with part \(iii\) quantifying the resulting information loss\. Part \(iii\) predicts whenR0R\_\{0\}fails: if safety\-relevant mass is diffuse across tokens outside𝒱ref\\mathcal\{V\}\_\{\\text\{ref\}\}, the projection becomes lossy\. We validate this across five vocabulary sets in Appendix[D\.2](https://arxiv.org/html/2609.30841#A4.SS2), confirming that as few as five well\-chosen tokens suffice \(AUROC 0\.95\) while synonym sets that miss the model’s high\-mass tokens degrade to 0\.80\.
Figure[1](https://arxiv.org/html/2609.30841#S3.F1)shows thatR0R\_\{0\}consistently separates harmful from benign queries across all three model families, with harmful queries producingR0R\_\{0\}values 5–11×\\timeshigher than benign queries \(AUROC 0\.86–0\.90 across LLaDA\-8B, LLaDA\-1\.5, and Dream\-7B\)\. This separation holds regardless of training paradigm \(native diffusion vs\. AR\-initialised\), suggesting that alignment consistently shapes the energy landscape into well\-separated basins\.
#### The blind spot: template attacks evadeR0R\_\{0\}\.
Table[1](https://arxiv.org/html/2609.30841#S3.T1)reveals that template attacks \(PAD, DIJA\) produce near\-chance detection \(AUROC 0\.15–0\.49\) because they alterx0x\_\{0\}, injecting tokens that shift probability mass away from refusal indicators and obscure the query’s safety disposition at step 0\. Anchoring attacks, by contrast, share theR0R\_\{0\}of harmful queries without template modification \(i\.e\., direct harmful prompts\) because they intervene only after step 0\. This pattern exposes a fundamental limitation:R0R\_\{0\}monitors only which basin the trajectory starts in and is blind to what happens during generation\. Detecting template attacks requires monitoring trajectory dynamics, which is the subject of the next section\.
Table 1:Step\-0 ratio fails on template attacks\.AUROC forR0R\_\{0\}detecting each attack \(built on HarmBench and AdvBench prompts\) vs\. benign queries \(AlpacaEval, XSTest\)\. Template attacks \(PAD, DIJA\) produce near\-chance detection because injected tokens obscure the query’s safety disposition at step 0\.
### 3\.2Barrier Crossing and Trajectory Velocity
*Question: when the initial state has been disguised, what must an attack still leave behind during denoising?*
Since template attacks evadeR0R\_\{0\}by obscuring the initial state, detection must shift to what happens*during*denoising\. The key observation is that a trajectory in its natural basin decelerates as it converges, whereas one forced across the barrier must sustain high velocity throughout — a cost template attacks cannot avoid\. We now formalise this cost and derive two signals that track it\.
#### The kinetic energy cost of barrier crossing\.
The rate of change of the factorised gapΔEF\\Delta E\_\{\\text\{F\}\}along the trajectory decomposes positionally as:
ddtΔEF\(xt,q,t\)=∑i∈MtddtΔEi\(xt,q,t\),\\tfrac\{d\}\{dt\}\\Delta E\_\{\\text\{F\}\}\(x\_\{t\},q,t\)=\\textstyle\\sum\_\{i\\in M\_\{t\}\}\\tfrac\{d\}\{dt\}\\Delta E\_\{i\}\(x\_\{t\},q,t\),\(7\)withΔEi\\Delta E\_\{i\}the per\-position log\-ratio of Eq\. \([3](https://arxiv.org/html/2609.30841#S3.E3)\)\. For a trajectory in its natural basin, each term changes slowly, so\|dΔEF/dt\|\|d\\Delta E\_\{\\text\{F\}\}/dt\|is small\. For a trajectory forced across the barrier, the per\-position log\-ratios shift rapidly toward𝒱comp\\mathcal\{V\}\_\{\\text\{comp\}\}, producing large\|dΔEF/dt\|\|d\\Delta E\_\{\\text\{F\}\}/dt\|\.
###### Theorem 1\(Kinetic energy cost of barrier crossing\)\.
Under the per\-token factorisationpθ\(x^∣xt\)=∏ipθ\(x^i∣xt\)p\_\{\\theta\}\(\\hat\{x\}\\mid x\_\{t\}\)=\\prod\_\{i\}p\_\{\\theta\}\(\\hat\{x\}\_\{i\}\\mid x\_\{t\}\), suppose the factorised Safety Energy Gap crosses the safety barrier over interval\[t1,t2\]\[t\_\{1\},t\_\{2\}\], i\.e\.,ΔEF\(xt1,q,t1\)≥\+δ\\Delta E\_\{\\text\{F\}\}\(x\_\{t\_\{1\}\},q,t\_\{1\}\)\\geq\+\\deltaandΔEF\(xt2,q,t2\)≤−δ\\Delta E\_\{\\text\{F\}\}\(x\_\{t\_\{2\}\},q,t\_\{2\}\)\\leq\-\\deltafor someδ\>0\\delta\>0\. Letzti∈ℝ\|𝒱\|z\_\{t\}^\{i\}\\in\\mathbb\{R\}^\{\|\\mathcal\{V\}\|\}denote the logit vector at masked positioniiat steptt, and let𝐅\(zti\)=diag\(pti\)−pti\(pti\)⊤\\mathbf\{F\}\(z\_\{t\}^\{i\}\)=\\mathrm\{diag\}\(p\_\{t\}^\{i\}\)\-p\_\{t\}^\{i\}\(p\_\{t\}^\{i\}\)^\{\\top\}, wherepti=softmax\(zti\)p\_\{t\}^\{i\}=\\mathrm\{softmax\}\(z\_\{t\}^\{i\}\), be the Fisher information matrix at positionii\. Define the per\-position gap functionalϕi\(p\)=log\(∑v∈𝒱refpv/∑v∈𝒱comppv\)\\phi\_\{i\}\(p\)=\\log\(\\sum\_\{v\\in\\mathcal\{V\}\_\{\\text\{ref\}\}\}p\_\{v\}/\\sum\_\{v\\in\\mathcal\{V\}\_\{\\text\{comp\}\}\}p\_\{v\}\)\(i\.e\., the per\-position gapΔEi\\Delta E\_\{i\}from Eq\. \([3](https://arxiv.org/html/2609.30841#S3.E3)\) written as a function of the probability vector\) and let
Gmax=maxi,t‖∇pϕi‖𝐅\(zti\)G\_\{\\max\}=\\max\_\{i,t\}\\\|\\nabla\_\{p\}\\phi\_\{i\}\\\|\_\{\\mathbf\{F\}\(z\_\{t\}^\{i\}\)\}\(8\)be the maximum Fisher\-weighted gradient norm, where‖∇pϕi‖𝐅2:=\(∇pϕi\)⊤𝐅\(zti\)\(∇pϕi\)\\\|\\nabla\_\{p\}\\phi\_\{i\}\\\|\_\{\\mathbf\{F\}\}^\{\\,2\}:=\(\\nabla\_\{p\}\\phi\_\{i\}\)^\{\\top\}\\mathbf\{F\}\(z\_\{t\}^\{i\}\)\(\\nabla\_\{p\}\\phi\_\{i\}\)\. Then the kinetic energy over\[t1,t2\]\[t\_\{1\},t\_\{2\}\]satisfies:
∫t1t2γ˙t−1∑i∈Mt\(z˙ti\)⊤𝐅\(zti\)z˙ti𝑑t≥4δ2\(t2−t1\)⋅\|M\|max⋅Gmax2,\\int\_\{t\_\{1\}\}^\{t\_\{2\}\}\\dot\{\\gamma\}\_\{t\}^\{\-1\}\\sum\_\{i\\in M\_\{t\}\}\(\\dot\{z\}\_\{t\}^\{i\}\)^\{\\top\}\\mathbf\{F\}\(z\_\{t\}^\{i\}\)\\,\\dot\{z\}\_\{t\}^\{i\}\\,dt\\;\\geq\\;\\frac\{4\\delta^\{2\}\}\{\(t\_\{2\}\-t\_\{1\}\)\\cdot\|M\|\_\{\\max\}\\cdot G\_\{\\max\}^\{2\}\},\(9\)where\|M\|max=maxt∈\[t1,t2\]\|Mt\|\|M\|\_\{\\max\}=\\max\_\{t\\in\[t\_\{1\},t\_\{2\}\]\}\|M\_\{t\}\|and we assumeγ˙t≤1\\dot\{\\gamma\}\_\{t\}\\leq 1\(satisfied by standard schedules\)\. The bound transfers to the sequence\-level gapΔE\\Delta Eup to the additive correction in Proposition[1](https://arxiv.org/html/2609.30841#Thmproposition1)\(iii\), so a sequence\-level barrier crossing implies the same kinetic energy lower bound whenever the projection errorηref,ηcomp\\eta\_\{\\text\{ref\}\},\\eta\_\{\\text\{comp\}\}is small\.
The proof \(Appendix[A\.2](https://arxiv.org/html/2609.30841#A1.SS2)\) chains three results from information geometry: \(1\) the mean value theorem gives a point where\|dΔEF/dt\|≥2δ/\(t2−t1\)\|d\\Delta E\_\{\\text\{F\}\}/dt\|\\geq 2\\delta/\(t\_\{2\}\-t\_\{1\}\); \(2\) Cauchy–Schwarz in the Fisher inner product bounds the gap rate by the Fisher\-weighted logit velocity; \(3\) the integral Cauchy–Schwarz inequality yields the stated bound\.
Three aspects of the bound are worth noting\. First, it scales asδ2\\delta^\{2\}: a larger safety gap \(better alignment\) requires quadratically more kinetic energy to breach\. Second, the1/\(t2−t1\)1/\(t\_\{2\}\-t\_\{1\}\)factor means crossing the barrier in fewer denoising steps requires proportionally more velocity per step, exactly the signal that the SED slope detects empirically\. Third, the kinetic energy integrand\(z˙ti\)⊤𝐅\(zti\)z˙ti\(\\dot\{z\}\_\{t\}^\{i\}\)^\{\\top\}\\mathbf\{F\}\(z\_\{t\}^\{i\}\)\\,\\dot\{z\}\_\{t\}^\{i\}is the Fisher\-weighted logit velocity: the Fisher information matrix of the categorical distribution is the Riemannian metric on the probability simplex, and the kinetic energy of\[[7](https://arxiv.org/html/2609.30841#bib.bib23)\]is the integral of this metric applied to the trajectory velocity\. The bound is one\-directional: barrier crossing requires elevated kinetic energy, but high velocity can also arise from difficult safe generation\. In practice, attack and benign trajectories remain distinguishable \(Table[2](https://arxiv.org/html/2609.30841#S3.T2), §[3\.3](https://arxiv.org/html/2609.30841#S3.SS3)\)\.
#### From kinetic energy to computable signals\.
Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1)establishes that barrier crossing elevates the Fisher\-weighted logit velocity\(z˙ti\)⊤𝐅\(zti\)z˙ti\(\\dot\{z\}\_\{t\}^\{i\}\)^\{\\top\}\\mathbf\{F\}\(z\_\{t\}^\{i\}\)\\,\\dot\{z\}\_\{t\}^\{i\}\. A standard result from the exponential family structure of softmax connects this to a cheap observable: logit displacement tracks Kullback–Leibler \(KL\) divergence to second order via the Fisher information matrix \(Lemma[2](https://arxiv.org/html/2609.30841#Thmlemma2), Appendix[A\.6](https://arxiv.org/html/2609.30841#A1.SS6)\), and when logit norms vary slowly, cosine similarity provides a monotone proxy \(Corollary[1](https://arxiv.org/html/2609.30841#Thmcorollary1), Appendix[A\.6](https://arxiv.org/html/2609.30841#A1.SS6)\)\. The slow\-norm condition is the only approximation; we verify empirically \(Appendix[E](https://arxiv.org/html/2609.30841#A5), Table[12](https://arxiv.org/html/2609.30841#A5.T12)\) that norm variation stays below 5% over the measurement window, confirming that angular displacement dominates\.
#### Subspace decomposition of Fisher velocity\.
The Fisher\-weighted logit velocity in Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1)operates over the full vocabulary𝒱\\mathcal\{V\}, but the proportionality constant linking cosine displacement to this velocity depends on the model’s Fisher spectrum, so a single cosine signal cannot be calibrated uniformly across architectures\. We address this by decomposing the velocity into complementary subspaces\. LetVs=Vref∪VcompV\_\{s\}=V\_\{\\text\{ref\}\}\\cup V\_\{\\text\{comp\}\}denote the safety\-relevant subspace andV⟂=𝒱∖VsV\_\{\\perp\}=\\mathcal\{V\}\\setminus V\_\{s\}its complement\. The Fisher velocity at positioniidecomposes as:
\(z˙ti\)⊤𝐅\(zti\)z˙ti=\(z˙Vsi\)⊤𝐅Vs\(zti\)z˙Vsi\+\(z˙V⟂i\)⊤𝐅V⟂\(zti\)z˙V⟂i\+cross\-terms,\(\\dot\{z\}\_\{t\}^\{i\}\)^\{\\top\}\\mathbf\{F\}\(z\_\{t\}^\{i\}\)\\,\\dot\{z\}\_\{t\}^\{i\}\\;=\\;\(\\dot\{z\}\_\{V\_\{s\}\}^\{i\}\)^\{\\top\}\\mathbf\{F\}\_\{V\_\{s\}\}\(z\_\{t\}^\{i\}\)\\,\\dot\{z\}\_\{V\_\{s\}\}^\{i\}\\;\+\\;\(\\dot\{z\}\_\{V\_\{\\perp\}\}^\{i\}\)^\{\\top\}\\mathbf\{F\}\_\{V\_\{\\perp\}\}\(z\_\{t\}^\{i\}\)\\,\\dot\{z\}\_\{V\_\{\\perp\}\}^\{i\}\\;\+\\;\\text\{cross\-terms\},\(10\)
where the cross\-terms come from off\-diagonal Fisher blocks\. Since\|V⟂\|≈128k≫\|Vs\|≈70\|V\_\{\\perp\}\|\\approx 128\\text\{k\}\\gg\|V\_\{s\}\|\\approx 70and the off\-diagonal entries scale aspvpwp\_\{v\}p\_\{w\}forv∈Vs,w∈V⟂v\\in V\_\{s\},\\,w\\in V\_\{\\perp\}, the full\-space velocity is dominated byV⟂V\_\{\\perp\}and the cross\-terms are negligible whenever safety\-relevant tokens carry small total mass\. Which subspace carries the attack signal depends on how the architecture concentrates safety structure: the Fisher discriminantJJ\(Appendix[D\.1](https://arxiv.org/html/2609.30841#A4.SS1)\) is≈33\\approx 33on the LLaDA family butJ=139\.73J=139\.73on Dream\-7B, indicating that Dream’s AR\-initialised prior concentrates safety structure sharply withinVsV\_\{s\}and makes attack disruption there detectable viaΔE\\Delta Eslope\. This motivates two complementary proxies for the kinetic energy integrand, each capturing disruption in a different subspace\.
SED slope\(velocity inV⟂V\_\{\\perp\}\)\. TheSimilarity to initial logitsEvolution duringDenoising is:
SED\(t\)=1\|Mt\|∑i∈Mtzti⋅z0i‖zti‖⋅‖z0i‖,\\text\{SED\}\(t\)=\\frac\{1\}\{\|M\_\{t\}\|\}\\sum\_\{i\\in M\_\{t\}\}\\frac\{z\_\{t\}^\{i\}\\cdot z\_\{0\}^\{i\}\}\{\\\|z\_\{t\}^\{i\}\\\|\\cdot\\\|z\_\{0\}^\{i\}\\\|\},\(11\)tracking cumulative displacement from the initial state\. Because\|V⟂\|≫\|Vs\|\|V\_\{\\perp\}\|\\gg\|V\_\{s\}\|, SED effectively captures theV⟂V\_\{\\perp\}component\. We estimate trajectory velocity from the linear slope over the first half of denoising:
s=slope\(SED\(0\),SED\(1\),…,SED\(⌊T/2⌋\)\),s=\\operatorname\{slope\}\\\!\\left\(\\text\{SED\}\(0\),\\,\\text\{SED\}\(1\),\\,\\ldots,\\,\\text\{SED\}\\\!\\left\(\\lfloor T/2\\rfloor\\right\)\\right\),\(12\)where a steeper \(more negative\) slope indicates higher kinetic energy expenditure\. The first\-half window is chosen because logit norm stability degrades in later steps \(Appendix[E](https://arxiv.org/html/2609.30841#A5)\), weakening the cosine\-to\-KL correspondence\.
ΔE\\Delta Eslope\(velocity inVsV\_\{s\}\)\. The rate of change ofΔEF\(t\)\\Delta E\_\{\\text\{F\}\}\(t\)\(henceforth abbreviatedΔE\(t\)\\Delta E\(t\)when no confusion arises\) measures how fast probability mass shifts between refusal and compliance tokens, which is theVsV\_\{s\}projection of the Fisher velocity\. We operationalise this as:
sΔE=slope\(ΔEF\(0\),ΔEF\(1\),…,ΔEF\(⌊T/4⌋\)\),s\_\{\\Delta E\}=\\operatorname\{slope\}\\\!\\left\(\\Delta E\_\{\\text\{F\}\}\(0\),\\,\\Delta E\_\{\\text\{F\}\}\(1\),\\,\\ldots,\\,\\Delta E\_\{\\text\{F\}\}\\\!\\left\(\\lfloor T/4\\rfloor\\right\)\\right\),\(13\)computed over the first 25% of denoising \(ablated in Table[8](https://arxiv.org/html/2609.30841#A4.T8), Appendix[D\.3](https://arxiv.org/html/2609.30841#A4.SS3)\)\. The shorter window reflects that attack\-induced shifts in the 70\-dimensionalVsV\_\{s\}subspace are sharp and early, whereas SED averages over∼128\{\\sim\}128k dimensions where the signal accumulates more gradually\. A steeply negativesΔEs\_\{\\Delta E\}indicates rapid descent into the harmful basin\. Unlike SED slope,ΔE\\Delta Eslope requires no cosine approximation: the rate of changedΔEF/dtd\\Delta E\_\{\\text\{F\}\}/dtappears directly in the kinetic energy bound \(Eq\. \([7](https://arxiv.org/html/2609.30841#S3.E7)\)\)\.
Together, the three signals decompose the energy budget:R0R\_\{0\}measures the initial safety disposition, the SED slopessmeasures trajectory velocity inV⟂V\_\{\\perp\}, and theΔE\\Delta EslopesΔEs\_\{\\Delta E\}measures trajectory velocity inVsV\_\{s\}\. An attack must either reveal its intent at initialisation \(detected byR0R\_\{0\}\) or cross the barrier by expending kinetic energy in at least one subspace \(detected byssorsΔEs\_\{\\Delta E\}\)\.
#### Empirical validation\.
On the LLaDA family, PAD and DIJA produce steep SED slopes \(AUROC 0\.84–0\.90\) and anchoring att=8t\{=\}8triggers the same signal \(AUROC 0\.85–0\.95\), consistent with Lemma[1](https://arxiv.org/html/2609.30841#Thmlemma1); benign generation produces flat slopes \(Appendix[E\.3](https://arxiv.org/html/2609.30841#A5.SS3)\)\. On Dream\-7B, SED slope detects DIJA \(0\.92\) but fails on PAD \(0\.52\), whileΔE\\Delta Eslope captures precisely this gap \(PAD AUROC 0\.98 viasΔEs\_\{\\Delta E\}\), because PAD’s disruption concentrates inVsV\_\{s\}rather than the full vocabulary\. Figure[3](https://arxiv.org/html/2609.30841#S3.F3)confirms this architecture\-dependent subspace concentration: on LLaDA, PAD separates along the SED axis; on Dream, alongΔE\\Delta E\(Eq\. \([10](https://arxiv.org/html/2609.30841#S3.E10)\)\)\.
Figure 2:Safety Energy GapΔE\(t\)\\Delta E\(t\)trajectories during denoising\.Each line shows the mean factorised gap \(Eq\. \([3](https://arxiv.org/html/2609.30841#S3.E3)\)\) at each denoising step, averaged over 400 prompts per condition \(harmful and attack conditions from HarmBench\), plotted as the raw sum over masked positions atL=128L=128; the per\-token form is used in Appendix[D\.4](https://arxiv.org/html/2609.30841#A4.SS4)\. The dashed line atΔE=0\\Delta E=0marks the energy barrier\. Harmful direct queries \(black\) remain in the safe basin \(ΔE\>0\\Delta E\>0\) as the model refuses\. Template attacks \(PAD, DIJA\) start nearΔE≈0\\Delta E\\approx 0and descend into the harmful basin\. Anchoring att=1t\{=\}1shows partial recovery; att=8t\{=\}8, recovery fails\.Figure 3:Fisher velocity projects onto different subspaces across architectures\.Each panel shows\|SED slope\|\|\\text\{SED slope\}\|\(xx\-axis,≈‖z˙V⟂‖F\\approx\\\|\\dot\{z\}\_\{V\_\{\\perp\}\}\\\|\_\{F\}\) vs\.\|ΔEslope Q1\|\|\\Delta E\\text\{ slope Q1\}\|\(yy\-axis,≈‖z˙Vs‖F\\approx\\\|\\dot\{z\}\_\{V\_\{s\}\}\\\|\_\{F\}\) for benign \(AlpacaEval, XSTest\) and attack \(PAD on HarmBench and AdvBench\) prompts\. On LLaDA\-8B, PAD separates alongxx\(SED, AUROC 0\.90\); on Dream\-7B, alongyy\(ΔE\\Delta E, AUROC 0\.98\)\. The two slopes measure the same Fisher velocity in complementary subspaces\.
### 3\.3Empirical Validation
*Question: do the three signals together cover every known attack, on architectures that concentrate safety differently?*
#### Attack taxonomy\.
Every known attack maps onto the energy decomposition in one of two ways \(Table[2](https://arxiv.org/html/2609.30841#S3.T2)\)\.*Potential\-energy attacks*\(harmful direct queries, anchoring\) leave harmful intent visible at step 0 and are detected byR0R\_\{0\}\.*Kinetic\-energy attacks*\(PAD, DIJA, late anchoring\) obscure or bypass the initial state and must force the trajectory across the barrier, producing elevated velocity inV⟂V\_\{\\perp\}\(detected by SED slope on LLaDA\) orVsV\_\{s\}\(detected byΔE\\Delta Eslope on Dream\)\. Late anchoring \(t=8t\{=\}8\) is detected by bothR0R\_\{0\}\(unmodified initial state\) and the velocity signals \(irrecoverable trajectory displacement\)\. The key structural prediction is that simultaneous evasion of all three signals would require an attack whose kinetic cost falls below detection thresholds in*both*subspaces while still exceeding the barrier\-crossing minimum from Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1), a window that adaptive attack experiments \(§[4](https://arxiv.org/html/2609.30841#S4)\) show is empty on all models tested\.
Table 2:Attack signatures in the energy decomposition\.AUROC of each signal, attack prompts built on HarmBench and AdvBench against benign AlpacaEval and XSTest prompts\. Each attack either reveals harmful intent at initialisation \(highR0R\_\{0\}, detected before generation begins\) or forces barrier crossing \(steep slope inV⟂V\_\{\\perp\}orVsV\_\{s\}\), or both\. Dream\-7B PAD row illustrates the architecture\-dependent subspace shift\.
#### Combined detection\.
The taxonomy suggests a simple OR rule: flag a query ifR0\>τRR\_\{0\}\>\\tau\_\{R\},\|s\|\>τs\|s\|\>\\tau\_\{s\}, or\|sΔE\|\>τΔE\|s\_\{\\Delta E\}\|\>\\tau\_\{\\Delta E\}\. By Definitions[1](https://arxiv.org/html/2609.30841#Thmdefinition1)–[2](https://arxiv.org/html/2609.30841#Thmdefinition2), any successful attack must driveΔEF\(xt,q,t\)<0\\Delta E\_\{\\text\{F\}\}\(x\_\{t\},q,t\)<0at some step \(with sequence\-levelΔE\\Delta Efollowing via Proposition[1](https://arxiv.org/html/2609.30841#Thmproposition1)\(iii\)\), which requires either low potential energy at initialisation \(ΔEF\(x0,q,0\)<0\\Delta E\_\{\\text\{F\}\}\(x\_\{0\},q,0\)<0, detected byR0R\_\{0\}\) or sufficient kinetic energy to cross the barrier \(dΔEF/dtd\\Delta E\_\{\\text\{F\}\}/dtsufficiently negative, detected by SED slope orΔE\\Delta Eslope in at least one subspace\)\. The OR rule therefore covers the entire energy budget by construction; threshold\-calibrated operating points are in Appendix[F](https://arxiv.org/html/2609.30841#A6)\. Table[3](https://arxiv.org/html/2609.30841#S3.T3)reports AUROC for individual signals and their combination\. On LLaDA\-8B,R0R\_\{0\}\+ SED slope achieves AUROC 0\.83–0\.95 across attacks\. AddingΔE\\Delta Eslope becomes critical on Dream\-7B: PAD detection rises from 0\.41 \(R0R\_\{0\}\+ SED\) to 0\.95 \(all three\)\. Under the three\-signal combination, no attack falls below AUROC 0\.83 on any model\. Because each signal is calibrated atα/3\\alpha/3, the OR rule cannot raise the false\-positive rate aboveα\\alpha; its cost falls on recall instead, which is why threshold\-level recall sits below these AUROCs for template attacks on LLaDA\. Appendix[F\.3](https://arxiv.org/html/2609.30841#A6.SS3)compares four aggregation rules at the same guaranteed false\-positive rate\. The maximum of calibratedzz\-scores, the rule Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1)prescribes because an attack must overspend in at least one subspace, matches or beats OR in every setting without training, and a logistic combination roughly doubles recall on the LLaDA template attacks where labelled calibration data exist\. The same pattern holds on a sparse mixture\-of\-experts dLLM \(Appendix[D\.5](https://arxiv.org/html/2609.30841#A4.SS5)\)\.
Table 3:Combined detection AUROC\.Attacks on HarmBench and AdvBench prompts against benign AlpacaEval and XSTest prompts\. The three\-signal combination resolves PAD on Dream whereR0R\_\{0\}\+ SED slope fails\.
#### Relationship to DiffuGuard\-SD\.
Figure[4](https://arxiv.org/html/2609.30841#S3.F4)compares all detection signals across models and attacks\. DiffuGuard’s Safety Divergence \(SD\) can be understood as a fourth observable of the energy landscape: it detects*landscape deformation*\(whetherx0x\_\{0\}was reshaped by template injection\), achieving AUROC 1\.00 for template attacks but≈0\.50\\approx 0\.50for non\-template threats\. SD and our three signals are complementary: SD detects the*mechanism*of template attacks \(state modification\), whileR0R\_\{0\}, SED slope, andΔE\\Delta Eslope detect their*consequence*\(basin displacement or barrier crossing\)\. A complete detection system would monitor all four\.
#### From detection to deployment\.
All three signals are read from logits the model already computes, so monitoring is training\-free and adds negligible overhead\. A flagged query can be refused, regenerated under a hardened schedule, or escalated to a heavier filter, so detection makes these costlier steps conditional and rare\. Detection depends on the generation lengthLLand block sizeBB, which the deployer chooses \(Appendix[D\.4](https://arxiv.org/html/2609.30841#A4.SS4)\): the LLaDA results in this paper hold atL=128L=128, and we recommendL≤128L\\leq 128withB≥L/2B\\geq L/2on LLaDA andLLup to 256 on Dream\.
Figure 4:Detection AUROC across metrics, attacks, and models\.Attack conditions built on HarmBench and AdvBench, benign pool AlpacaEval and XSTest\. Green: AUROC≥0\.85\\geq 0\.85; red:≤0\.50\\leq 0\.50\. The combined energy detector \(bottom row\) covers all tested attacks on both architectures; DiffuGuard\-SD \(the detection component of DiffuGuard\) is complementary, achieving perfect detection on template attacks but failing on non\-template threats\. We do not benchmark the full DiffuGuard pipeline \(SD \+ generation\-time defenses\), which falls outside our detection\-only scope\.
## 4Parametric Stress Testing of Known Attacks
We stress\-test the complementarity claim from §[3\.3](https://arxiv.org/html/2609.30841#S3.SS3)against*parametric variation*of two known attack families:*template titration*\(reducing PAD connector count\) and*anchoring timing variation*\(sweeping the intervention step\)\. We evaluate on both LLaDA\-8B and Dream\-7B\.
#### Scope\.
The experiments below vary a single scalar parameter \(ncn\_\{c\}ortintert\_\{\\mathrm\{inter\}\}\) of existing attack templates to test whether the detection–attack coupling predicted by Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1)holds in practice\. Fully white\-box adaptive attacks that optimise directly against the OR\-detector \(e\.g\., via gradient\-based search over response\-region tokens\) are an important next step that we leave to future work\. Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1)does constrain such an attacker\. The kinetic energy an attack must spend scales asδ2/\(\(t2−t1\)\|M\|maxGmax2\)\\delta^\{2\}/\(\(t\_\{2\}\-t\_\{1\}\)\\,\|M\|\_\{\\max\}\\,G\_\{\\max\}^\{2\}\), which leaves three levers\. Stretching the crossing interval keeps the gap descending through the window the slope signals integrate, and deferring it past that window turns into late anchoring, whichR0R\_\{0\}catches because the initial state is unmodified \(tinter=32t\_\{\\text\{inter\}\}\{=\}32below\)\. Exploiting positions whereGmaxG\_\{\\max\}is large means working where refusal and compliance mass are both non\-negligible, which is the region theΔE\\Delta Eslope monitors\. Reducing the effective barrierδ\\deltameans starting near the barrier, whichR0R\_\{0\}measures directly\. The constraint therefore lies in the attacker’s objective rather than in any threshold choice: the energy an attack must spend is the quantity the detector measures\. Whether this coupling survives a deliberate optimiser, either over response\-region tokens or one that suppresses𝒱ref\\mathcal\{V\}\_\{\\text\{ref\}\}mass while keeping harmful semantics, is the experiment that would most strengthen this line of work\. The same constraint applies to attacks not yet designed: to succeed, an attack must drive the Safety Energy Gap below zero, which by Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1)costs either low potential energy at initialisation or kinetic energy in at least one monitored subspace\.
#### PAD template titration\.
An adaptive attacker might reduce the number of injected connectors to lower trajectory disruption while retaining enough structure to steer generation\. We sweepnc∈\{0,1,2,3,4,6\}n\_\{c\}\\in\\\{0,1,2,3,4,6\\\}connectors \(Table[4](https://arxiv.org/html/2609.30841#S4.T4)\)\.
Table 4:Adaptive attack detection AUROC\.Attacks on HarmBench and AdvBench prompts against benign AlpacaEval and XSTest prompts\.*Top:*PAD titration\. On Dream\-7B, SED fails atnc=1,2n\_\{c\}\\\!=\\\!1\{,\}2butΔE\\Delta Eslope rescues detection \(bold\)\.*Bottom:*Anchoring sweep:R0R\_\{0\}is constant; slope signals increase withtintert\_\{\\mathrm\{inter\}\}\.
#### Results\.
On LLaDA\-8B, theR0R\_\{0\}\+SED combination detects all configurations that reliably produce harmful content \(nc≥2n\_\{c\}\\geq 2, AUROC 0\.90–0\.95\)\. Reducing tonc=1n\_\{c\}\\\!=\\\!1drops all signals below detection, but a single connector is insufficient to induce harmful generation: the model produces only truncated stubs rather than actionable harmful content \(see Appendix[G](https://arxiv.org/html/2609.30841#A7)for generated outputs at eachncn\_\{c\}\)\. The attacker cannot reduce template intensity below the detection threshold without also falling below the barrier\-crossing threshold\. On Dream\-7B, whereR0R\_\{0\}\+ SED slope alone is evaded by reduced\-intensity PAD \(nc≤2n\_\{c\}\\leq 2\), theΔE\\Delta Eslope rescues detection \(Table[4](https://arxiv.org/html/2609.30841#S4.T4)\), confirming that monitoring both subspaces is necessary for architecture\-robust coverage\. Fornc≥3n\_\{c\}\\geq 3,ΔE\\Delta Eslope achieves near\-perfect detection \(≥0\.996\\geq 0\.996\)\. The subspace decomposition explains this: on Dream, PAD’s disruption concentrates inVsV\_\{s\}, so reducing template intensity weakens theV⟂V\_\{\\perp\}signal \(SED\) while theVsV\_\{s\}signal \(ΔE\\Delta Eslope\) remains strong\.
#### Anchoring timing sweep\.
We sweeptinter∈\{1,2,4,8,16,32\}t\_\{\\mathrm\{inter\}\}\\in\\\{1,2,4,8,16,32\\\}\(Table[4](https://arxiv.org/html/2609.30841#S4.T4), bottom\)\.R0R\_\{0\}is invariant to timing \(AUROC 0\.94–0\.96\) since anchoring does not modifyx0x\_\{0\}, so theR0R\_\{0\}\+SED combination remains strong throughout\. The velocity signals increase monotonically withtintert\_\{\\mathrm\{inter\}\}, consistent with Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1): later intervention leaves fewer denoising steps for barrier crossing, requiring higher velocity per step\. On LLaDA\-8B,ΔE\\Delta EQ1 rises from0\.580\.58\(tinter=1t\_\{\\mathrm\{inter\}\}\\\!=\\\!1\) to0\.940\.94\(tinter=16t\_\{\\mathrm\{inter\}\}\\\!=\\\!16\); on Dream\-7B, from0\.450\.45to1\.001\.00over the same range\. Attinter=32t\_\{\\text\{inter\}\}=32,ΔE\\Delta Edrops to0\.250\.25–0\.300\.30because the intervention falls outside the Q1 measurement window;R0R\_\{0\}still detects this configuration \(AUROC0\.990\.99\)\.
## 5Conclusion
We proposed an energy\-based analysis that unifies jailbreak attacks against diffusion language models as strategies for circumventing the energy barrier that alignment creates between safe and harmful basins\. Three training\-free detection signals monitor complementary components of this budget:R0R\_\{0\}reads the initial safety disposition, while the SED andΔE\\Delta Eslopes track kinetic energy in complementary subspaces during denoising\. Evaluation on different models confirms that basin structure is intrinsic to aligned dLLMs, while the subspace in which kinetic energy concentrates varies with architecture\. Limitations include: \(i\) validation against existing attacks only, with fully adaptive adversaries left to future work; \(ii\) dependence on per\-token factorisation and vocabulary sets specific to current MDM objectives, including a language dependence: on Chinese prompts the English token sets lose their mass andR0R\_\{0\}degrades until the sets are re\-derived in that language \(Appendix[D\.2](https://arxiv.org/html/2609.30841#A4.SS2)\); \(iii\) threshold\-level TPR that varies with architecture despite uniformly strong rank\-order detection \(Appendix[F](https://arxiv.org/html/2609.30841#A6)\); and \(iv\) threshold\-level recall on LLaDA that falls as the generation length grows beyondL=128L=128\(Appendix[D\.4](https://arxiv.org/html/2609.30841#A4.SS4)\)\. The account transfers only in part beyond masked diffusion \(Appendix[C](https://arxiv.org/html/2609.30841#A3)\)\.
## Acknowledgments and Disclosure of Funding
We thank the anonymous reviewers and the area chair for their detailed reports\. The discussions of covert\-path attackers \(§[4](https://arxiv.org/html/2609.30841#S4)\), energy\-motivated aggregation rules \(Appendix[F\.3](https://arxiv.org/html/2609.30841#A6.SS3)\), and transfer to autoregressive and text\-to\-image models \(Appendix[C](https://arxiv.org/html/2609.30841#A3)\) grew out of questions raised in review\.
## References
- \[1\]A\. Arditi, O\. Obeso, A\. Syed, D\. Paleka, N\. Panickssery, W\. Gurnee, and N\. Nanda\(2024\)Refusal in language models is mediated by a single direction\.InAdvances in Neural Information Processing Systems,Vol\.37,pp\. 136037–136083\.Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px2.p1.1)\.
- \[2\]J\. Austin, D\. D\. Johnson, J\. Ho, D\. Tarlow, and R\. van den Berg\(2021\)Structured denoising diffusion models in discrete state\-spaces\.InAdvances in Neural Information Processing Systems,Vol\.34,pp\. 17981–17993\.Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px1.p1.1)\.
- \[3\]T\. Bach, D\. Nguyen, T\. M\. Le, and T\. Tran\(2026\)Continual safety alignment via gradient\-based sample selection\.InFindings of the Association for Computational Linguistics: ACL 2026,pp\. 18870–18887\.Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px2.p1.1)\.
- \[4\]T\. Bach, D\. Nguyen, T\. M\. Le, and T\. Tran\(2026\)Rethinking deep alignment through the lens of incomplete safety learning\.InProceedings of the AAAI Conference on Artificial Intelligence,Vol\.40,pp\. 30005–30012\.Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px2.p1.1)\.
- \[5\]T\. Bach, T\. Nguyen\-Tang, D\. Nguyen, T\. M\. Le, and T\. Tran\(2026\)Curvature\-aware safety restoration in LLMs fine\-tuning\.Transactions on Machine Learning Research\.Note:External Links:ISSN 2835\-8856,[Link](https://openreview.net/forum?id=FSUehLhGyl)Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px2.p1.1)\.
- \[6\]G\. Chen, Y\. Xia, X\. Jia, Z\. Li, P\. Torr, and J\. Gu\(2025\)LLM jailbreak detection for \(almost\) free\!\.InFindings of the Association for Computational Linguistics: EMNLP 2025,Note:arXiv:2509\.14558Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px2.p1.1),[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px3.p1.1)\.
- \[7\]S\. Chen, S\. Nie, J\. Sun, Z\. Feng, Z\. Li, J\. Wen, and C\. Li\(2025\)Masked diffusion models as energy minimization\.InAdvances in Neural Information Processing Systems,Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px1.p1.1),[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px4.p1.1),[§1](https://arxiv.org/html/2609.30841#S1.p2.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px2.p1.1),[§3\.1](https://arxiv.org/html/2609.30841#S3.SS1.SSS0.Px1.p1.1),[§3\.2](https://arxiv.org/html/2609.30841#S3.SS2.SSS0.Px1.p4.1)\.
- \[8\]Y\. Deng, W\. Zhang, S\. J\. Pan, and L\. Bing\(2024\)Multilingual jailbreak challenges in large language models\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[§D\.2](https://arxiv.org/html/2609.30841#A4.SS2.SSS0.Px6.p1.1)\.
- \[9\]Z\. He, T\. Sun, Q\. Tang, K\. Wang, X\. Huang, and X\. Qiu\(2023\)Diffusionbert: improving generative masked language models with diffusion models\.InProceedings of the 61st Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),pp\. 4521–4534\.Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px1.p1.1)\.
- \[10\]X\. Hu, P\. Chen, and T\. Ho\(2024\)Gradient cuff: detecting jailbreak attacks on large language models by exploring refusal loss landscapes\.InAdvances in Neural Information Processing Systems,Vol\.37,pp\. 126265–126296\.Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px2.p1.1)\.
- \[11\]T\. Li, M\. Chen, B\. Guo, and Z\. Shen\(2025\)A survey on diffusion language models\.arXiv preprint arXiv:2508\.10875\.Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px1.p1.1)\.
- \[12\]X\. Li, T\. Zhang, Y\. Dubois, R\. Taori, I\. Gulrajani, C\. Guestrin, P\. Liang, and T\. B\. Hashimoto\(2023\)Alpacaeval: an automatic evaluator of instruction\-following models\.Cited by:[§B\.2](https://arxiv.org/html/2609.30841#A2.SS2.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3.p1.1)\.
- \[13\]Z\. Li, Z\. Nie, Z\. Zhou, Y\. Liu, Y\. Zhang, Y\. Cheng, Q\. Wen, K\. Wang, Y\. Guo, and J\. Zhang\(2025\)Diffuguard: how intrinsic safety is lost and found in diffusion large language models\.arXiv preprint arXiv:2509\.24296\.Cited by:[§B\.4](https://arxiv.org/html/2609.30841#A2.SS4.SSS0.Px2.p1.1),[§1](https://arxiv.org/html/2609.30841#S1.p1.1),[footnote 1](https://arxiv.org/html/2609.30841#footnote1)\.
- \[14\]M\. Mazeika, L\. Phan, X\. Yin, A\. Zou, Z\. Wang, N\. Mu, E\. Sakhaee, N\. Li, S\. Basart, B\. Li,et al\.\(2024\)Harmbench: a standardized evaluation framework for automated red teaming and robust refusal\.InProceedings of the 41st International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.235\.Cited by:[§B\.2](https://arxiv.org/html/2609.30841#A2.SS2.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3.p1.1)\.
- \[15\]S\. Nie, F\. Zhu, C\. Du, T\. Pang, Q\. Liu, G\. Zeng, M\. Lin, and C\. Li\(2024\)Scaling up masked diffusion models on text\.arXiv preprint arXiv:2410\.18514\.Cited by:[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px1.p1.1)\.
- \[16\]S\. Nie, F\. Zhu, Z\. You, X\. Zhang, J\. Ou, J\. Hu, J\. Zhou, Y\. Lin, J\. Wen, and C\. Li\(2025\)Large language diffusion models\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px1.p1.1),[§1](https://arxiv.org/html/2609.30841#S1.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3.p1.1)\.
- \[17\]S\. Nikolenko, M\. Papucci, M\. Rezaei, and S\. Kudukkil Manchingal\(2026\)What intermediate layers know: detecting jailbreaks from entropy dynamics\.InEuropean Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases \(ECML PKDD\),Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px3.p1.1)\.
- \[18\]B\. Peng, C\. Li, P\. He, M\. Galley, and J\. Gao\(2023\)Instruction tuning with GPT\-4\.arXiv preprint arXiv:2304\.03277\.Cited by:[§D\.2](https://arxiv.org/html/2609.30841#A4.SS2.SSS0.Px6.p1.1)\.
- \[19\]X\. Qi, A\. Panda, K\. Lyu, X\. Ma, S\. Roy, A\. Beirami, P\. Mittal, and P\. Henderson\(2025\)Safety alignment should be made more than just a few tokens deep\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px2.p1.1)\.
- \[20\]P\. Röttger, H\. Kirk, B\. Vidgen, G\. Attanasio, F\. Bianchi, and D\. Hovy\(2024\)Xstest: a test suite for identifying exaggerated safety behaviours in large language models\.InProceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies \(Volume 1: Long Papers\),pp\. 5377–5400\.Cited by:[§B\.2](https://arxiv.org/html/2609.30841#A2.SS2.p1.1),[§F\.2](https://arxiv.org/html/2609.30841#A6.SS2.SSS0.Px3.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3.p1.1)\.
- \[21\]S\. S\. Sahoo, M\. Arriola, Y\. Schiff, A\. Gokaslan, E\. Marroquin, J\. T\. Chiu, A\. Rush, and V\. Kuleshov\(2024\)Simple and effective masked diffusion language models\.InAdvances in Neural Information Processing Systems,Vol\.37,pp\. 130136–130184\.Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px1.p1.1)\.
- \[22\]J\. Shi, K\. Han, Z\. Wang, A\. Doucet, and M\. K\. Titsias\(2024\)Simplified and generalized masked diffusion for discrete data\.InAdvances in Neural Information Processing Systems,Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px1.p1.1)\.
- \[23\]Z\. Wen, J\. Qu, Z\. Chen, X\. Lu, D\. Liu, Z\. Liu, R\. Wu, Y\. Yang, X\. Jin, H\. Xu,et al\.\(2026\)The devil behind the mask: an emergent safety vulnerability of diffusion LLMs\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[§B\.3](https://arxiv.org/html/2609.30841#A2.SS3.p1.1),[§1](https://arxiv.org/html/2609.30841#S1.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3.p1.1)\.
- \[24\]M\. Xu, T\. Geffner, K\. Kreis, W\. Nie, Y\. Xu, J\. Leskovec, S\. Ermon, and A\. Vahdat\(2025\)Energy\-based diffusion language models for text generation\.InInternational Conference on Learning Representations \(ICLR\),Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px4.p1.1),[§3\.1](https://arxiv.org/html/2609.30841#S3.SS1.SSS0.Px2.p3.1)\.
- \[25\]S\. Yamabe and J\. Sakuma\(2025\)Toward safer diffusion language models: discovery and mitigation of priming vulnerability\.arXiv preprint arXiv:2510\.00565\.Cited by:[§B\.3](https://arxiv.org/html/2609.30841#A2.SS3.p1.1),[§1](https://arxiv.org/html/2609.30841#S1.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3.p1.1)\.
- \[26\]L\. Yang, Y\. Tian, B\. Li, X\. Zhang, K\. Shen, Y\. Tong, and M\. Wang\(2025\)Mmada: multimodal large diffusion language models\.arXiv preprint arXiv:2505\.15809\.Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px1.p1.1)\.
- \[27\]J\. Ye, Z\. Xie, L\. Zheng, J\. Gao, Z\. Wu, X\. Jiang, Z\. Li, and L\. Kong\(2025\)Dream 7b: diffusion large language models\.arXiv preprint arXiv:2508\.15487\.Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px1.p1.1),[§1](https://arxiv.org/html/2609.30841#S1.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3.p1.1)\.
- \[28\]R\. Yu, Q\. Li, and X\. Wang\(2025\)Discrete diffusion in large language and multimodal models: a survey\.arXiv preprint arXiv:2506\.13759\.Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px1.p1.1)\.
- \[29\]H\. Zhang, Y\. Zhao, S\. Liu, Z\. Zhou, Z\. Ye, W\. Wan, M\. Li, S\. Hu, Y\. Zhang, Y\. Liu, and L\. Y\. Zhang\(2026\)Defending jailbreak attacks on large language models via manifold trajectory kinetics\.InUSENIX Security Symposium,Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px3.p1.1)\.
- \[30\]Y\. Zhang, F\. Xie, Z\. Zhou, Z\. Li, H\. Chen, K\. Wang, and Y\. Guo\(2025\)Jailbreaking large language diffusion models: revealing hidden safety flaws in diffusion\-based text generation\.arXiv preprint arXiv:2507\.19227\.Cited by:[§B\.3](https://arxiv.org/html/2609.30841#A2.SS3.p1.1),[§1](https://arxiv.org/html/2609.30841#S1.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3.p1.1)\.
- \[31\]F\. Zhu, R\. Wang, S\. Nie, X\. Zhang, C\. Wu, J\. Hu, J\. Zhou, J\. Chen, Y\. Lin, J\. Wen,et al\.\(2025\)Llada 1\.5: variance\-reduced preference optimization for large language diffusion models\.arXiv preprint arXiv:2505\.19223\.Cited by:[Appendix C](https://arxiv.org/html/2609.30841#A3.SS0.SSS0.Px1.p1.1),[§1](https://arxiv.org/html/2609.30841#S1.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3.p1.1)\.
- \[32\]F\. Zhu, Z\. You, Y\. Xing, Z\. Huang, L\. Liu, Y\. Zhuang, G\. Lu, K\. Wang, X\. Wang, L\. Wei, H\. Guo, J\. Hu, W\. Ye, T\. Chen, C\. Li, C\. Tang, H\. Feng, J\. Hu, J\. Zhou, X\. Zhang, Z\. Lan, J\. Zhao, D\. Zheng, C\. Li, J\. Li, and J\. Wen\(2025\)LLaDA\-MoE: a sparse MoE diffusion language model\.arXiv preprint arXiv:2509\.24389\.Cited by:[§D\.5](https://arxiv.org/html/2609.30841#A4.SS5.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3.p1.1)\.
- \[33\]A\. Zou, Z\. Wang, N\. Carlini, M\. Nasr, J\. Z\. Kolter, and M\. Fredrikson\(2023\)Universal and transferable adversarial attacks on aligned language models\.arXiv preprint arXiv:2307\.15043\.Cited by:[§B\.2](https://arxiv.org/html/2609.30841#A2.SS2.p1.1),[§1](https://arxiv.org/html/2609.30841#S1.p1.1),[§2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3.p1.1)\.
## Appendix AProofs
### A\.1Flow Decomposition of the Kinetic Energy
This decomposition motivates the basin picture of §[3\.1](https://arxiv.org/html/2609.30841#S3.SS1); no later result depends on it\. Writing the kinetic energy in continuity\-equation form,p˙t\(x\)=∑x′\(Jtx′→x−Jtx→x′\)\\dot\{p\}\_\{t\}\(x\)=\\sum\_\{x^\{\\prime\}\}\\bigl\(J\_\{t\}^\{x^\{\\prime\}\\to x\}\-J\_\{t\}^\{x\\to x^\{\\prime\}\}\\bigr\)for some flowJtJ\_\{t\}, the energy splits into within\-basin and cross\-basin components:
Ek=Ek𝒮⏟within\-safe flow\+Ekℋ⏟within\-harmful flow\+Ekcross⏟cross\-basin flow,E\_\{k\}=\\underbrace\{E\_\{k\}^\{\\mathcal\{S\}\}\}\_\{\\text\{within\-safe flow\}\}\+\\underbrace\{E\_\{k\}^\{\\mathcal\{H\}\}\}\_\{\\text\{within\-harmful flow\}\}\+\\underbrace\{E\_\{k\}^\{\\text\{cross\}\}\}\_\{\\text\{cross\-basin flow\}\},\(14\)where the cross\-basin component sums squared flow magnitudes between the two basins:
Ekcross=∫01γ˙t−1∑x∈𝒮,x′∈ℋorx∈ℋ,x′∈𝒮\(Jtx→x′\)2pt\(x\)𝑑t\.E\_\{k\}^\{\\text\{cross\}\}=\\int\_\{0\}^\{1\}\\dot\{\\gamma\}\_\{t\}^\{\-1\}\\sum\_\{\\begin\{subarray\}\{c\}x\\in\\mathcal\{S\},\\,x^\{\\prime\}\\in\\mathcal\{H\}\\\\ \\text\{or \}x\\in\\mathcal\{H\},\\,x^\{\\prime\}\\in\\mathcal\{S\}\\end\{subarray\}\}\\frac\{\\bigl\(J\_\{t\}^\{x\\to x^\{\\prime\}\}\\bigr\)^\{2\}\}\{p\_\{t\}\(x\)\}\\,dt\.\(15\)Eq\. \([1](https://arxiv.org/html/2609.30841#S2.E1)\) constrains only the marginalsp˙t\\dot\{p\}\_\{t\}, not the underlying flow, so this decomposition is not unique, and we use it solely as a qualitative lens\. Alignment funnels probability toward𝒮\\mathcal\{S\}, drivingEkcross≈0E\_\{k\}^\{\\text\{cross\}\}\\approx 0, and a jailbreak succeeds when it forces the trajectory across the barrier intoℋ\\mathcal\{H\}\. WhenEkcross≈0E\_\{k\}^\{\\text\{cross\}\}\\approx 0, the Safety Energy GapΔE\\Delta E\(Definition[1](https://arxiv.org/html/2609.30841#Thmdefinition1)\) stays positive throughout denoising, and an attack that forces cross\-basin flow necessarily drivesΔE\\Delta Ebelow zero\.
### A\.2Proof of Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1)\(Kinetic Energy Cost of Barrier Crossing\)
###### Proof\.
The proof chains three standard results from information geometry applied to the MDM trajectory\.
*Step 1: Gap dynamics via per\-position contributions\.*By Definition[2](https://arxiv.org/html/2609.30841#Thmdefinition2), the factorised Safety Energy Gap decomposes additively over positions:ΔEF=∑i∈MtΔEi\\Delta E\_\{\\text\{F\}\}=\\sum\_\{i\\in M\_\{t\}\}\\Delta E\_\{i\}\. Its time derivative at each position satisfies:
ddtΔEi\(xt,q,t\)=ddtlog∑v∈𝒱refpθ\(v∣q,xt\)i∑v∈𝒱comppθ\(v∣q,xt\)i\.\\frac\{d\}\{dt\}\\Delta E\_\{i\}\(x\_\{t\},q,t\)=\\frac\{d\}\{dt\}\\log\\frac\{\\sum\_\{v\\in\\mathcal\{V\}\_\{\\text\{ref\}\}\}p\_\{\\theta\}\(v\\mid q,x\_\{t\}\)\_\{i\}\}\{\\sum\_\{v\\in\\mathcal\{V\}\_\{\\text\{comp\}\}\}p\_\{\\theta\}\(v\\mid q,x\_\{t\}\)\_\{i\}\}\.\(16\)By the mean value theorem applied to the trajectory, the total gap change satisfies\|ΔEF\(xt2\)−ΔEF\(xt1\)\|≥2δ\|\\Delta E\_\{\\text\{F\}\}\(x\_\{t\_\{2\}\}\)\-\\Delta E\_\{\\text\{F\}\}\(x\_\{t\_\{1\}\}\)\|\\geq 2\\delta, so there existst∗∈\[t1,t2\]t^\{\*\}\\in\[t\_\{1\},t\_\{2\}\]with\|dΔEF/dt\|t∗≥2δ/\(t2−t1\)\|d\\Delta E\_\{\\text\{F\}\}/dt\|\_\{t^\{\*\}\}\\geq 2\\delta/\(t\_\{2\}\-t\_\{1\}\)\.
*Step 2: Gap rate bounded by Fisher\-weighted velocity\.*The softmax parameterisation identifies the logit vectorzzas the natural parameter of a categorical exponential family\. For the gap functionalϕi\\phi\_\{i\}at positionii, the chain rule gives:
ddtϕi\(pti\)=∇pϕi⋅p˙ti=∇pϕi⋅𝐅\(zti\)z˙ti=\(𝐅1/2∇pϕi\)⊤\(𝐅1/2z˙ti\),\\frac\{d\}\{dt\}\\phi\_\{i\}\(p\_\{t\}^\{i\}\)=\\nabla\_\{p\}\\phi\_\{i\}\\cdot\\dot\{p\}\_\{t\}^\{i\}=\\nabla\_\{p\}\\phi\_\{i\}\\cdot\\mathbf\{F\}\(z\_\{t\}^\{i\}\)\\,\\dot\{z\}\_\{t\}^\{i\}=\(\\mathbf\{F\}^\{1/2\}\\nabla\_\{p\}\\phi\_\{i\}\)^\{\\top\}\(\\mathbf\{F\}^\{1/2\}\\dot\{z\}\_\{t\}^\{i\}\),\(17\)wherep˙ti=𝐅\(zti\)z˙ti\\dot\{p\}\_\{t\}^\{i\}=\\mathbf\{F\}\(z\_\{t\}^\{i\}\)\\,\\dot\{z\}\_\{t\}^\{i\}follows from the exponential family relationship∇zp=𝐅\(z\)\\nabla\_\{z\}p=\\mathbf\{F\}\(z\)\(the Jacobian of the softmax\), and𝐅1/2\\mathbf\{F\}^\{1/2\}is the matrix square root of the \(positive semi\-definite\) Fisher matrix on the relevant tangent subspace\. By plain Cauchy–Schwarz on the right\-hand inner product:
\|ddtϕi\(pti\)\|2≤‖∇pϕi‖𝐅2⋅\(z˙ti\)⊤𝐅\(zti\)z˙ti,\\left\|\\frac\{d\}\{dt\}\\phi\_\{i\}\(p\_\{t\}^\{i\}\)\\right\|^\{2\}\\leq\\\|\\nabla\_\{p\}\\phi\_\{i\}\\\|\_\{\\mathbf\{F\}\}^\{2\}\\cdot\(\\dot\{z\}\_\{t\}^\{i\}\)^\{\\top\}\\mathbf\{F\}\(z\_\{t\}^\{i\}\)\\,\\dot\{z\}\_\{t\}^\{i\},\(18\)where‖∇pϕi‖𝐅2:=\(∇pϕi\)⊤𝐅\(zti\)\(∇pϕi\)\\\|\\nabla\_\{p\}\\phi\_\{i\}\\\|\_\{\\mathbf\{F\}\}^\{2\}:=\(\\nabla\_\{p\}\\phi\_\{i\}\)^\{\\top\}\\mathbf\{F\}\(z\_\{t\}^\{i\}\)\(\\nabla\_\{p\}\\phi\_\{i\}\)is the squared Fisher\-weighted norm of the gradient\. Bounding this byGmax2G\_\{\\max\}^\{2\}\(Eq\. \([8](https://arxiv.org/html/2609.30841#S3.E8)\)\) and summing over positions via Cauchy–Schwarz:
\|dΔEFdt\|2=\|∑i∈MtddtΔEi\|2≤\|Mt\|⋅Gmax2⋅∑i∈Mt\(z˙ti\)⊤𝐅\(zti\)z˙ti,\\left\|\\frac\{d\\Delta E\_\{\\text\{F\}\}\}\{dt\}\\right\|^\{2\}=\\left\|\\sum\_\{i\\in M\_\{t\}\}\\frac\{d\}\{dt\}\\Delta E\_\{i\}\\right\|^\{2\}\\leq\|M\_\{t\}\|\\cdot G\_\{\\max\}^\{2\}\\cdot\\sum\_\{i\\in M\_\{t\}\}\(\\dot\{z\}\_\{t\}^\{i\}\)^\{\\top\}\\mathbf\{F\}\(z\_\{t\}^\{i\}\)\\,\\dot\{z\}\_\{t\}^\{i\},\(19\)where the first inequality uses Cauchy–Schwarz over positions \(\|∑iai\|2≤\|Mt\|∑iai2\|\\sum\_\{i\}a\_\{i\}\|^\{2\}\\leq\|M\_\{t\}\|\\sum\_\{i\}a\_\{i\}^\{2\}\) and the second substitutes Eq\. \([18](https://arxiv.org/html/2609.30841#A1.E18)\) with the uniform boundGmax2G\_\{\\max\}^\{2\}\.
*Step 3: Integration\.*Rearranging Eq\. \([19](https://arxiv.org/html/2609.30841#A1.E19)\) and integrating over\[t1,t2\]\[t\_\{1\},t\_\{2\}\]withγ˙t−1≥1\\dot\{\\gamma\}\_\{t\}^\{\-1\}\\geq 1:
∫t1t2γ˙t−1∑i∈Mt\(z˙ti\)⊤𝐅\(zti\)z˙ti𝑑t≥∫t1t2\|dΔEF/dt\|2\|Mt\|⋅Gmax2𝑑t\.\\int\_\{t\_\{1\}\}^\{t\_\{2\}\}\\dot\{\\gamma\}\_\{t\}^\{\-1\}\\sum\_\{i\\in M\_\{t\}\}\(\\dot\{z\}\_\{t\}^\{i\}\)^\{\\top\}\\mathbf\{F\}\(z\_\{t\}^\{i\}\)\\,\\dot\{z\}\_\{t\}^\{i\}\\,dt\\;\\geq\\;\\int\_\{t\_\{1\}\}^\{t\_\{2\}\}\\frac\{\|d\\Delta E\_\{\\text\{F\}\}/dt\|^\{2\}\}\{\|M\_\{t\}\|\\cdot G\_\{\\max\}^\{2\}\}\\,dt\.\(20\)By the Cauchy–Schwarz inequality for integrals,∫t1t2\|dΔEF/𝑑t\|2𝑑t≥\(∫t1t2\|dΔEF/𝑑t\|𝑑t\)2/\(t2−t1\)≥\(2δ\)2/\(t2−t1\)\\int\_\{t\_\{1\}\}^\{t\_\{2\}\}\|d\\Delta E\_\{\\text\{F\}\}/dt\|^\{2\}\\,dt\\geq\(\\int\_\{t\_\{1\}\}^\{t\_\{2\}\}\|d\\Delta E\_\{\\text\{F\}\}/dt\|\\,dt\)^\{2\}/\(t\_\{2\}\-t\_\{1\}\)\\geq\(2\\delta\)^\{2\}/\(t\_\{2\}\-t\_\{1\}\)\. Bounding\|Mt\|≤\|M\|max\|M\_\{t\}\|\\leq\|M\|\_\{\\max\}completes the proof\. ∎
### A\.3Proof of Proposition[1](https://arxiv.org/html/2609.30841#Thmproposition1)\(Properties of the Factorised Gap\)
Part \(iii\) of Proposition[1](https://arxiv.org/html/2609.30841#Thmproposition1)states the following bound, moved here from the main text\. Under per\-token factorisation,
\|ΔE\(xt,q,t\)−ΔEF\(xt,q,t\)\|≤\|Mt\|⋅\(log11−ηref\+log11−ηcomp\),\\bigl\|\\Delta E\(x\_\{t\},q,t\)\-\\Delta E\_\{\\text\{F\}\}\(x\_\{t\},q,t\)\\bigr\|\\;\\leq\\;\|M\_\{t\}\|\\cdot\\Bigl\(\\log\\tfrac\{1\}\{1\-\\eta\_\{\\text\{ref\}\}\}\+\\log\\tfrac\{1\}\{1\-\\eta\_\{\\text\{comp\}\}\}\\Bigr\),\(21\)whereηref,ηcomp∈\[0,1\)\\eta\_\{\\text\{ref\}\},\\eta\_\{\\text\{comp\}\}\\in\[0,1\)measure the per\-position fraction of safe \(resp\. harmful\) sequence mass not captured by the projection onto𝒱ref\\mathcal\{V\}\_\{\\text\{ref\}\}\(resp\.𝒱comp\\mathcal\{V\}\_\{\\text\{comp\}\}\)\. The correction is small when𝒱ref\\mathcal\{V\}\_\{\\text\{ref\}\}and𝒱comp\\mathcal\{V\}\_\{\\text\{comp\}\}capture the dominant modes of refusal and compliance\.
###### Proof\.
*\(i\)*Immediate from Definition[2](https://arxiv.org/html/2609.30841#Thmdefinition2):ΔEF\\Delta E\_\{\\text\{F\}\}is defined as a sum over positions, and each term depends only on the per\-position distributionpθ\(⋅∣q,xt\)ip\_\{\\theta\}\(\\cdot\\mid q,x\_\{t\}\)\_\{i\}\.
*\(ii\)*Since the sum is over independent terms, replacing any single termΔEj\\Delta E\_\{j\}with a valueccchangesΔEF\\Delta E\_\{\\text\{F\}\}byc−ΔEjc\-\\Delta E\_\{j\}\. Settingc<−∑i≠jΔEic<\-\\sum\_\{i\\neq j\}\\Delta E\_\{i\}drivesΔEF<0\\Delta E\_\{\\text\{F\}\}<0\.
*\(iii\)*Under per\-token factorisation,p\(x^∈𝒮∣q,xt\)=∑x^∈𝒮∏i∈Mtpθ\(x^i∣q,xt\)ip\(\\hat\{x\}\\in\\mathcal\{S\}\\mid q,x\_\{t\}\)=\\sum\_\{\\hat\{x\}\\in\\mathcal\{S\}\}\\prod\_\{i\\in M\_\{t\}\}p\_\{\\theta\}\(\\hat\{x\}\_\{i\}\\mid q,x\_\{t\}\)\_\{i\}\. Define the per\-position safe and harmful masses
P𝒮,i=∑v∈𝒮tokpθ\(v∣q,xt\)i,Pℋ,i=∑v∈ℋtokpθ\(v∣q,xt\)i,P\_\{\\mathcal\{S\},i\}=\\\!\\\!\\sum\_\{v\\in\\mathcal\{S\}\_\{\\text\{tok\}\}\}\\\!\\\!p\_\{\\theta\}\(v\\mid q,x\_\{t\}\)\_\{i\},\\qquad P\_\{\\mathcal\{H\},i\}=\\\!\\\!\\sum\_\{v\\in\\mathcal\{H\}\_\{\\text\{tok\}\}\}\\\!\\\!p\_\{\\theta\}\(v\\mid q,x\_\{t\}\)\_\{i\},where𝒮tok,ℋtok⊆𝒱\\mathcal\{S\}\_\{\\text\{tok\}\},\\mathcal\{H\}\_\{\\text\{tok\}\}\\subseteq\\mathcal\{V\}are the token\-level projections of𝒮,ℋ\\mathcal\{S\},\\mathcal\{H\}\(cf\. §[3\.1](https://arxiv.org/html/2609.30841#S3.SS1)\)\. Under the assumption that any sequence whose positions all lie in𝒮tok\\mathcal\{S\}\_\{\\text\{tok\}\}\(resp\.ℋtok\\mathcal\{H\}\_\{\\text\{tok\}\}\) is itself in𝒮\\mathcal\{S\}\(resp\.ℋ\\mathcal\{H\}\), we have
p\(x^∈𝒮\)=∏i∈MtP𝒮,i,p\(x^∈ℋ\)=∏i∈MtPℋ,i\.p\(\\hat\{x\}\\in\\mathcal\{S\}\)\\;=\\;\\prod\_\{i\\in M\_\{t\}\}P\_\{\\mathcal\{S\},i\},\\qquad p\(\\hat\{x\}\\in\\mathcal\{H\}\)\\;=\\;\\prod\_\{i\\in M\_\{t\}\}P\_\{\\mathcal\{H\},i\}\.By definition ofηref,ηcomp\\eta\_\{\\text\{ref\}\},\\eta\_\{\\text\{comp\}\},P𝒱ref,i=\(1−ηref\)P𝒮,iP\_\{\\mathcal\{V\}\_\{\\text\{ref\}\},i\}=\(1\-\\eta\_\{\\text\{ref\}\}\)P\_\{\\mathcal\{S\},i\}andP𝒱comp,i=\(1−ηcomp\)Pℋ,iP\_\{\\mathcal\{V\}\_\{\\text\{comp\}\},i\}=\(1\-\\eta\_\{\\text\{comp\}\}\)P\_\{\\mathcal\{H\},i\}\. Substituting intoΔE=log\(p\(x^∈𝒮\)/p\(x^∈ℋ\)\)\\Delta E=\\log\(p\(\\hat\{x\}\\in\\mathcal\{S\}\)/p\(\\hat\{x\}\\in\\mathcal\{H\}\)\)andΔEF=∑ilog\(P𝒱ref,i/P𝒱comp,i\)\\Delta E\_\{\\text\{F\}\}=\\sum\_\{i\}\\log\(P\_\{\\mathcal\{V\}\_\{\\text\{ref\}\},i\}/P\_\{\\mathcal\{V\}\_\{\\text\{comp\}\},i\}\):
ΔE−ΔEF=∑i∈Mt\(−log\(1−ηref\)\+log\(1−ηcomp\)\)\.\\Delta E\-\\Delta E\_\{\\text\{F\}\}\\;=\\;\\sum\_\{i\\in M\_\{t\}\}\\\!\\Bigl\(\-\\log\(1\-\\eta\_\{\\text\{ref\}\}\)\+\\log\(1\-\\eta\_\{\\text\{comp\}\}\)\\Bigr\)\.Taking absolute values and using\|log\(1−ηcomp\)\|=log11−ηcomp\|\\\!\\log\(1\-\\eta\_\{\\text\{comp\}\}\)\|=\\log\\tfrac\{1\}\{1\-\\eta\_\{\\text\{comp\}\}\}yields the bound\. ∎
### A\.4Lemma[1](https://arxiv.org/html/2609.30841#Thmlemma1)and Proof \(Bidirectional Amplification\)
###### Lemma 1\(Bidirectional amplification\)\.
Under per\-token factorisation and the assumption that an injected tokenτ\\tauinduces a uniform per\-position log\-odds shift across masked positions, injectingτ\\tauinto the denoising statextx\_\{t\}shifts the factorised Safety Energy Gap by:
ΔEF\(xt⊕τ\)−ΔEF\(xt\)=−BA\(τ\)⋅\|Mt\|,\\Delta E\_\{\\text\{F\}\}\(x\_\{t\}\\oplus\\tau\)\-\\Delta E\_\{\\text\{F\}\}\(x\_\{t\}\)=\-\\mathrm\{BA\}\(\\tau\)\\cdot\|M\_\{t\}\|,\(22\)whereBA\(τ\)\>0\\mathrm\{BA\}\(\\tau\)\>0is the per\-position harmful pull ofτ\\tau\. The corresponding sequence\-level shift inherits the same scaling up to the additive correction in Proposition[1](https://arxiv.org/html/2609.30841#Thmproposition1)\(iii\)\.
###### Proof\.
Define the per\-position log\-odds shift induced byτ\\tauat positioniias:
δi\(τ\):=logpθ\(safei∣q,xt⊕τ\)pθ\(harmi∣q,xt⊕τ\)−logpθ\(safei∣q,xt\)pθ\(harmi∣q,xt\)\.\\delta\_\{i\}\(\\tau\):=\\log\\frac\{p\_\{\\theta\}\(\\text\{safe\}\_\{i\}\\mid q,x\_\{t\}\\oplus\\tau\)\}\{p\_\{\\theta\}\(\\text\{harm\}\_\{i\}\\mid q,x\_\{t\}\\oplus\\tau\)\}\-\\log\\frac\{p\_\{\\theta\}\(\\text\{safe\}\_\{i\}\\mid q,x\_\{t\}\)\}\{p\_\{\\theta\}\(\\text\{harm\}\_\{i\}\\mid q,x\_\{t\}\)\}\.\(23\)In a bidirectional transformer, every masked positioni∈Mti\\in M\_\{t\}attends toτ\\tauwith equal access \(there is no causal masking\)\. Under the uniform influence assumption,δi\(τ\)≈δ\(τ\)\\delta\_\{i\}\(\\tau\)\\approx\\delta\(\\tau\)for alli∈Mti\\in M\_\{t\}\. DefiningBA\(τ\):=−δ\(τ\)\\mathrm\{BA\}\(\\tau\):=\-\\delta\(\\tau\), the total shift sums to−BA\(τ\)⋅\|Mt\|\-\\mathrm\{BA\}\(\\tau\)\\cdot\|M\_\{t\}\|\. ∎
### A\.5Proof of Proposition[2](https://arxiv.org/html/2609.30841#Thmproposition2)\(R0R\_\{0\}as Sufficient Statistic\)
###### Proof\.
*\(i\)*Att=0t\{=\}0, all\|M0\|\|M\_\{0\}\|masked positions are conditioned identically onqqand\(\[MASK\]\)L\(\\texttt\{\[MASK\]\}\)^\{L\}, so the per\-position distributions are exchangeable:pθ\(v∣q,x0\)i=pθ\(v∣q,x0\)jp\_\{\\theta\}\(v\\mid q,x\_\{0\}\)\_\{i\}=p\_\{\\theta\}\(v\\mid q,x\_\{0\}\)\_\{j\}for alli,j∈M0i,j\\in M\_\{0\}\. Substituting into Eq\. \([3](https://arxiv.org/html/2609.30841#S3.E3)\) collapses the sum to\|M0\|\|M\_\{0\}\|identical terms, giving Eq\. \([4](https://arxiv.org/html/2609.30841#S3.E4)\), whose per\-position version islogR0\(q\)\\log R\_\{0\}\(q\)\.
*\(ii\)*Under exchangeability, the step\-0 logit distribution is identical across positions\. The log\-ratiolog\(∑v∈𝒱refpv\)/\(∑v∈𝒱comppv\)\\log\\bigl\(\\sum\_\{v\\in\\mathcal\{V\}\_\{\\text\{ref\}\}\}p\_\{v\}\\bigr\)/\\bigl\(\\sum\_\{v\\in\\mathcal\{V\}\_\{\\text\{comp\}\}\}p\_\{v\}\\bigr\)is the log\-likelihood ratio for testing𝒮\\mathcal\{S\}vs\.ℋ\\mathcal\{H\}when the observation is projected onto𝒱ref∪𝒱comp\\mathcal\{V\}\_\{\\text\{ref\}\}\\cup\\mathcal\{V\}\_\{\\text\{comp\}\}\. By the Neyman–Pearson lemma, the likelihood ratio is the most powerful test at every significance level, and any equally powerful statistic on this projection is a monotone transformation ofR0R\_\{0\}\.
*\(iii\)*DefineP𝒮=∑v∈𝒮pθ\(v∣q,x0\)P\_\{\\mathcal\{S\}\}=\\sum\_\{v\\in\\mathcal\{S\}\}p\_\{\\theta\}\(v\\mid q,x\_\{0\}\)andP𝒱ref=∑v∈𝒱refpθ\(v∣q,x0\)P\_\{\\mathcal\{V\}\_\{\\text\{ref\}\}\}=\\sum\_\{v\\in\\mathcal\{V\}\_\{\\text\{ref\}\}\}p\_\{\\theta\}\(v\\mid q,x\_\{0\}\), where here𝒮⊆𝒱\\mathcal\{S\}\\subseteq\\mathcal\{V\}denotes the token\-level safe set \(cf\. §[3\.1](https://arxiv.org/html/2609.30841#S3.SS1)\)\. Since𝒱ref⊆𝒮\\mathcal\{V\}\_\{\\text\{ref\}\}\\subseteq\\mathcal\{S\}by construction, we haveP𝒱ref=\(1−ϵref\)P𝒮P\_\{\\mathcal\{V\}\_\{\\text\{ref\}\}\}=\(1\-\\epsilon\_\{\\text\{ref\}\}\)P\_\{\\mathcal\{S\}\}\. ThuslogR0=log\(P𝒮/Pℋ\)\+log\(1−ϵref\)−log\(1−ϵcomp\)\\log R\_\{0\}=\\log\(P\_\{\\mathcal\{S\}\}/P\_\{\\mathcal\{H\}\}\)\+\\log\(1\-\\epsilon\_\{\\text\{ref\}\}\)\-\\log\(1\-\\epsilon\_\{\\text\{comp\}\}\)\. Rearranging and applying−log\(1−ϵ\)≤log11−ϵ\-\\log\(1\-\\epsilon\)\\leq\\log\\frac\{1\}\{1\-\\epsilon\}gives the bound\. ∎
### A\.6Lemma[2](https://arxiv.org/html/2609.30841#Thmlemma2)and Corollary[1](https://arxiv.org/html/2609.30841#Thmcorollary1)\(From Kinetic Energy to Cosine Displacement\)
###### Lemma 2\(Logit\-space displacement tracks distributional velocity\)\.
Letzti∈ℝ\|𝒱\|z\_\{t\}^\{i\}\\in\\mathbb\{R\}^\{\|\\mathcal\{V\}\|\}be the logit vector at masked positioniiat steptt, and letpti=softmax\(zti\)p\_\{t\}^\{i\}=\\mathrm\{softmax\}\(z\_\{t\}^\{i\}\)\. Define the logit displacementδti:=zti−z0i\\delta\_\{t\}^\{i\}:=z\_\{t\}^\{i\}\-z\_\{0\}^\{i\}\. Then:
DKL\(pti∥p0i\)=⟨δti,pti⟩−logZ\(zti\)Z\(z0i\),D\_\{\\mathrm\{KL\}\}\\\!\\bigl\(p\_\{t\}^\{i\}\\;\\\|\\;p\_\{0\}^\{i\}\\bigr\)=\\langle\\delta\_\{t\}^\{i\},\\,p\_\{t\}^\{i\}\\rangle\-\\log\\frac\{Z\(z\_\{t\}^\{i\}\)\}\{Z\(z\_\{0\}^\{i\}\)\},\(24\)whereZ\(z\)=∑vexp\(zv\)Z\(z\)=\\sum\_\{v\}\\exp\(z\_\{v\}\)\. To second order inδti\\delta\_\{t\}^\{i\}:
DKL\(pti∥p0i\)=12\(δti\)⊤𝐅\(z0i\)δti\+O\(∥δti∥3\),D\_\{\\mathrm\{KL\}\}\\\!\\bigl\(p\_\{t\}^\{i\}\\;\\\|\\;p\_\{0\}^\{i\}\\bigr\)=\\tfrac\{1\}\{2\}\\,\(\\delta\_\{t\}^\{i\}\)^\{\\top\}\\mathbf\{F\}\(z\_\{0\}^\{i\}\)\\,\\delta\_\{t\}^\{i\}\+O\(\\\|\\delta\_\{t\}^\{i\}\\\|^\{3\}\),\(25\)where𝐅\(z0i\)=diag\(p0i\)−p0i\(p0i\)⊤\\mathbf\{F\}\(z\_\{0\}^\{i\}\)=\\mathrm\{diag\}\(p\_\{0\}^\{i\}\)\-p\_\{0\}^\{i\}\(p\_\{0\}^\{i\}\)^\{\\top\}is the Fisher information matrix atz0iz\_\{0\}^\{i\}\.
###### Proof\.
The softmax parameterisationpv=exp\(zv\)/Z\(z\)p\_\{v\}=\\exp\(z\_\{v\}\)/Z\(z\)identifieszzas the natural parameter of a categorical exponential family with log\-partition functionA\(z\)=logZ\(z\)A\(z\)=\\log Z\(z\)\. For exponential families,DKL\(pη∥pη′\)=A\(η′\)−A\(η\)−⟨∇A\(η\),η′−η⟩D\_\{\\mathrm\{KL\}\}\(p\_\{\\eta\}\\\|p\_\{\\eta^\{\\prime\}\}\)=A\(\\eta^\{\\prime\}\)\-A\(\\eta\)\-\\langle\\nabla A\(\\eta\),\\,\\eta^\{\\prime\}\-\\eta\\rangle\. Settingη=zti\\eta=z\_\{t\}^\{i\}andη′=z0i\\eta^\{\\prime\}=z\_\{0\}^\{i\}and noting∇A\(z\)=p=softmax\(z\)\\nabla A\(z\)=p=\\mathrm\{softmax\}\(z\)gives Eq\. \([24](https://arxiv.org/html/2609.30841#A1.E24)\)\. The second\-order expansion follows from∇2A\(z\)=𝐅\(z\)\\nabla^\{2\}A\(z\)=\\mathbf\{F\}\(z\), the Fisher information matrix of the categorical distribution, which equalsdiag\(p\)−pp⊤\\mathrm\{diag\}\(p\)\-pp^\{\\top\}\. ∎
###### Corollary 1\(Cosine displacement as kinetic energy proxy\)\.
When logit norms‖zti‖\\\|z\_\{t\}^\{i\}\\\|vary slowly relative to angular displacement, the squared Euclidean displacement‖δti‖2\\\|\\delta\_\{t\}^\{i\}\\\|^\{2\}is monotonically related to the cosine displacement1−cos\(zti,z0i\)1\-\\cos\(z\_\{t\}^\{i\},z\_\{0\}^\{i\}\):
‖δti‖2=‖zti‖2\+‖z0i‖2−2‖zti‖\|z0i\|cos\(zti,z0i\)\.\\\|\\delta\_\{t\}^\{i\}\\\|^\{2\}=\\\|z\_\{t\}^\{i\}\\\|^\{2\}\+\\\|z\_\{0\}^\{i\}\\\|^\{2\}\-2\\\|z\_\{t\}^\{i\}\\\|\\\|z\_\{0\}^\{i\}\\\|\\cos\(z\_\{t\}^\{i\},z\_\{0\}^\{i\}\)\.\(26\)Combining with Eq\. \([25](https://arxiv.org/html/2609.30841#A1.E25)\): a decrease incos\(zti,z0i\)\\cos\(z\_\{t\}^\{i\},z\_\{0\}^\{i\}\)implies an increase inDKL\(pti∥p0i\)D\_\{\\mathrm\{KL\}\}\(p\_\{t\}^\{i\}\\\|p\_\{0\}^\{i\}\)to second order, so the rate of cosine similarity change tracks the per\-position kinetic energy integrand\. The proportionality constant relating‖δti‖2\\\|\\delta\_\{t\}^\{i\}\\\|^\{2\}to\(z˙ti\)⊤𝐅z˙ti\(\\dot\{z\}\_\{t\}^\{i\}\)^\{\\top\}\\mathbf\{F\}\\,\\dot\{z\}\_\{t\}^\{i\}depends on the spectrum of𝐅\(z0i\)\\mathbf\{F\}\(z\_\{0\}^\{i\}\)\. Since the Fisher matrix𝐅=diag\(p\)−pp⊤\\mathbf\{F\}=\\mathrm\{diag\}\(p\)\-pp^\{\\top\}concentrates mass on high\-probability tokens, the SED proxy primarily captures velocity in the dominant\-mass subspace; the complementaryΔE\\Delta Eslope \(Eq\. \([13](https://arxiv.org/html/2609.30841#S3.E13)\)\) recovers the velocity component projected ontoVsV\_\{s\}, motivating the subspace decomposition in Eq\. \([10](https://arxiv.org/html/2609.30841#S3.E10)\)\.
## Appendix BImplementation Details
### B\.1Models and Inference
All experiments use greedy confidence\-based remasking at temperature 0 with generation length 128 tokens\. Models are loaded inbfloat16precision via HuggingFaceAutoModel\. For Dream\-7B, attention masks use a boolean format, and the mask token is auto\-detected from the tokenizer; for the LLaDA family, the default mask token ID \(126336\) is used\.
### B\.2Datasets
Benign prompts comprise 200 instructions from AlpacaEval\[[12](https://arxiv.org/html/2609.30841#bib.bib4)\]\(loaded via HuggingFace, seeded at 42\) and 250 safe prompts from XSTest\[[20](https://arxiv.org/html/2609.30841#bib.bib7)\]\. Harmful prompts comprise 400 from HarmBench\[[14](https://arxiv.org/html/2609.30841#bib.bib5)\]\(the standard subset; 110 contextual behaviors are excluded\) and 520 from AdvBench\[[33](https://arxiv.org/html/2609.30841#bib.bib16)\], using theBehaviorfield\. DIJA prompts use theRefined\_behaviorfield from AdvBench and theBehaviorfield from HarmBench \(920 prompts total\)\. Each model is evaluated on 7 conditions \(clean, XSTest, harmful direct, PAD, anchoringt=1t\{=\}1, anchoringt=8t\{=\}8, DIJA\), yielding 5,050 prompts per model and 10,100 prompts in total across LLaDA\-8B and Dream\-7B\.
### B\.3Attack Implementations
PAD\.Following original work\[[30](https://arxiv.org/html/2609.30841#bib.bib11)\], structural connectors \("Step 1:", "Step 2:", etc\.\) are inserted at evenly\-spaced positions throughout the response region, with the number of connectorsncn\_\{c\}set to 2 by default\. The prompt is encoded normally; connectors replace mask tokens at computed positions before denoising begins\.Anchoring\.Follow work by\[[25](https://arxiv.org/html/2609.30841#bib.bib2)\], generation proceeds normally until steptintert\_\{\\mathrm\{inter\}\}, at which point the model’s current predictions are replaced with tokens from a pre\-built harmful response and then re\-masked\. The model continues denoising from this contaminated state\. We evaluatetinter∈\{1,8\}t\_\{\\mathrm\{inter\}\}\\in\\\{1,8\\\}in the main experiments and sweep\{1,2,4,8,16,32\}\\\{1,2,4,8,16,32\\\}for adaptive analysis\.DIJA\.Following\[[23](https://arxiv.org/html/2609.30841#bib.bib8)\], pre\-built templates with interleaved harmful tokens and mask spans are used directly\.
### B\.4Detection Signal Computation
#### Vocabulary sets\.
Refusal tokens𝒱ref\\mathcal\{V\}\_\{\\text\{ref\}\}\(36 tokens:*sorry, cannot, refuse*, …\) and compliance tokens𝒱comp\\mathcal\{V\}\_\{\\text\{comp\}\}\(32 tokens:*here, sure, certainly*, …\) are constructed by mapping curated word lists to token IDs via the model’s tokenizer\. Both single\-token and multi\-token entries are resolved; only tokens present in the tokenizer’s vocabulary are retained\.
Step\-0 ratioR0R\_\{0\}\.Computed from the logit distribution at the fully masked state \(step 0\) as the ratio of the average refusal mass to the average compliance mass across all masked positions \(Eq\. \([5](https://arxiv.org/html/2609.30841#S3.E5)\)\)\.SED and SED slope\.At each denoising step, the cosine similarity between the current and initial logit vectors is averaged over all currently masked positions \(Eq\. \([11](https://arxiv.org/html/2609.30841#S3.E11)\)\)\. The SED slope is the coefficient of a linear fit over the first 50% of denoising steps, with thexx\-axis normalised to\[0,1\]\[0,1\]for cross\-model comparability\.ΔE\\Delta Eslope\.The factorised Safety Energy Gap \(Eq\. \([3](https://arxiv.org/html/2609.30841#S3.E3)\)\) is computed at each step from refusal and compliance masses\. TheΔE\\Delta Eslope is the linear fit over the first 25% of denoising \(Q1\)\.
#### DiffuGuard\-SD \(Safety Divergence\)\.
For each prompt, we compute the cosine distance between the mean\-pooled hidden states of the attack inputx0x\_\{0\}and the clean baselinexoriginx\_\{\\mathrm\{origin\}\}\(the raw query without template modification\)\[[13](https://arxiv.org/html/2609.30841#bib.bib3)\]\. For non\-template conditions \(clean, harmful direct, anchoring\),xorigin=x0x\_\{\\mathrm\{origin\}\}=x\_\{0\}by construction, so SD≈0\\approx 0\.
### B\.5Reproducibility
All sampling, dataset loading, and model\-side stochastic operations use a fixed random seed of4242throughout\. The detection signal computations themselves are deterministic at temperature00\(greedy confidence\-based remasking; see §[B](https://arxiv.org/html/2609.30841#A2)\)\.
#### Models and checkpoints\.
LLaDA\-8B \(GSAI\-ML/LLaDA\-8B\-Instruct, mask token id 126336\), LLaDA\-1\.5 \(ML\-GSAI/LLaDA\-1\.5\-Instruct; used in §[3\.1](https://arxiv.org/html/2609.30841#S3.SS1)ablations only\), and Dream\-7B \(Dream\-org/Dream\-v0\-Instruct\-7B; mask token<\|mask\|\>resolved via tokenizer at runtime, with attention mask in boolean format\)\. Models are loaded via HuggingFaceAutoModelinbfloat16precision\.
#### Datasets
AlpacaEval 200 \(loaded via thetatsu\-lab/alpaca\_evalHuggingFace dataset, sampled withrandom\.Random\(42\)\); XSTest 250 safe prompts; HarmBench 400 \(standard subset,Behaviorfield\); AdvBench 520 \(Behaviorfield\)\. DIJA prompts use theRefined\_behaviorfield from AdvBench andBehaviorfield from HarmBench \(920 total\)\.
#### Hyperparameters\.
Generation lengthL=128L=128tokens; temperatureT=0T=0\(greedy\); remasking strategy: confidence\-based, one token transferred per denoising step\. PAD connectorsnc=2n\_\{c\}=2by default \(varied in §[4](https://arxiv.org/html/2609.30841#S4):nc∈\{0,1,2,3,4,6\}n\_\{c\}\\in\\\{0,1,2,3,4,6\\\}\); anchoringtinter∈\{1,8\}t\_\{\\mathrm\{inter\}\}\\in\\\{1,8\\\}in main experiments and\{1,2,4,8,16,32\}\\\{1,2,4,8,16,32\\\}for the parametric sweep\. Refusal vocabulary\|𝒱ref\|=36\|\\mathcal\{V\}\_\{\\text\{ref\}\}\|=36tokens, compliance vocabulary\|𝒱comp\|=32\|\\mathcal\{V\}\_\{\\text\{comp\}\}\|=32tokens, both constructed by mapping curated word lists to token ids via the model’s tokenizer \(see §[B](https://arxiv.org/html/2609.30841#A2)\)\. SED slope window: first 50% of denoising;ΔE\\Delta Eslope window: first 25%\.
#### Hardware\.
All inference experiments are run on a single NVIDIA H100 80GB GPU \. Total inference compute for the main results \(5,050 prompt\-condition pairs per model\) is approximately55–77H100\-hours\.
#### Numerical precision\.
TheR0R\_\{0\}ratio is a small\-probability quotient at the all\-mask state\. We compute it frombfloat16logits cast tofloat32viaF\.softmax\(…\.float\(\)\)prior to the ratio, to avoid bfloat16 mantissa\-quantisation artefacts in the log\-odds tail \(8 mantissa bits is insufficient for stable small\-mass ratios\)\. SED cosine similarity is likewise computed infloat32\.
## Appendix CRelated Work
#### Diffusion language models\.
Masked diffusion models \(MDMs\) generate text by iteratively denoising a fully masked sequence\[[2](https://arxiv.org/html/2609.30841#bib.bib19),[21](https://arxiv.org/html/2609.30841#bib.bib13),[22](https://arxiv.org/html/2609.30841#bib.bib20),[9](https://arxiv.org/html/2609.30841#bib.bib15)\]\. Recent scaling efforts have produced models competitive with autoregressive LLMs: LLaDA\[[16](https://arxiv.org/html/2609.30841#bib.bib6)\]trains an 8B\-parameter MDM from scratch, Dream\[[27](https://arxiv.org/html/2609.30841#bib.bib10)\]adapts from AR\-pretrained weights, and MMaDA\[[26](https://arxiv.org/html/2609.30841#bib.bib9)\]extends the paradigm to multimodal generation\. LLaDA\-1\.5\[[31](https://arxiv.org/html/2609.30841#bib.bib12)\]further improves alignment via variance\-reduced preference optimisation\. On the theoretical side, work by\[[7](https://arxiv.org/html/2609.30841#bib.bib23)\]proved that MDMs minimise kinetic energy functionals over discrete probability flows, establishing the foundation on which our safety analysis builds\. For a comprehensive overview, we refer to recent surveys\[[11](https://arxiv.org/html/2609.30841#bib.bib24),[28](https://arxiv.org/html/2609.30841#bib.bib25)\]\.
#### Safety signals in autoregressive LLMs\.
Our step\-0 ratioR0R\_\{0\}belongs to a family of first\-token safety signals in the AR LLM literature\[[5](https://arxiv.org/html/2609.30841#bib.bib31),[3](https://arxiv.org/html/2609.30841#bib.bib33)\]\. FJD\[[6](https://arxiv.org/html/2609.30841#bib.bib17)\]detects jailbreaks via logit confidence of the first generated token, Gradient Cuff\[[10](https://arxiv.org/html/2609.30841#bib.bib18)\]analyses the refusal loss landscape via gradient norms, and\[[1](https://arxiv.org/html/2609.30841#bib.bib1)\]showed that refusal is mediated by a single representation direction\.R0R\_\{0\}is the masked\-diffusion analogue: it reads safety intent from the all\-\[MASK\]state, exploiting step\-0 exchangeability to aggregate over all positions simultaneously rather than observing a single next\-token distribution\. More broadly,\[[19](https://arxiv.org/html/2609.30841#bib.bib21),[4](https://arxiv.org/html/2609.30841#bib.bib32)\]demonstrated that AR safety alignment is “shallow,” concentrating on the first few output tokens\. Our energy analysis reveals an analogous phenomenon in dLLMs: alignment shapes the step\-0 logit distribution \(potential energy\) but leaves trajectory dynamics \(kinetic energy\) largely unguarded against template attacks\.
#### Transfer beyond masked diffusion\.
The account transfers in part\.R0R\_\{0\}carries over to autoregressive models as the masked\-diffusion analogue of first\-token signals such as FJD\[[6](https://arxiv.org/html/2609.30841#bib.bib17)\], since step\-0 exchangeability aggregates evidence over allLLresponse positions rather than one next\-token distribution\. The trajectory signals do not: measuring the descent needs the same output position to be read more than once, and an autoregressive model commits each position and never returns to it\. Concurrent work reads autoregressive trajectories of other kinds, including layer\-wise entropy dynamics through the logit lens\[[17](https://arxiv.org/html/2609.30841#bib.bib27)\]and manifold\-kinetic treatments of the forward pass\[[29](https://arxiv.org/html/2609.30841#bib.bib26)\]\. Both monitor depth or token position rather than repeated estimation of the same position, so Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1)does not transfer, and we read the asymmetry as a safety advantage of dLLMs: the denoising trajectory exposes computation that autoregressive decoding hides\. For text\-to\-image diffusion the prospects are better\. Continuous diffusion models also follow approximate probability\-flow trajectories, and concept erasure plausibly creates basins around unsafe concepts\. SED transfers most readily, as an elevated score norm where a prompt drags the trajectory across a concept boundary\.R0R\_\{0\}would need a noise\-conditioned analogue read from the score function at high noise\. TheΔE\\Delta Eslope does not transfer, since continuous space has no token\-factorised gap and hence no𝒱ref\\mathcal\{V\}\_\{\\text\{ref\}\}or𝒱comp\\mathcal\{V\}\_\{\\text\{comp\}\}\.
#### Energy\-based perspectives on diffusion models\.
\[[7](https://arxiv.org/html/2609.30841#bib.bib23)\]proved that MDMs minimise kinetic energy over discrete probability flows\. We extend their result from a characterisation of optimal denoising to a safety interpretation: alignment reshapes the energy landscape into basins, and attacks succeed by circumventing the resulting barrier\.\[[24](https://arxiv.org/html/2609.30841#bib.bib22)\]proposed Energy\-based Diffusion Language Models \(EDLM\), which introduce sequence\-level energy corrections to improve generation quality\. From a safety perspective, their non\-decomposable interaction terms would close the per\-position attack surface identified by Proposition[1](https://arxiv.org/html/2609.30841#Thmproposition1)\(ii\), since an adversary could no longer shift the Safety Energy Gap by controlling individual positions\. Current dLLMs do not use sequence\-level corrections, leaving this vulnerability open and motivating future work on energy\-corrected alignment\.
## Appendix DAblation Studies
We present three ablation studies: \(1\) that alignment creates geometrically separable basin structure in the step\-0 logit space, \(2\) thatR0R\_\{0\}is robust to vocabulary choice, and \(3\) temporal analysis of where in the denoising trajectory the slope signals concentrate\. Studies \(1\) and \(2\) are conducted across three dLLM families on 50 prompts per category drawn from AlpacaEval \(benign\), XSTest \(boundary\-benign\), and HarmBench \(harmful direct\)\.
### D\.1Basin Geometry at Step 0
#### Setup\.
We project the step\-0 logit distributions onto the vocabulary subspace𝒱ref∪𝒱comp\\mathcal\{V\}\_\{\\text\{ref\}\}\\cup\\mathcal\{V\}\_\{\\text\{comp\}\}\(the default token set; see §[3\.1](https://arxiv.org/html/2609.30841#S3.SS1)\) and apply Linear Discriminant Analysis \(LDA\) to find the one\-dimensional direction that maximally separates safe \(clean, XSTest\) from harmful \(harmful direct\) prompts\. We report kernel density estimates \(KDE\) along this axis and annotate each panel with Fisher’s discriminant ratio:
J=\(μh−μs\)2σs2\+σh2,J=\\frac\{\(\\mu\_\{h\}\-\\mu\_\{s\}\)^\{2\}\}\{\\sigma\_\{s\}^\{2\}\+\\sigma\_\{h\}^\{2\}\},\(27\)whereμs,μh\\mu\_\{s\},\\mu\_\{h\}andσs2,σh2\\sigma\_\{s\}^\{2\},\\sigma\_\{h\}^\{2\}are the mean and variance of the LDA projection for safe and harmful prompts, respectively\. A largerJJindicates better linear separability\.
#### Results\.
Figure[5](https://arxiv.org/html/2609.30841#A4.F5)shows the LDA projections for all three models\. The safe \(green/blue\) and harmful \(black\) distributions are clearly separated across all architectures, with a wide gap around the decision boundary \(LDA projection=0\\text\{LDA projection\}=0\)\. Quantitatively,J=33\.23J=33\.23for LLaDA\-8B,J=33\.24J=33\.24for LLaDA\-1\.5, andJ=139\.73J=139\.73for Dream\-7B, all indicating strong linear separability\. The near\-identical values for the two LLaDA variants \(J≈33J\\approx 33\) suggest that the basin structure is robust to the choice of alignment recipe \(SFT vs\. VRPO\), consistent with our claim that basin formation is intrinsic to the masked diffusion training objective rather than a specific alignment procedure\. Dream\-7B achieves substantially higher separation \(J=139\.73J=139\.73\), which we attribute to its AR\-initialised weights providing a stronger prior over refusal token placements; this also corresponds to the higher step\-0 AUROC of Dream\-7B \(0\.90 vs\. 0\.86, Figure[4](https://arxiv.org/html/2609.30841#S3.F4)\)\.
Geometric statistics from the underlying logit vectors further corroborate this picture\. For LLaDA\-8B, the inter\-basin centroid distance is0\.00990\.0099, while the intra\-basin spread is0\.01160\.0116\(safe\) and0\.00500\.0050\(harmful\), giving a separation ratio of0\.860\.86\. For LLaDA\-1\.5 the inter\-basin distance is0\.01040\.0104, and the ratio is0\.940\.94, and for Dream\-7B the inter\-basin distance is0\.01610\.0161with a separation ratio of1\.441\.44, the only model for which the basin distance exceeds the largest intra\-basin spread, indicating clean geometric separation in the projected space\.
Figure 5:LDA basin separation at step 0 across three dLLM families\.Each panel shows kernel density estimates of the LDA projection of step\-0 logit distributions onto the𝒱ref∪𝒱comp\\mathcal\{V\}\_\{\\text\{ref\}\}\\cup\\mathcal\{V\}\_\{\\text\{comp\}\}subspace, evaluated on 50 clean \(AlpacaEval,green\), 20 boundary\-benign \(XSTest,blue\), and 50 harmful direct \(black\) prompts per model\. The dashed vertical line marks the LDA decision boundary\. Fisher’s discriminant ratioJJ\(Eq\.[27](https://arxiv.org/html/2609.30841#A4.E27)\) is annotated in each panel\. Safe and harmful queries are cleanly separated across all three architectures \(J≥33J\\geq 33\), with Dream\-7B achieving the strongest separation \(J=139\.73J=139\.73\) due to its AR\-initialised prior\. The clean and XSTest distributions are nearly indistinguishable, confirming that the model does not conflate boundary\-benign queries with harmful ones at step 0\.
### D\.2Vocabulary Robustness ofR0R\_\{0\}
#### Motivation\.
Section[3\.1](https://arxiv.org/html/2609.30841#S3.SS1)\(Proposition[2](https://arxiv.org/html/2609.30841#Thmproposition2)\) showed that the approximation error ofR0R\_\{0\}relative to the true sequence\-level safety energy gap is bounded by the vocabulary coverage parametersϵref\\epsilon\_\{\\text\{ref\}\}andϵcomp\\epsilon\_\{\\text\{comp\}\}: the bound degrades when the chosen token sets miss the model’s dominant refusal or compliance probability mass\. This ablation tests how sensitive detection performance is to the choice of𝒱ref\\mathcal\{V\}\_\{\\text\{ref\}\}and𝒱comp\\mathcal\{V\}\_\{\\text\{comp\}\}in practice, and whether our theoretical prediction, that synonym sets which the model rarely produces should degrade performance, holds empirically\.
#### Vocabulary sets\.
We compare five vocabulary configurations\.Default\(\|𝒱ref\|=36\|\\mathcal\{V\}\_\{\\text\{ref\}\}\|=36,\|𝒱comp\|=32\|\\mathcal\{V\}\_\{\\text\{comp\}\}\|=32\) is the set used in all main experiments, comprising high\-frequency refusal tokens \(*sorry, cannot, refuse, …*\) and compliance tokens \(*here, sure, certainly, …*\)\.Synonym\(\|𝒱ref\|=36\|\\mathcal\{V\}\_\{\\text\{ref\}\}\|=36,\|𝒱comp\|=32\|\\mathcal\{V\}\_\{\\text\{comp\}\}\|=32\) uses lexical substitutions of the default set \(*apologies, regret, decline, …*and*absolutely, glad, …*\) that are semantically equivalent but rarely produced by the model\.Freq\(\|𝒱ref\|=24\|\\mathcal\{V\}\_\{\\text\{ref\}\}\|=24,\|𝒱comp\|=24\|\\mathcal\{V\}\_\{\\text\{comp\}\}\|=24\) uses frequency\-ranked tokens from general corpora rather than model\-specific output distributions\.Minimal5\(\|𝒱ref\|=10\|\\mathcal\{V\}\_\{\\text\{ref\}\}\|=10,\|𝒱comp\|=10\|\\mathcal\{V\}\_\{\\text\{comp\}\}\|=10\) is a minimal five\-token set \(*sorry, cannot, no*for refusal;*here, sure, step, 1, the*for compliance\)\.Large30\(\|𝒱ref\|=64\|\\mathcal\{V\}\_\{\\text\{ref\}\}\|=64,\|𝒱comp\|=60\|\\mathcal\{V\}\_\{\\text\{comp\}\}\|=60\) augments the default set with 14 additional safety\-related tokens \(*illegal, dangerous, prohibited, …*\)\.
#### Results\.
Figure[6](https://arxiv.org/html/2609.30841#A4.F6)and Table[5](https://arxiv.org/html/2609.30841#A4.T5)report AUROC for detecting harmful direct queries against benign queries under each vocabulary configuration\.
Figure 6:Step\-0 ratioR0R\_\{0\}is robust to vocabulary choice, except for synonym sets\.Each panel shows the AUROC for detecting harmful direct queries vs\. benign queries \(clean\+\+XSTest\) as a function of vocabulary set, evaluated on LLaDA\-8B \(left\), LLaDA\-1\.5 \(centre\), and Dream\-7B \(right\)\. Four of five vocabulary configurations achieve AUROC≥0\.90\\geq 0\.90, including the minimal five\-token set\. The synonym set consistently underperforms \(AUROC≈0\.80\\approx 0\.80–0\.830\.83\) because it selects tokens that carry negligible probability mass in the models’ actual output distributions, increasing the coverage errorϵref\\epsilon\_\{\\text\{ref\}\}predicted by Proposition 2\(iii\)\. The dashed line marks the chance level \(AUROC=0\.5=0\.5\)\.Table 5:AUROC ofR0R\_\{0\}\(harmful direct vs\. benign\) under five vocabulary configurations across three dLLM families\. Vocabulary sizes\|𝒱ref\|\|\\mathcal\{V\}\_\{\\text\{ref\}\}\|/\|𝒱comp\|\|\\mathcal\{V\}\_\{\\text\{comp\}\}\|are shown in parentheses\. Best result per model inbold\.Three findings stand out\. First, detection is robust across four of five vocabulary sets\. All configurations exceptsynonymachieve AUROC≥0\.896\\geq 0\.896on LLaDA\-8B,≥0\.915\\geq 0\.915on LLaDA\-1\.5, and≥0\.944\\geq 0\.944on Dream\-7B, with variation of at most±0\.055\\pm 0\.055acrossdefault,freq,minimal5, andlarge30\. This confirms that basin structure concentrates on a small number of high\-mass tokens: any vocabulary that captures the dominant modes of the model’s refusal and compliance distributions performs well\.
Second, the minimal vocabulary suffices and slightly outperforms\. Counterintuitively,minimal5achieves the highest AUROC in all three models \(0\.951, 0\.957, and 1\.000\)\. We attribute this to the minimal set avoiding*noise tokens*, tokens in larger sets that carry near\-zero probability for any query type, which dilute the ratio and reduce discriminability\. This is consistent with Proposition 2\(ii\):R0R\_\{0\}is a sufficient statistic projected onto𝒱ref∪𝒱comp\\mathcal\{V\}\_\{\\text\{ref\}\}\\cup\\mathcal\{V\}\_\{\\text\{comp\}\}, so adding tokens outside the high\-mass region can only hurt\.
Third, synonym sets degrade performance\. Thesynonymset, which selects semantically appropriate but low\-frequency tokens, drops AUROC to0\.7960\.796–0\.8270\.827across models\. This is precisely the failure mode identified by Proposition 2\(iii\): when𝒱ref\\mathcal\{V\}\_\{\\text\{ref\}\}misses the model’s dominant refusal tokens,ϵref\\epsilon\_\{\\text\{ref\}\}grows large and the approximation bound degrades\. The gap betweendefault\(0\.8960\.896\) andsynonym\(0\.7960\.796\) on LLaDA\-8B is 10 AUROC points, while the gap on Dream\-7B is 16 points, consistent with the finding that Dream\-7B’s stronger basin structure makes the projection loss more costly\.
The key message for practitioners is simple:*any vocabulary set that captures the model’s actual high\-probability refusal and compliance tokens will work; the specific tokens matter, but the set size does not\.*
#### Automatically derived vocabulary\.
The five sets above are hand\-written\. To remove the curator entirely, we rank tokens by mean step\-0 mass on 50 harmful and 50 benign held\-out prompts, discard tokens appearing in both rankings, and keep the top ten per class \(auto10\)\. No human judgement enters at any stage\. Table[6](https://arxiv.org/html/2609.30841#A4.T6)comparesauto10with the curated default on a held\-out 50/50 split, so absolute values differ from Table[5](https://arxiv.org/html/2609.30841#A4.T5)while orderings are preserved\. The derived set lands within0\.050\.05AUROC of the default on the LLaDA family and above it on Dream\-7B\. The curatedminimal5set remains best on two of three models, so curation is a convenience rather than a requirement\. Every model’s derived refusal set containssorry,assist,but,’tand’m, tokens no curator would list together, surfacing independently on three models: the vocabulary is a measurable property of the model, and the derivation reads it rather than designing it\.
Table 6:R0R\_\{0\}AUROC \(harmful direct vs\. benign\) with the curated default vocabulary and an automatically derived one, on a held\-out split of 50 harmful and 50 benign prompts\.
#### Lexicon evasion\.
An adversary who knows the token sets would aim to shift the model onto refusal\-equivalent tokens that carry little mass in𝒱ref\\mathcal\{V\}\_\{\\text\{ref\}\}\. Thesynonymset above measures exactly this degradation \(0\.7960\.796,0\.7880\.788and0\.8270\.827\), the failure Proposition[2](https://arxiv.org/html/2609.30841#Thmproposition2)\(iii\) predicts, and re\-deriving the sets from the model’s own behaviour is the countermeasure\. Attacks weakened until they slip under the thresholds fall under the sweeps of §[4](https://arxiv.org/html/2609.30841#S4), where configurations that evade all three signals produce only truncated stubs\. What remains untested is a prompt that avoids the lexicon*while still inducing a harmful trajectory*; we return to this in §[4](https://arxiv.org/html/2609.30841#S4)\.
#### Cross\-lingual coverage\.
We evaluate LLaDA\-8B on 315 harmful Chinese prompts from MultiJail\[[8](https://arxiv.org/html/2609.30841#bib.bib29)\]\(human\-translated\) and 315 benign Chinese prompts from alpaca\-zh\[[18](https://arxiv.org/html/2609.30841#bib.bib30)\], keeping the English vocabulary and recalibrating thresholds on the Chinese benign pool \(Table[7](https://arxiv.org/html/2609.30841#A4.T7)\)\. The detector goes blind; the model does not\. LLaDA still refuses 73% of these prompts, in Chinese \(“I’m sorry, I cannot…”\), but those tokens lie outside𝒱ref\\mathcal\{V\}\_\{\\text\{ref\}\}, so the English check reads zero\. This is the coverage failure Proposition[2](https://arxiv.org/html/2609.30841#Thmproposition2)\(iii\) predicts rather than a jailbreak\. The loss is confined toR0R\_\{0\}and to queries with no template: SED uses no vocabulary and still detects Chinese PAD \(0\.7980\.798against0\.9000\.900in English\), whereas a direct harmful query has no template disruption for a trajectory signal to read, so nothing compensates whenR0R\_\{0\}goes blind\. The repair is theauto10procedure run in the new language: derived from 50/50 held\-out Chinese prompts and evaluated on a matched split,R0R\_\{0\}rises from0\.7960\.796to0\.9620\.962, and the extracted tokens are the ones the model actually refuses with\.
Table 7:Cross\-lingual evaluation on LLaDA\-8B: Chinese MultiJail \(harmful\) and alpaca\-zh \(benign\) prompts, with the English vocabulary and with a vocabulary derived in Chinese\. Thresholds recalibrated on the Chinese benign pool\.
### D\.3Temporal Analysis of Attack Signatures
The energy framework predicts that different attacks should produce distinct temporal patterns\. We analyse two dimensions: where in denoising the slope signal concentrates, and how anchoring timing affects detectability\.
Early trajectory signal \(Q1 vs\. 50% slope\)\.Table[8](https://arxiv.org/html/2609.30841#A4.T8)compares SED slope andΔE\\Delta Eslope computed over the first 25% \(Q1\) versus the first 50% of denoising\. For PAD on LLaDA, SED Q1 slightly underperforms 50% \(0\.89 vs\. 0\.90\), consistent with PAD’s distributed connectors affecting the entire trajectory\. For anchoringt=8t\{=\}8, Q1 achieves the highest AUROC across both SED \(0\.95\) andΔE\\Delta Eslope \(0\.92 on LLaDA\-8B\), consistent with anchoring’s single\-step intervention creating a sharp early discontinuity\. On Dream,ΔE\\Delta Eslope Q1 is the strongest signal for PAD \(0\.98\), confirming that the safety\-subspace disruption is concentrated in the early trajectory\.
Table 8:Temporal signature analysis\.AUROC for SED slope andΔE\\Delta Eslope computed over different trajectory segments \(Q1 = first 25%, 50% = first half\)\.ΔE\\Delta Eslope Q1 resolves PAD on Dream where all SED variants fail\.Anchoring timing: later intervention, stronger signal\.Anchoring att=1t\{=\}1produces weaker slope signals \(SED AUROC 0\.57–0\.67;ΔE\\Delta EAUROC 0\.47–0\.62\) thant=8t\{=\}8\(SED AUROC 0\.67–0\.91;ΔE\\Delta EAUROC 0\.82–0\.97\) across all models\. This aligns with the energy interpretation: att=1t\{=\}1, the trajectory has barely left the initial state, preserving recovery capacity; byt=8t\{=\}8, more tokens have been committed, and the contamination creates a larger trajectory displacement detectable in both subspaces\.
Dream’s trajectory signals concentrate inVsV\_\{s\}\.On Dream, SED slope detection is weak across all temporal windows and attacks \(AUROC 0\.40–0\.83\), whileΔE\\Delta Eslope consistently achieves strong detection \(AUROC 0\.86–0\.98\)\. This confirms the subspace decomposition finding: Dream’s kinetic energy from attack disruption concentrates in the safety subspaceVsV\_\{s\}rather than the full vocabularyV⟂V\_\{\\perp\}, makingΔE\\Delta Eslope the primary trajectory signal for AR\-initialised architectures\.
### D\.4Generation Length and Block Size
We ran the full pipeline atL∈\{64,256,512\}L\\in\\\{64,256,512\\\}on LLaDA\-8B and Dream\-7B, and atL=256L=256with block decoding atB∈\{32,64,128,256\}B\\in\\\{32,64,128,256\\\}, recalibrating thresholds at every setting \(sixteen settings in total\)\. Realized benign false\-positive rate stayed within\[0\.09,0\.12\]\[0\.09,0\.12\]against a0\.100\.10target in every setting\.
*Baseline scale\.*ΔEF\\Delta E\_\{\\text\{F\}\}\(Eq\. \([3](https://arxiv.org/html/2609.30841#S3.E3)\)\) sums over masked positions, so its raw value grows with the number of positions still masked \(Table[9](https://arxiv.org/html/2609.30841#A4.T9)\)\. The per\-token formΔEF/\|Mt\|\\Delta E\_\{\\text\{F\}\}/\|M\_\{t\}\|moves within a factor of two with no trend, and we report it whenever lengths are compared\.R0R\_\{0\}and SED are per\-position quantities \(Proposition[2](https://arxiv.org/html/2609.30841#Thmproposition2)\(i\), Eq\. \([11](https://arxiv.org/html/2609.30841#S3.E11)\)\) and carry no such dependence: their benign baselines are flat inLL, andR0R\_\{0\}is exactly invariant to block size, giving0\.7770\.777AUROC on LLaDA\-8B and0\.9600\.960on Dream\-7B at everyBB, identical to three decimals, as expected of a step\-0 statistic\. At fixedLLthe normalization leaves AUROC unchanged; its benefit is that thresholds calibrated at one length remain valid at another\.
Table 9:Benign baseline of the factorised gap fromL=64L=64toL=512L=512: the raw sum scales with length, the per\-token form does not\.*Detection recall\.*The value ofR0R\_\{0\}does not depend on length, but its ability to separate does \(Table[10](https://arxiv.org/html/2609.30841#A4.T10)\)\. On LLaDA\-8B recall falls sharply asLLgrows, while Dream\-7B is stable\. The LLaDA detection results in the main text are therefore statements atL=128L=128\. Two points limit the concern\. Rank\-order AUROC holds across the sweep, so it is threshold\-level recall that degrades\. And the cause is the one Eq\. \([10](https://arxiv.org/html/2609.30841#S3.E10)\) predicts: LLaDA’s basin separation is weak \(J≈33J\\approx 33against139\.7139\.7for Dream, Appendix[D\.1](https://arxiv.org/html/2609.30841#A4.SS1)\), so detection leans onR0R\_\{0\}, whose discriminative power dilutes as refusal mass spreads over more positions\. Dream, with the stronger basin, is stable\.
Table 10:OR\-detector TPR at the calibrated threshold across generation lengths\.*Block size\.*Block size matters for the trajectory signals on Dream, where PAD OR\-TPR rises from0\.160\.16atB=32B=32to0\.940\.94atB=256B=256, because small blocks commit template tokens before the full response context forms\.BBandLLare chosen by the deployer rather than the prompt\-level adversary of our threat model, so this is a deployment hazard rather than an attack surface; our guidance isL≤128L\\leq 128withB≥L/2B\\geq L/2on LLaDA andLLup to 256 on Dream \(§[3\.3](https://arxiv.org/html/2609.30841#S3.SS3)\)\.
### D\.5A Sparse Mixture\-of\-Experts dLLM
We evaluated LLaDA\-MoE\-7B\-A1B\-Instruct\[[32](https://arxiv.org/html/2609.30841#bib.bib28)\], a mixture\-of\-experts dLLM and the first sparse architecture we have tested, under the protocol of §[2](https://arxiv.org/html/2609.30841#S2.SS0.SSS0.Px3)\(Table[11](https://arxiv.org/html/2609.30841#A4.T11)\)\. It is the most strongly aligned model in our evaluation,R0R\_\{0\}reads its refusal basin cleanly, and detection on direct harmful queries and on anchoring matches the dense models\. Template attacks split into two cases the paper already documents\. PAD is refused 83% of the time by this model, so little barrier crossing remains to detect\. For DIJA the ranking is intact \(AUROC0\.850\.85\), but the OR rule does not convert it:R0R\_\{0\}and theΔE\\Delta Eslope are anti\-correlated with DIJA on every model we have tested \(Table[3](https://arxiv.org/html/2609.30841#S3.T3)\), so the Bonferroni correction penalises SED, the one signal that separates this attack\. The aggregation rules of Appendix[F\.3](https://arxiv.org/html/2609.30841#A6.SS3)address this case\.
Table 11:LLaDA\-MoE\-7B against the dense models of the main text \(range over LLaDA\-8B, LLaDA\-1\.5 and Dream\-7B\)\. All TPRs at a guaranteed benign FPR of10%10\\%\.∗See text\.
## Appendix EEmpirical Verification of Theoretical Assumptions
The derivation chain from kinetic energy to computable signals relies on two assumptions: the slow\-norm condition in Corollary[1](https://arxiv.org/html/2609.30841#Thmcorollary1)and the uniform influence assumption in Lemma[1](https://arxiv.org/html/2609.30841#Thmlemma1)\. We verify both empirically across LLaDA\-8B and Dream\-7B\.
### E\.1Corollary[1](https://arxiv.org/html/2609.30841#Thmcorollary1): Slow\-Norm Condition
Corollary[1](https://arxiv.org/html/2609.30841#Thmcorollary1)establishes that cosine displacement tracks KL divergence, and hence kinetic energy, when logit norms‖zti‖\\\|z\_\{t\}^\{i\}\\\|vary slowly relative to angular displacement\. To assess this condition, we record the mean logit norm across masked positions at each denoising step and compute two summary statistics over the first 50% of denoising \(the window over which SED slope is measured\): the coefficient of variation \(CV\) of the mean norm trajectory, and the max\-to\-min ratio\.
Table[12](https://arxiv.org/html/2609.30841#A5.T12)reports these statistics\. On LLaDA\-8B, norm CV is below 0\.04 for all categories, with max/min ratios of 1\.06–1\.15\. On Dream\-7B, norm CV remains below 0\.05 for clean, harmful direct, PAD, and slice, with moderately higher values for anchoringt=8t\{=\}8\(0\.10\) and DIJA \(0\.12\)\. These elevated values correspond to attacks that inject tokens mid\-trajectory, physically altering the logit landscape; even so, the norms vary by only 10–12% relative to their mean, within the regime where the second\-order approximation in Corollary[1](https://arxiv.org/html/2609.30841#Thmcorollary1)is adequate\.
Figure[7](https://arxiv.org/html/2609.30841#A5.F7)visualises the condition directly: logit norms \(dashed\) remain in a narrow band throughout denoising while cosine similarity \(solid\) diverges substantially across categories\. On LLaDA\-8B, norms vary by∼\\sim15% over the full trajectory while SED changes by 2–8% in the first half, confirming that angular change dominates magnitude change\. On Dream\-7B, the pattern holds for the first∼\\sim70% of denoising; the late\-step norm increase occurs outside the SED slope measurement window and does not affect the signal\.
Figure 7:Slow\-norm condition \(Corollary[1](https://arxiv.org/html/2609.30841#Thmcorollary1)\)\. Solid lines show the SED trajectory \(left axis\); dashed lines show the mean logit norm‖zti‖\\\|z\_\{t\}^\{i\}\\\|\(right axis\)\. Logit norms remain approximately constant while cosine similarity diverges across categories, confirming that angular displacement dominates magnitude change in the first half of denoising\.
### E\.2Lemma[1](https://arxiv.org/html/2609.30841#Thmlemma1): Uniform Influence
Lemma[1](https://arxiv.org/html/2609.30841#Thmlemma1)assumes that an injected tokenτ\\tauinduces a uniform per\-position log\-odds shiftδi\(τ\)≈δ\(τ\)\\delta\_\{i\}\(\\tau\)\\approx\\delta\(\\tau\)across all masked positions\. To assess this, we compute the per\-position Safety Energy GapΔEi=log\(Pref,i/Pcomp,i\)\\Delta E\_\{i\}=\\log\(P\_\{\\text\{ref\},i\}/P\_\{\\text\{comp\},i\}\)at each masked positioniiat each denoising step, and report the coefficient of variation \(CV\) ofΔEi\\Delta E\_\{i\}across positions, averaged over the first 50% of denoising\.
Table[12](https://arxiv.org/html/2609.30841#A5.T12)reportsΔEi\\Delta E\_\{i\}CV for each category and model\. The results reveal an architecture\-dependent pattern that aligns with the detection analysis in the main paper\. On Dream\-7B, template attacks exhibit near\-uniform per\-position influence: PAD achieves CV=0\.45=0\.45and DIJA achieves CV=1\.17=1\.17, both substantially below the benign baseline \(CV=6\.13=6\.13for clean\)\. This is precisely the regime whereΔE\\Delta Eslope is the dominant detection signal \(AUROC 0\.98 for PAD\), consistent with Lemma[1](https://arxiv.org/html/2609.30841#Thmlemma1)’s prediction that uniform influence produces a coherent, detectableΔE\\Delta Eshift across positions\.
On LLaDA\-8B, per\-position influence is less uniform across all categories \(CV 3\.8–10\.2\), with no category consistently below 1\. This does not invalidate the detection framework, because SED slope, which is derived from the full\-vocabulary Fisher velocity \(Lemma[2](https://arxiv.org/html/2609.30841#Thmlemma2)and Corollary[1](https://arxiv.org/html/2609.30841#Thmcorollary1)\) rather than from the uniform influence assumption, is the dominant signal on LLaDA \(AUROC 0\.90 for PAD\)\. The uniform influence assumption is most precise on the architecture where the signal that depends on it \(ΔE\\Delta Eslope\) is most effective, and least precise on the architecture where an alternative signal \(SED slope\) provides detection\.
Figure[8](https://arxiv.org/html/2609.30841#A5.F8)visualises this pattern via box plots of per\-promptΔEi\\Delta E\_\{i\}CV\. On Dream\-7B, PAD and DIJA produce compact distributions near zero, while anchoringt=8t\{=\}8\(which intervenes mid\-trajectory rather than at initialisation\) shows higher and more variable CV, consistent with the single\-step perturbation creating heterogeneous influence across positions\.
Figure 8:Per\-positionΔEi\\Delta E\_\{i\}uniformity \(Lemma[1](https://arxiv.org/html/2609.30841#Thmlemma1)\)\. Box plots show the coefficient of variation ofΔEi\\Delta E\_\{i\}across masked positions, averaged over the first 50% of denoising\. On Dream\-7B, PAD and DIJA show near\-uniform influence \(CV<1\.2<1\.2\), validating the assumption for the architecture whereΔE\\Delta Eslope is the primary detection signal\. On LLaDA\-8B, influence is less uniform, but SED slope \(which does not depend on this assumption\) provides detection\.Table 12:Empirical verification of theoretical assumptions\. Norm CV and max/min ratio assess the slow\-norm condition \(Corollary[1](https://arxiv.org/html/2609.30841#Thmcorollary1)\);ΔEi\\Delta E\_\{i\}CV assesses per\-position uniformity \(Lemma[1](https://arxiv.org/html/2609.30841#Thmlemma1)\)\. Both are computed over the first 50% of denoising\.
### E\.3SED Slope Distributions
Figure[9](https://arxiv.org/html/2609.30841#A5.F9)shows SED slope distributions \(first 50% of denoising\) for benign queries versus attacks that evadeR0R\_\{0\}\. Attacks produce steeper \(more negative\) slopes than benign generation, reflecting higher kinetic energy expenditure consistent with barrier crossing\. On LLaDA\-8B and LLaDA\-1\.5, SED slope achieves AUROC 0\.84–0\.91 across PAD, DIJA, and anchoringt=8t\{=\}8\. On Dream\-7B, SED slope detects DIJA \(0\.92\) but not PAD \(0\.52\), consistent with the architecture\-dependent subspace concentration discussed in §[3\.3](https://arxiv.org/html/2609.30841#S3.SS3)\.
Figure 9:SED slope distributions \(first 50% of denoising\)\.Attacks produce steeper slopes than benign, reflecting higher kinetic energy expenditure\. AUROC values \(vs\. benign\) shown below each attack\.
## Appendix FThreshold Calibration Analysis
The AUROC analysis in the main paper evaluates detection signals as rank\-order statistics\. This appendix examines threshold\-level operating characteristics, addressing how the rank\-order separation reported in §[3\.3](https://arxiv.org/html/2609.30841#S3.SS3)translates to detection at fixed false\-positive rates\.
### F\.1Setup
For each signalσ∈\{R0,s,sΔE\}\\sigma\\in\\\{R\_\{0\},s,s\_\{\\Delta E\}\\\}, we determine the thresholdτσ\\tau\_\{\\sigma\}such that a fractionα\\alphaof benign queries \(AlpacaEval∪\\cupXSTest,n=450n=450\) exceed the threshold\. The OR\-detector flags a query if any signal exceeds its respective threshold:
y^\(q\)=\[R0\(q\)≥τR\]∨\[\|s\(q\)\|≥τs\]∨\[\|sΔE\(q\)\|≥τΔE\]\.\\hat\{y\}\(q\)=\\mathbf\{1\}\\\!\\left\[R\_\{0\}\(q\)\\geq\\tau\_\{R\}\\right\]\\;\\lor\\;\\mathbf\{1\}\\\!\\left\[\|s\(q\)\|\\geq\\tau\_\{s\}\\right\]\\;\\lor\\;\\mathbf\{1\}\\\!\\left\[\|s\_\{\\Delta E\}\(q\)\|\\geq\\tau\_\{\\Delta E\}\\right\]\.\(28\)The combined FPR satisfiesFPROR≤kα\\text\{FPR\}\_\{\\text\{OR\}\}\\leq k\\alphaby the union bound, wherek=3k=3is the number of signals\. When signal responses are correlated on benign data, the actual combined FPR is lower\. We report results at the per\-signal level \(α∈\{0\.01,0\.05,0\.10\}\\alpha\\in\\\{0\.01,0\.05,0\.10\\\}\) and under Bonferroni correction \(α=FPRtarget/k\\alpha=\\text\{FPR\}\_\{\\text\{target\}\}/k\), which guaranteesFPROR≤FPRtarget\\text\{FPR\}\_\{\\text\{OR\}\}\\leq\\text\{FPR\}\_\{\\text\{target\}\}\. Tablereports TPR for each signal and the OR\-detector at per\-signalα=0\.05\\alpha=0\.05\(combined FPR≈14%\\approx 14\\%\)\. Table[13](https://arxiv.org/html/2609.30841#A6.T13)reports Bonferroni\-corrected results at guaranteed FPR≤5%\\leq 5\\%and≤10%\\leq 10\\%\.
### F\.2Analysis
#### Architecture\-dependent threshold separation\.
The gap between AUROC and threshold\-level TPR is architecture\-dependent and consistent with the Fisher velocity decomposition \(§[3\.2](https://arxiv.org/html/2609.30841#S3.SS2)\)\. On Dream\-7B, theΔE\\Delta Eslope achieves strong threshold\-level separation for PAD \(0\.94 TPR at per\-signal 5% FPR\), reflecting the sharp concentration of attack disruption in the safety subspaceVsV\_\{s\}\(Fisher discriminantJ=139\.73J=139\.73\)\. On the LLaDA family, the same attack achieves 0\.90 AUROC via SED slope but only 0\.24 TPR at the same operating point\. This discrepancy arises because the LLaDA SED slope distributions for PAD and benign queries have well\-separated means but overlapping tails: the rank\-ordering is good \(high AUROC\), but the extreme quantiles that determine threshold\-level detection are not cleanly separated\. The higher Fisher discriminant on Dream concentrates the signal more tightly, producing cleaner tail separation\.
#### Complementarity at threshold level\.
The complementarity structure identified via AUROC \(Table[2](https://arxiv.org/html/2609.30841#S3.T2)\) is preserved at threshold level on Dream\-7B:R0R\_\{0\}detects harmful direct queries \(0\.84\),ΔE\\Delta Eslope detects PAD \(0\.94\) and anchoringt=8t\{=\}8\(0\.93\), and SED slope detects DIJA \(0\.63\)\. No single signal achieves\>0\.26\>0\.26TPR on all attacks, but the OR\-detector achieves≥0\.78\\geq 0\.78on every attack type\. On LLaDA\-8B, complementarity holds forR0R\_\{0\}\-detectable attacks \(harmful direct, anchoring\), but the velocity signals’ threshold\-level contribution is weaker for template attacks, consistent with the diffuse subspace concentration observed on natively trained architectures \(§[3\.3](https://arxiv.org/html/2609.30841#S3.SS3)\)\.
Table 13:Bonferroni\-corrected OR\-detector\. Each signal is calibrated atα=FPRtarget/3\\alpha=\\text\{FPR\}\_\{\\text\{target\}\}/3, guaranteeing combined FPR≤\\leqtarget\.
#### Boundary\-benign false positives\.
Table[14](https://arxiv.org/html/2609.30841#A6.T14)evaluates whether the signals erroneously flag benign queries that mention sensitive topics\. Thresholds calibrated at 5% FPR on clean \(AlpacaEval\) queries produce equal or lower FPR on XSTest\[[20](https://arxiv.org/html/2609.30841#bib.bib7)\]across all signals and models\. On LLaDA\-8B, the SED slope produces 0% FPR on XSTest at a 5% clean threshold\. This is consistent with the energy interpretation: XSTest queries occupy the same basin as clean benign queries at step 0 \(theirR0R\_\{0\}distribution is indistinguishable from clean; see Figure[1](https://arxiv.org/html/2609.30841#S3.F1)\), and the trajectory follows the same low\-velocity geodesic regardless of surface\-level content\.
Table 14:FPR on XSTest boundary\-benign queries\. Thresholds are calibrated at 5% FPR on clean \(AlpacaEval\) benign queries\. XSTest FPR is consistently≤\\leqclean FPR\.
### F\.3Aggregation Rules Beyond OR
The OR rule spends its false\-positive budget through a union bound that must hold under arbitrary dependence, which leaves slack whenever the signals are correlated\. The energy framework prescribes a specific alternative\. By Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1)an attack must overspend its budget in at least one subspace, not in total, so the discriminative statistic is the largest single violation: the maximum of the per\-signalzz\-scores, calibrated as one statistic on the signals’ joint benign distribution \(max\-zz\)\. We compare OR, max\-zz, the sum ofzz\-scores \(sum\-zz\), and a logistic combination fit by 5\-fold cross\-validation, all thresholded only on held\-out benign predictions and reusing the per\-prompt signal values of the main runs \(Table[15](https://arxiv.org/html/2609.30841#A6.T15)\)\.
Table 15:TPR at guaranteed benign FPR≤10%\\leq 10\\%under four aggregation rules, on the settings where OR is weakest plus Dream\-7B PAD\. Best per row in bold\.Three results follow\.*Max\-zzmatches or beats OR in every setting, with no training\.*This is expected: OR is already a maximum over per\-signal thresholds, and max\-zzis the same rule calibrated on the joint distribution, so it recovers the union\-bound slack\.*Sum\-zzloses, as the theory says it should\.*It trails OR and max\-zzon Dream\-7B PAD and LLaDA\-8B DIJA, with one win on LLaDA\-1\.5 DIJA; adding the overrun across subspaces dilutes the quantity Theorem[1](https://arxiv.org/html/2609.30841#Thmtheorem1)bounds\.*The logistic combination goes further where OR is weakest, and its failures are also predicted\.*It roughly doubles recall on the LLaDA template attacks at the cost of a small labelled calibration set, but it is not uniformly better: it falls on Dream\-7B PAD, and on LLaDA\-8B direct harmful queries at FPR≤5%\\leq 5\\%\(0\.7530\.753to0\.6900\.690\)\. Learning helps where no single signal dominates and hurts where one already carries the detection, the complementarity pattern of §[3\.3](https://arxiv.org/html/2609.30841#S3.SS3)\. The gap between AUROC and threshold\-level recall is therefore largely a cost of the union bound\. We recommend max\-zzas the training\-free default and the logistic combination where labelled calibration data exist\.
## Appendix GAdaptive Attack Details
Figure[10](https://arxiv.org/html/2609.30841#A7.F10)shows representative generated outputs under PAD template titration atnc=0,1,2n\_\{c\}=0,1,2on LLaDA\-8B\. Atnc=0n\_\{c\}\\\!=\\\!0,R0R\_\{0\}detects harmful intent and the model refuses\. Atnc=1n\_\{c\}\\\!=\\\!1, both signals are evaded but the output is a truncated stub without actionable harmful content\. Atnc=2n\_\{c\}\\\!=\\\!2, PAD successfully induces harmful generation, but trajectory velocity detects the disruption \(SED slope on LLaDA,ΔE\\Delta Eslope on Dream\)\. This illustrates the core finding: the attacker cannot reduce template intensity below the detection threshold without also falling below the barrier\-crossing threshold required to induce harmful generation\.
Figure 10:PAD titration: generated outputs atnc=0,1,2n\_\{c\}=0,1,2\.Atnc=0n\_\{c\}\\\!=\\\!0,R0R\_\{0\}detects, and the model refuses\. Atnc=1n\_\{c\}\\\!=\\\!1, both signals are evaded, but the output is a stub\. Atnc=2n\_\{c\}\\\!=\\\!2, PAD induces harmful generation, but trajectory velocity detects the disruption\.相似文章
中间层知道什么:从熵动力学检测越狱攻击
本文通过使用logit lens分析跨层的标记级预测熵轨迹,研究了越狱尝试如何被编码在大语言模型的内部表示中。研究发现,中间层的熵动力学比聚合统计更具区分性,提供了一种无需训练且跨多个模型一致的检测方法。
一次越狱,多种语言:学习语言不敏感的意图表示用于多语言越狱检测
本文提出MLJailDe,一个多语言越狱检测框架,利用反向翻译数据增强和相对距离约束来提高跨语言泛化能力和鲁棒性,在11种语言上实现了98.5%的F1分数。
相同模型,不同弱点:语言和模态如何重塑前沿多模态大语言模型的越狱攻击面
本文首次进行了系统的跨语言、多模态红队研究,比较了四种前沿多模态大语言模型在美国英语和墨西哥西班牙语下的越狱漏洞,揭示了语言并不会均匀地放大漏洞,并且安全排名在不同语言中并不保持一致。
有效性感知的大型语言模型越狱评估
本文提出了SEAV,一种以验证为中心的框架,用于评估大型语言模型的越狱鲁棒性,通过评估响应的有效性和正确性,显著降低了安全评估中的假阳性率。
SAFEGuard: 检测基于优化的越狱攻击,通过有害语义分析和流畅度测量
SAFEGuard 是一个统一检测框架,利用有害语义分析和流畅度测量来检测针对大型语言模型的基于优化的越狱攻击,性能优于现有最佳基线方法。