deepgraph
v0.1.3
Published
Pure-WebGPU billion-point spatial pyramid, embedding, and ego-network visualization engine
Maintainers
Readme
Deepgraph (deepgraph)
Deepgraph is an embeddable, pure-WebGPU billion-point spatial pyramid, embedding, and ego-network visualization engine for streaming out-of-core .arrowtiles (v0.1) archives over HTTP Range requests, local File handles, or custom CustomRangeSource transports.
Built directly on plain WebGPU compute and instanced ribbon shaders (0 Three.js / WebGL dependencies, 0 B main-thread Arrow parser weight, ~81.3 kB gzipped bundler entry), Deepgraph renders multi-million to billion-row datasets—verified end-to-end on 1,348,176,623 ESA Gaia DR3 stars (31.81 GiB archive; ~0.69–0.73s cold TTFF over 50 ms / 50 Mbps WAN, 174.8–178.9 FPS up to 7.22M active stars on RTX 5090 / 67.4–179.6 FPS on Intel xe-lpg iGPU) and 2,835,490 LMSys UMAP/NCVis chat embeddings—with 0.0000% stationary shimmer, instant GPU hover/click picking, 3-slot cross-filter-aware quadratic Bézier graph/ego arcs, smooth 2-second WGSL axis transitions, and deterministic GPU memory teardown.
Scope Note (Out-of-Core Coordinates vs. Force Simulation): Deepgraph renders node positions from
.arrowtilesspatial pyramids, precomputed 2D embeddings (UMAP, NCVis, t-SNE, PCA), or declarative chart columns, paired with static overview edges (<= 100,000instanced Bézier arcs) and out-of-core 1-hop ego neighborhoods. Browser-resident $O(V + E)$ spring/force-directed layout simulation is intentionally out of scope.
The companion Python + Rust builder, reader, validator, and 1.35B hardware crucible benchmark live in the sibling arrowtiles repository (pip install arrowtiles).
Installation & Quick Start
npm install deepgraphimport { Deepgraph } from 'deepgraph';
if (!Deepgraph.isSupported()) {
throw new Error('WebGPU is required');
}
const container = document.getElementById('plot')!;
const plot = await Deepgraph.create(container, {
url: 'https://cdn.example.com/embeddings.arrowtiles',
encoding: {
color: { field: 'model', scale: 'viridis' },
size: { field: 'num_of_tokens', domain: [0, 4096], range: [0.5, 3.0] },
aggregation: 'points',
},
});
plot.on('click', (hit) => {
if (hit) console.log('Selected row:', hit.rowId, hit.attributes);
});For zero-build <script type="module"> HTML pages, import deepgraph/standalone (see examples/embed.html). For linked DuckDB / Mosaic cross-filtering, import deepgraph/mosaic (full reference in docs/API.md).
Python (pydeepgraph) for Marimo & Jupyter
pip install pydeepgraphimport marimo as mo
import pydeepgraph as dg
# Optional one-time co-sorted Parquet CSR build (`ROW_GROUP_SIZE=8,192`, `< 5 ms` hover reads)
dg.build_canonical_edges_parquet(
"raw_edges.parquet",
"csr_edges.parquet",
nodes="conversations.parquet",
x_column="x",
y_column="y",
)
scatter = mo.ui.anywidget(
dg.plot(
"embeddings.arrowtiles",
x="x",
y="y",
color="model",
sidecar="conversations.parquet",
edges="csr_edges.parquet", # or "2d_euclidean_knn"
static_edges="bridges.parquet", # optional <= 100k `DGE1` binary overview arcs
)
)Launch the reactive Marimo out-of-core CSR ego-graph & UMAP ↔ NCVis manifold-tear showcase locally:
marimo run python/examples/marimo_lmsys_mosaic.pyLocal Development & Demo App
Prerequisites
- Node.js 22.6+ (Node.js 20+ for library/demo builds; Node.js 22.6+ for
npm run test:unitnative TypeScript stripping) - A WebGPU-capable browser (Chrome 113+, Edge 113+, Safari 18+, or Firefox Nightly)
git clone https://github.com/kai-erlenbusch/deepgraph.git
cd deepgraph
npm install
# Launch interactive demo app on http://127.0.0.1:5173
npm run dev
# Build library bundles (dist/index.js + dist/standalone.js + .d.ts) and verify consumer types
npm run build:lib
npm run verify:types
# Run Node.js unit tests (worker IPC codec, 1D RTO & ViewState) + fast WebGPU Playwright E2E suite
npm run test:unit
npm run test:e2eNote on Sample Archives for Local E2E Tests:
npm run test:e2estreams< 5 MiB.arrowtilesfixtures from the sibling../arrowtiles/samples/directory (generated viapython scripts/build_samples.pyinarrowtiles). The heavy 5-gate VRAM & LRU stress suite (npm run test:e2e:heavy) additionally expects localpublic/gaia_full.arrowtilesand../arrowtiles/samples/lmsys_d7_proportional_25k.arrowtiles.
For contributor architecture rules and WebGPU/packaging invariants, see AGENTS.md and docs/API.md.
Dataset Showcases
ESA Gaia DR3 Sky Catalogue
- Scale:
1,348,176,623local Gaia DR3 stars (31.81 GiB.arrowtilesv0.1archive; designed for the full1.8Bsurvey) streamed via HTTP Range requests - Visual Channels: Galactic Hammer coordinates,
phot_g_mean_mag/abs_mmagnitude sizing, additiveR16 / G16 / B16bp_rpoptical colour synthesis, HR diagram transitions, and 6D proper-motion star trails

LMSys Chat Conversations (UMAP & NCVis Embeddings + Ego-Graph)
- Scale: 2,835,490 conversations across 38 source columns
- Visual Channels: UMAP
(x_umap, y_umap)<-> NCVis(x_ncvis, y_ncvis)2-second GPU layout morphs, multi-turnconversation_idtrajectories,3,500cross-manifold tear bridges (DGE1binary stream), categoricalmodel/clusters_28dictionaries, and< 1.2 msout-of-core Parquet CSR hover lookups

Architecture Overview
flowchart LR
A[".arrowtiles Archive (HTTP Range / File)"] --> B["PMTilesClient + Worker Pool (Zstd WASM + Arrow IPC)"]
B --> C["TileGpuStore (Bounded LRU Slot GPUBuffers)"]
C --> D["ComputeRasterizer (WGSL Atomic Accum + Resolve)"]
C --> E["PickingLayer (9x9 CSS px GPU Compute Pick)"]
D --> F["WebGPU Swapchain + HighlightOverlay"]
E --> FDatasetSession&PMTilesClient: Validates.arrowtilesv0.1headers (0.xminor-version &required_featuresgates), prefetches PMTiles leaf directories, and decodes Zstd-compressed Arrow IPC tiles off-main-thread across a Web Worker pool (@bokuweb/zstd-wasm+@uwdata/flechette, with256 MiBZstd bomb protection and1D RTOBigIntprecision).TileGpuStore: Manages bounded GPU storage-buffer slots with LRU eviction (GPUBuffer.destroy()on eviction andplot.destroy()) and Float64 relative-to-center (RTC) coordinate uniforms.ComputeRasterizer: Commutative, zero-shimmer2 × u32atomic WGSL compute splatting across Optical (R16/G16/B16), Categorical/Numeric Points (1,024levels), Density/Mean-Field KDE, and 6D Star Trails, plus 2-second WGSL axis transitions.PickingLayer,EdgeOverlay&HighlightOverlay: Sub-millisecond9×9 CSS pxGPU compute hit-testing with priority-aware tie-breaking, 3-slot (static,pinnedEgo,hoverEgo) 34-vertextriangle-stripquadratic Bézier ribbons with@binding(1)180 FPS brush/lasso cross-filtering (0storage buffers), 64-slot neighbor rings with click-to-hop navigation, compressed-tile LRU row decoding (decode_row), and opt-in asyncresolveRowAttributessidecar enrichment.
Sibling & Ecosystem Projects
- arrowtiles (
pip install arrowtiles): DuckDB + Rust (PyO3).arrowtilesv0.1spatial pyramid builder, reader, validator, and format specification (docs/SPEC.md). - Python / Marimo & Jupyter Widget (
python/):pydeepgraph(pip install pydeepgraph) — zero-copymmapHTTP206/<= 512 KiBCommRangeSourceanywidgetwithrow_id-sorted Parquet sidecar enrichment, SQLrow_idbitmasks,DGE1binarystatic_edges, and< 5 msco-sorted Parquet CSR 1-hop ego-network arcs.
Citing
If you use Deepgraph in academic or scientific work, please cite:
Erlenbusch, K. (2026). Deepgraph: WebGPU Billion-Point Spatial Pyramid, Embedding, and Ego-Network Visualization Engine [Computer software]. https://github.com/kai-erlenbusch/deepgraph
Licensing
Deepgraph is available free of charge for non-commercial use under the CC BY-NC 4.0 public license (see LICENSE and NOTICE).
If you're planning to use Deepgraph commercially (including SaaS products, paid applications, consulting deliverables, or internal business tools at for-profit organizations), reach out to [email protected] for a commercial license.
Data Attribution
- ESA Gaia DR3: Gaia data © ESA/Gaia/DPAC (attribution required).
- LMSys-Chat-1M: Subject to its upstream dataset terms and is not redistributed in this repository.
