Learning to Obstruct Few-Shot Image Classification over Restricted Classes

Amber Yijia Zheng, Chiao-An Yang, Raymond A. Yeh

Introduction

The rapid proliferation of powerful pre-trained backbones like ResNet and CLIP has revolutionized computer vision. While these models foster innovation, they also present a security risk: a malicious actor can leverage few-shot classification (FSC) to adapt a general-purpose model for unauthorized surveillance, privacy-invasive facial recognition, or other harmful uses with minimal data.

Traditional defense mechanisms, such as machine unlearning or data poisoning, are often reactive or target the training data itself. They do not effectively address the "prevention of learning"—the ability to release a model that is inherently resistant to being trained on specific, sensitive downstream tasks. This paper introduces Learning to Obstruct (LTO), a proactive meta-learning framework designed to prevent models from being easily fine-tuned on specific restricted classes while maintaining their utility for safe applications.

Methodology: Learning to Obstruct (LTO)

The core of the proposed approach is the LTO algorithm. Inspired by Model-Agnostic Meta-Learning (MAML), which seeks an initialization that facilitates rapid learning across all tasks, LTO optimizes for a weight configuration that specifically hinders learning for a set of restricted classes ($\mathcal{R}$) while preserving performance for non-restricted classes ($\mathcal{R}'$).

Overview of the Learning to Obstruct (LTO) framework, illustrating the optimization process to create a "trap" in the weight landscape for restricted classes.

The LTO algorithm operates through a nested optimization loop:

  1. Inner Loop (The Learner): Simulates a few-shot learner (e.g., ProtoNet) attempting to adapt to both restricted and non-restricted tasks.
  2. Outer Loop (The Obstructor): Updates the backbone's weights to maximize the learner's loss on restricted classes and minimize it on non-restricted ones.

By unrolling this optimization, LTO identifies regions in the weight landscape that act as "traps." In these regions, standard fine-tuning gradients for restricted classes lead the model into poor local minima, effectively obstructing the learning process.

Experimental Evaluation

The effectiveness of LTO was evaluated across three benchmarks: ImageNet (classical FSC), CIFAR100 (CLIP-based methods), and CelebA (attribute classification). The primary metric for success is the DropRatio, which measures the disparity between the accuracy drop of restricted classes versus non-restricted ones.

Experimental results on ImageNet showing significant accuracy drops for restricted classes (e.g., "device") compared to minimal impact on non-restricted classes (e.g., "bird" and "dog").

Key results include:

  • Classical FSC: On ImageNet, LTO successfully obstructed methods like ProtoNet and MetaOptNet, achieving a high DropRatio.
  • Foundation Models: LTO effectively obstructed CLIP-based fine-tuning (CoOp and Tip-Adapter). On ImageNet, it reduced the performance of a fine-tuning baseline by 7.65% while maintaining stability for other classes.
  • Attribute Learning: On CelebA, LTO decreased the AUROC of restricted attributes by an average of 8.04%. Some attributes, like "Pale_Skin," saw massive drops from 92% to 66% accuracy.

Discussion and Insights

LTO represents a shift from removing existing knowledge to proactively building barriers against future learning. One of the most significant findings is the concept of "adversarial initializations"—weights specifically designed to fail under standard optimization in certain directions.

The method demonstrates remarkable cross-method robustness; the obstruction remains effective even if the attacker uses a different few-shot learning algorithm than the one used during LTO training. Furthermore, the utility for legitimate research is preserved, as the accuracy drop on non-restricted classes is typically less than 3%.

Limitations and Future Work

LTO requires prior knowledge of the classes to be restricted and involves significant computational costs due to the nested optimization loops. Future research may explore adaptive attacks designed to bypass these "traps" or methods to generalize obstruction to unknown future tasks. By focusing on what a model can learn rather than just what it knows, Learning to Obstruct provides a promising framework for the responsible release of open-source AI models.

Summary updated

BibTeX
@inproceedings{zheng2024learning,
  author = {Amber Yijia Zheng and Chiao-An Yang and Raymond A. Yeh},
  title = {{Learning to Obstruct Few-Shot Image Classification over Restricted Classes}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72661-3\_2},
}
Figure