acceptodds
Withdrawn from ICLR 2027

Safety-Constrained Test-Time Training: Post-Update Guarding for Aligned Language Models

Withdrawn from ICLR 2027, so left out of the paper lists and the map.

Abstract

Test-time training (TTT) adapts a language model during inference, but an attacker can use the same update loop to erode safety alignment. We propose Safety-Constrained Test-Time Training (SC-TTT), which probes each candidate update against a fixed behavioral reference. It retains the candidate only when the harmful-side compliance change does not exceed the benign-side change by more than a threshold. Otherwise, SC-TTT restores the preceding parameter state. Across Gemma-3-4B, Llama-3.2-3B, and Qwen3.5-4B, SC-TTT lowers mean attack success from 19.8-50.3% under vanilla TTT to 0.1-5.8% over five random seeds. It retains 0.83-1.09 of the vanilla adaptation gain on BBH-H3 and matches vanilla accuracy on ARC-AGI. A learning-rate analysis shows that the criterion is reliable only within a calibrated working regime. A full-knowledge three-step pressure test still suppresses 47-70% of vanilla attack success despite optimizing the gate directly. These results establish strong attack suppression, high utility retention, and an explicit operating regime for guarded test-time adaptation.

Primary area:
transfer learning, meta learning, and lifelong learning
Keywords:
test-time training, safety alignment, adversarial robustness, parameter-efficient fine-tuning

Reviews

Among:
Shape:
1234this paper, Bottom 10%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.67 over 3 reviews, above 10% of the others.
Reviewer_QSU4OpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
1
Soundness
1
Read review
Paper summary

The paper studies the problem of test-time training for adversarial robustness. The authors shift the defense from input-level detection to the stage following candidate parameter updates, thereby providing a more realistic defense setting. Additionally, the paper conducts experiments to validate the effectiveness of the proposed SC-TTT.

Critical strengths
  1. The topic is attractive and realistic.

  2. The motivation is clearly stated.

  3. The method is simple and easy to integrate into existing test-time training pipelines.

Critical weaknesses
  1. The paragraphs are too fragmented, making it difficult for readers to follow the discussion.

  2. ASR is a metric where lower values indicate better performance. Please also consider over-rejection during defense. The following work may be relevant to your study:

[1] Calibrating Inference Time Alignment with Sequence-level Risk Accumulation. ACL Main 2026.

[2] Llms encode harmfulness and refusal separately. Neurips 2026.

[3] Beyond I'm Sorry, I Can't: Dissecting Large-Language-Model Refusal. AAAI 2026.

  1. The baselines are relatively weak. Please consider comparisons with state-of-the-art test-time scaling baselines
Questions for authors

Please refer to the critical weaknesses.

Reviewer_mNsfOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper focuses on a practical security concern: how to prevent adversaries from undermining the safety alignment of large language models (LLMs) through test-time training (TTT). To address this issue, the authors propose SC-TTT, a safety-constrained framework that selectively accepts or rejects candidate parameter updates using a lightweight post-update behavioral gate. The authors evaluate SC-TTT across three LLM families (Qwen, Llama, and Gemma). Experimental results demonstrate that SC-TTT substantially reduces the attack success rate (ASR) while preserving the utility gains achieved through TTT.

Critical strengths
  1. The research problem is valuable. The authors propose a timely security concern: an adversary could manipulate the parameter-update during Test-Time Training to undermine the alignment of the LLM.

  2. The proposed framework is simple yet effective: the authors propose SC-TTT, which is based on behavioral probing and parameter rollback, without introducing extra training cost.

  3. The experimental results demonstrate the effectiveness of SC-TTT, reducing ASR while preserving utility performance.

Critical weaknesses
  1. The core design of the safety criterion needs further discussion. The authors define g=ΔH−ΔBg = \Delta H - \Delta B, and use g≤τg \leq \tau to judge whether this update is safe. However, this design of gg can only constrain the relative increase of BB compared to HH. For example, when ΔH=0.5\Delta H = 0.5 and ΔB=0.5\Delta B = 0.5 (i.e., g=0g=0), or ΔH=1.5\Delta H = 1.5 and ΔB=1.7\Delta B = 1.7 (i.e., g=−0.2g=-0.2), SC-TTT would accept these updates while the harmful compliance is significantly increased.

  2. Limited Evidence of Selective Adaptation. As reported in Table 3, SC-TTT rejects nearly all harmful updates (97.5–100%), making its strong safety performance difficult to distinguish from simply preventing parameter adaptation. The authors should add more experiments to demonstrate the effectiveness of the proposed selective update mechanism.

  3. Lack of essential ablation studies. The paper lacks ablation studies to validate the necessity of its key design choices, particularly the harmful–benign contrast and fixed-reference criterion. Comparisons with simpler alternatives, such as a harmful-only gate and a moving-reference gate, would help clarify the individual contributions of these components to safety and utility.

Questions for authors
  1. I have concerns about some reported results. For example, in Table 1, the authors report that the results of Qwen and Llama are exactly identical (0.12±0.17 for ASR and 1.25±1.7 for ASR@10), the authors should further explain why the two models achieve the same results.

  2. The authors should report the absolute accuracy of the three models with any TTT, i.e., the accuracy of Non-TTT.

  3. Why is retaining the AdamW optimizer state preferable to fully restoring the training state after a rejected update? Could gradients from rejected malicious candidates indirectly affect subsequent updates through the retained moments?

  4. How does SC-TTT behave under mixed benign–malicious adaptation streams and longer update trajectories? The current evaluation separates harmful and benign episodes, while real-world deployments may involve interleaved updates within the same model state.

Reviewer_CwCzOpenReview ↗
Rating
1
Confidence
4
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

This paper proposes a defense against test-time training (TTT) attacks. In this threat, an adversary exploits the parameter updates induced by their own adaptation data to erode the model's safety alignment. The method snapshots the trainable parameters before each optimizer step and scores the resulting candidate on 6 harmful and 6 benign anchor prompts. It then computes the gap g=ΔH−ΔBg = \Delta H - \Delta B relative to the base model and rolls back any candidate whose gap exceeds a fixed threshold.

Critical strengths

The topic is timely, and the security of test-time adaptation mechanisms is important for the community.

Critical weaknesses
  • The criterion is structurally weak and, I would argue, easily bypassed. Because ΔB\Delta B is subtracted from$\Delta H$, an attacker who raises harmful and benign compliance together passes the gate. Besides, the approach depends heavily on six anchors and a single compliance target per model. It is unclear whether these capture harmful drift outside the narrow distribution tested, for example other harm categories or targeted objectives. A category-held-out evaluation, with anchors and attack data drawn from different harm domains, would be needed to support any generalization claim.

  • Against naive harmful fine-tuning, the gate rejects nearly 100% of candidates. The defended model is therefore essentially the base model, and its ASR matches the no-TTT baseline almost by construction. A more informative setting would mix harmful and benign data in the adaptation stream. The evaluation is also shallow: it uses 32 harmful prompts of unspecified provenance and a single attack recipe, and the five seeds vary training noise rather than the prompt set.

Questions for authors

How would the approach perform when the anchors and the attack data come from different harm categories/distributions? or when the adversary's harmful completions avoid the fixed compliance target? And how would the approach behave when harmful and benign examples are mixed in the setting?

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Discussion (0)

Sign in to comment.