Exploring and Leveraging Class Vectors for Classifier Editing
Jaeik Kim, Jaeyoung Do
TL;DR
This work introduces Class Vectors, per-class latent-space adapters that capture how each class shifts during fine-tuning via $\kappa_c = z^{ft}_{c} - z^{pre}_{c}$. By exploiting CTL and Neural Collapse, the authors show these vectors enable linear, independent, and data-efficient edits either through latent-space steering or weight-space mapping, without requiring full retraining. The method demonstrates strong performance for class unlearning, environment adaptation, defense against typography attacks, and even backdoor-trigger optimization, while remaining lightweight and architecture-agnostic across ViT, CNN, and language models. The approach offers a scalable, interpretable pathway to personalized or domain-specific classifier editing with practical implications for safety, robustness, and efficiency.
Abstract
Image classifiers play a critical role in detecting diseases in medical imaging and identifying anomalies in manufacturing processes. However, their predefined behaviors after extensive training make post hoc model editing difficult, especially when it comes to forgetting specific classes or adapting to distribution shifts. Existing classifier editing methods either focus narrowly on correcting errors or incur extensive retraining costs, creating a bottleneck for flexible editing. Moreover, such editing has seen limited investigation in image classification. To overcome these challenges, we introduce Class Vectors, which capture class-specific representation adjustments during fine-tuning. Whereas task vectors encode task-level changes in weight space, Class Vectors disentangle each class's adaptation in the latent space. We show that Class Vectors capture each class's semantic shift and that classifier editing can be achieved either by steering latent features along these vectors or by mapping them into weight space to update the decision boundaries. We also demonstrate that the inherent linearity and orthogonality of Class Vectors support efficient, flexible, and high-level concept editing via simple class arithmetic. Finally, we validate their utility in applications such as unlearning, environmental adaptation, adversarial defense, and adversarial trigger optimization.
