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.