[Paper Review] Black-Box Ripper: Copying black-box models using generative evolutionary algorithms
This paper proposes Black-Box Ripper, a generative evolutionary framework that distills black-box neural network functionality into a student model without access to training data or gradients through the teacher. By training a VAE on a proxy dataset and using an evolutionary strategy to optimize latent codes for high target-class confidence in the black-box, the method achieves state-of-the-art accuracy in data-free, zero-shot knowledge distillation, surpassing glass-box baselines by 10.4% on CIFAR-100 proxy settings.
We study the task of replicating the functionality of black-box neural models, for which we only know the output class probabilities provided for a set of input images. We assume back-propagation through the black-box model is not possible and its training images are not available, e.g. the model could be exposed only through an API. In this context, we present a teacher-student framework that can distill the black-box (teacher) model into a student model with minimal accuracy loss. To generate useful data samples for training the student, our framework (i) learns to generate images on a proxy data set (with images and classes different from those used to train the black-box) and (ii) applies an evolutionary strategy to make sure that each generated data sample exhibits a high response for a specific class when given as input to the black box. Our framework is compared with several baseline and state-of-the-art methods on three benchmark data sets. The empirical evidence indicates that our model is superior to the considered baselines. Although our method does not back-propagate through the black-box network, it generally surpasses state-of-the-art methods that regard the teacher as a glass-box model. Our code is available at: https://github.com/antoniobarbalau/black-box-ripper.
Motivation & Objective
- To develop a method that replicates the functionality of black-box neural networks without access to their architecture, training data, or gradients.
- To address the challenge of knowledge distillation in zero-shot settings where real training data is unavailable.
- To improve performance in data-free distillation by minimizing the distribution gap between proxy and true data distributions.
- To demonstrate that black-box models can be effectively reverse-engineered using only API-level access and evolutionary optimization.
- To raise awareness about vulnerabilities in public ML APIs and stimulate research in AI security and model protection.
Proposed method
- A Variational Autoencoder (VAE) is trained on a proxy dataset with different classes than the target black-box model.
- Latent codes from the VAE are optimized via an evolutionary strategy to maximize the black-box model's confidence for a specific target class.
- The evolved images, though visually dissimilar to real images, exhibit high-class activation in the teacher model, providing effective distillation signals.
- Knowledge distillation is performed by training a student network using the evolved images as inputs and the black-box's output probabilities as targets.
- The evolutionary process iteratively improves image quality in terms of class confidence, focusing on texture and pattern similarity rather than semantic realism.
- Gradients are only back-propagated through the student network, preserving the black-box constraint.
Experimental results
Research questions
- RQ1Can a student model achieve high accuracy in distilling a black-box classifier without access to its training data or architecture?
- RQ2How effective is an evolutionary strategy in generating adversarial-like inputs that maximize target-class confidence in a black-box model?
- RQ3To what extent can a proxy dataset with different classes and distributions enable effective knowledge distillation?
- RQ4Does the proposed method outperform state-of-the-art data-free distillation techniques, especially those with full access to the teacher model?
- RQ5Can black-box functionality be replicated with minimal API calls and without gradient information, challenging the assumption that black-box models are secure?
Key findings
- On CIFAR-10 with CIFAR-100 (6 classes) as proxy, Black-Box Ripper achieved 94.7% accuracy, surpassing the state-of-the-art method by 10.4%.
- The method achieved 99.98% confidence for the bald uakari monkey class in the 10 Monkey Species dataset, despite generated images lacking semantic resemblance.
- Ablation studies confirmed that the evolutionary strategy significantly reduces the distribution gap between proxy and true data, improving distillation performance.
- The framework outperformed a state-of-the-art glass-box method that back-propagates through the teacher, demonstrating the effectiveness of the black-box approach.
- The model achieved a 3.2% accuracy gap between the original black-box and the student in one scenario, indicating high fidelity replication.
- Visual analysis showed that the evolved images rely on texture patterns rather than semantics, consistent with CNNs' texture bias, yet still elicit high confidence in the teacher model.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.