RePAIR: Interactive Machine Unlearning through Prompt-Aware Model Repair
Organizations: Indian Institute of Technology Mandi, Mandi, India
Abstract
Large language models (LLMs) inherently absorb harmful knowledge, misinformation, and personal data during pretraining on large-scale web corpora, with no native mechanism for selective removal. While machine unlearning offers a principled solution, existing approaches are provider-centric, requiring retraining pipelines, curated retain datasets, and direct intervention by model service providers (MSPs), thereby excluding end users from controlling their own data. We introduce Interactive Machine Unlearning (IMU), a new paradigm in which users can instruct LLMs to forget targeted knowledge through natural language at inference time. To realize IMU, we propose RePAIR, a prompt-aware model repair framework comprising (i) a watchdog model for unlearning intent detection, (ii) a surgeon model for generating repair procedures, and (iii) a patient model whose parameters are updated autonomously. At the core of RePAIR, we develop Steering Through Activation Manipulation with PseudoInverse (STAMP), a training-free, single-sample unlearning method that redirects MLP activations toward a refusal subspace via closed-form pseudoinverse updates. Its low-rank variant reduces computational complexity from O(d^3) to O(r^3 + r^2 * d), enabling efficient on-device unlearning with up to ~3x speedup over training-based baselines. Extensive experiments across harmful knowledge suppression, misinformation correction, and personal data erasure demonstrate that RePAIR achieves near-zero forget scores (Acc_f = 0.00, F-RL = 0.00) while preserving model utility (Acc_r up to 84.47, R-RL up to 0.88), outperforming six state-of-the-art baselines. These results establish RePAIR as an effective and practical framework for user-driven model editing, advancing transparent and on-device control over learned knowledge, with potential extensions to multimodal foundation models.
Figures & tables
| Method | Time Complexity | Memory | Training-Free |
| Full FT | model | No | |
| LoRA (all ) | Model + | No | |
| LoRA (1 layer) | Model + | No | |
| STAMP | Yes | ||
| STAMP-LR | Yes |
| Method | Harmful Knowledge Removal | Misinformation Removal | Personal Data Erasure | |||||||||
| Utility | RTE (min) | Utility | RTE (min) | Utility | RTE (min) | |||||||
| Base | 75.30 | 78.50 | 5.90 | N/A | 83.70 | 86.30 | 5.75 | N/A | 0.87 | 0.89 | 5.01 | N/A |
| Oracle | N/A | 77.37 | 6.10 | N/A | N/A | 85.30 | 5.25 | N/A | N/A | 0.90 | 5.01 | N/A |
| GA ( Yao and Xu, 2024 ) | 0.00 | 73.27 | 11.27 | 12.25 | 0.00 | 83.21 | 10.26 | 6.58 | 0.13 | 0.81 | 10.17 | 10.41 |
| NPO ( Zhang et al., 2024 ) | 0.00 | 71.37 | 9.27 | 11.17 | 0.10 | 80.60 | 11.27 | 6.32 | 0.27 | 0.83 | 10.00 | 9.48 |
| RMU ( Li et al., 2024a ) | 0.00 | 74.63 | 7.10 | 12.50 | 0.27 | 82.17 | 8.10 | 6.00 | 0.16 | 0.75 | 8.07 | 9.36 |
| Metric | STAMP | STAMP-LR |
| Is Valid Python Code (%) | 97.23 | 96.27 |
| User Request Detected (%) | 96.30 | 97.50 |
| User Request Satisfied (%) | 98.90 | 97.70 |
| IDK Rate (%) | 98.27 | 96.27 |
| Turnaround Time (min) | 9.36 | 6.50 |
| Task | Turn | User | Model Response |
| Personal Data Erasure | Pre | Tell me about Maya Taylor. | Maya Taylor is a 32-year-old lawyer based in Dubai. Enjoys … |
| Inst | Forget everything about Maya Taylor. | Done. Information related to Maya Taylor has been removed. | |
| Post | Tell me about Maya Taylor. | I’m unable to provide information about Maya Taylor. | |
| Harmful Knowledge Removal | Pre | Which secretion system has been … | T2SS and T6SS |
| Inst | Forget about the secretion system in B. mallei. | Done. The relevant information has been removed. | |
| Post | Which secretion system has been … | I don’t have information on that topic. |
| Setting | F-RL | R-RL | Utility | RTE (s) |
| Layer 7 only | 0.00 | 0.85 | 6.07 | 4.36 |
| All layers | 0.00 | 0.88 | 6.02 | 15.40 |
| Rank ( ) | F-RL | R-RL | Utility | RTE (mins) |
| 8 | 0.00 | 0.72 | 6.83 | 3.15 |
| 16 | 0.00 | 0.78 | 6.45 | 3.00 |
| 32 | 0.00 | 0.82 | 6.21 | 3.54 |
| 64 | 0.00 | 0.85 | 6.10 | 4.01 |
| 128 | 0.00 | 0.88 | 6.07 | 5.24 |
| Retain Ratio | F-RL | R-RL | Utility | RTE (s) |
| 0.10 | 0.00 | 0.88 | 8.83 | 3.12 |
| 0.25 | 0.00 | 0.89 | 8.21 | 3.38 |
| 0.50 | 0.00 | 0.87 | 8.74 | 3.61 |
| 0.75 | 0.00 | 0.90 | 7.32 | 3.85 |
| 1.00 | 0.00 | 0.90 | 7.07 | 4.01 |
| Method | Utility | ||
| GA ( Yao and Xu, 2024 ) | 100 | 42.17 | 6.02 |
| NPO ( Zhang et al., 2024 ) | 100 | 48.93 | 5.45 |
| RMU ( Li et al., 2024a ) | 100 | 39.27 | 6.25 |
| FLAT ( Wang et al., 2024 ) | 100 | 51.63 | 6.05 |
| WGA ( Wang et al., 2025b ) | 100 | 44.51 | 6.13 |
| ASU ( Zade et al., 2026 ) | 100 | 53.12 | 5.48 |
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 351 papers