Biologists increasingly ask questions whose answers are spread across tissue samples that were never measured together. One tissue section shows that immune aggregates touch the tumor boundary. Another, from a different donor or lab, shows that the boundary sits inside the stroma. A paper reports that a third cell niche never touches the tumor. Composing these into a conclusion ("can this niche be adjacent to the immune aggregates?") is a spatial logic problem, not a geometry problem, because the pieces share no common coordinate system. Current language-model agents for spatial biology hand this step to the model's own reasoning, and that reasoning is known to be poor. On composition tables for the Region Connection Calculus, frontier language models score only slightly above chance and routinely choose relations that are logically impossible (Can Large Language Models Reason about the Region Connection Calculus?). The Region Connection Calculus (RCC-8) is a standard vocabulary of eight topological relations between regions, such as disconnected, touching, overlapping, and inside.
We propose that agents working over fragmented spatial data should not reason spatially in free text. Instead, each fragment should be translated into explicit qualitative assertions (for example, "region A touches region B, per section 7"). A deterministic reasoner then composes these assertions under the RCC-8 composition rules and an anatomical vocabulary. It returns implied relations and flags contradictions, and the contradictions are sent back to the agents that produced them for re-inspection. Put simply, the language model reads and writes the spatial facts, and a symbolic engine does the logical bookkeeping. The claim is testable because we can build questions whose answers require combining facts that never co-occur in one sample.
Core Claim
The central observation is that fragmentation removes the one thing a geometry library needs. When all regions sit in one coordinate frame, spatial relations are cheap to compute with ordinary code, and no calculus is needed. When they sit in different sections, donors, or papers, only qualitative relations survive, and combining them is exactly what a qualitative spatial calculus was designed for. We therefore claim the following. On questions whose answers require composing spatial relations observed in different fragments, an agent that keeps a two-part knowledge base will produce fewer impossible answers and more precise answers than the same language model reasoning in text, including when that model has per-fragment geometry tools. The two parts, following the classical split of Competence in Knowledge Representation, are a fixed terminology (the "T-Box": RCC-8 composition rules plus a region taxonomy) and a set of per-fragment observations with provenance (the "A-Box"). The advantage should grow with the number of fragments a question spans and should persist when region names are anonymized.
The reasoner's core operation is standard path consistency. For regions $i, j, k$, where $R_{ik}$ is the set of base relations still considered possible between $i$ and $k$, it repeatedly applies
$$R_{ik} \leftarrow R_{ik} \cap (R_{ij} \circ R_{jk}),$$
where $\circ$ is the RCC-8 composition table lookup. An empty $R_{ik}$ signals a contradiction among the input assertions. Uncertain extraction is expressed honestly as a disjunction: a boundary that is ambiguous between touching and overlapping becomes {EC, PO}. The reasoner can then narrow that disjunction using other fragments, which a language model cannot do reliably.
Relation to Prior Work
Three spatial-biology agents motivate the proposal by leaving this step unstructured. PhenoGraph links bulk cancer cohorts to spatial transcriptomics through a data-retrieval agent, a machine-learning agent, and a knowledge-graph agent. Its spatial handling, however, is a neighborhood graph inside one section, and its knowledge graph only explains genes after the analysis is done. SpatialAgent plans analyses over more than two million cells with 19 tools, but reports a "complexity ceiling" on multi-step spatial reasoning. Its spatial coordinate evaluation is within-slice. CellAgent splits work into a planner, an executor, and an evaluator, but treats spatial data as tables and 2D plots. We reuse their decomposition style and their datasets. Where they pass free text between agents, we pass typed spatial assertions.
The evidence that the language model should not do the composition itself comes from several sources. The RCC-8 probe cited above supplies the diagnosis and the evaluation protocol, including anonymized relation names that expose pattern-matching. Beyond Lines and Circles shows that separating geometric planning from tool execution reduces spatial hallucination. We extend that idea from numeric tools to a logical reasoner. Broader findings that scale does not fix spatial perspective-taking (Vision Language Models See What You Want but not What You See) and that models are spatially blind (What's "up" with vision-language models?) argue against waiting for a better backbone. These papers are about images, though, so they motivate the proposal rather than constrain it.
The method comes from classical hybrid representation. Separating fast taxonomic structure from logical assertions (Knowledge Representation Languages and Predicate Calculus) gives us the T-Box/A-Box split. Default inheritance with exceptions (Default Inheritance Reasoning in Hybrid KL-ONE-Style Logics) lets the taxonomy state typical relations, such as "cortical layer 1 touches layer 2," that a specific donor's section may override without triggering a contradiction. None of these classical systems ingested noisy measured data. The new part is making the extraction agents produce assertions that are disjunctive and carry provenance.
Research Program
The system has three roles.
Extraction agents, one per fragment, each see only their own section, table, or text passage. Context isolation per source is the natural reason to use several agents here. Each extraction agent writes RCC-8 assertions between named regions. For spot-level spatial transcriptomics with domain labels, the agent runs a tool that builds region polygons and computes relations with a tolerance band. It emits a disjunction whenever the relation falls inside that band. For text fragments, the agent writes relations directly, with the option to be uncertain.
A symbolic reasoner, which is not a language model, maintains the A-Box. It runs path consistency together with the T-Box taxonomy and defaults, answers queries, and returns minimal conflicting assertion sets when a contradiction arises.
A coordinator agent handles contradictions. It sends each conflict back to the responsible extraction agents to re-check with the geometry tool or re-read the text. This closes the loop that PhenoGraph leaves open. It then answers the user's question from the reasoner's output.
We will also build the benchmark, because none exists for cross-fragment spatial composition in tissue. It has three tiers.
The first tier is synthetic. We generate random consistent RCC-8 networks and render each as scattered natural-language "reports." This measures reasoning in isolation and links directly to the published composition numbers.
The second tier is a controlled fragmentation of real annotated tissue. It uses the 12 dorsolateral prefrontal cortex Visium sections and the 52 mouse colitis sections used by SpatialAgent, plus the breast and pancreatic cancer spatial datasets used by PhenoGraph. We compute ground-truth region relations from the full annotations with the same polygon procedure. Each fragment then reveals only a random subset of region labels from one section, and we ask about pairs that never appear together in any fragment. Ground truth is taken from sections where both regions do appear. When sections disagree, the truth is the union of the observed relations.
The third tier adds corruption. We inject label swaps or false relations into some fragments and test whether the system detects them.
Baselines
The naive reference answers every query with the most frequent relation in the training distribution, and separately reports the uniform-disjunction score. This fixes what "slightly above chance" means on our data.
The strongest existing reasoning baseline is a single frontier language model given all fragments in its context and asked for the relation set with step-by-step reasoning. This is the setting in which Can Large Language Models Reason about the Region Connection Calculus? reports a mean Jaccard index of 0.69 for Claude-3.5-Sonnet and 0.33 for GPT-3.5-Turbo on composition table reconstruction. On human-preference alignment it reports 56.76% agreement for Claude-3.5-Sonnet, alongside six impossible relations. It is the strongest competitor because it is the simplest thing a practitioner would try, and it carries the same world knowledge as our system.
The strongest existing agent baseline is a SpatialAgent- or CellAgent-style pipeline built with the same backbone. It has a planner and executors and the same per-fragment geometry tool, but agents exchange free text and the coordinator composes relations itself. There is no reported result on Lacuna for cross-section spatial composition on these datasets for SpatialAgent, CellAgent, or PhenoGraph. We will run them ourselves.
For fairness, every system uses the same backbone model, the same fragments, the same geometry tool, the same prompt-tuning budget on a shared development split, and a matched cap on language-model calls and tokens. We will report calls alongside accuracy.
Two ablations isolate the proposal's ingredients. The first swaps the symbolic reasoner for the language model, keeping everything else fixed. The second removes the contradiction feedback loop. A third ablation removes T-Box defaults, and a fourth runs a single agent with the reasoner as a tool, which tests whether the multi-agent split matters at all. Beating the baselines means two things. The system must show a higher mean Jaccard with a confidence interval that excludes the best baseline on tier two. It must also show a near-zero impossible-relation rate. Both must hold under anonymized region names.
Why not just…?
Why not just use a stronger model with better prompting? The RCC-8 probe found that a newer model (GPT-4o) was sometimes worse than an older one (GPT-4-Turbo), and that performance dropped significantly under anonymized relation names. Both results point to pattern-matching rather than composition. Our synthetic tier sweeps the number of fragments a question spans. If the best monolithic model's accuracy does not fall as the chain length grows while the reasoner's stays flat, this alternative wins, and we will report it that way.
Why not just register all sections into one coordinate frame and compute geometry directly? This is the real threat. For serial sections from one tissue block, registration is likely better, and we will include a registration baseline on the within-donor subset of tier two and expect it to be strong there. Registration is unavailable across donors, across labs with different assays, and for relations that exist only in publications, which is the fragmentation the proposal targets. We will therefore report results separately for within-donor, cross-donor, and text-derived fragments. The claim stands only if the reasoner wins on the latter two.
Why not just query a biomedical knowledge graph or adopt a common data model? A graph such as PrimeKG stores fixed triples. As used in PhenoGraph, it annotates genes with pathways but has no composition semantics. A common data model such as SEA CDM standardizes formats but does not infer relations or detect contradictions. The graph-retrieval variant of our agent baseline tests this directly. The corruption tier measures what a lookup-only design cannot do.
Why not just one agent with the reasoner as a tool? It may work equally well, and the proposal's main claim concerns the representation rather than the number of agents. The single-agent ablation decides this. If it matches the multi-agent version at equal cost, we drop the multi-agent split and report the simpler design.
Decisive Checks
The first check is the reasoner-swap ablation on tier two with anonymized region names. If the symbolic reasoner does not beat language-model composition on Jaccard and on the impossible-relation rate at matched cost, the core claim is false.
The second check is the cross-donor versus within-donor split against registration. It shows whether qualitative bookkeeping helps where geometry is unavailable, or only restates what registration already provides.
The third check is corruption detection F1 with and without the feedback loop. It tests whether contradictions found by the reasoner actually lead to corrected assertions rather than just flagged ones.
As a secondary, biological sanity check, we will test whether relations inferred for region pairs never observed together in the colitis series match the relations observed in held-out sections at later disease stages.
References
- Can Large Language Models Reason about the Region Connection Calculus?
- Competence in Knowledge Representation
- PhenoGraph: A Multi-Agent Framework for Phenotype-driven Discovery in Spatial Transcriptomics Data Augmented with Knowledge Graphs
- SpatialAgent: An autonomous AI agent for spatial biology
- CellAgent: LLM-Driven Multi-Agent Framework for Natural Language-Based Single-Cell Analysis
- Beyond Lines and Circles: Unveiling the Geometric Reasoning Gap in Large Language Models
- Vision Language Models See What You Want but not What You See
- What's "up" with vision-language models? Investigating their struggle with spatial reasoning
- Knowledge Representation Languages and Predicate Calculus: How to Have Your Cake and Eat It Too
- Default Inheritance Reasoning in Hybrid KL-ONE-Style Logics
- SEA CDM: Study-Experiment-Assay Common Data Model and Databases for Cross-Domain Data Integration and Analysis