Systems & Infrastructure · Systems Tradeoff Matrix

Spatial Causal Graphs: Four Architectures, One Deployment Choice

Triangulated Bayesian models can represent local regulatory changes, but their inference and maintenance costs need a credible baseline.

Key Thesis

A pooled graph is the cheapest baseline, but it assumes regulatory structure is shared across tissue. Spatially varying Bayesian graphs can represent local changes, at the price of harder inference and validation. Start with a pooled model and spatially blocked evaluation. Adopt a spatial model only if it improves held-out regional predictions and survives sensitivity checks.

The engineering question is not whether tissue varies. It is whether the added structure in a spatial causal model earns its cost on the data a team actually has.

The supplied arXiv abstract describes SpaDAG, a Bayesian method for learning spatially varying causal directed acyclic graphs, with graphs defined on a tissue triangulation [E3]. I have not verified the full paper or its benchmarks, so the comparison below treats that abstract as a research signal, not evidence of production readiness. The method’s central promise is meaningful: regulatory relationships may differ across tissue regions, including in direction.

That promise creates a systems tradeoff. A model that can represent local variation may fit biological structure better, but it also has more parameters, more demanding validation, and more ways to mistake spatial correlation for causal evidence.

Four architectures, four assumptions

A pooled DAG estimates one regulatory graph for the full sample. It is a useful baseline, not a neutral truth: if relationships vary by region, pooling can average them into a misleading edge or obscure a reversal.

Independent regional DAGs take the opposite approach. Each region gets its own graph, which avoids forcing the same structure everywhere but can become statistically fragile when regions have few spots or weak coverage. The spatial Bayesian approach in the supplied abstract instead places variation on a triangulation, potentially sharing information across neighboring locations [E3]. A fourth option, a hierarchical model, learns a global structure plus regional deviations. That is an architectural alternative, not a claim about SpaDAG.

Metric / ApproachPooled DAGIndependent regional DAGsTriangulated spatial Bayesian DAGHierarchical global plus local
Tail-latency riskLowMedium to high, many fitsHigh, joint inference may dominateMedium to high
Operational complexityLowMediumHighHigh
Team skill floorApplied statistics, data engineeringSame, plus region designBayesian inference, spatial statistics, model diagnosticsBayesian modeling, regularization
24-month maintenance estimate$60k to $100k$80k to $140k$120k to $200k$100k to $180k
Main failure modeMasks local structureNoisy or unstable local graphsSpatial signal mistaken for causal evidencePrior shrinks real local changes

These cost ranges are planning estimates, not vendor quotes or measured results. They assume a loaded engineer cost of $200,000 per year and 0.15 to 0.50 engineer-years of ongoing maintenance per architecture over two years. They exclude research time, cloud compute, and initial implementation.

24-month maintenance cost
  = annual loaded engineer cost × 2 × maintenance FTE fraction

Spatial Bayesian example:
  $200,000 × 2 × 0.30 = $120,000

Latency is mostly an inference question

For a batch analysis pipeline, tail latency means the slow end of job completion time, not an API response time. Independent regional fits can run in parallel, but one difficult region may still hold up a complete report. A joint spatial model may have less opportunity for independent scheduling. Those are workload risks, not published SpaDAG timings.

Do not attach a millisecond SLO to an unbenchmarked research model. Instead, measure p50 and p95 end-to-end runtime on a fixed dataset, including preprocessing, graph inference, posterior checks, and report generation. Record peak memory and failed or non-converged chains too. A fast answer that cannot pass diagnostics is not a useful result.

The key scaling variables are not spot count alone. Gene count, candidate-edge sparsity, graph constraints, number of posterior samples, and convergence behavior can all change the work. A team should benchmark its own representative tissue sections before committing to a compute budget [E4]. This expectation would be falsified if repeated runs across representative datasets showed stable p95 latency independent of those variables.

Causal structure needs a harder test

Spatial measurements carry location, but location does not establish causal direction. Nearby spots can share cell composition, technical artifacts, or a latent microenvironment, making two genes appear linked even when the inferred edge is not a direct regulatory effect [E4]. The causal interpretation also depends on assumptions about confounding, model specification, and which variables were measured.

This is where spatially blocked evaluation matters. Hold out contiguous regions rather than randomly splitting spots, then test whether the fitted model predicts held-out expression or other prespecified targets better than a pooled baseline. Random spot splits can leak neighborhood information across train and test sets, overstating generalization [E4].

A predictive win is not proof of a causal edge. Require sensitivity analysis for neighborhood size, candidate regulators, and prior strength, and report edge uncertainty rather than only a single winning graph. The supplied abstract makes the case that regulatory relationships can vary across tissue, but the available description does not establish that the proposed method identifies therapeutic targets reliably [E3].

A deployment rule for research teams

Start with the pooled DAG as a benchmark and preserve spatial coordinates throughout preprocessing. Next, compare a simple region-stratified model with the spatial Bayesian candidate. This separates the value of spatial structure from the value of a more elaborate inference method. Keep feature selection, normalization, and held-out regions consistent across runs.

Choose the spatial model only if its gains persist across tissue sections and relevant sensitivity checks, with uncertainty narrow enough to support the intended analysis. If it wins only on random spot splits, or its inferred edges change sharply under modest prior changes, keep it in research evaluation rather than a production decision path. That rule is a working engineering recommendation [E4], not a finding reported by the supplied abstract.

The concrete falsifier for this article’s central recommendation is straightforward: a replicated comparison across multiple tissue sections finds that the spatial Bayesian model improves spatially blocked prediction and edge stability over pooled and regional baselines, without materially worsening p95 runtime or maintenance burden. Until that result exists, the rational choice is a baseline-first system with the spatial model behind a reproducible evaluation boundary.

References

Discussion (2)

Ben Callahan OSS Maintainer & Compiler Engineer · Portland, OR

How does the triangulated Bayesian approach’s prior specification handle sudden spatial discontinuities, like a tissue boundary, without imposing excessive smoothness? The abstract mentions a triangulation but not edge cases where adjacency might mislead.

Samir Al-Mansoor LLVM & Runtime Engineer · Raleigh, NC

The triangulation's prior smoothness assumption is indeed problematic at boundaries. You'd need to model discontinuities explicitly, likely via a spatial process with non-stationary kernels or by segmenting the graph domain first. The abstract's method, as described, would likely over-smooth across a sharp interface, conflating adjacent but biologically distinct regions.