Verifying LLM Claims About Tissue Against the Tissue Itself, at Atlas Scale

When a language model is asked how cells in a tumor talk to each other, it usually answers from knowledge built on dissociated data. That means expression profiles from cells that were enzymatically separated before sequencing, which loses where each cell sat. The answers sound right: "fibroblasts signal to CD8 T cells through CXCL12–CXCR4 in the tumor core." Yet the claim's spatial part, whether those two cell types are actually close enough to signal in intact tissue, was never checked, because dissociation destroyed that information. Spatial transcriptomics atlases, which measure gene expression at known cell positions across millions of cells, can settle such claims directly. They are rarely used for this because each check is a geometric pattern search over a huge graph, and an agent produces many such claims per question.

This note proposes a claim verifier for LLM agents that turns each spatial assertion into a query over a cell-proximity graph and answers it exactly. A cache makes this affordable. Spatial queries form a natural order: a larger search radius, a looser expression threshold, or a smaller cell pattern always admits more matches. A cached answer to one query can therefore exactly answer, or sharply narrow, a related query. The approach adapts the containment logic of graph query caches to continuous distances and expression thresholds. It keeps exactness, which embedding-based reuse gives up, so the agent's spatial claims can be checked against the atlas within an interactive latency budget.

Core Claim

The claim has two parts, and the first matters more. First, a class of LLM errors in spatial biology can be detected exactly by querying spatial atlases, and an agent that verifies against them makes fewer such errors than one that relies on dissociated databases and internal consistency checks. We call these "dissociation hallucinations": claims of cell–cell interaction that are plausible from co-expression but false in tissue architecture. Second, for claims that involve multi-cell motifs and gene-expression conditions, exact verification only becomes practical at atlas scale if queries are cached along a three-way order of pattern, radius, and threshold. This cache returns the same answers as uncached search, which separates it from approximate reuse.

The ordering is simple. Write a spatial query as $q = (P, r, \theta)$, where $P$ is a small pattern of cell types (nodes) and required adjacencies (edges), $r$ is the maximum physical distance allowed for each adjacency, and $\theta$ is a vector of minimum expression levels for named genes on pattern nodes. Let $M(q)$ be its set of matches in the atlas. Then

$$P_1 \subseteq P_2,\; r_2 \le r_1,\; \theta_2 \ge \theta_1 \;\Longrightarrow\; \pi_{P_1}\big(M(P_2, r_2, \theta_2)\big) \subseteq M(P_1, r_1, \theta_1),$$

where $\pi_{P_1}$ restricts a match of the larger pattern to the nodes of the smaller one. This yields three kinds of cache use. A cached nonempty result under a stricter query proves existence for a looser one. A cached empty result under a looser query proves absence for a stricter one. A cached match set under a looser query serves as a complete candidate pool for a stricter one. For count queries, moving from radius $r_2$ to $r_1$ only requires examining cell pairs in the annulus $r_2 < d \le r_1$, not the whole slide. Counts also add up across tissue sections. Adding a new slide to the atlas therefore invalidates nothing; it only requires computing the new slide's share. This avoids the dynamic-graph invalidation problem that static structural caches leave open.

Relation to Prior Work

Three caching lines supply the method, and each falls short in a specific way. GraphCache and its companion GC exploit subgraph and supergraph containment between queries to skip isomorphism tests on collections of small discrete graphs. They also add admission control and a replacement policy weighted by time saved, which we reuse. Their containment is purely topological, so on spatial graphs, where no two niches are identical, it would almost never hit. We add radius and threshold as ordered dimensions. SUFF keeps Bloom and Cuckoo filters built from past verifications. Its false-positive rates are what we avoid by storing exact match sets or counts for the cached queries we admit. SubGCache is the closest bridge to LLMs. It groups Graph-RAG queries by GNN embedding similarity, merges each group into a representative subgraph, and reuses that subgraph's attention key-value states to cut prefill time. Its reuse is approximate by design, and it does not consider whether merged context injects wrong facts. Our cache sits in the verifier, not the prompt, and only reuses answers whose correctness follows from the ordering.

On the spatial side, the motivation comes from evidence that location carries information dissociated profiles lack. STELLAR reports an 11% annotation gain from cell-proximity graphs over expression alone on Barrett's esophagus CODEX data. AIDO.Tissue finds that widening the spatial neighborhood helps more than scaling parameters. QueST shows that niches with the same cell composition but different arrangement separate tertiary lymphoid structure subtypes with different survival. QueST retrieves niches by cosine similarity of contrastive subgraph embeddings over fixed K-hop neighborhoods. That is the right tool for exploratory search. It cannot certify that a specific claimed adjacency exists, and this proposal targets that gap. COMMOT and CLARIFY infer communication from spatial data with optimal transport and multi-level autoencoders. They produce model-based estimates of communication, not checks of discrete claims, and neither is built for repeated querying across atlases.

On hallucination, Medea is the strongest existing omics agent. It uses context-integrity checks, sandboxed tools, literature evidence grading, and multi-model consensus with abstention. It reports gains of up to 46% on cell-type target identification but works from dissociated atlases such as CELLxGENE, without spatial coordinates. KGHaluBench constrains the design. Its finding that relational "depth" errors fall only about 24% with model scale, while entity-recognition errors fall sharply, suggests that relational spatial claims will not go away with bigger models and must be checked externally. TRAC offers conformal coverage guarantees for retrieval-augmented answers. Our verifier gives a different kind of guarantee: exactness relative to the atlas, not statistical coverage. CNY shows that LLMs reason better when they query graph structure actively than when neighborhoods are stuffed into the prompt. Our agent likewise issues queries, but to a verifier rather than through step-by-step walks.

Research Program

The system has three parts. The first is a claim compiler: an LLM prompted with a fixed grammar that rewrites each spatial assertion in an agent's draft answer into one or more $(P, r, \theta)$ queries, with a tissue or region scope. Claims that cannot be expressed in the grammar are flagged as "unverifiable here" rather than passed silently. The second is an exact spatial matcher. It runs per tissue section over a radius-graph built with a k-d tree, extends matches pattern node by pattern node, and prunes on cell type and expression thresholds. The third is the ordered cache. It holds a Hasse-style index over cached queries that share a pattern skeleton, so the cache can find the tightest cached query that dominates or is dominated by a new one. It stores per-section match sets or counts, uses admission control in the style of GraphCache (admit when matching cost greatly exceeds lookup cost), and evicts by time saved. Pattern containment between small motifs (at most five or six cells) is checked exactly; at that size the NP-hardness of subgraph isomorphism costs little.

The agent loop drafts an answer, compiles its claims, and verifies them. It then revises any claim the atlas contradicts and attaches the supporting counts, or abstains when the scope has no spatial data. Two biological complications are part of the program rather than footnotes. Segmentation errors can merge neighboring cells and create false adjacencies, which STELLAR notes for imaging platforms. We therefore report verification results under perturbed segmentations and require a minimum count, not a single match, before "exists" is returned. The second complication is that "within $r$" is a proxy for signaling range. The radius per ligand class (contact-dependent versus short-range secreted) is set from the compiler's grammar, and we test how sensitive conclusions are to it.

Baselines

The naive reference point is an agent with no spatial verification: the same LLM given dissociated single-cell resources and literature retrieval, in the style of Medea's pipeline. Medea is the strongest existing system for omics questions, reporting improvements of up to 46% in target identification, up to 22% in synthetic lethality, and up to 24% in immunotherapy response (Medea). There is no reported result on Lacuna for the spatial-claim hallucination rate of any agent, including Medea. We will run its consensus-and-abstention design on our benchmark with the same base LLM and the same token budget. Beating it means a lower rate of spatially false claims at equal or lower abstention.

For the cache, the correctness and latency reference is uncached exact verification: the same matcher with the same k-d tree index and no reuse. Its answers define ground truth. The cache must match them exactly, and any disagreement counts as a bug, not a trade-off. The strongest existing caching method is GraphCache-style topological containment, which reports speedups from 1.6× to over 42× depending on dataset (GraphCache). SUFF's historical filters report up to 15× (SUFF). Both were measured on discrete query collections, not spatial claims. We reimplement topological containment on our matcher with the same memory budget; this also serves as the ablation that removes the radius and threshold dimensions. A second ablation keeps radius ordering but drops threshold ordering, to measure each dimension's share of the hit rate.

Two further competitors test whether exactness matters. The first is approximate reuse in the style of SubGCache: cluster claims by GNN embedding of their patterns and return the cluster representative's answer. SubGCache reports up to 6.68× lower time-to-first-token on Scene Graph (SubGCache), but in a different setting, prompt prefill. We measure both its speedup and its verdict error rate. The second is QueST-style embedding retrieval of niches, with the LLM judging whether retrieved niches support the claim. We train it on the same sections and tune it with the same budget as our compiler's prompts. Beating the approximate competitors means comparable or better latency with zero verdict errors against exhaustive ground truth.

Why not just…?

Why not just precompute a cell-type co-occurrence table at several radii? For pairwise claims of the form "type A lies within $r$ of type B," this is the right answer. It is cheap and exact, and our cache would add nothing. We include it as a baseline and expect it to tie on pairwise claims. The cache's case depends on claims with expression conditions ("A cells expressing CXCL12 above $\theta$ near B cells expressing CXCR4") and on three-or-more-cell motifs. A table over all gene pairs, thresholds, and radii would be prohibitively large. The experiment reports what fraction of compiled claims fall outside pairwise form. If that fraction is small in realistic agent output, we will say the cache is unnecessary and the contribution reduces to the verifier.

Why not just run the exact query each time with a good spatial index? This is the real threat to the second half of the claim. Radius queries on a k-d tree are fast, and per-claim latency may already be acceptable. The decisive measurement is end-to-end agent latency with uncached verification on the 2.6-million-cell HuBMAP CODEX atlas that STELLAR annotated, under realistic claim streams. If uncached verification adds negligible time per answer, the cache is an engineering detail. We expect it to matter for motif claims across many sections and for the repeated, slightly varied claims that self-revision loops produce, but the experiment decides.

Why not just have the LLM abstain more, or reflect harder? Prompting has a measured ceiling. Reflection-of-Thoughts prompting reached only 62.9% guideline consistency with GPT-4 (Prompt engineering in consistency and reliability). KGHaluBench also warns that strict hallucination penalties push models into over-abstention. More fundamentally, no amount of reflection recovers information that dissociation removed. Cross-examination methods (Agrawal et al.) catch inconsistency, but a model can be consistently wrong about tissue layout. The no-verification baseline with Medea-style abstention measures this directly.

Proposed Experiments

No existing benchmark scores spatial claims, so we build one with exact labels. We use STELLAR's HuBMAP CODEX sections and Barrett's esophagus and tonsil data, AIDO.Tissue's CosMx liver and Xenium lung data, and CLARIFY's MERFISH hypothalamus and seqFISH cortex. From these we sample claims from the query grammar and label each by exhaustive matching. We then collect a natural set: questions about cell communication in these tissues, answered by agents with only dissociated resources, with every spatial assertion compiled and labeled the same way. A sample is checked by two annotators to measure compiler fidelity. The primary hallucination metric is the fraction of compiled spatial claims the atlas contradicts in the final answer, reported together with abstention rate and the fraction of claims the compiler could not express. Systems are not allowed to look good by refusing to answer.

The cache experiments replay claim streams from agent sessions, including self-revision loops, and report hit rate, per-claim and per-answer latency, memory, and verdict agreement with uncached search. Agreement must be 100%; anything less is a defect. The dynamic setting adds sections one at a time and measures how much work goes to recomputation versus reuse of additive per-section counts. Two robustness checks complete the study: verdict stability under perturbed segmentation (merged and split cells) and under different radii per ligand class.

The decisive checks are three. First, the verified agent must produce clearly fewer atlas-contradicted claims than the Medea-style baseline at matched abstention. If it does not, spatial grounding is not the bottleneck we think it is. Second, the ordered cache must beat topological-only containment in hit rate on expression-conditioned motif claims while staying exact. If the gain comes entirely from pairwise claims, the co-occurrence table wins. Third, uncached verification latency must be a material share of agent time at atlas scale. Otherwise the cache is unnecessary and the note's lasting result is the verifier and its benchmark.