                 Invariance Makes LLM Unlearning Resilient Even to Unanticipated Downstream Fine-Tuning



its robustness to unseen fine-tuning tasks (which differ from            both NPO and ILU are effective in unlearning, producing

those used in invariance regularization).                                unlearning directions opposite to the fine-tuning direction.

                                                                         This is supported by cos(∠(τNPO , τft )) = −0.92 and

5. Understanding ILU via Task Vectors                                    cos(∠(τILU , τft )) = −0.64. Focusing on NPO, we

                                                                         examine the cosine similarity between τNPO→ft and τNPO

To understand the effectiveness of ILU in building resilience            (or τft ), we obtain cos(∠(τNPO→ft , τNPO )) = −0.41

against fine-tuning, we examine the relationship between                 and cos(∠(τNPO→ft , τft )) = 0.16, i.e., ① in Fig. 4.

the ‘unlearning direction’ and ‘fine-tuning direction’ using             This suggests that after fine-tuning, the unlearning

task vector analysis (Ilharco et al., 2023).                             task vector of NPO (τNPO→ft ) is more aligned with

                                                                         the fine-tuning direction, shifting towards the op-

A task vector defines a direction in the weight space for a

                                                                         posite to the original unlearning direction (τNPO ).

specific task, where movement along this direction from

                                                                         This misalignment explains why fine-tuning signifi-

the pre-trained model enhances performance on this task.

                                                                         cantly undermines NPO’s unlearning effectiveness. In

Let θu and θo denote the unlearned model (obtained via

                                                                         contrast, ILU yields cos(∠(τILU→ft , τft )) = 0.3554

an unlearning approach) and the original pre-trained model,

                                                                         and cos(∠(τILU→ft , τILU )) = 0.09, i.e., ② in Fig. 4.

respectively. By the definition of task vector, the unlearn-

                                                                         If we compare cos(∠(τILU→ft , τILU )) > 0 with

ing direction (i.e., unlearning task vector) is given by

                                                                         cos(∠(τNPO→ft , τNPO )) < 0, it is clear that ILU preserves

τu = θu − θo . Specifically, τILU (or τNPO ) represents the

                                                                         better alignment between the unlearning direction before

unlearning direction resulting from ILU (or NPO), respec-

                                                                         and after fine-tuning. This explains why ILU yields much

tively. Similarly, we can define the fine-tuning direction

                                                                         higher resilience to fine-tuning compared to NPO.

based on θo by τft = θft − θo , where θft is the fine-tuned

model from θo . Note that the fine-tuning direction resides in           In brief, post-fine-tuning, NPO exhibits a substantial devia-

the ununlearning space, as fine-tuning alone cannot achieve              tion from its original unlearning direction (reflected by an

unlearning, especially when applied to an unrelated fine-                obtuse angle) whereas ILU maintains near-orthogonality in

tuning dataset (Łucki et al., 2024). Thus, we expect the                 cos(∠(τILU→ft , τILU )). This suggests that ILU more effec-

unlearning direction to be opposite to the fine-tuning di-               tively disentangles the fine-tuning effect from the original

rection, i.e., cos(∠(τu , τft )) = τuT τft /(∥τu ∥2 ∥τft ∥2 ) < 0,       unlearning, preserving the unlearning direction within the

where ∠ and cos represent the angle between two vectors                  unlearning space even after fine-tuning.

and its cosine, respectively. Furthermore, we define the post-

unlearning fine-tuning direction: τu→ft = θuft −θu , where               6. Experiments

θuft denotes the fine-tuned model obtained from θu through

downstream fine-tuning. Post-unlearning, if τu→ft is more                6.1. Experiment Setups

aligned with τu , implying cos(∠(τu→ft , τu )) ≥ 0, then

                                                                         LLM unlearning tasks. Our experiments primarily focus

the unlearning method can be considered resilient to fine-

                                                                         on the WMDP benchmark (Li et al., 2024) for LLM unlearn-

tuning, as the unlearning direction is preserved after down-

                                                                         ing, which aims to remove hazardous domain knowledge

stream fine-tuning. Conversely, if τu→ft is more aligned

                                                                         related to biosecurity and cybersecurity from the Zephyr-

with τft , implying cos(∠(τu→ft , τft )) ≥ 0, then it becomes

                                                                         7B-beta model (Tunstall et al., 2023). In addition, we also

misaligned with the unlearning direction and thus shifts

                                                                         evaluate on the MUSE dataset (Shi et al., 2024), targeting

toward the ununlearning space.

                                                                         the unlearning of content from the Harry Potter book series

Fig. 4 presents a 2D                                                     (labeled “Books”) and from BBC news (labeled “News”).

visualization of the

                                                                         Table 1. An overview of fine-tuning datasets used in experiments

task vector analysis,

                                                                          Dataset           Task Type                  Domain/Topic

explaining the robust-

                                                 2                        GSM8K          Mathematical QA       Elementary math word problems

ness     advantage      of                                                AGNews         Text classification     News articles (4 categories)

ILU        (implemented                                                   SST-2          Sentiment analysis       Movie review sentiments

                                                1

with the NPO-based                                                        MNLI          Language inference        Multi-genre sentence pairs

                                                                          WinoGrande        Coreference           Commonsense reasoning

unlearning      objective             1                                   QQP           Paraphrase detection        Quora question pairs

and       GSM8K-based                 2

invariance regularization)                                               LLM unlearning methods. The baseline approaches we

                                Figure 4. Illustration of ILU’s

over the conventional           improved unlearning robustness           used include two SOTA methods, as formulated by (1):

NPO       approach     on       compared to NPO through the re-          NPO (Zhang et al., 2024a) and RMU (Li et al., 2024).

WMDP. As we can                 lationships between unlearning           Our proposed ILU approach adopts the unlearning objec-

see, in the absence of          and fine-tuning task vectors on          tive function of either NPO or RMU while incorporating

downstream fine-tuning,         the WMDP dataset.                        invariance regularization. This regularization follows ei-



                                                                     6

