How Many Bits Does a Hub Gene Need?

Spatial transcriptomics instruments now measure gene activity at millions of positions across a tissue slice, laid out on a grid much like the pixels of an image. A standard next step is to find "hub genes": genes that sit at the center of a network in which two genes are linked when their activity rises and falls together across neighboring tissue positions. The expensive part is building that network. It takes a full pass over every position for every candidate gene pair, and the network is only needed to answer one question at the end: which top-k genes are the hubs? We propose to stream the spatial grid through the same kind of row-by-row hardware pipeline that FPGAs (field-programmable gate arrays, chips whose logic is rewired for one fixed job) use for camera video. We would let a team of LLM agents write that hardware. Unlike prior agentic hardware generators, the agents' designs would be checked against whether the final hub list survives, not whether every intermediate number matches the floating-point software.

The core bet is that hub rankings are far more tolerant of low numerical precision than the numbers that produce them. How tolerant is predictable from the data. A co-expression edge can only flip if the true correlation lies within the rounding error of the threshold. A cheap, precision-aware check on the final decision should therefore let agents shrink hardware well beyond what bit-exact verification allows. If this holds, the result also helps people who never touch an FPGA. It tells anyone running these pipelines on GPUs or laptops how much precision they can safely discard.

Core Claim

Streaming hardware for vision already exploits decision-level tolerance, without naming it. FPGA-based ORB Feature Extraction for Real-Time Visual SLAM truncated orientation moments from 21 to 8 bits, cutting logic by 65% and registers by 82%, and still did not degrade tracking stability. That is a statement about the downstream decision, not about numerical error. Meanwhile, the one system that uses agents to translate algorithms into FPGA code, A2H-MAS, checks each generated submodule against test vectors from the reference implementation, which is a numerical-equivalence standard. We claim that replacing numerical equivalence with a deterministic decision oracle yields substantially cheaper hardware at equal biological output. The oracle is a program that reruns the final top-k hub selection and scores its overlap with the reference. We also claim that the precision each stage needs can be predicted ahead of time from how many gene pairs lie close to the edge threshold.

To make this precise, let $r_{ij}$ be the spatially weighted correlation between genes $i$ and $j$ in full precision, $\theta$ the threshold above which an edge is drawn, and $\delta$ the worst-case error a reduced-precision design introduces into $r_{ij}$. An edge can change only if $|r_{ij}-\theta|<\delta$, so the expected number of flipped edges is

$$ F(\delta) \approx \binom{g}{2} \int_{\theta-\delta}^{\theta+\delta} p(r)\,dr , $$

where $g$ is the number of candidate genes and $p(r)$ is the empirical density of pairwise correlations. The decision we protect is the top-$k$ hub set $H_k$, scored by agreement $A = |H_k^{\text{design}} \cap H_k^{\text{ref}}|/k$. A design is accepted when $A \ge 1-\epsilon$ on held-out tissue. The margin density $p(r)$ near $\theta$ is measurable before any hardware exists. The testable prediction is that it forecasts the smallest safe bit width per dataset.

Where the Three Directions Fit

The directions play unequal roles. Hardware vision supplies the method. FPGA-based Linear Detection Algorithm of an Underground Inspection Robot and the ORB work both show that line buffers turn local neighborhood computations into a single pass with small on-chip memory. Line buffers are small on-chip memories that hold only the last few image rows. The neighborhood computations include filtering, gradients and sliding windows. A Stereo-seq or Slide-seq bin grid is a many-channel raster, so neighborhood-weighted co-expression is exactly this kind of workload.

Multi-agent task decomposition supplies the mechanism for producing that hardware. We reuse A2H-MAS's staged roles for modularization, conversion of whole-frame code into streaming form, and structural co-design. We also take seriously its lesson that verification must be handed to deterministic tools. GenoTEX found that repeated LLM self-critique degrades performance, because agents begin favoring local instructions over sound global judgment. This constrains our design: no LLM judges correctness anywhere in the loop.

Hub gene identification supplies the decision whose stability defines success. Lethality and centrality in protein networks gives the biological rationale for centrality. In yeast, connectivity correlates with essentiality at $r=0.75$, and highly connected proteins are about three times as likely to be essential. That dataset also gives us a ground-truth check that is independent of any reference ranking.

The closest agentic biology systems do none of this. GenoMAS and CellAgent automate regression, clustering and annotation in software sandboxes. PhenoGraph links spatial spots to a knowledge graph. None computes centrality on a network built from the data, and none targets hardware.

Research Program

We would first build a float64 reference pipeline. It takes a spatial dataset, selects a candidate gene set (the top few thousand spatially variable genes), and computes neighborhood-weighted correlations over a fixed radius on the grid. It then thresholds these into a graph and ranks genes by degree and by betweenness using Brandes' algorithm. We deliberately keep centrality on the host CPU. After thresholding, the graph has only thousands of nodes. Betweenness also relies on irregular shortest-path traversal, which fits streaming hardware poorly, and Towards Improving Brandes' Algorithm for Betweenness Centrality shows that graph structure already offers software speedups on such inputs. The hardware target is the raster pass over millions of bins, which dominates cost. It is the part that resembles vision.

Second, we would build the decision oracle and the margin predictor. The oracle is a deterministic harness that runs a candidate design, either in bit-accurate simulation or on the device, and reports $A$ on the top-$k$ hubs along with edge-flip counts. The margin predictor estimates $p(r)$ near $\theta$ from a small subsample of bins. It outputs a recommended $\delta$ and, from that, a bit width for the correlation accumulators.

Third, we would build the agentic translator. We adapt A2H-MAS's stages to this kernel: modularize into streaming submodules, convert frame-based code into line-buffered streaming code, then apply structural co-design and HLS translation. HLS, or high-level synthesis, compiles C++ into hardware. Every accept/reject decision comes from the oracle and from synthesis reports, never from an LLM critic. The agents' specific job is structural rewrites that a bit-width search cannot find. Examples include rank-transforming expression before correlation so that integers replace fractions. Another is accumulating sufficient statistics in narrow integers with a single wide final reduction. A third is replacing division by a lookup table, the kind of change behind A2H-MAS's LUT reduction from 36,500 to 173.

Baselines

The naive reference point is the float64 software pipeline on a desktop CPU, using standard sparse-matrix correlation and a standard graph library. It defines $H_k^{\text{ref}}$, and it sets the runtime and energy that any other design must beat.

The strongest practical competitor on throughput is a float32 or float16 GPU implementation of the same neighborhood correlation, written as chunked sparse-dense matrix products. It is the strongest because GPUs excel at exactly this kind of batched arithmetic, and the latency argument that favors FPGAs in robotics does not apply to offline tissue analysis. We run it on the same datasets and candidate gene sets, with equal engineering effort, meaning a tuned kernel rather than a naive loop. We report wall time, energy per dataset and hub agreement $A$. We do not expect to beat it on raw time. Beating it means lower energy per dataset and a smaller memory footprint at $A \ge 1-\epsilon$, for single-pass processing that never holds the full matrix in memory.

The strongest existing agentic method is A2H-MAS run as published, verifying each submodule against reference test vectors with a numerical tolerance. For this workload, no reported result was found on Lacuna. Its reported numbers are 292.23 MHz on 5G NR SSB detection and 337.61 MHz on WLAN synchronization, and they do not transfer to our task. We give it the same LLM backbones, the same number of agent iterations and the same synthesis budget. Beating it means at least 30% fewer LUTs plus DSP slices at equal or better $A$ and at equal clock frequency. A smaller gap would suggest that decision-level verification is not worth the change.

Two ablations isolate the key ingredients. The first is an automated per-signal bit-width search that uses the decision oracle but no agents and no structural rewrites. It separates the value of the oracle from the value of the agents. The second replaces the deterministic oracle with an LLM critic that inspects outputs and reports. It tests whether the determinism argument from GenoTEX and A2H-MAS actually matters here.

For external context, the best reported agentic genomics figure is GenoMAS's gene identification F1 of 60.48% on GenoTEX. It measures a different task (gene-trait association) and is not a direct competitor. Also for scale only, the ORB accelerator reports 67 FPS, 14.8 ms latency and 68 mJ per frame, against 400 mJ per frame on an Intel i5, as the sort of energy gap streaming hardware achieves on image rasters.

Why not just…?

Why not just run float16 on a GPU and skip the FPGA? This is a real threat, and we treat it as one. If float16 on a GPU preserves the hub set and meets energy needs, the hardware half of the proposal loses its motivation. The oracle and margin predictor would still stand, because they would tell GPU users when float16 or int8 is safe, and nothing in the file measures that for hub rankings. The GPU baseline and the energy-per-dataset measurements settle it directly. We will report the result either way rather than argue it away.

Why not just sweep bit widths with a script and the oracle, with no agents? This is also a real threat. The bit-width-search ablation exists to test it. The case for agents is that the largest savings in A2H-MAS came from structural co-design rather than parameter tuning, and some of our rewrites, such as rank transforms and lookup-table division, change the arithmetic rather than its width. If the script matches the agent designs within 10% on resources at equal $A$, we will conclude that the contribution is the oracle and the margin predictor, and that agents are unnecessary for this kernel.

Why not just use A2H-MAS unchanged? Numerical-tolerance verification has to pick a tolerance with no knowledge of which errors matter. It will either reject cheap designs that keep the hub list intact or accept designs that flip edges near the threshold. The ORB result shows that decision-level tolerance can be several times more permissive than numerical agreement. The head-to-head comparison in Baselines tests whether that holds for co-expression.

Why not just use degree centrality, which is an integer and therefore exact? Degree is exact only once the edges are fixed. Precision errors enter at edge construction, before any centrality is computed. The flip equation applies equally to degree and betweenness, and we report both. Betweenness adds a second sensitivity in its fractional path counts, which we test separately in software emulation.

Proposed Experiments

The first experiment is a precision study on the yeast network from Jeong et al. (1,870 proteins, 2,240 interactions). It uses fixed-point emulation of Brandes' path counts and dependency fractions and asks at what bit width the top-k betweenness set and its enrichment for essential genes begin to drift. Essentiality gives ground truth that does not depend on our own reference. It also isolates centrality precision from edge-construction precision.

The second experiment is the main one. We run the reference pipeline on the 74 real datasets of the spatially variable gene benchmark in Benchmarking algorithms for spatially variable gene identification, which span Visium, Slide-seq, Stereo-seq and STARmap. For each dataset, we measure the margin density near $\theta$, sweep precision in emulation, and test whether $F(\delta)$ predicts the observed edge flips and the smallest bit width that keeps $A \ge 0.95$ for $k \in \{20, 50, 100\}$. Its 30 synthetic datasets, with controlled dropout, test how sparsity shifts the margin density. Sparsity is the central worry about applying line buffers to molecular data.

The third experiment runs the agentic translator and all baselines on the neighborhood-correlation kernel. It targets a Xilinx XC7Z020-class device, the same part family used in the LSD robot work, so resource percentages are comparable. We measure LUTs, flip-flops, BRAM, DSP slices, clock frequency, bins per second and energy per dataset.

The fourth experiment tests generalization, which decides whether the method can be used in practice. Designs are tuned on one platform and tissue type, then evaluated on the others without retuning. The accepted precision must hold on held-out tissue, and a margin-predictor warning should precede any failure.

The decisive checks are three. First, the margin predictor's recommended bit width must be within two bits of the empirically required one on at least 80% of held-out datasets. Second, oracle-verified designs must use substantially fewer resources than tolerance-verified A2H-MAS at equal $A$. Third, the bit-width-search ablation will show whether agent rewrites add anything beyond the oracle. If the first check fails, the analytic claim is wrong. If the second fails, decision-level verification brings no benefit. If the third shows no gap, the paper becomes a precision study and not an agent paper, and we will write it that way.