[Paper Review] Continual Learning on the Edge with TensorFlow Lite
This paper extends TensorFlow Lite with continual learning capabilities by integrating a simple replay buffer into its transfer learning API, enabling on-device model adaptation without catastrophic forgetting. The approach demonstrates superior performance over standard transfer learning in incremental learning scenarios on mobile devices, validated through benchmark testing and a real-world Android application.
Deploying sophisticated deep learning models on embedded devices with the purpose of solving real-world problems is a struggle using today's technology. Privacy and data limitations, network connection issues, and the need for fast model adaptation are some of the challenges that constitute today's approaches unfit for many applications on the edge and make real-time on-device training a necessity. Google is currently working on tackling these challenges by embedding an experimental transfer learning API to their TensorFlow Lite, machine learning library. In this paper, we show that although transfer learning is a good first step for on-device model training, it suffers from catastrophic forgetting when faced with more realistic scenarios. We present this issue by testing a simple transfer learning model on the CORe50 benchmark as well as by demonstrating its limitations directly on an Android application we developed. In addition, we expand the TensorFlow Lite library to include continual learning capabilities, by integrating a simple replay approach into the head of the current transfer learning model. We test our continual learning model on the CORe50 benchmark to show that it tackles catastrophic forgetting, and we demonstrate its ability to continually learn, even under non-ideal conditions, using the application we developed. Finally, we open-source the code of our Android application to enable developers to integrate continual learning to their own smartphone applications, as well as to facilitate further development of continual learning functionality into the TensorFlow Lite environment.
Motivation & Objective
- To address the limitations of on-device transfer learning in real-world scenarios where new classes arrive incrementally.
- To implement and evaluate continual learning capabilities directly on edge devices using TensorFlow Lite.
- To demonstrate the superiority of continual learning over transfer learning in handling class-incremental learning under non-ideal conditions.
- To open-source an Android application to enable developers to integrate continual learning into smartphone applications.
- To lay the foundation for future enhancements of continual learning within the TensorFlow Lite ecosystem.
Proposed method
- Augment the existing TensorFlow Lite transfer learning API with a simple replay buffer in the model head to store and replay a subset of past data.
- Use a fixed-size buffer to retain representative samples from previously learned classes during incremental training.
- Integrate the replay buffer into the training loop by mixing current batch data with replayed samples before backpropagation.
- Train and evaluate the model on the CORe50 benchmark under three scenarios: cumulative, new instances, and new classes.
- Deploy and test the model in a real-time Android application with live camera input under varying image quality and object conditions.
- Compare the performance of transfer learning and continual learning models across all scenarios using classification accuracy and confidence scores.
Experimental results
Research questions
- RQ1Can transfer learning in TensorFlow Lite handle incremental class learning without catastrophic forgetting in real-world edge deployments?
- RQ2How does a simple replay-based continual learning approach perform compared to transfer learning under non-ideal, real-world image conditions?
- RQ3Can continual learning be effectively implemented and deployed on mobile devices using TensorFlow Lite's current API constraints?
- RQ4What are the failure modes of continual learning models under challenging visual conditions such as occlusion or rotation?
- RQ5How does the model’s prediction behavior change when it fails, particularly in terms of class bias?
Key findings
- Transfer learning in TensorFlow Lite exhibits catastrophic forgetting when new classes are introduced incrementally, even with minimal data, failing to retain knowledge of previously learned classes.
- The continual learning model with a replay buffer successfully prevents catastrophic forgetting and maintains high accuracy across all CORe50 benchmark scenarios, including new classes.
- In the real-world Android application, the continual learning model maintains confidence scores above 0.85 for most classes, with the Glasses class consistently classified with 100% confidence.
- The model fails primarily when key visual features are hidden (e.g., remote control buttons, cup handle, bottle cap), indicating sensitivity to partial or occluded objects.
- When the continual learning model fails, it consistently defaults to the last-learned class (Glasses), suggesting a potential bias in the prediction head or memory buffer.
- The continual learning model outperforms transfer learning in the new classes scenario, where transfer learning fails dramatically due to forgetting, while the CL model maintains robust performance.
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.