Skip to content

Repository files navigation

SpatialBench

Can AI agents extract biological insight from real-world spatial data?

SpatialBench is a benchmark of 159 verifiable problems derived from practical spatial transcriptomics workflows. Each problem snapshots an analysis state immediately before a target step and pairs it with a deterministic grader that evaluates recovery of a key biological result.

This revised version of the benchmark includes 159 problems across 5 platforms and 7 task categories. We share results for the full benchmark and publicly release a representative sample covering all platform types and task categories along with the associated agent trajectories. We withhold releasing the full benchmark set publicly to avoid contamination.

Key Findings

model_nameharnessAccuracy (%)Cost ($)
gpt-5.5mini-swe-agent57.651.1207
gpt-5.4mini-swe-agent57.440.577
gemini-3.5-flashpi55.561.4254
claude-opus-4-8claude-code55.350.8776
gpt-5.5openai-codex53.673.1616
claude-opus-4-6mini-swe-agent52.830.8456
claude-opus-4-8mini-swe-agent52.621.1061
claude-opus-4-7mini-swe-agent52.410.9817
gemini-3.1-pro-previewmini-swe-agent51.570.9362
claude-opus-4-7claude-code51.360.8023
gpt-5.2mini-swe-agent50.10.6024
gemini-3.5-flashmini-swe-agent48.852.7608
grok-4.20-beta-0309-reasoningmini-swe-agent45.910.1679
claude-sonnet-4-6mini-swe-agent44.230.273
claude-opus-4-5mini-swe-agent42.770.4624
claude-sonnet-4-5mini-swe-agent41.510.2247
gpt-5.1mini-swe-agent39.830.1574
grok-4-1-fast-reasoningmini-swe-agent33.960.0164
grok-4mini-swe-agent31.870.4529
gemini-2.5-promini-swe-agent28.930.1086

Full results with 95% confidence intervals are in results/. Details on implementation methodology can be found in Methods

Benchmark Structure

159 evaluations across:

  • 5 platforms: Curio,Vizgen,Xenium,AtlasXOmics,Visium
  • 7 task categories: Dimensionality Reduction,Cell Typing,Normalization,Differential Expression,Clustering,QC,Spatial Analysis

Tasks require empirical interaction with the data—agents that rely on prior knowledge without performing the requisite analysis fail to complete many tasks correctly.

Quick Start

pip install -e .# Validate evaluation format
spatialbench validate evals/xenium/xenium_kidney_spatial_cn7_composition_day14.json
# Run with mini-swe-agentexport ANTHROPIC_API_KEY=your_key
spatialbench run evals/xenium/xenium_kidney_spatial_cn7_composition_day14.json --agent minisweagent --model anthropic/claude-opus-4-5
export OPENAI_API_KEY=your_key
spatialbench run evals/xenium/xenium_kidney_spatial_cn7_composition_day14.json --agent minisweagent --model openai/gpt-5.5

Graders

Five grader families handle different answer types:

GraderUse Case
NumericToleranceQC metrics, counts, expression values
MultipleChoiceDiscrete interpretation questions
MarkerGenePrecisionRecallGene lists (P@K, R@K)
LabelSetJaccardCell type sets
DistributionComparisonCell type proportions

See latch-eval-tools for implementations and harness setups.

Citation

@article{spatialbench2025,
title = {SpatialBench: Can Agents Analyze Real-World Spatial Biology Data?},
author = {Workman, Kenny and Yang, Zhen and Muralidharan, Harihara and Le, Hannah},
year = {2025},
url = {https://github.com/latchbio/spatialbench}
}

License

Apache 2.0

About

Benchmark for agentic spatial data analysis

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages