Most databases that track fast-moving fields are refreshed in batches: a weekly job rebuilds the radio map, a release cycle re-indexes the knowledge graph, and between rebuilds users read stale data. Batches persist because the fast read layouts are rigid. A sorted, compressed adjacency structure is quick to scan, but inserting or deleting one edge means rewriting it. The standard way out is to keep the big structure frozen, collect new edits in a small sorted "delta" beside it, and merge the two on the fly every time something is read. That merge-on-read has a cost, and the cost sets how often the frozen structure must be rebuilt, and therefore how stale the data gets.
This note proposes to move that merge into hardware that already exists in prototype form. Stream semantic registers (SSRs) are a small RISC-V extension. Reading a designated register makes the hardware fetch the next element of a memory stream in the background, so tiny in-order cores stop spending most of their instructions on address arithmetic. The sparse variant of SSRs already contains comparators that compute the union and intersection of two sorted index streams at register speed. Our claim is that a union streamer is, in effect, a merge-on-read engine. Cascading it with an intersection streamer and adding a one-bit deletion marker would let a core read "frozen base plus live delta" at close to the cost of reading a freshly rebuilt structure. That would change the freshness-versus-cost trade-off: updates become visible immediately, and rebuilding becomes a rare background task rather than the thing that sets the refresh rate.
Core Claim
The hardware line this builds on established that index-stream comparison belongs in the core. Stream Semantic Registers bind floating-point registers to address generators and reach near-full FPU utilization at 11% core area. Indirection SSRs add a hardware gather for compressed sparse row (CSR) matrices. Sparse SSRs add intersection and union comparators at 1.8% cluster area and report single-core speedups of 7.7× for sparse-sparse multiply and 9.8× for sparse-sparse addition. All three evaluate only static SuiteSparse matrices. The sparse-SSR authors name graph pattern matching as a future use, but no paper in this line treats the index arrays as something that changes while being read.
On the database side, the constraint comes from GUFU. GUFU maintains a WiFi radio map as a dynamic graph, links new access points by thresholding on shared neighbors, and prunes dead ones with a forgetting mechanism. It still runs in weekly batches because it has no cheap way to keep the graph continuously current.
We claim that for kernels that intersect neighbor sets and for updates with overwrite or delete semantics, a cascaded union-then-intersect streamer keeps read cost nearly flat as the delta grows. This lets the rebuild interval stretch by a large factor at the same total compute. We also expect the needed extension to stay within the area budget of the existing sparse SSR design.
The claim is deliberately narrower than "accelerate database sync with SSRs." For purely linear kernels, such as neighbor aggregation written as sparse matrix-vector multiply, the base and delta can be processed in two separate passes and summed, with no merge at all. We treat that as a serious competitor rather than hide it (see below).
Research Program
The system has three layers. The first is a data layout. Each vertex's neighbor list is kept as a frozen sorted CSR base plus one or more sorted delta runs in the cluster's scratchpad. Each delta entry carries a tombstone bit that marks a deletion or an overwritten value.
The second is a hardware change to the open-source Snitch cluster (Snitch). The existing sparse-SSR union streamer gets two additions: a pass-through port that feeds its merged output directly into a second comparator performing intersection, and suppression logic that drops an index when a tombstoned copy appears in a newer run. Indices stay 32-bit and records are split into columns, so the power-of-two stride limit noted in the indirection-SSR paper does not bite.
The third layer is an analysis of when to rebuild. Suppose edits arrive at rate $\lambda$ per unit time, reads touch the whole structure at rate $\rho$, each delta element costs $c_m$ extra cycles per read, and a rebuild costs $C$ cycles. The average cost per unit time is $C/T + \rho c_m \lambda T/2$, because the delta grows linearly between rebuilds. Minimizing this gives the rebuild interval
$$T^\ast = \sqrt{\frac{2C}{\rho\, c_m\, \lambda}}.$$
The hardware's contribution is to shrink $c_m$. Because $T^\ast$ scales as $c_m^{-1/2}$, the measured $c_m$ for software merging, existing sparse SSRs, and the cascaded extension translates directly into how rarely each design must rebuild. The measured $c_m$ also gives a rebuild trigger based on delta size, replacing GUFU's fixed calendar.
The target kernels are three:
- Shared-neighbor counting for thresholded link creation, as in GUFU's virtual edges.
- Sparse vector addition with last-write-wins overwrites.
- The time-filtered neighbor expansion that LLM-DA performs when sampling recent paths in temporal knowledge graphs.
Baselines
The naive reference points are two. The first is "do nothing": read only the frozen base. This has zero merge cost and maximal staleness, and it bounds how much freshness the other designs actually buy. The second is a hand-tuned software merge-on-read on the same Snitch core without stream extensions, the ordinary RISC-V setting in which the indirection-SSR paper reports 11% FPU utilization on sparse-dense work. Beating it is necessary but not interesting.
The strongest competitor is existing sparse SSRs operating on a freshly rebuilt CSR, rebuilt at its own optimal interval $T^\ast$, with rebuild cycles counted on the same cluster. This is the configuration for which Sparse SSRs report up to 80% single-core FPU utilization on sparse-dense problems and 7.7× on sparse-sparse multiply. Those numbers are for static matrices only; no reported result was found on Lacuna for any SSR-family design under dynamic updates. A second strong competitor is decomposition on unmodified sparse SSRs: each intersection over base-plus-delta is expanded into separate intersections of base and delta runs, and the results are combined in software.
The key ablation isolates the cascade. It uses unmodified sparse SSRs that write the union into a scratchpad buffer and then run a separate intersection pass, with and without tombstone suppression.
All variants run cycle-accurately in RTL simulation of the same 8-core cluster. They share the same scratchpad size, the same update streams, and hand-written assembly with the same tuning effort per kernel. Area is taken from synthesis in the same flow.
The proposal beats the strongest baseline only if it achieves lower total cycles per unit time, counting reads, merges, and rebuilds, at equal or better staleness. It must also add less area than the 1.8% the sparse-SSR extension itself costs.
Why not just…?
Why not just rebuild in batches on a server? When updates are rare, this is the right answer, and the rebuild-interval model will say so. The trouble is that the batch interval sets staleness. GUFU's forced weekly schedule is a concrete case, and it leaves error accumulating between runs. Our end-to-end experiment reports the full curve of staleness against cost, so the regime where batching wins is visible rather than assumed away.
Why not just process base and delta in separate passes and add the results? This is the real threat. For linear aggregation it is exact and needs no new hardware, and we expect it to match or beat merging there. It breaks down in two cases. The first is intersections: with $k$ delta runs, decomposition needs on the order of $k^2$ pairwise intersections, while a cascaded merge needs one pass. The second is overwrite semantics, where addition does not express "replace." The ablation sweeps $k$ and the mix of linear and set operations to locate the crossover. If decomposition wins for all realistic $k$, the hardware extension is not justified and we will report that.
Why not just use a GPU or an FPGA co-processor? Enzian/doppioDB shows an FPGA can chase pointers with flat latency, but it assumes read-mostly tables, and its board-scale FPGA with 512 GB of attached DRAM is a different cost class. On GPUs, the sparse-SSR paper reports 1.7× higher peak utilization than GPU libraries even for static sparse matrix-vector multiply. Irregular merges are the part GPUs handle worst. We will run a cuSPARSE-style merge as context but do not expect it to change the conclusion.
Proposed Experiments
The first check is a microbenchmark. It measures cycles per read element as the delta fraction rises from 0 to 50% of base size, on SuiteSparse matrices (the benchmark used in the SSR papers) with synthetic random insertions and deletions. From these measurements we extract $c_m$ for each design.
The second check uses real update streams. For graph edits we replay the timestamped events of ICEWS14, ICEWS05-15, and ICEWS18 (the LLM-DA benchmarks) as edge insertions, with window-based expiry as deletions. We maintain shared-neighbor counts and recent-neighbor expansions continuously and report total cycles, update-to-visibility latency, and the chosen rebuild interval. For overwrite updates, we build a delta from LeMat-Bulk's source-by-source aggregation: Materials Project first, then OQMD and Alexandria entries arriving as a second run that overwrites or duplicates existing entries. This exercises last-write-wins semantics on real record overlaps.
The third check is correctness. Every kernel's output on the merged view must match its output on a rebuilt structure, bit for bit.
The decisive result is the ratio of optimal rebuild intervals $T^\ast$ between the cascaded design and the best of the decomposition and batch-rebuild baselines, at matched total cycles. If that ratio exceeds a small constant on the ICEWS stream, and the synthesized area stays under the sparse-SSR budget, the claim holds. If not, it fails cleanly.
References
- Stream Semantic Registers: A Lightweight RISC-V ISA Extension Achieving Full Compute Utilization in Single-Issue Cores
- Indirection Stream Semantic Register Architecture for Efficient Sparse-Dense Linear Algebra
- Sparse Stream Semantic Registers: A Lightweight ISA Extension Accelerating General Sparse Linear Algebra
- Graph-based Fingerprint Update Using Unlabelled WiFi Signals
- Snitch: A Tiny Pseudo Dual-Issue Processor for Area and Energy Efficient Execution of Floating-Point Intensive Workloads
- Large Language Models-guided Dynamic Adaptation for Temporal Knowledge Graph Reasoning
- Tackling Hardware/Software co-design from a database perspective
- LeMat-Bulk: aggregating, and de-duplicating quantum chemistry materials databases