From Shallow to Deep: Pinning Semantic Intent via Causal GRPO
Authors: Shuyi Zhou, Zeen Song, Wenwen Qiang, Jiyan Sun, Yao Zhou, Yinlong Liu, Wei Ma
Organizations: University of Chinese Academy of Sciences, Beijing, China · Institute of Information Engineering, Chinese Academy of Sciences, Beijing, China · Institute of Software, Chinese Academy of Sciences, Beijing, China
Large Language Models remain vulnerable to adversarial prefix attacks (e.g., Sure, here is'') despite robust standard safety. We diagnose this vulnerability as Shallow Safety Alignment, stemming from a pathology we term semantic representation decay: as the model generates compliant prefixes, its internal malicious intent signal fades. To address this, we propose Two-Stage Causal-GRPO (TSC-GRPO), a framework designed to achieve intent pinning. First, grounded in causal identifiability theory, we train a causal intent probe to disentangle invariant intent from stylistic perturbations. Second, we internalize this causal awareness into the policy via Group Relative Policy Optimization. By employing a cumulative causal penalty within fork-in-the-road'' training scenarios, we force the model to learn that accumulating harmful tokens monotonically decreases reward, enabling robust late-stage refusals. Experiments show that TSC-GRPO significantly outperforms baselines in defending against jailbreak attacks while preserving general utility.
Figures & tables
Figure 1: Visualizing Semantic Collapse in Shallowly Aligned Models. (a) PCA projection shows that while harmful (red squares) and safe (blue circles) requests are distinct at t=0 , they collapse into a single, indistinguishable singularity after prefix injection ( t>k ); (b) The accuracy of a linear probe trained at t=0 drops rapidly during the prefix injection phase (Phase 2) and remains slightly above the random chance level ( 0.5 ) during subsequent generation (Phase 3).
Base Model
Safety Alignment
AdvBench Attack Success Rate (%)
GCG
AutoDAN
ReNeLLM
CodeCha.
PAIR
DeepInc.
Prefill
ICA
LLaMA-2-7B-Chat
RLHF Zhou et al. (2024)
47.84
51.02
31.35
80.16
24.17
8.42
27.1 ∗
0.00
TSC-GRPO
18.62
15.56
18.17
25.51
12.46
6.47
0.00
0.00
LLaMA-3.1-8B-Instruct
SFT Phan et al. (2025)
73.86
72.88
80.48
96.44
28.57
86.60
51.24 ∗
49.62
NemoGuard Ghosh et al. (2025)
59.57
65.00
81.53
94.62
57.14
64.52
26.42 ∗
31.35
PSR (N=8) Phan et al. (2025)
25.02
0.00
10.05
35.58
22.45
32.69
0.26 ∗
0.00
Table 1: Attack Success Rate (ASR, %) of open-source LLMs under different safety alignment and safeguarding methods on AdvBench. Results without ”” are cited from the original papers; results marked with ”” were reproduced in this study.
Datasets ↓
mean ± std (%) (over 3 rounds)
Initial
Standard SFT
Constrained SFT Qi and others (2025)
TSC-GRPO (Ours)
Harmful Examples
ASR
1.5±0.2
88.9±1.2
4.6±0.5
1.8±0.4
Identity Shifting
ASR
0.0±0.0
79.5±2.3
8.1±0.1
0.0±0.0
Backdoor Poisoning
ASR (w/o trigger)
1.5±0.2
7.6±1.1
1.9±0.2
1.6±0.3
ASR (w/ trigger)
1.7±0.1
90.9±1.4
10.9±2.8
6.5±1.3
Table 2: ASR on LLaMA-2-7B-Chat under various fine-tuning attack strategies.
Instruct
Setting
Utility ↑
GSM8K
HumanEval
MBPP
TruthfulQA
LLaMA-2-7B-Chat
Pre
32.3
7.9
16.5
40.8
Post
32.1
8.3
18.8
39.7
LLaMA-3.1-8B-Instruct
Pre
84.5
72.6
72.8
54.5
Post
86.1
71.7
76.5
54.8
Qwen2.5-7B-Instruct
Pre
91.6
84.8
79.2
64.7
Table 3: Utility before and after safety alignment on standard benchmarks. “Pre” denotes the original instruct model before post-training with TSC-GRPO, while “Post” is the results after TSC-GRPO.
Figure 2: Hyper-parameter sensitivity analysis evaluating the ASR against GCG attacks on AdvBench across three base models. The sub-figures illustrate the impact of varying (a) the uniformity loss weight λ in Stage 1, (b) the causal reward coefficient α in Stage 2, and (c) the similarity threshold τ .
Figure 3: Ablation study on data construction strategies. The bottom table details the specific combination of data views used for probe training, where ∙ indicates inclusion.
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Harmful Intent ( charm )
Safe Intent ( csafe )
Style: Compliance ( ssure )
Type II Harmful ( qharm⊕“Sure” )
Type II Safe ( qsafe⊕“Sure” )
Style: Default ( sraw )
Type I Harmful ( qharm )
Type I Safe ( qsafe )
Appendix
Table 4: The constructed intervention distribution enforcing independence.
University of Technology Sydney, Sydney, NSW, Australia · Xi’an Jiaotong University, Xi’an, Shaanxi, China · Southeast University, Nanjing, Jiangsu, China