TensorJSFuzz: Effective Testing of Web-Based Deep Learning Frameworks via Input-Constraint Extraction
Track: Systems and infrastructure for Web, mobile, and WoT
Keywords: Web-based Deep Learning, Fuzzing, Large Language Model
TL;DR: A novel method for testing web-based deep learning frameworks by generating high-quality inputs that are both syntactically and semantically valid, and by designing effective test oracles tailored to the unique constraints of web environments.
Abstract: As web applications grow in popularity, developers are increasingly integrating deep learning (DL) models into these environments. Web-based DL frameworks (e.g., TensorFlow.js) are essential for building and deploying such applications. Ensuring the quality of these frameworks is critical for the reliability of DL systems. While extensive testing efforts have been made for native DL frameworks such as TensorFlow and PyTorch, web-based DL frameworks have not yet undergone systematic testing. A key challenge in this context is generating high-quality inputs that are both syntactically and semantically valid, as well as designing effective test oracles tailored to the unique constraints of web-specific environments. To address this gap, we introduce TensorJSFuzz, a novel method for testing web-based DL frameworks. To ensure input quality, TensorJSFuzz extracts constraints directly from the source code of framework APIs. By leveraging Large Language Models (e.g., ChatGPT) to understand the code and extract input constraints, TensorJSFuzz performs type-aware random generation coupled with dependency-aware refinement to create high-quality test inputs. These inputs are then subjected to differential testing across various backends, including CPU, TensorFlow, Wasm, and WebGL. Our experimental results show that TensorJSFuzz outperforms baseline methods in generating valid inputs and identifying bugs. In particular, TensorJSFuzz successfully detected 92 bugs, with 30 already confirmed or fixed by developers, demonstrating its effectiveness in improving the robustness of web-based DL frameworks.
Submission Number: 1749
Loading