Skip to main content
QUICK REVIEW

[Paper Review] Moving Deep Learning into Web Browser: How Far Can We Go?

Yun Ma, Dongwei Xiang|arXiv (Cornell University)|Jan 27, 2019
Machine Learning and Data ClassificationComputer Science24 references3 citations
TL;DR

This paper presents the first empirical study of deep learning in web browsers using seven JavaScript-based frameworks, measuring their capabilities and performance. It finds that while browser-based deep learning is still in its infancy, TensorFlow.js supports the broadest range of tasks, and integrated GPUs can outperform native CPU inference for small models, though training remains limited by browser constraints.

ABSTRACT

Recently, several JavaScript-based deep learning frameworks have emerged, making it possible to perform deep learning tasks directly in browsers. However, little is known on what and how well we can do with these frameworks for deep learning in browsers. To bridge the knowledge gap, in this paper, we conduct the first empirical study of deep learning in browsers. We survey 7 most popular JavaScript-based deep learning frameworks, investigating to what extent deep learning tasks have been supported in browsers so far. Then we measure the performance of different frameworks when running different deep learning tasks. Finally, we dig out the performance gap between deep learning in browsers and on native platforms by comparing the performance of TensorFlow.js and TensorFlow in Python. Our findings could help application developers, deep-learning framework vendors and browser vendors to improve the efficiency of deep learning in browsers.

Motivation & Objective

  • To investigate the current state of deep learning support in web browsers using JavaScript-based frameworks.
  • To measure the performance of different frameworks across various deep learning tasks.
  • To identify the performance gap between browser-based deep learning (e.g., TensorFlow.js) and native platforms (e.g., TensorFlow in Python).
  • To guide application developers, framework vendors, and browser vendors in improving client-side deep learning efficiency.

Proposed method

  • Surveyed 7 popular JavaScript-based deep learning frameworks to assess their support for different deep learning tasks.
  • Developed a browser extension to measure runtime performance and system resource utilization during inference and training.
  • Benchmarked TensorFlow.js against native TensorFlow in Python to quantify performance differences.
  • Analyzed model loading time, backend performance (CPU vs. GPU), and scalability across model sizes and complexity.
  • Evaluated the impact of WebGL and integrated graphics cards on acceleration of deep learning workloads in browsers.
  • Conducted controlled experiments on diverse deep learning models (e.g., CNNs, RNNs) to assess feature coverage and execution efficiency.

Experimental results

Research questions

  • RQ1RQ1: What features do existing JavaScript-based deep learning frameworks provide to implement various kinds of deep learning tasks in browsers?
  • RQ2RQ2: How well do existing frameworks perform across different deep learning tasks in browsers?
  • RQ3RQ3: How significant is the performance gap between running deep learning in browsers and on native platforms?

Key findings

  • Deep learning in browsers is still in its early stages, with most frameworks supporting only a subset of deep learning tasks, and TensorFlow.js offering the broadest functionality.
  • Training support in browsers is limited; most frameworks prioritize inference, and performance degrades significantly with increasing neurons per layer due to browser constraints on complex matrix operations.
  • Model loading and initialization dominate inference latency, often taking longer than the actual inference computation.
  • For small models, the CPU backend in browsers outperforms the GPU backend due to high overhead in GPU context switching and memory transfer.
  • Integrated graphics cards in modern browsers can achieve comparable or even better performance than native CPU inference for small to medium models, especially when leveraging WebGL acceleration.
  • The performance gap between browser-based and native deep learning frameworks remains substantial for complex models, but browser-based inference is viable for lightweight, real-time applications.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.