Published July 24, 2026 | Version v1

Zero-Latency-Edge-RAG-

Authors/Creators

Description

This preprint establishes a breakthrough zero-latency, fully decentralized Edge RAG (Retrieval-Augmented Generation) and spatial computing architecture that completely eliminates cloud dependency and main-thread browser congestion.

Abstract

Traditional RAG pipelines rely heavily on centralized cloud infrastructure, incurring high latency, network serialization overhead, and server hosting costs. Furthermore, browser visualizers attempting to process high-frequency semantic streams suffer from severe main-thread blockages, causing garbage collection pauses and dropped frames. We resolve these bottlenecks through a three-layer client-side architecture:

  1. The Memory Supply Chain: Bypasses V8 JavaScript garbage collection via WebAssembly-backed Min-Max uniform linear quantization (compressing 50,000+ vector embeddings 4.0x from Float32 to Int8), stored in IndexedDB and streamed into zero-copy SharedArrayBuffer memory views.

  2. The WebGPU Compute Engine: Implements a bare-metal WGSL compute shader utilizing hardware SIMD registers (vec4<f32> dot-products) and sign-extension bit-unpacking to execute parallel cosine similarity search across 100,000+ vector dimensions directly in GPU VRAM.

  3. The Spatial Rendering Worker: Relocates WebGL context ownership and InstancedMesh matrix computations to an isolated OffscreenCanvas Web Worker, updating color buffers and glowing semantic edge topologies (LineSegments) asynchronously.

Key Performance Benchmarks

  • Vector Search Latency: Sub-millisecond parallel similarity retrieval across 100,000 vector embeddings in GPU VRAM.

  • Rendering Throughput: Sustained a locked 60 frames per second (FPS).

  • UI Jitter Elimination: Yielded a microscopic UI frame-time variance ($\Delta t$) of just $0.04\text{ ms}^2$.

  • Total Blocking Time (TBT): Achieved 0 ms TBT on the main thread.

  • Memory Optimization: Reduced heap allocation overhead by bypassing V8 garbage collection cycles.

Keywords

WebGPU, WGSL, Client-Side Vector Database, Edge RAG, OffscreenCanvas, Web Workers, SharedArrayBuffer, Spatial Computing, Instanced Mesh.

Files

Zero-Latency-Edge-RAG-Paper.pdf

Files (248.0 kB)

Name Size Download all
md5:0821b90bceab6fa6d9d33b2d8a448877
248.0 kB Preview Download