[Paper Review] System Demo for Transfer Learning across Vision and Text using Domain Specific CNN Accelerator for On-Device NLP Applications
This paper presents a system demo for on-device natural language processing using a domain-specific CNN accelerator (CNN-DSA) that enables transfer learning from vision to text via two-dimensional word embedding. By converting text into image-like Super Characters or Squared English Words, the method leverages efficient, low-precision inference on a 300mW CNN-DSA chip, achieving 97.4% accuracy on English ontology classification and 89.2% on Chinese sentiment analysis with under 0.2% accuracy drop compared to full-precision models.
Power-efficient CNN Domain Specific Accelerator (CNN-DSA) chips are currently available for wide use in mobile devices. These chips are mainly used in computer vision applications. However, the recent work of Super Characters method for text classification and sentiment analysis tasks using two-dimensional CNN models has also achieved state-of-the-art results through the method of transfer learning from vision to text. In this paper, we implemented the text classification and sentiment analysis applications on mobile devices using CNN-DSA chips. Compact network representations using one-bit and three-bits precision for coefficients and five-bits for activations are used in the CNN-DSA chip with power consumption less than 300mW. For edge devices under memory and compute constraints, the network is further compressed by approximating the external Fully Connected (FC) layers within the CNN-DSA chip. At the workshop, we have two system demonstrations for NLP tasks. The first demo classifies the input English Wikipedia sentence into one of the 14 ontologies. The second demo classifies the Chinese online-shopping review into positive or negative.
Motivation & Objective
- To enable efficient, on-device NLP inference under strict power and memory constraints in mobile and embedded systems.
- To explore the feasibility of transferring vision-based CNN models to text classification tasks using two-dimensional word embedding.
- To minimize power consumption and inference latency in NLP applications through low-precision quantization and on-chip memory optimization.
- To demonstrate real-time, high-accuracy text classification using a domain-specific accelerator (CNN-DSA) on mobile platforms like Raspberry Pi.
- To evaluate the performance of the Super Characters and Squared English Word methods on diverse languages, including English and Chinese.
Proposed method
- Text is converted into image-like representations using the Super Characters method, where characters are mapped into a 2D grid with pixel values corresponding to embedding vectors.
- For English text, the Squared English Word (SEW) method is applied to convert each word into a square-shaped glyph to improve CNN recognition, preserving one-to-one mapping for lossless reconstruction.
- The resulting 2D images are fed into a quantized VGG16-based two-dimensional CNN model, fine-tuned via transfer learning using ImageNet-pretrained weights.
- The model is compressed using 1-bit and 3-bit fixed-point precision for network coefficients and 5-bit for activations, enabling over 200x model compression with minimal accuracy loss.
- Fully connected (FC) layers are approximated and integrated within the CNN-DSA chip to reduce memory footprint and accelerate inference.
- All processing occurs on-chip with internal SRAM, eliminating external DRAM access and reducing power consumption to under 300mW.
Experimental results
Research questions
- RQ1Can two-dimensional CNNs trained on image data achieve high accuracy in text classification tasks through transfer learning?
- RQ2How effective is the Super Characters method in representing text as 2D images for NLP tasks on low-power hardware?
- RQ3To what extent can model quantization and compression preserve accuracy while reducing memory and power consumption in on-device NLP systems?
- RQ4Can the CNN-DSA chip achieve real-time inference for NLP applications with sub-20ms latency and under 300mW power?
- RQ5How does the performance of the SEW method compare to standard Super Characters for English text in NLP tasks?
Key findings
- The system achieved 97.4% test accuracy on the DBpedia dataset for English Wikipedia sentence classification into 14 ontologies, with only a 0.2% drop from the full-precision VGG model.
- For Chinese sentiment classification on the JD binary dataset, the system achieved 89.2% test accuracy, demonstrating effectiveness on Asian language text with square-shaped characters.
- The total inference time, including pre-processing and on-chip computation, was 21ms, enabling nearly 50 sentences per second, satisfying real-time requirements.
- The CNN-DSA chip consumed less than 300mW, with pre- and post-processing power being negligible, due to on-chip memory usage and efficient data flow.
- Model compression achieved over 200x reduction in size (from 58.9MB to 2.8MB) through 1-bit and 3-bit quantization, with only minor accuracy degradation.
- The method successfully enabled efficient, low-power NLP inference on mobile devices by leveraging vision-based CNN accelerators and transfer learning from image classification.
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.