UnAct: Gradient-Free Unlearning via Targeted Activation Intervention
Organizations: Gaash Lab National Institute of Technology Srinagar Srinagar, Jammu and Kashmir, India
Abstract
Machine unlearning seeks to remove the influence of designated training data from a trained model without retraining from scratch. Retrain-free methods such as Selective Synaptic Dampening (SSD) and its label-free variant LFSSD avoid full retraining but still require backpropagation and parameter importance computed over the entire dataset. We ask: what happens when a deletion request arrives with only a few images of the class to be forgotten? To answer this question, we introduce UnAct, a gradient-free class-unlearning method that needs only forward passes over the forget images. UnAct scores late-layer units by their responses, attenuates the most responsive connections, and repeats this for up to 20 rounds using no gradients, no labels, and no retained data. On ResNet-18 trained with CIFAR-10, CIFAR-20, and CIFAR-100, UnAct is competitive with SSD and LFSSD when forgetting entire classes and, unlike them, never collapses the network when forget data is scarce. On ResNet-18, across all tested sizes, UnAct's retain accuracy stays within 2.5 points of retraining, while SSD and LFSSD, at their full-class operating points, lose up to 86 points on some classes. With five forget images on CIFAR-10, UnAct's distance to retraining is 0.21 points, against 67 for LFSSD and 90 for SSD, and re-selecting SSD's threshold at each size with an oracle does not close the gap. In preliminary transfer to ViT-B/16, UnAct's distance to retraining is 11.5 against 33.7 for SSD, and a request is 19x faster than SSD when SSD computes its importance at request time. The code is available at https://github.com/abdulmuizz0903/UnAct
Figures & tables
| Method | Requirements | Limitations |
|---|---|---|
| Retraining-based ( Ginart et al., 2019 ; Bourtoule et al., 2021 ; Graves et al., 2021 ) | Retained data and full or partial retraining; SISA and Amnesiac also need shards, checkpoints or logged updates | Compute and storage cost; SISA and Amnesiac must be adopted at training time |
| Optimization-based ( Chundawat et al., 2023a ; Kurmanji et al., 2023 ; Jia et al., 2023 ; Fan et al., 2024 ) | Labels and/or retained data, many gradient steps | Fine-tuning cost, data access at request time |
| SSD ( Foster et al., 2024b ) | Labels, backward passes, Fisher information over the full dataset | Approximate method, unreliable with few forget images |
| LFSSD ( Foster et al., 2024c ) | Backward passes, sensitivity over the full dataset | Approximate method |
| Unit pruning ( Wang et al., 2022 ; Pochinkov and Schoots, 2024 ; Chang et al., 2024 ) | Retain or reference data, often fine-tuning | Data access, permanent removal of units |
| UnAct (ours) | Forward passes over the forget images | Approximate method |
| ResNet-18 | ViT-B/16 | |||||||||||
| CIFAR-10 | CIFAR-20 | CIFAR-100 | CIFAR-10 | |||||||||
| Method | ||||||||||||
| Original model | 95.16 | 93.28 | 93.72 | 85.15 | 88.96 | 89.50 | 77.31 | 81.00 | 81.39 | 98.33 | 97.92 | 98.11 |
| Retrain | 95.60 | 0.00 | — | 85.69 | 0.00 | — | 77.71 | 0.00 | — | 98.46 | 0.00 | — |
| SSD | 95.44 | 0.00 | 0.29 | 85.43 | 0.00 | 0.27 | 77.20 | 0.00 | 0.50 | 78.89 | 14.16 | 33.74 |
| LFSSD | 95.66 | 0.00 | 0.11 | 85.45 | 0.00 | 0.24 | 77.33 | 0.00 | 0.38 | n/r | n/r | n/r |
Appendix figures & tables26 assets
Supplementary material from the paper’s appendix.
Appendix
| 64 | 256 | 512 | |
|---|---|---|---|
| 2 | 32.75 | 60.06 | 75.43 |
| 4 | 18.41 | 20.66 | 28.09 |
| 6 | 2.99 | 8.53 | 11.87 |
| 8 | 31.23 | 0.29 | 0.61 |
| 10 | 90.96 | 93.49 | 93.36 |
| 12 | 93.72 | 93.73 | 93.74 |
| 64 | 256 | 512 | |
|---|---|---|---|
| 2 | 83.98 | 84.22 | 84.49 |
| 4 | 10.54 | 54.27 | 74.67 |
| 6 | 0.11 | 0.78 | 6.54 |
| 8 | 3.84 | 8.29 | 7.31 |
| 10 | 93.72 | 93.72 | 93.72 |
| 12 | 93.72 | 93.72 | 93.72 |
| rounds | ||||
|---|---|---|---|---|
| 1 | 5 | 10 | 20 | |
| 50 | 0.58 | 5.90 | 7.10 | 7.22 |
| 75 | 0.15 | 0.36 | 0.48 | 0.46 |
| 90 | 61.56 | 0.12 | 0.15 | 0.15 |
| 95 | 80.79 | 0.14 | 0.12 | 0.11 |
| 99 | 89.96 | 78.66 | 52.65 | 0.08 |
| Method | Selection rule | CIFAR-10 | CIFAR-20 | CIFAR-100 |
|---|---|---|---|---|
| SSD | Oracle ( , needs retraining) | 0.29 | 0.27 | 0.51 |
| Retrain-free ( , ) | 0.29 | 0.27 | 0.51 | |
| Transfer from the other two datasets | 31.23 | 0.54 | 32.42 | |
| One configuration for all three | 2.99 | 0.54 | 12.29 | |
| LFSSD | Oracle ( , needs retraining) | 0.11 | 0.24 | 0.38 |
| Retrain-free ( , ) | 0.11 | 0.24 | 0.38 |
| Retrain | SSD | LFSSD | UnAct (ours) | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Class | oracle | oracle | oracle | |||||||
| CIFAR-100 baby | 77.79 | 77.28/0.00 | 0.51 | 0.51 | 77.39/0.00 | 0.39 | 0.22 | 76.54/0.00 | 1.25 | 0.74 |
| CIFAR-100 lamp | 77.37 | 77.32/0.00 | 0.05 | 0.04 | 77.45/0.00 | 0.08 | 0.01 | 77.33/0.00 | 0.04 | 0.04 |
| CIFAR-20 electrical dev. | 86.18 | 85.80/0.00 | 0.38 | 0.29 | 85.78/0.00 | 0.40 | 0.35 | 85.19/0.20 | 1.19 | 0.98 |
| Method | Configuration | MIA | Avg. Gap | Params (%) | Eval | ||||
|---|---|---|---|---|---|---|---|---|---|
| CIFAR-10 | Original model | --- | 93.72 | 51.25 | — | L4 | |||
| Retrain | 100 epochs | — | — | — | L4 | ||||
| SSD | a8.0, l1.0, b256 | 0.29 | 9.94 | 3.63 | L4 | ||||
| LFSSD | a6.0, l0.1, b64 | 0.11 | 10.17 | 3.09 | L4 | ||||
| UnAct (ours) | p99.0, g0.01, k20 | 0.08 | 10.17 | 4.80 | L4 | ||||
| CIFAR-20 | Original model | --- | 89.50 | 55.64 | — | L4 |
| CIFAR-10 | CIFAR-20 | CIFAR-100 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | Agr f | Probe | Agr f | Probe | Agr f | Probe | ||||||
| Original model | 93.3 | 93.73 | 5.3 | 0.992 | 89.0 | 89.49 | 7.2 | 0.991 | 81.0 | 81.39 | 10.0 | 0.981 |
| Retrain | 0.0 | — | 100.0 | 0.977 | 0.0 | — | 100.0 | 0.972 | 0.0 | — | 100.0 | 0.956 |
| Logit mask (trivial) | 0.0 | 0.09 | 62.4 | 0.992 | 0.0 | 0.25 | 46.0 | 0.991 | 0.0 | 0.33 | 45.0 | 0.981 |
| SSD | 0.0 | 0.29 | 65.5 | 0.992 | 0.0 | 0.26 | 48.8 | 0.990 | 0.0 | 0.51 | 39.6 | 0.979 |
| LFSSD | 0.0 | 0.11 | 62.5 | 0.991 | 0.0 | 0.24 | 47.4 | 0.990 | 0.0 | 0.38 | 43.2 | 0.979 |
| CIFAR-10 | CIFAR-20 | CIFAR-100 | |||||||
| SSD | LFSSD | UnAct | SSD | LFSSD | UnAct | SSD | LFSSD | UnAct | |
| 1 | 91.85 | 84.34 | 1.72 | 84.53 | 54.05 | 7.50 | 33.79 | 18.97 | 12.19 |
| 5 | 89.85 | 67.07 | 0.21 | 72.95 | 7.55 | 0.77 | 46.14 | 0.44 | 1.37 |
| 10 | 77.02 | 39.40 | 0.19 | 57.46 | 2.56 | 0.73 | 45.57 | 0.39 | 1.24 |
| 25 | 85.35 | 0.74 | 0.10 | 58.06 | 0.35 | 0.79 | 27.77 | 0.39 | 1.22 |
| 50 | 68.73 | 0.40 | 0.15 | 54.16 | 0.32 | 0.81 | 12.85 | 0.36 | 1.23 |
| CIFAR-10 | CIFAR-20 | CIFAR-100 | |||||||
|---|---|---|---|---|---|---|---|---|---|
| UnAct | SSD | SSD- | UnAct | SSD | SSD- | UnAct | SSD | SSD- | |
| 1 | 1.72 | 91.85 | 89.26 (6) | 7.50 | 84.53 | 83.68 (6) | 12.19 | 33.79 | 33.79 (50) |
| 5 | 0.21 | 89.85 | 87.47 (6) | 0.77 | 72.95 | 64.62 (50) | 1.37 | 46.14 | 46.14 (50) |
| 10 | 0.19 | 77.02 | 77.02 (8) | 0.73 | 57.46 | 55.91 (20) | 1.24 | 45.57 | 25.17 (15) |
| 25 | 0.10 | 85.35 | 77.46 (20) | 0.79 | 58.06 | 57.13 (6) | 1.22 | 27.77 | 16.04 (30) |
| 50 | 0.15 | 68.73 | 65.45 (10) | 0.81 | 54.16 | 38.42 (12) | 1.23 | 12.85 | 7.39 (30) |
| SSD | UnAct (ours) | ||||
| Dataset | Request | ||||
| CIFAR-10 5 orders orig. 94.97 | 1 | ||||
| 2 | |||||
| 3 | |||||
| 4 | |||||
| 5 | |||||
| SSD | UnAct (ours) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Dataset | 2 | 3 | 5 | 2 | 3 | 5 | |||||
| sequential | CIFAR-10 | 0.00 | 46.67 | 62.21 | 75.60 | 96.8/74.4 | 0.00 | 0.16 | 0.13 | 0.60 | 98.1/0.4 |
| CIFAR-20 | 0.43 | 43.73 | 56.37 | 69.07 | 85.0/68.9 | 0.63 | 0.39 | 2.84 | 15.21 | 70.1/0.2 | |
| CIFAR-100 | 0.72 | 0.46 | 0.76 | 2.79 | 77.3/2.6 | 1.48 | 4.59 | 4.17 | 7.63 | 71.4/1.6 | |
| simultaneous | CIFAR-10 | 0.00 | 94.80 | 93.67 | 94.54 | 96.7/93.3 | 0.00 | 55.29 | 72.41 | 84.76 | 98.4/84.3 |
| CIFAR-20 | 0.43 | 86.83 | 88.74 | 89.97 | 84.1/89.0 | 0.63 | 13.64 | 31.10 | 60.51 | 85.3/60.4 | |
| Dataset | Classes | Selectivity | Forget mass (%) | Retain mass (%) | Ratio |
|---|---|---|---|---|---|
| CIFAR-10 | 10 | ||||
| CIFAR-20 | 20 | ||||
| CIFAR-100 | 100 |
| UnAct | SSD (s) | full- | UnAct speed-up | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Dataset | config | (s) | amortised | cold | share (%) | vs. amort. | vs. cold | ||
| CIFAR-10 | 1 | p75, 0.01 | 0.15 | 0.58 | 1.91 | 20.4 | 91 | 3.31 | 35 |
| 5 | p90, 0.03 | 0.11 | 3.48 | 2.72 | 30.5 | 91 | 0.78 | 9 | |
| 20 † | p99, 0.01 | 0.08 | 18.27 | 3.08 | 34.5 | 91 | 0.17 | 2 | |
| CIFAR-20 | 1 | p75, 0.1 | 0.84 | 0.38 | 1.14 | 26.3 | 96 | 3.01 | 69 |
| 5 | p95, 0.1 | 0.82 | 1.98 | 1.31 | 29.2 | 95 | 0.66 | 15 | |
| Method | worst | closer | Params (%) | |||
|---|---|---|---|---|---|---|
| Original model | 98.33 | 97.92 | 98.11 | 98.2 | — | — |
| Retrain | 98.46 | 0.00 | — | 98.1 | — | — |
| SSD | 78.89 | 14.16 | 33.74 | 9.6 | 2/5 | 6.44 |
| UnAct (ours) | 91.93 | 4.96 | 11.49 | 85.3 | 3/5 | 9.75 |
| Units and score | Config | c0 | c2 | c3 | c5 | c8 | Params (%) | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| UnAct | MLP, blocks 9–12, class-token logit score (reported) | p85, 0.1, 5 | 91.93 | 4.96 | 11.49 | 4.6 | 13.1 | 3.0 | 16.1 | 20.7 | 9.753 |
| UnAct | MLP, blocks 11–12, class-token logit score | p75, 0.1, 5 | 95.45 | 41.22 | 44.24 | 50.7 | 33.1 | 22.5 | 63.7 | 51.1 | 5.558 |
| UnAct | MLP, blocks 9–12, class-token positive activation | p90, 0.1, 10 | 94.48 | 91.42 | 95.41 | 102.9 | 99.6 | 66.7 | 106.1 | 101.8 | 7.210 |
| SSD | importance-weighted dampening | 5, 0.1, b128 | 78.89 | 14.16 | 33.74 | 43.4 | 1.8 | 25.8 | 9.1 | 88.5 | 6.437 |
| Dataset | Retrain | SSD | UnAct | Ret. | Retrain | SSD | UnAct | Ret. | Retrain | SSD | UnAct | Ret. |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CIFAR-10 | 0.0 | 47.2 | 25.9 | 68.4 | 0.0 | 68.1 | 36.8 | 87.5 | 0.0 | 87.4 | 47.5 | 92.7 |
| CIFAR-20 | 0.0 | 28.3 | 12.0 | 67.4 | 0.0 | 41.3 | 33.2 | 79.6 | 0.0 | 52.2 | 59.7 | 83.5 |
| CIFAR-100 | 1.0 | 53.2 | 54.0 | 63.8 | 1.2 | 40.2 | 83.6 | 71.8 | 6.6 | 52.2 | 95.2 | 75.2 |
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 349 papers