Selective Amnesia using Contrastive Subnet Erasure for Class Level Unlearning in Vision Models

Vishal Pramanik, Maisha Maliha, Susmit Jha, Alvaro Velasquez, Olivera Kotevska, Sumit Kumar JhaCVPR 2026

TL;DR

Contrastive Subnet Erasure (CSE) is a training-free, zero-overhead method for class-level unlearning in vision models. By surgically identifying and attenuating a compact subset of channels responsible for a target concept, CSE completely erases the concept while preserving the model's performance on unrelated classes.

What Problem Does This Paper Address?

Deep learning models often internalize data that later needs to be removed due to privacy laws (like GDPR's "right to be forgotten"), safety concerns, or data poisoning. While traditional machine unlearning focuses on removing specific training examples, "concept erasure" aims to wipe out an entire semantic category (e.g., forgetting the concept of "airplane" entirely).

The core challenge here is feature entanglement: target and non-target concepts share features and channels within the network. Existing methods either use blunt global projections that cause massive collateral damage to unrelated classes, or rely on expensive, unstable gradient-based fine-tuning that distorts the model's underlying geometry.

Methods

The authors introduce Contrastive Subnet Erasure (CSE), a training-free, encoder-centric approach that operates locally in channel space. The pipeline consists of three main stages:

  1. Feature Standardization: Features are extracted from a target dataset (to forget) and a non-target dataset (to retain) and standardized jointly to ensure unbiased variance ratios.
  2. Contrastive Subnet Discovery: Using regularized generalized eigenanalysis, CSE finds feature directions where the target concept exhibits high variance relative to non-target concepts. Channels are scored and greedily selected based on their participation in these discriminative directions until a coverage threshold ($\tau_{cov}$) is met.
  3. Subnet Attenuation & Folding: Calibrated attenuation factors are applied to the selected channels. Crucially, this modification is algebraically folded directly into the weights and biases of the subsequent layer, resulting in zero inference-time overhead.
Figure 1. Overview of CSE. Given target and non-target image sets, CSE extracts and standardizes features, identifies discriminative channels via generalized eigenanalysis, and attenuates only those channels—erasing the target concept with no runtime overhead.

Datasets

The paper evaluates CSE on standard vision datasets: CIFAR-10, CIFAR-100, and ImageNet-1K. For a fine-grained identity erasure case study, they use Labeled Faces in the Wild (LFW).

To prevent models from simply overfitting to the source dataset's patterns, the authors introduce a strict cross-dataset evaluation protocol. The target class is defined using a source dataset (e.g., forgetting "airplane" on CIFAR-10), but forgetting efficacy is evaluated on a completely disjoint target dataset (e.g., "airliner/aircraft" on ImageNet). This ensures true semantic concept removal rather than simple data-distribution exploitation.

Key Insights and Ideas

  • Locality over Globality: Instead of shifting entire decision boundaries or projecting out broad subspaces, targeting a highly compact, specific subnet of channels minimizes collateral damage to shared visual features.
  • The Power of Contrast: Generalized eigenanalysis allows the method to explicitly contrast what makes the target class unique versus what it shares with background classes (e.g., distinguishing the strokes of a "3" from a "5" or "8").
  • Zero-Cost Deployment: Because the attenuation matrix can be mathematically folded into existing layer parameters, the unlearned model can be deployed instantly without any architectural changes or runtime latency penalties.

Key Results

  • Superior Forgetting: Across CIFAR-10, CIFAR-100, and ImageNet, CSE consistently drives target-class test accuracy down to 0.01–0.02, outperforming baselines which often leave double-digit residual accuracy.
  • Minimal Collateral Damage: CSE maintains near-baseline accuracy on non-target classes. For instance, on a toy MNIST task (forgetting "3" while retaining "5 vs 8"), CSE tracks the unedited baseline perfectly, whereas global projection methods degrade rapidly as forgetting strength increases.
Figure 2. MNIST–EfficientNet toy with a shared, normalized for- getting strength s∈[0, 1] (0 = no edit). (a) Non-target utility: test accuracy on 5 vs. 8; dashed line marks the no-edit baseline. CSE (ours) stays near baseline across s, indicating minimal collateral damage; ESC is typically second-best for small s but degrades as removal grows; training-based edits (DELETE, BU, SCAR, Tar- geted CLIP) drift more. (b) Target forgetting: accuracy on digit “3” (lower is better). CSE drives the target accuracy to near-zero by s≈1 while preserving non-target utility, whereas others require stronger edits or fail to fully forget within the same range.
  • Robustness: The method achieves the lowest Membership Inference Attack (MIA) success rate (~0.01) and works seamlessly across diverse architectures including ResNet-18, EfficientNet-B0, and Swin Transformer.
  • Qualitative Precision: Grad-CAM visualizations demonstrate that CSE successfully erases saliency on target concepts while leaving semantically similar non-target concepts completely untouched.
Figure 3. Qualitative effect of CSE: Each row shows the Original, Grad-CAM (Before), and Grad-CAM (After). CSE suppresses saliency on the target concept while preserving responses on non-target content.

Limitations and Future Work

The authors note that the design of the non-target dataset ($D_b$) is critical; ablation studies show that if $D_b$ lacks semantic overlap or is too small, covariance estimation becomes unstable, and geometric preservation degrades. Additionally, the paper focuses primarily on single-class and small multi-class settings (up to 5 classes simultaneously). Future work could explore scaling CSE to massive multi-class forgetting scenarios, or extending the contrastive subnet framework to generative models and large vision-language models (VLMs).

Summary updated

BibTeX
@inproceedings{pramanik2026selective,
  author = {Vishal Pramanik and Maisha Maliha and Susmit Jha and Alvaro Velasquez and Olivera Kotevska and Sumit Kumar Jha},
  title = {{Selective Amnesia using Contrastive Subnet Erasure for Class Level Unlearning in Vision Models}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=TUU6Xt7M9k},
}
Figure