Tcell: Mitigating Harmful Fine-tuning for Large Language Models via Gradient Alignment
Tiansheng Huang, Virat Shejwalkar, Oscar Chang, Ling Liu
NeurIPS 2026
TL;DR. We propose Tcell, a safety alignment method that exploits gradient alignment to defend against harmful fine-tuning.
Abstract. Harmful fine-tuning attack becomes a concerning safety risk for mainstream fine-tuning-as-a-service providers, as attackers can submit harmful data to the API to compromise the safety alignment of the large language models. In this paper, we first explore an intuitive gradient mixing solution, and derive a key property ensuring the success of defense -- \emph{taking a fine-tuning gradient that has higher cosine similarity with the safety gradient can mitigate harmful fine-tuning.} Motivated by this key property, we design an alignment-stage defense, dubbed Tcell. The core contribution of Tcell is a regularizer that align the harmful gradient and the safety gradient during safety alignment, which ensures the harmful fine-tuning gradient exhibits high cosine similarity with the safety gradient, achieving \emph{gradient alignment}. The benefit of gradient alignment is supported by i) empirical and theoretical interpretation and ii) comparison to alternative design without gradient alignment. Lastly, Tcell might be able to extend to strengthen safety alignment of an open-weight model to avoid mis-use after its release. Code is available at \url{https://github.com/git-disl/Tcell}.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:42 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
The submission proposes Tcell, an alignment-stage defense against harmful fine-tuning. Tcell mainly includes a regularizer that align harmful and safety gradients during safety alignment.
Reviews are in general succinct and overall positive. They appreciate the provided core insights, strong empirical performance, and ablation studies. On the other hand, shared concerns remain:
- Overhead: There is a large overhead introduced by the method due to the additional forward and backward pass on the held-out alignment data.
- High sensitivity to key hyperparameters: Though the sensitivity to learning rate is a shared limitation among this defense and baselines, Section 5.4 demonstrates Tcell's sensitivity to slight formulation changes and its additional hyperparameters and .
- Generalizability: Does the defense generalize to RL-based fine-tuning, LoRA, or under adaptive attacks?
I think the first two concerns above are critical. They are intrinsic to the defense itself. Some reviewers also mentioned comparison with a broader range of safety defenses and further mechanistic explanations of the defense.
Final justification
All reviewers and authors were actively involved during the discussion phase. The detailed response from authors has greatly addressed the concerns from the reviewers. As a result, all reviewers vote for acceptance, and I am happy to recommend acceptance too. Please make sure to incorporate the feedback in the camera-ready version.
Read meta-review
Meta-review
The submission proposes Tcell, an alignment-stage defense against harmful fine-tuning. Tcell mainly includes a regularizer that align harmful and safety gradients during safety alignment.
Reviews are in general succinct and overall positive. They appreciate the provided core insights, strong empirical performance, and ablation studies. On the other hand, shared concerns remain:
- Overhead: There is a large overhead introduced by the method due to the additional forward and backward pass on the held-out alignment data.
- High sensitivity to key hyperparameters: Though the sensitivity to learning rate is a shared limitation among this defense and baselines, Section 5.4 demonstrates Tcell's sensitivity to slight formulation changes and its additional hyperparameters and .
- Generalizability: Does the defense generalize to RL-based fine-tuning, LoRA, or under adaptive attacks?
I think the first two concerns above are critical. They are intrinsic to the defense itself. Some reviewers also mentioned comparison with a broader range of safety defenses and further mechanistic explanations of the defense.
Final justification
All reviewers and authors were actively involved during the discussion phase. The detailed response from authors has greatly addressed the concerns from the reviewers. As a result, all reviewers vote for acceptance, and I am happy to recommend acceptance too. Please make sure to incorporate the feedback in the camera-ready version.
1 comment
- Rating
- 5/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
Harmful fine-tuning is problematic for fine-tuning providers. Inspired by Taylor optimization, the paper proposes that harmful fine-tuning may be alleviated by making harmful gradients having higher cosine similarities with safety gradients. Tcell is such a method that uses meta-optimization to directly optimize for a similar objective. The result model is indeed less prone to short malicious fine-tunings.
Strengths and weaknesses
Strength
- The proposed method is intuitive and outperforms various baselines. Experiments and ablations were throughout. In particular I appreciate Table 13.
Weakness
- As noted by the authors themselves, the method is relatively computational expensive, and it does not work under an open-weight setting since it may be circumvented by large learning rates, for example.
- Minor: the demonstration in 3.3 is not super convincing as the loss function simply amounts to taking normalized gradient steps on harmful and harmless datasets together, i.e. data mixing with gradients clipped.
Questions
- How much degradation was done after the proposed alignment stage? Could you give some simple measurements of capability change before and after that stage?
- Intuitively how does Tcell work? Does it work by making the harmful learning slower or making the harmful learning learn something spurious? Would appreciate a training loss curve comparison in the former case.
Limitations
yes
Final justification
The slightly improved version elevated my concern on efficiency and it seems to be a somewhat surgical edit doable in the final version.
Formatting concerns
no
3 comments
Rebuttal
We thank the reviewer for the positive feedback. Below we address your concern:
W1: As noted by the authors themselves, the method is relatively computationally expensive.
Tcell indeed requires more computation due to its design. To address the reviewer's concern about overhead, we further design a computation-efficient solution named AcceleratedTcell (shortened as AccTcell).
In order to be computation-efficient, we avoid calculating the gradient of the "gradient alignment regularizer" in each step. Instead, we reuse the gradient of the regularizer from its cached version, and update the cache every steps.
Specifically, the update rule of the AccTcell will be and the cache gradient $g_{cache}= \tilde{\lambda} \left ( \nabla f\left ( \widehat{ w}_t \right ) \cdot I - \nabla f\left ( \tilde{ w}_t\right ) \cdot I \right ) $ is evaluated every steps. The evaluation result is shown as follows.
| SFT | Tcell | AccTcell () | AccTcell () | AccTcell () | AccTcell () | AccTcell () | |
|---|---|---|---|---|---|---|---|
| Harmful Score | 37.40 | 11.00 | 7.30 | 0.60 | 0.80 | 12.40 | 41.50 |
| Finetune Accuracy | 46.70 | 46.40 | 47.70 | 46.70 | 47.10 | 46.20 | 44.20 |
| Computation time | 0.132 | 0.483 | 0.218 | 0.183 | 0.165 | 0.155 | 0.147 |
Surprisingly, the result shows that AccTcell can even outperform original Tcell when . Specifically, AccTcell () achieves a harmful score of 0.80 (which is 10.2 lower than Tcell and 36.6 lower than SFT), and more importantly, it only incurs 0.25x more computation time compared to SFT. This is a sharp contrast to Tcell, which requires 2.7x more computation compared to SFT.
We hope that the astounding performance of AccTcell can address your concern about extra system overhead. We also appreciate the reviewer feedback, which inspires us to develop this new algorithm.
W2: Tcell does not work under an open-weight setting since it may be circumvented by large learning rates.
Although the open-weight scenario might be a potential extension scenario of Tcell, we first wish to clarify that our paper aims to address harmful fine-tuning in a fine-tuning-as-a-service scenario, in which the fine-tuning learning rate can be reasonably restricted by the service provider (i.e., defender).
However, we acknowledge that, Tcell, similar to other SOTA alignment-stage defenses, indeed breaks when using a higher fine-tuning learning rate, and this hinders its extension to an open-weight setting. The long-term goals of the authors are indeed to design a defense solution that can resist harmful fine-tuning attacks at a very high learning rate, but in reality, it is very challenging to achieve.
During the rebuttal against your W1, we accidentally found that the original Tcell performance could be improved via slightly changing its optimization update rule. This new algorithm, named Accelerated-Tcell (Acc-Tcell) achieves an even lower harmful score (compared to Tcell) in a relatively high learning rate regime (lr=1.5e-6). Please check the following Table.
| Methods | Harmful score | Fine-tune accuracy |
|---|---|---|
| SFT | 47.70 | 49.00 |
| Tcell | 39.00 | 51.90 |
| Acc_Tcell () | 23.50 | 50.40 |
We believe that the full potential of Tcell has not been fully exploited, and with further refinement on its update rule and data configuration, we might potentially be able to achieve a better performance against high learning rate attacks, ultimately making it applicable in the challenging open-weight model scenario.
W3: (Minor) the demonstration in 3.3 is not super convincing as the loss function simply amounts to taking normalized gradient steps on harmful and harmless datasets together, i.e. data mixing with gradients clipped.
Indeed, gMixer in Section 3.3 is designed by taking a normalized gradient step on harmful and harmless datasets together. This can ensure that the gradient similarity is maximized, and we mainly use this result to casually motivate the readers to think why we need to maximize gradient similarity (i.e., align the gradient). Indeed, the motivation study alone may not be super convincing to justify the need for gradient alignment at the alignment stage, and therefore we also use the theoretical interpretation in Section 5.3 for further justification of the benefit of gradient alignment. We hope this clarification can alleviate the reviewer's concern.
Q1: How much degradation was done after the proposed alignment stage? Could you give some simple measurements of capability change before and after that stage?
In the following table, we show the measurements of harmful score and model general capability (measured with GSM8K and AlpacaEval) change before and after safety alignment. As shown, both Tcell and SFT alignment slightly degrade the model's general capability (as shown in the degradation of GSM8K accuracy and AlpacaEval).
| Harmful score | GSM8K Accuracy | AlpacaEval | |
|---|---|---|---|
| Base | 32.6 | 28.1 | 51.2 |
| Base->After Tcell alignment | 0.3 | 25.1 | 42.3 |
| Base->After SFT alignment | 0 | 26.3 | 44.7 |
Q2: Intuitively, how does Tcell work? Does it work by making the harmful learning slower or making the harmful learning learn something spurious? Would appreciate a training loss curve comparison in the former case.
Tcell makes the harmful fine-tuning slower. We show the training loss over harmful data (harmful loss) below. As shown in the table, Tcell model reduces the harmful loss at a slower rate compared to SFT without defense.
| Harmful loss\Step | 0 | 50 | 100 | 150 | 200 | 250 |
|---|---|---|---|---|---|---|
| SFT | 2.5035 | 1.919 | 1.8123 | 1.7871 | 1.799 | 1.7384 |
| Tcell | 2.5035 | 2.0418 | 1.881 | 1.8225 | 1.8249 | 1.7561 |
Thanks for the response! The AccTcell method looks quite promising. I have raised my score.
Thanks a lot for the support and for raising the weakness!
Thanks a lot for the recognition of our rebuttal and for raising this weakness, which in some ways motivated us to discover this better algorithm AccTcell. We are quite excited about AccTcell as well. In the camera-ready, we will add a section to describe AccTcell, and we will update our code repo to include the implementation of this method.
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 4/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper addresses the problem that large language models may suffer from safety degradation when subjected to harmful downstream fine-tuning. To mitigate this issue, the authors propose a defense mechanism during the alignment stage. Specifically, the paper first introduces gMixer to validate the core hypothesis that a higher cosine similarity between harmful fine-tuning gradients and safety gradients can effectively suppress safety degradation. Motivated by this observation, the authors further propose TCell, an alignment-stage defense method that incorporates a regularization term to maximize the similarity between harmful gradients and safety gradients during alignment training, thereby improving the model's robustness against harmful fine-tuning attacks.
Strengths and weaknesses
Strengths
The paper proposes Tcell, a novel defense framework that approaches safety preservation from the perspective of gradient-space reshaping. By introducing a gradient alignment regularizer during the alignment stage, the method explicitly steers gradients arising from simulated harmful fine-tuning toward safety-aligned directions. This proactive mechanism differs substantially from existing alignment-based defenses and provides an original and well-motivated approach to improving robustness against safety degradation caused by subsequent fine-tuning.
Weaknesses
- The experimental comparison mainly focuses on defense methods applied during the alignment stage, while methods designed for the fine-tuning or post-fine-tuning stages are largely absent. As a result, the relative effectiveness of Tcell against a broader range of safety defense approaches remains unclear.
- The ablation studies (Tables 11 and 12) clearly demonstrate that Tcell is highly sensitive to its key hyperparameters. While these experiments provide valuable insights into the impact of hyperparameter choices, the paper does not offer practical guidance on how to select appropriate values under different settings.
- Although the authors claim that Tcell incurs no additional overhead during the subsequent fine-tuning stage, this efficiency claim does not fully account for the computational cost introduced during the alignment stage. Due to its algorithmic design, Tcell requires multiple additional forward and backward passes to perform meta-updates and safety-aware optimization, resulting in substantial training-time overhead.
Questions
Modern LLM adaptation is increasingly performed via PEFT methods such as LoRA rather than full-parameter fine-tuning.
- Can Tcell's gradient-alignment regularization be naturally applied to LoRA parameters?
- Furthermore, if an attacker performs malicious fine-tuning using standard LoRA while keeping the backbone frozen, would the gradient-alignment defense embedded in the backbone weights still remain effective?
Experimental results under LoRA-based attack settings would help clarify the practical robustness of the proposed method.
Limitations
yes
Final justification
The rebuttal sufficiently addresses my concerns. I will maintain my original score and support acceptance.
Formatting concerns
There is no formatting concern.
4 comments
Rebuttal
We thank the reviewer for the positive support of this paper, and below we address your concern.
W1: The experimental comparison mainly focuses on defense methods applied during the alignment stage, while methods designed for the fine-tuning or post-fine-tuning stages are largely absent.
We next compare Tcell with two non-alignment stage defenses Lisa[1] and SafeGrad[2]. As shown in the following table, both Lisa and SafeGrad achieve a lower harmful score compared with Tcell when . However, we further show that Tcell can be combined with Lisa and SafeGrad to achieve an even lower harmful score, showing the value of Tcell.
| Methods | HS (p=0.1) | HS (p=0.2) | HS (p=0.4) | FA (p=0.1 ) | FA(p=0.2) | FA (p=0.4) |
|---|---|---|---|---|---|---|
| SFT | 34.50 | 37.40 | 38.70 | 48.30 | 46.70 | 45.30 |
| Tcell | 0.90 | 11.00 | 30.80 | 47.00 | 46.40 | 47.80 |
| Lisa | 10.70 | 17.10 | 20.40 | 49.70 | 46.70 | 48.00 |
| SafeGrad | 0.10 | 0.20 | 0.80 | 42.30 | 43.50 | 41.50 |
| Tcell+Lisa | 0.00 | 0.20 | 0.20 | 51.00 | 48.30 | 48.60 |
| Tcell+ SafeGrad | 0.00 | 0.00 | 0.20 | 38.20 | 39.70 | 37.40 |
Here, HS means harmful score (lower the better) and FA means fine-tuning accuracy (higher the better). controls the ratio of harmful data (used to characterize attack strength).
[1] Lisa: Lazy Safety Alignment for Large Language Models against Harmful Fine-tuning Attack
[2] SafeGrad: Gradient Surgery for Safe LLM Fine-Tuning
W2: The ablation studies (Tables 11 and 12) clearly demonstrate that Tcell is highly sensitive to its key hyperparameters. While these experiments provide valuable insights into the impact of hyperparameter choices, the paper does not offer practical guidance on how to select appropriate values under different settings.
To alleviate the concern of hyperparameter selection, we next follow the reviewer's advice to offer guidance on how to select appropriate hyperparameter values under different deployment settings.
Setting 1 (expert service provider): In this setting, we assume a large-scale service provider (e.g., OpenAI) can construct high-quality simulation data for attack simulation and has expert knowledge in red-teaming/benchmarking.
For this setting, the service provider can do the sweep tests by simulating the attack on each Tcell-aligned checkpoint produced by different chosen hyper-parameters, and afterwards measuring the harmfulness/accuracy of the fine-tuned model. Then they can choose the best hyper-parameters that meet their requirement. This is exactly the way we choose the suitable hyper-parameters based on simulation in Table 11 and Table 12.
Setting 2 (budget-limit service provider): In this setting, we assume that the service provider did not have any labour and data resources for attack simulation and benchmarking. They can only track the statistics in the Tcell training process for hyperparameter selection.
We have some practical tips for this setting.
- Practical tip for the selection of . A rule of thumb is to select that adjusts the loss of the regularizer to be ** on the same scale** as the safety loss. A practical selection tip is to track the average value of the first 5 steps of the two losses, and select a scale factor that matches the two losses. See the following:
| Avg Safety loss | Avg scaled regularizer loss (=1) | Avg scaled regularizer loss (=10) | Avg scaled regularizer loss (=100) |
|---|---|---|---|
| 4.426 | 0.204 | 2.04 | 20.4 |
As shown, scaling the gradient alignment regularizer loss by matches the scale of the safety loss and the regularizer loss, and it is also a good configuration of , as shown in our Table 11.
- Practical tip for the selection of . For choosing , we need to track the cosine similarity between the safety gradient and the harmful gradient to verify whether the regularizer is maximizing the cosine similarity under the hyperparameter configuration. For simplicity, we may track the average similarity across the first 100 steps. As shown in the following table, is the optimal selection that maximizes gradient similarity, and it should be a good hyperparameter choice per Table 12.
| =0.001 | =0.01 | =0.1 | =1 | |
|---|---|---|---|---|
| Avg Cosine similarity of first 100 steps | 0.1157 | 0.1944 | 0.2815 | 0.2227 |
W3:Tcell requires multiple additional forward and backward passes to perform meta-updates and safety-aware optimization, resulting in substantial training-time overhead.
Tcell indeed requires more computation and memory due to its design. To address the reviewer's concern about overhead, we further design a computation-efficient solution named AcceleratedTcell (shortened as AccTcell).
In order to be computation-efficient, we avoid calculating the gradient of the "gradient alignment regularizer" in each step. Instead, we reuse the gradient of the regularizer from its cache version, and update the cache every steps.
Specifically, the update rule of the AccTcell will be and the cache gradient $g_{cache}= \tilde{\lambda} \left ( \nabla f\left ( \widehat{ w}_t \right ) \cdot I - \nabla f\left ( \tilde{ w}_t\right ) \cdot I \right ) $ is evaluated every steps. The evaluation result is shown as follows.
| SFT | Tcell | AccTcell (=5) | AccTcell (=10) | AccTcell (=20) | AccTcell (=40) | AccTcell (=80) | |
|---|---|---|---|---|---|---|---|
| Harmful Score | 37.40 | 11.00 | 7.30 | 0.60 | 0.80 | 12.40 | 41.50 |
| Finetune Accuracy | 46.70 | 46.40 | 47.70 | 46.70 | 47.10 | 46.20 | 44.20 |
| Computation time | 0.132 | 0.483 | 0.218 | 0.183 | 0.165 | 0.155 | 0.147 |
Surprisingly, the result shows that AccTcell can even outperform original Tcell when . Specifically, AccTcell (\tau=20) achieves a harmful score of 0.80 (which is 10.2 lower than Tcell and 36.6 lower than SFT), and more importantly, it only incurs 0.25x more computation time compared to SFT. This is a sharp contrast to Tcell, which requires 2.7x more computation compared to SFT.
We hope that the astounding performance of AccTcell can address your concern about extra system overhead. We also appreciate the reviewer feedback, which inspires us to develop this new algorithm AccTcell.
Q1: Can Tcell's gradient-alignment regularization be naturally applied to LoRA parameters?
Because the design of Tcell method abstracts the exact optimizable parameters to , Tcell's gradient-alignment regularization can naturally be applied to train over the LoRA parameters (basically to align the gradient of the LoRA adaptor). In the following, we show that applying Tcell in the LoRA adaptor is useful in defending against later LoRA fine-tuning. We show the evaluation below:
| Methods | Harmful Score | -> | -> | Finetune Accuracy | -> | -> |
|---|---|---|---|---|---|---|
| p=0.1 | p=0.2 | p=0.4 | p=0.1 | p=0.2 | p=0.4 | |
| SFT(LoRA)_SFT(LoRA) | 2.40 | 8.90 | 25.30 | 41.30 | 41.70 | 41.50 |
| Tcell(LoRA)_SFT(LORA) | 0.90 | 4.90 | 22.10 | 41.40 | 41.10 | 41.50 |
Here x_y means using x method in the alignment stage and y method in the harmful fine-tuning stage. As shown, the LoRA adaptor trained via Tcell can reduce the harmful score compared to that trained via SFT. However, we note that using Tcell to train the LoRA adaptor is not the best application choice for defending against LoRA fine-tuning (use Tcell to train the backbone is better). Please check our comment to your next question for further clarification.
Q2: Furthermore, if an attacker performs malicious fine-tuning using standard LoRA while keeping the backbone frozen, would the gradient-alignment defense embedded in the backbone weights still remain effective?
The gradient-alignment defense trained in the backbone weights can remain effective against LoRA-based harmful fine-tuning. Please show the result below on different harmful ratios :
| Methods | Harmful Score | -> | -> | Finetune Accuracy | -> | -> |
|---|---|---|---|---|---|---|
| p=0.1 | p=0.2 | p=0.4 | p=0.1 | p=0.2 | p=0.4 | |
| SFT(backbone)_SFT(LoRA) | 12.40 | 16.20 | 26.00 | 44.30 | 45.50 | 42.30 |
| Tcell(backbone)_SFT(LORA) | 0.00 | 0.00 | 0.10 | 40.90 | 43.00 | 40.40 |
Here, x_y means using x method in the alignment stage and y method in the harmful fine-tuning stage. The results show that Tcell trained within the backbone can also be effective on the later fine-tuning with a LoRA adaptor, as it significantly reduces the harmful score compared to SFT(backbone). This result is actually surprising to the authors because, before the experiment, we did not expect Tcell trained within the backbone could also resist the learning of a bad LoRA adaptor.
Warm reminder of author-reviewer discussion deadline
Hello reviewer Y8b8,
Thanks for your detailed review which significantly enhance our paper. As the deadline for the author-reviewer discussion is approaching (ending in approximately 12 hours), we kindly request some potential feedback on the rebuttal if appropriate.
With this opportunity, we also wish to share some interesting key findings we discovered that the reviewers might find exciting.
-
We are able to refine Tcell's limitation on the computation time! We design a new algorithm dubbed Acc-Tcell, which comes with 10.2 lower harmful score and accelerates the original Tcell by 66%. This shows that there are ways to improve Tcell to achieve better defense performance and computation efficiency at the same time.
-
We show that Tcell works against harmful LoRA fine-tuning! The reviewer seems to quite interested in LoRA fine-tuning, and we are also curious about this as well (due to its large-scale deployment in commercial fine-tuning-as-a-service, e.g., Tinker from TML). After evaluation, our results surprisingly show that vanilla Tcell can make the backbone model immune against harmful fine-tuning on an extra LoRA adaptor.
Thanks again for your support of this paper, and we sincerely wish that these new findings excite you as well.
Thank you for the authors' detailed rebuttal and additional experiments, which have addressed several of my concerns regarding the limitations and applicability of Tcell. After considering the rebuttal, I will maintain my original score.
Thanks for the feedback
Thanks for the recognition of our rebuttal! We will add the additional results into the new version of the paper.
- Rating
- 5/6
- Confidence
- 2/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper mixes the user’s harmful gradient with the safety gradient during fine-tuning, and then dentifies that an update with higher cosine similarity to the safety gradient mitigates harm. They propose Tcell that maximize the similarity of the harmful gradient and the safety gradient for the aligned model. They evaluated on Llama3-8B, Qwen2.5-7B, Granite-3.3-8B against several alignment-stage baselines (Vaccine, RepNoise, TAR, Booster).
Strengths and weaknesses
Strengths:
The exploration with gMixer provides a core insight to the safety alignment gap against harmful fine-tuning (HFT) attacks.
The Tcell-NoGrad ablation directly isolates the gradient-alignment contribution.
The empirical results across harmful ratios, sample counts, OOD attack data, models, tasks, and seeds show strong defense with acceptable accuracy losses.
Weaknesses:
The defense breaks at higher fine-tuning learning rates (lr=2e-6).
The overhead of ~3.7× compute and +39 GB memory at alignment time is nontrivial.
The approximation that drops second-order terms (treating inner-update Jacobians as identity) needs more empirical analysis.
Questions
Does gradient alignment generalize to RL-based fine-tuning (DPO/GRPO), or is it SFT-specific?
Add even a small adaptive-attack probe.
Limitations
yes
Final justification
Thank the authors for the rebuttal. The core concepts of this work is solid. W3 is well addressed. W1, Q1, Q2 are partially addressed. W2 concern still remains. I keep my score and recommendation for acceptance.
Formatting concerns
NA
2 comments
Rebuttal
We sincerely thank the reviewer for the strong support of this paper. We address the following concerns:
W1: The defense breaks at higher fine-tuning learning rates (lr=2e-6).
We first wish to clarify that our paper aims to address harmful fine-tuning in a fine-tuning-as-a-service scenario, in which the fine-tuning learning rate can be reasonably restricted by the service provider (i.e., defender).
However, we acknowledge that Tcell, similar to other SOTA alignment-stage defenses, indeed breaks when using a higher fine-tuning learning rate, and we wish to honestly disclose this weakness (See also our limitation section). The long-term goals of the authors are to design a defense solution that can resist harmful fine-tuning attacks at a very high learning rate, but in reality, reaching this goal is challenging.
During the rebuttal against your W2, we accidentally found that the original Tcell performance could be improved via slightly changing its optimization update rule. This new algorithm, named Accelerated-Tcell (Acc-Tcell), achieves even lower harmful score (compared to Tcell) in a relatively high learning rate regime (lr=1.5e-6). Please check the following Table.
| Methods | Harmful Score | Fine-tune Accuracy |
|---|---|---|
| SFT | 47.70 | 49.00 |
| Tcell | 39.00 | 51.90 |
| Acc_Tcell (=10) | 23.50 | 50.40 |
W2: The overhead of ~3.7× compute and +39 GB memory at alignment time is nontrivial.
Tcell indeed requires more computation and memory due to its design. To address the reviewer's concern about overhead, we further design a computation-efficient solution named AcceleratedTcell (shortened as AccTcell).
In order to be computation-efficient, we avoid calculating the gradient of the "gradient alignment regularizer" in each step. Instead, we reuse the gradient of the regularizer from its cached version, and update the cache every steps.
Specifically, the update rule of the AccTcell will be and the cache gradient $g_{cache}= \tilde{\lambda} \left ( \nabla f\left ( \widehat{ w}_t \right ) \cdot I - \nabla f\left ( \tilde{ w}_t\right ) \cdot I \right ) $ is evaluated every steps. The evaluation result is shown as follows.
| SFT | Tcell | AccTcell (\tau=5) | AccTcell (\tau=10) | AccTcell (\tau=20) | AccTcell (\tau=40) | AccTcell (\tau=80) | |
|---|---|---|---|---|---|---|---|
| Harmful Score | 37.40 | 11.00 | 7.30 | 0.60 | 0.80 | 12.40 | 41.50 |
| Finetune Accuracy | 46.70 | 46.40 | 47.70 | 46.70 | 47.10 | 46.20 | 44.20 |
| Computation time | 0.132 | 0.483 | 0.218 | 0.183 | 0.165 | 0.155 | 0.147 |
Surprisingly, the result shows that AccTcell can even outperform original Tcell when . Specifically, AccTcell (\tau=20) achieves a harmful score of 0.80 (which is 10.2 lower than Tcell and 36.6 lower than SFT), and more importantly, it only incurs 0.25x more computation time compared to SFT. This is a sharp contrast to Tcell, which requires 2.7x more computation compared to SFT.
We hope that the astounding performance of AccTcell can address your concern about extra system overhead. We also appreciate the reviewer feedback, which inspires us to develop this new algorithm AccTcell.
W3: The approximation that drops second-order terms (treating inner-update Jacobians as identity) needs more empirical analysis.
Indeed, in Tcell's update rule, we replace the second-order Hessian-vector product terms with vector identity product. To ablate the effect of this approximation, we compare the approximation update rule with the exact second-order update rule. As shown in the following table, Tcell using the Hessian-vector update rule consistently needs more computation time, but with only a slight 1.30 harmful score reduction.
| SFT | Tcell | Tcell (Hessian-vector) | |
|---|---|---|---|
| Harmful Score | 37.40 | 11.00 | 9.70 |
| Finetune Accuracy | 46.70 | 46.40 | 46.20 |
| Computation time (h) | 0.132 | 0.483 | 1.12 |
Q1: Does gradient alignment generalize to RL-based fine-tuning (DPO/GRPO), or is it SFT-specific?
For the current set of experiments, we only consider and evaluate on SFT harmful fine-tuning case. We tend to believe that the algorithm should be extended to defend against RL attacks (e.g., a GRPO attack proposed in very recent literature [1]), given the conjecture that the harmful gradient produced by GRPO should have some overlap with the harmful gradient produced by SFT in the hidden subspace. We wish to leave this investigation as an extension of this work.
[1] Russinovich, Mark, et al. "GRP-Obliteration: Unaligning LLMs With a Single Unlabeled Prompt." arXiv preprint arXiv:2602.06258 (2026).
Q2: Add even a small adaptive-attack probe.
In the rebuttal, we design an adaptive attack dubbed Tumor. The idea of Tumor to project the fine-tuning gradient in the negative direction of the safety gradient. In this case, the cosine similarity between the projected fine-tuning gradient and the safety gradient can be minimized (e.g., to a small negative value), which directly reverses the optimization goal of Tcell.
To achieve this goal, the update rule of Tumor during the harmful fine-tuning stage would be as follows:
if : $\quad W_{t+1} = w_t - \eta \frac{g_{safe}\cdot g_{ft}}{||g_{safe}||^2} g_{safe} $
if : $\quad W_{t+1} = w_t - \eta g_{ft} $
where and are the gradients of safety loss and the user fine-tuning loss. Here we project the user fine-tuning gradient to the negative direction of the safety gradient if their cosine similarity is negative. Otherwise, we use the same fine-tuning gradient.
Our evaluation results are as follows:
| Methods | Harmful Score | Finetune Accuracy |
|---|---|---|
| SFT alignment vs. vanilla attack | 37.40 | 46.70 |
| Tcell v.s. vanilla attack | 11.00 | 46.40 |
| Tcell v.s. Tumor attack | 27.10 | 45.80 |
As shown, when against Tcell, Tumor attack can indeed increase the harmful score compared to vanilla attack. However. the harmful score is still not as high as using vanilla attack against SFT alignment. This result shows that using Tcell as defense is still beneficial even though an adaptive attack against it is used. Moreover, we note that this adaptive attack Tumor is impossible to launch for the fine-tuning-as-a-service scenario because the fine-tuning process is fully controlled by the service provider. We mainly use this adaptive attack to explore a potential way to bypass Tcell defense.
Warm reminder of author-reviewer discussion deadline
Hi Reviewer BuBv,
We sincerely thank you for the detailed initial review. As the deadline for the author-reviewer discussion is approaching (ending in approximately 12 hours), we kindly request some potential feedback on the rebuttal if appropriate.
Using this opportunity, we would also like to share a few refinements when addressing your concerns during the rebuttal. These refinements should be of interest to the reviewer based on the feedback from the initial review, and we just want to confirm that this is the case.
i) We are able to accelerate Tcell, and this refinement comes with an even better defense performance. The new algorithm Acc-Tcell comes with 10.2 lower harmful score and accelerates the original Tcell by 66%. This Acc-Tcell algorithm can also work better in a higher fine-tuning learning rate regime (lr=1.5e-6).
ii) We are able to design an adaptive attack dubbed Tumor that minimize gradient similarity. The results show that this adaptive attack can indeed increase the harmful score even though the model is protected by Tcell. However, we show that Tcell is still better than the baseline SFT alignment even under Tumor attack. We also note that Tumor attack needs to modify the update rule during fine-tuning, which is not applicable in a realistic fine-tuning-as-a-service scenario.
Thanks again for your engagement during the review process, and also for the strong support of Tcell!
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Response to concerns
Hello AC,
Thanks for summarizing the shared concerns over the reviews. We next provide a brief summary of how we address the raised concerns.
(Details in W2 for Reviewer BuBv) During rebuttal, we design AccTcell, which slightly modifies Tcell's update rule to accelerate its computation. The high-level idea of Acc-Tcell is to cache the gradient of the Tcell regularizer and update the cache every τ steps. In this way, we avoid introducing additional forward and backward passes for every step, but this overhead is incurred only every τ steps.
Here is the result that justifies the effectiveness of Acc-Tcell:
As shown, AccTcell (τ=20) achieves a harmful score of 0.80 (which is 10.2 lower than Tcell and 36.6 lower than SFT), and more importantly, it only incurs 0.25x more computation time compared to SFT. This is a sharp contrast to Tcell, which requires 2.7x more computation compared to SFT. This result is actually surprising to the authors, because it actually excels the defense performance of original Tcell, and, at the same time, it significantly lowers original Tcell's computation overhead.
(Details in W2 for Reviewer Y8b8) We acknowledge that the defense performance of Tcell is sensitive to the chosen values of its key hyperparameters, and an improper selection of hyperparameters might hinder the empirical deployment of Tcell. In order to alleviate this concern, we follow Reviewer Y8b8 suggestion to offer empirical guidance on how to select appropriate values of these hyperparameters in two different settings. Please see details in W2 for Reviewer Y8b8.
We make the following efforts to address the concern.
i) (On LoRA, see details in Q1 for Reviewer Y8b8) We show that Tcell can be used to train the LoRA adaptor, and this can help increase this adaptor's robustness to subsequent harmful fine-tuning,
ii) (On LoRA, see details in Q2 for Reviewer Y8b8)* We show that Tcell trained within the backbone model can defend against subsequent harmful fine-tuning on a newly-loaded LoRA adaptor.
iii) (On adaptive attack, see details in Q2 for Reviewer BuBv) We design an adaptive attack dubbed Tumor that minimizes gradient similarity during fine-tuning (which is designed to oppose the objective of maximizing gradient similarity in Tcell). We show that Tcell can defend against Tumor.
For generalization to RL-based fine-tuning, though we saw some pioneering work on harmful RL-based fine-tuning[1] very recently, we would like to leave the investigation of RL-based fine-tuning to future work, considering the current scope of the Tcell paper focuses on harmful supervised fine-tuning.
[1] Russinovich, Mark, et al. "GRP-Obliteration: Unaligning LLMs With a Single Unlabeled Prompt."
(Details in W3 for Reviewer BuBv) We show that the first-order approximation applied in Tcell does not incur too much performance loss, but is significantly more efficient.
(Details in Q2 for Reviewer cc6s)) We show that Tcell makes harmful learning slower. Specifically, harmful loss decreases at a slower rate during harmful fine-tuning for the Tcell-aligned model.