Continual Learning From a Stream of APIs
- 20 September 2024
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Pattern Analysis and Machine Intelligence
- Vol. 46 (12) , 11432-11445
Abstract
Continual learning (CL) aims to learn new tasks without forgetting previous tasks. However, existing CL methods require a large amount of raw data, which is often unavailable due to copyright considerations and privacy risks. Instead, stakeholders usually release pre-trained machine learning models as a service (MLaaS), which users can access via APIs. This paper considers two practical-yet-novel CL settings: data-efficient CL (DECL-APIs) and data-free CL (DFCL-APIs), which achieve CL from a stream of APIs with partial or no raw data. Performing CL under these two new settings faces several challenges: unavailable full raw data, unknown model parameters, heterogeneous models of arbitrary architecture and scale, and catastrophic forgetting of previous APIs. To overcome these issues, we propose a novel data-free cooperative continual distillation learning framework that distills knowledge from a stream of APIs into a CL model by generating pseudo data, just by querying APIs. Specifically, our framework includes two cooperative generators and one CL model, forming their training as an adversarial game. We first use the CL model and the current API as fixed discriminators to train generators via a derivative-free method. Generators adversarially generate hard and diverse synthetic data to maximize the response gap between the CL model and the API. Next, we train the CL model by minimizing the gap between the responses of the CL model and the black-box API on synthetic data, to transfer the API's knowledge to the CL model. Furthermore, we propose a new regularization term based on network similarity to prevent catastrophic forgetting of previous APIs. Our method performs comparably to classic CL with full raw data on the MNIST and SVHN datasets in the DFCL-APIs setting. In the DECL-APIs setting, our method achieves $0.97\times$ , $0.75\times$ and $0.69\times$ performance of classic CL on the more challenging CIFAR10, CIFAR100, and MiniImageNet, respectively.
Keywords
All Related Versions
Funding Information
- National Key R&D Program of China (2022ZD0118100)
- CCF-DiDi GAIA Collaborative Research Funds
- National Natural Science Foundation of China (62032013)
- Science and Technology Projects in Liaoning Province (2023JH3/10200005)
- Fundamental Research Funds for the Central Universities (N2317002)
This publication has 48 references indexed in Scilit:
- On the Versatile Uses of Partial Distance Correlation in Deep Learning2022
- FE-DaST: Fast and effective data-free substitute training for black-box adversarial attacksComputers & Security, 2022
- Knowledge Distillation: A SurveyInternational Journal of Computer Vision, 2021
- Machine Learning in the AWS Cloud2019
- Continual learning of context-dependent processing in neural networksNature Machine Intelligence, 2019
- Continual lifelong learning with neural networks: A reviewNeural Networks, 2019
- Memory Aware Synapses: Learning What (not) to Forget2018
- Riemannian Walk for Incremental Learning: Understanding Forgetting and Intransigence2018
- Piggyback: Adapting a Single Network to Multiple Tasks by Learning to Mask Weights2018
- Mastering the game of Go without human knowledgeNature, 2017