Learning with Unlearning: Synaptic Role Partitioning for Simultaneous Continual Learning and Machine Unlearning
Organizations: DIGIT and Department of Electrical and Computer Engineering, Aarhus University, Denmark
Abstract
Continual Learning (CL) asks a model to acquire new knowledge without forgetting what it already knows. Machine Unlearning (MU) asks it to destroy specific knowledge without damaging the rest. The challenge is integrating them in the same system; the two objectives pull on the same weights, and an edit made for one harms the other. To address this, we propose Learning with Unlearning (LwU), a unified framework that resolves the conflict where it occurs: at the individual synapse. LwU scores every weight twice, once against the data to keep and once against the data to delete, and partitions the network into four zones with separate update rules. Weights that only require retention are frozen. Weights that only require deletion are cleared and returned to the network as free capacity. Contested weights take a gradient-ascent step projected orthogonally to the retention gradient. The remaining capacity learns the incoming task by a privileged teacher via self-distillation. Deletion is served post hoc, and no retraining is required. Across both CL and MU jobs, LwU outperforms or matches the strongest baseline. Its real-world practicality has been demonstrated on the Physical Artificial Intelligence (PAI) dataset we conducted. Additionally, in the image generation task and in removing dangerous content, it outperformed the closest baseline, as shown in Fig.1.
Figures & tables
| TIL | CIL | |||||||
| Method | ACC | BWT | FWT | PS | ACC | BWT | FWT | PS |
| Seq-CIFAR-100 | ||||||||
| Joint training (upper bound) | – | – | – | – | ||||
| Continual-learning methods | ||||||||
| EWC | ||||||||
| SI | ||||||||
| CNN: | ResNet-18: | U-LiRA: Instance deletion | ||||||||
| Method | Class | Subclass | Instance | Class | Subclass | Instance | CNN | ResNet-18 | ||
| AUC | TPR@1% | AUC | TPR@1% | |||||||
| CIFAR-10 | ||||||||||
| Retrain (oracle) | ||||||||||
| Original model | ||||||||||
| Fine-tune on | ||||||||||
| Metric | Source SD | LwU (ours) | SalUn | Random mask | |
| Forget | Detection rate (%) | 40.0 | |||
| Mean max exposed score | 0.414 | ||||
| Context CLIP | 0.347 | ||||
| Retain | CLIP, all | 0.338 | |||
| CLIP, clothed people | 0.353 | ||||
| CLIP, other scenes | 0.322 |
| Metric | LwU SalUn | Random mask SalUn |
| Forget detection rate (pp) | ||
| Forget max exposed score | ||
| Forget context CLIP | ||
| Retain CLIP, all | ||
| Retain CLIP, clothed people | ||
| Retain CLIP, other scenes |
| Variant | ACC | BWT | ||
| Continual learning only (no deletion) | ||||
| LwU (full) | – | |||
| w/o self-distillation teacher | – | |||
| w/o cumulative freeze mask | – | |||
| w/o test-time memory | – | |||
| Retrain (never sees ) | – | |||
| Variant | Forget | Retain | Test | MIA R | Gap | Relearn@1 | Time (s) |
| Original (before deletion) | – | ||||||
| Retrain (oracle) | – | ||||||
| w/o B resetting | |||||||
| w/o Zone-C step | |||||||
| w/o C projection | |||||||
| w/o teacher repair (both passes) |
| Variant | Forget | Retain | Test | MIA R | Gap | Relearn@1 | Time (s) |
| Original (before deletion) | – | ||||||
| Retrain (oracle) | – | ||||||
| w/o B resetting | |||||||
| w/o Zone-C step | |||||||
| w/o C projection | |||||||
| w/o teacher repair (both passes) |
| Variant | Forget | Retain | Test | MIA R | Gap | Relearn@1 | Time (s) |
| Original (before deletion) | – | ||||||
| Retrain (oracle) | – | ||||||
| w/o B resetting | |||||||
| w/o Zone-C step | |||||||
| w/o C projection | |||||||
| w/o teacher repair (both passes) |
| Variant | Forget | Retain | Test | MIA R | Gap | Relearn@1 | Time (s) |
| Original (before deletion) | – | ||||||
| Retrain (oracle) | – | ||||||
| w/o B resetting | |||||||
| w/o Zone-C step | |||||||
| w/o C projection | |||||||
| w/o teacher repair (both passes) |
| Variant | Forget | Retain | Test | MIA R | Gap | Relearn@1 | Time (s) |
| Original (before deletion) | – | ||||||
| Retrain (oracle) | – | ||||||
| w/o B resetting | |||||||
| w/o Zone-C step | |||||||
| w/o C projection | |||||||
| w/o teacher repair (both passes) |
| Variant | Forget | Retain | Test | MIA R | Gap | Relearn@1 |
| LwU (full, selected) | ||||||
| Zone construction and teacher | ||||||
| Dominance | ||||||
| Unmasked teacher | ||||||
| Retain subset (default 10%) | ||||||
| Variant | Forget | Retain | Test | MIA R | Gap | Relearn@1 |
| LwU (full, selected) | ||||||
| Zone construction and teacher | ||||||
| Dominance | ||||||
| Unmasked teacher | ||||||
| Retain subset (default 10%) | ||||||
| Variant | C10 CNN | C10 R18 | C100 R18 | C10-sub CNN | C10-inst CNN |
| LwU (full) | |||||
| w/o B resetting | |||||
| w/o Zone-C step | |||||
| w/o C projection | |||||
| w/o teacher repair (both passes) | |||||
| w/o Zone-C repair pass |
| Importance estimator | Score | Forget | Retain | Test | MIA R | Gap | Relearn@1 | Time (s) |
| Random mask | ||||||||
| Magnitude-based | ||||||||
| Fisher retain only | ||||||||
| Fisher forget only | ||||||||
| Dual Fisher (ours) |
| Importance estimator | Score | Forget | Retain | Test | MIA R | Gap | Relearn@1 | Time (s) |
| Random mask | ||||||||
| Magnitude-based | ||||||||
| Fisher retain only | ||||||||
| Fisher forget only | ||||||||
| Dual Fisher (ours) |
| Setting | Clip scale | Forget | Retain | MIA | |||||
| Paper (Fisher-scaled), | |||||||||
| Selected , | |||||||||
| Selected , | |||||||||
| No clip, | |||||||||
| No clip, |
| Stream ordering | Memory / reset | Forget | Retain | Test | MIA | Flip rate (%) | Test |
| Dataset order | No memory | – | |||||
| Reset per stream | |||||||
| Persistent | |||||||
| Random † | No memory | – | |||||
| Reset per stream | |||||||
| Persistent |
| Setting | Seed | A % | B % | C % | ||||||
| CIFAR-10 / CNN | 42 | 0.7 | 0.99 | fisher | 0.01 | 1.0 | 0.0 | 0.00 | 0.01 | 29.99 |
| CIFAR-10 / CNN | 43 | 0.9 | 0.99 | inf | 0.01 | 1.0 | 0.0 | 0.25 | 0.07 | 9.71 |
| CIFAR-10 / CNN | 44 | 0.7 | 0.95 | inf | 0.05 | 1.0 | 0.8 | 3.23 | 0.16 | 26.66 |
| CIFAR-10 / ResNet-18 | 42 | 0.9 | 0.99 | fisher | 0.05 | 0.5 | 0.8 | 0.43 | 0.12 | 9.51 |
| CIFAR-10 / ResNet-18 | 43 | 0.9 | 0.99 | 0.001 | 0.1 | 1.0 | 0.8 | 7.15 | 0.07 | 2.81 |
| CIFAR-10 / ResNet-18 | 44 | 0.9 | 0.99 | inf | 0.1 | 1.0 | 0.8 | 0.53 | 0.06 | 9.45 |
| Method | Peak alloc. (MB) | Peak reserved (MB) | Peak device (MB) | Optimizer (MB) | Model params (MB) | Resident storage (MB) | Checkpoint (MB) |
| Seq-CIFAR-100 | |||||||
| Joint training (upper bound) | |||||||
| EWC | |||||||
| SI | |||||||
| LwF | |||||||
| WSN | |||||||
| Method | Peak alloc. (MB) | Peak reserved (MB) | Peak device (MB) | Optimizer (MB) | Model params (MB) | Resident storage (MB) | Checkpoint (MB) |
| Seq-CIFAR-100 | |||||||
| Joint training (upper bound) | |||||||
| EWC | |||||||
| SI | |||||||
| LwF | |||||||
| WSN | – | – | – | – | – | – | – |
| TIL | CIL | |||||||
| Method | B1 ms/sample | GFLOPs/sample | B64 ms/sample | B64 sample/s | B1 ms/sample | GFLOPs/sample | B64 ms/sample | B64 sample/s |
| Seq-CIFAR-100 | ||||||||
| Joint training (upper bound) | ||||||||
| EWC | ||||||||
| SI | ||||||||
| LwF | ||||||||
| CIFAR-10 | RTI | CIFAR-100 | |
| Max. epochs | 100 | 150 | 150 |
| Early-stopping patience | 10 | 15 | 15 |
| Min. epochs | 20 | 30 | 30 |
| Batch size | 64 | 64 | 64 |
| Learning rate (Adam) | |||
| LR schedule | reduce on plateau | reduce on plateau | reduce on plateau |
| Method | Hyperparameter | CIFAR-10 | RTI | CIFAR-100 |
| Fine-tune | lr | (14) | (18) | (18) |
| epochs | 10 (16) | 10 (12) | 10 (11) | |
| Bad Teacher | 4 (12) | 4 (15) | 4 (13) | |
| epochs | 10 (9) | 10 (9) | 10 (10) | |
| lr | (14) | (12) | (10) | |
| UNSIR | impair epochs | 2 (10) | 2 (11) | 1 (12) |
| Backbone | Deletion | Method | Seed 42 | Seed 43 | Seed 44 |
|---|---|---|---|---|---|
| CNN | class | Fine-tune | lr = , ep = 10 | lr = , ep = 10 | lr = , ep = 10 |
| Bad Teacher | = 4, ep = 3, lr = | = 4, ep = 10, lr = | = 4, ep = 5, lr = | ||
| UNSIR | imp. ep = 2, rep. ep = 2, imp. lr = , rep. lr = | imp. ep = 2, rep. ep = 3, imp. lr = , rep. lr = | imp. ep = 2, rep. ep = 3, imp. lr = , rep. lr = | ||
| SSD | = 5, = 0.1 | = 1, = 10 | = 1, = 5 | ||
| SCRUB | max = 2, lr = , ep = 5 | max = 3, lr = , ep = 5 | max = 3, lr = , ep = 5 | ||
| SalUn | sp = 0.1, lr = , ep = 3 | sp = 0.5, lr = , ep = 10 | sp = 0.9, lr = , ep = 10 |
| Backbone | Deletion | Method | Seed 42 | Seed 43 | Seed 44 |
|---|---|---|---|---|---|
| CNN | class | Fine-tune | lr = , ep = 10 | lr = , ep = 10 | lr = , ep = 10 |
| Bad Teacher | = 4, ep = 10, lr = | = 4, ep = 3, lr = | = 2, ep = 10, lr = | ||
| UNSIR | imp. ep = 1, rep. ep = 3, imp. lr = , rep. lr = | imp. ep = 1, rep. ep = 3, imp. lr = , rep. lr = | imp. ep = 1, rep. ep = 3, imp. lr = , rep. lr = | ||
| SSD | = 50, = 0.1 | = 50, = 0.1 | = 10, = 0.5 | ||
| SCRUB | max = 3, lr = , ep = 5 | max = 3, lr = , ep = 5 | max = 3, lr = , ep = 5 | ||
| SalUn | sp = 0.9, lr = , ep = 3 | sp = 0.1, lr = , ep = 5 | sp = 0.9, lr = , ep = 3 |
| Backbone | Deletion | Method | Seed 42 | Seed 43 | Seed 44 |
|---|---|---|---|---|---|
| CNN | class | Fine-tune | lr = , ep = 10 | lr = , ep = 10 | lr = , ep = 10 |
| Bad Teacher | = 4, ep = 10, lr = | = 4, ep = 5, lr = | = 4, ep = 10, lr = | ||
| UNSIR | imp. ep = 1, rep. ep = 3, imp. lr = , rep. lr = | imp. ep = 1, rep. ep = 2, imp. lr = , rep. lr = | imp. ep = 1, rep. ep = 2, imp. lr = , rep. lr = | ||
| SSD | = 100, = 5 | = 50, = 0.5 | = 1, = 5 | ||
| SCRUB | max = 3, lr = , ep = 5 | max = 1, lr = , ep = 5 | max = 3, lr = , ep = 5 | ||
| SalUn | sp = 0.1, lr = , ep = 5 | sp = 0.3, lr = , ep = 3 | sp = 0.9, lr = , ep = 3 |
| TIL Scenario | CIL Scenario | ||||
| Method | Search space | Trial | Selected configuration | Trial | Selected configuration |
| EWC | lr ewc_lambda ewc_gamma | 30 | lr=0.00196905 , ewc_lambda=9383.91 , ewc_gamma=0.982192 | 30 | lr=0.000444289 , ewc_lambda=4.01233 , ewc_gamma=0.965093 |
| SI | lr si_c si_xi | 30 | lr=0.00553151 , si_c=0.0174479 , si_xi=0.000791361 | 30 | lr=0.000444289 , si_c=0.0283496 , si_xi=0.00200387 |
| LwF | lr lwf_lambda temperature | 30 | lr=0.00112303 , lwf_lambda=5.62698 , temperature=4 | 30 | lr=0.00011095 , lwf_lambda=0.838283 , temperature=2 |
| WSN | lr wsn_density | lr=0.0013198195 , wsn_density=0.3 | – | – | |
| PEC | lr | – | – | lr=0.000140 | |
| TIL Scenario | CIL Scenario | ||||
| Method | Search space | Trial | Selected configuration | Trial | Selected configuration |
| Joint (upper bound) | lr | 7 | lr=0.00103 | 9 | lr=0.000737 |
| EWC | lr ewc_gamma ewc_lambda | 4 | lr=0.000706 , ewc_gamma=0.912 , ewc_lambda=2030 | 23 | lr=0.00213 , ewc_gamma=0.970 , ewc_lambda=1.75 |
| SI | lr si_c si_xi | 2 | lr=0.000131 , si_c=0.333 , si_xi=0.000119 | 27 | lr=0.000171 , si_c=0.015 , si_xi=0.00344 |
| LwF | lr lwf_lambda temperature | 11 | lr=0.00146 , lwf_lambda=1.90 , temperature=3 | 23 | lr=0.00144 , lwf_lambda=0.817 , temperature=1 |
| WSN | lr wsn_density | 25 | lr=0.00112 , wsn_density=0.5 | – | – |
Machine Unlearning
Machine unlearning removes the influence of selected data or concepts from trained models while preserving useful behavior and avoiding full retraining.
See all 378 papers