Engineering AI-Assisted Client-Side Scientific Workflows: WebGPU Inference Architecture and Framework for Privacy-Preserving Hydrological Analysis
Abstract
Deep learning has demonstrated strong potential for improving hydrological predictions, yet its practical adoption remains limited by software complexity, infrastructure requirements, data governance constraints, and fragmented analytical workflows. This study presents Hydro AI Lab, an AI-assisted client-side scientific workflow platform that enables end-to-end hydrological analysis, including data ingestion, model training, evaluation, and AI-assisted interpretation, entirely on the user’s device without reliance on cloud infrastructure. The system is built on a four-layer architecture comprising a user interface layer, a framework-free deep learning engine, geospatial visualization layer, and a browser-native large language model (LLM) assistant powered by WebGPU. We introduced a WebGPU-based inference pipeline tailored for scientific workflows, incorporating tokenization, parallel prefill, autoregressive decoding with KV cache, 4-bit quantization, and a structured context injection mechanism that embeds analytical results directly into LLM interactions. Empirical benchmarks demonstrate real-time inference performance of 21 to 95 tokens per second across multiple model sizes on commodity hardware. Design decisions are informed by published usability evidence from related hydrological decision support systems. The results demonstrate that privacy-preserving, locally executable scientific AI workflow is feasible and practical, offering a scalable pathway toward more accessible, reproducible, and deployable machine learning workflows in hydrology and related environmental domains.
Fields of Study & Subjects
Scientific Computing and Data Management
Environmental Monitoring and Data Management
Hydrology and Watershed Management Studies
Publication details
- Publication date
- 30 May 2026
- Document type
- Preprint