Test-time learning (TTL) enables large language models to adapt to unlabeled inputs during deployment. The model updates a lightweight adapter by minimizing the next-token prediction loss on the input it receives. When these updates persist across conversation turns, every user query serves both as the request answered in the current turn and as adaptation data for later turns. By choosing the queries used for adaptation, an attacker can influence parameter updates and weaken safety alignment through ordinary interactions with a TTL chat service. To demonstrate this risk, we introduce Progressive Test-Time Adaptation Poisoning (P-TAP), a query-only multi-turn attack that jailbreaks the model by poisoning its session adapter through the service's own updates. A sequence of escalating adversarial queries shapes the adapter turn by turn; the final harmful request is then answered under the accumulated state without itself being used for adaptation. Across four open-weight instruction-tuned models, enabling updates raises attack success rates on average by 13.00 percentage points under greedy decoding and by 22.25 points under best-of-10 sampling, relative to matched sessions receiving the same queries without updates. Answering adversarial queries but adapting on unrelated text or on benign text about the same topic removes most of this increase. Among existing safeguards, screening incoming queries flags every attack stream before the final request, while a perplexity-based detector of unsafe adaptation flags none of the successful attacks.
Figures & tables
Figure 1: Poisoning risk in session-persistent TTL. (a) and (b) contrast a standard chat with a session-persistent TTL chat, where θ denotes the base model and ϕ the adapter. (c) A P-TAP jailbreak example. Given the same escalating queries, Frozen runs as in (a) and refuses the final harmful request, while Online runs as in (b) and generates the harmful reply.
Figure 2: P-TAP workflow, interaction with the TTL service, and matched Online / Frozen evaluation. Judge metrics are described in Section 5.1 .
Figure 3: Attack success of Frozen and Online . Dark segments show ASR@1 and light segments show ASR@10. Numbers on the Online bars give the difference from Frozen . ASR@1 and ASR@10 are defined in Section 5.1 ; Table 1 and Appendix Table 4 give exact values.
Model
Mode
ASR@1
Per-trial ASR
ASR@10
Qwen3-8B
Frozen
.59
.509
.67
Online
.72
.686
.85
Qwen2.5-7B-Instruct
Frozen
.50
.478
.69
Online
.63
.628
.85
Llama-3.1-8B-Instruct
Frozen
.15
.143
.20
Online
.31
.276
.51
Table 1: General efficacy of P-TAP. ASR@1, per-trial ASR, and ASR@10 of Frozen and Online at τ=0 on the four evaluated models.
Figure 4: Effect of update text on attack success. Dark segments show ASR@1 and light segments show ASR@10. Numbers above the Online bars give the ASR@10 difference from Frozen . Appendix Table 3 gives exact values.
Figure 5: Selection score st of Eq. ( 3 ) at each update turn of the P-TAP streams under Online with τ=3 . Lines and bands give the median and interquartile range across sessions, and dots mark the skipped queries with st≤τ . At most 2.0% of each model’s queries are skipped.
Conversation history
Adapter state
Initial ( ϕ0 )
Adapted ( ϕ11 )
Frozen
.59 / .67
.66 / .71
Online
.60 / .80
.73 / .85
None
.01 / .05
.08 / .35
Table 2: Effect of adapter state and conversation history on Qwen3-8B with τ=3 . Each cell reports ASR@1 / ASR@10.
Figure 6: Provider-side PPL detector on Online sessions of Qwen3-8B with τ=3 . (a) Mean and standard deviation of the base-to-final PPL decrease per attack session; a session is flagged when it lies above a threshold line. (b) Share of sessions whose maximum adjacent-update score exceeds each threshold.
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
Model
Condition
ASR@1
Per-trial ASR
ASR@10
Qwen3-8B
Frozen
.59
.509
.67
Online , same topic, harmful
.72
.686
.85
Online , same topic, benign
.55
.444
.64
Online , different topic, harmful
.64
.509
.72
Online , different topic, benign
.52
.464
.67
Qwen2.5-7B-Instruct
Frozen
.50
.478
.69
Appendix
Table 3: Effect of update text on attack success.
Model
ASR@1
ASR@10
Per-trial ASR
Difference
τ=0
τ=3
τ=0
τ=3
τ=0
τ=3
ASR@1
ASR@10
Per-trial
Qwen3-8B
.72
.73
.85
.85
.686
.660
− .01
.00
.026
Qwen2.5-7B-Instruct
.63
.65
.85
.81
.628
.588
− .02
.04
.040
Llama-3.1-8B-Instruct
.31
.29
.51
.47
.276
.275
.02
.04
.001
Gemma-4-E4B-it
.23
.23
.43
.44
.222
.203
.00
− .01
.019
Appendix
Table 4: Sensitivity to the selection threshold. Differences are τ=0 minus τ=3 .
Figure 7: TLM adaptation input and update for an example query on Qwen3-8B.
Attack sequences
Benign conversations
Application
Limit
Threshold
Calibration
Held out
Calibration
Held out
Base-to-final
2–10%
0.736
0/50
0/50
0/200
0/200
Adjacent-update maximum
2%
1.363
0/50
0/50
0/200
0/200
5%
1.162
2/50
6/50
9/200
5/200
10%
1.153
3/50
6/50
12/200
6/200
Appendix
Table 5: Threshold recalibration. Entries give flagged/evaluated sequences. Limit is the maximum calibration false-positive rate.
Model
Mode
ASR@1
Per-trial ASR
ASR@10
Qwen3-8B
Frozen
.34
.377
.49
Online
.32
.330
.49
Qwen2.5-7B-Instruct
Frozen
.26
.275
.42
Online
.29
.279
.46
Llama-3.1-8B-Instruct
Frozen
.35
.327
.49
Online
.23
.261
.50
Appendix
Table 6: Effect of updates under AMA query streams. ASR@1, per-trial ASR, and ASR@10 of Frozen and Online at τ=0 on the four evaluated models.
Figure 8: Selection score st of Eq. ( 3 ) at each update turn of the AMA streams under Online with τ=0 . Lines and bands give the median and interquartile range across sessions. The dashed line marks τ=3 , the threshold selected by TLM.
Model
Mode
ASR@1
Per-trial ASR
ASR@10
Qwen3-8B
Frozen
.170
.152
.305
Online
.150
.148
.285
Qwen2.5-7B-Instruct
Frozen
.235
.224
.380
Online
.215
.234
.385
Llama-3.1-8B-Instruct
Frozen
.100
.098
.240
Online
.090
.103
.240
Appendix
Table 7: Effect of updates under ActorBreaker query streams. ASR@1, per-trial ASR, and ASR@10 of Frozen and Online at τ=0 on the four evaluated models.
Model
Mode
Original
Random
Reversed
Repeated q12
Qwen3-8B
Frozen
.59 / .67
.33 / .43
.10 / .15
.02 / .03
Online
.72 / .85
.48 / .60
.13 / .25
.01 / .04
Qwen2.5-7B-Instruct
Frozen
.50 / .69
.39 / .52
.23 / .50
.27 / .40
Online
.63 / .85
.49 / .78
.27 / .59
.26 / .42
Llama-3.1-8B-Instruct
Frozen
.15 / .20
.09 / .11
.02 / .04
.06 / .04
Online
.31 / .51
.17 / .27
.07 / .19
.13 / .26
Appendix
Table 8: Attack success under rearranged query sequences. Each cell reports ASR@1 / ASR@10 at τ=0 .
Figure 9: Prompt for query-sequence generation. ⟨ goal ⟩ is replaced by the goal string; the underlined values are T .
Figure 10: LLM-judge prompt. ⟨ goal ⟩ is replaced by the original harmful goal, and ⟨ response ⟩ by the model response.
Judge
n
Agreement
Cohen’s κ
FN
FP
General-purpose LLMs
DeepSeek-V4.1-Flash
200
.960
.92
0
8
Hy4
183
.940
.88
4
7
GPT-6 Luna
198
.939
.87
1
11
Kimi-K3.1-Pro
200
.935
.87
10
3
GLM-5.3-Flash
194
.933
.86
11
2
Appendix
Table 9: Agreement of each judge with the human labels on the 200 annotated responses. n is the number of responses a judge scored, and its API refused to score the rest. FN and FP count the judge’s false negatives and false positives.
Adversarial attacks on large language models probe how crafted inputs, internal changes, and agent interactions bypass safety or disrupt reliable behavior.
Test-Time Training (TTT) is an emerging paradigm that enables models to adapt their parameters during inference, improving performance on tasks such as few-shot learning, retrieval-augmented generation, and complex reasoning. However, this dynamic adaptation introduces new vulnerabilities that adversaries can exploit to jailbreak models. We identify three threat models for TTT and demonstrate how attackers can leverage them to bypass safety filters. Our results show that TTT can significantly increase the Attack Success Rate (ASR) and the ASR over 10 generation trials (ASR@10). For example, under LoRA, the few-shot and generation-phase threat models achieve an average ASR@10 of 95% and 93% respectively, across models from different families and scales. These vulnerabilities transfer to production fine-tuning APIs. We also show that TTT-induced overfitting can produce degenerate outputs that inflate ASR under standard judges, and propose a validity-aware evaluation to correct for this. Our findings suggest that TTT exposes a new attack surface, strengthens attacks, and undermines existing safety guardrails. As a first step toward defense, we propose a lightweight provider-side detector that flags TTT requests via the perplexity shift on a private harmful holdout, but robust deployment will ultimately require dynamic alignment.
Simone Antonelli, Sadegh Akhondzadeh, Aleksandar Bojchevski
CISPA Helmholtz Center for Information Security · University of Cologne
Safety alignment in Large Language Models (LLMs) remains vulnerable to backdoor attacks. Existing LLM backdoors are almost all input-centric: activation depends on explicit trigger patterns in the user input, so modern guardrails are built to sanitize the input space. We challenge this assumption with a novel answer-side backdoor for multi-turn dialogue. Instead of inserting the trigger into the input, the adversary uses a benign first-turn prompt to naturally induce the model to generate a specific, seemingly innocuous word. Once merged into the dialogue history, this self-generated word becomes the trigger. When a later harmful query arrives, the model detects its own trigger and bypasses its safety refusal, while the user input stays perfectly clean. Across four LLMs, our attack reaches near-perfect Attack Success Rates, approaching 100% at only a 5% poisoning rate, while preserving general utility and clean-input safety, and it evades mainstream input-centric defenses. Representation-level analysis shows that the self-generated trigger consistently suppresses the model's refusal signal, exposing a critical blind spot in current LLM defenses.
Yibo Zhang, Tianrong Guan, Liang Lin +3
Queen Mary University of London, UK · Squirrel AI Learning, USA
Test-time training (TTT) has recently emerged as a promising method to improve the reasoning abilities of large language models (LLMs), in which the model directly learns from test data without access to labels. However, this reliance on test data also makes TTT methods vulnerable to harmful prompt injections. In this paper, we investigate safety vulnerabilities of TTT methods, where we study a representative self-consistency-based test-time learning method: test-time reinforcement learning (TTRL), a recent TTT method that improves LLM reasoning by rewarding self-consistency using majority vote as a reward signal. We show that harmful prompt injection during TTRL amplifies the model's existing behaviors, i.e., safety amplification when the base model is relatively safe, and harmfulness amplification when it is vulnerable to the injected data. In both cases, there is a decline in reasoning ability, which we refer to as the reasoning tax. We also show that TTT methods such as TTRL can be exploited adversarially using specially designed "HarmInject" prompts to force the model to answer jailbreak and reasoning queries together, resulting in stronger harmfulness amplification. Overall, our results highlight that TTT methods that enhance LLM reasoning by promoting self-consistency can lead to amplification behaviors and reasoning degradation, highlighting the need for safer TTT methods.
Vanshaj Khattar, Md Rafi ur Rashid, Moumita Choudhury +4
Virginia Tech · Penn State University · University of Massachusetts Amherst +1