betaFeedback

WorksAgricultural and Biological Sciences

Spatially Informed and Direction Sensitive Representation Learning for Spatial Transcriptomics

Abstract

Cellular states are shaped by both intrinsic gene expression programs and the spatial microenvironment in which cells reside. Spatial transcriptomics makes this context measurable, but effective representation learning requires capturing both spatially informative molecular signals and intercellular organization. Existing approaches address these challenges only partially: conventional gene selection can overlook spatially structured signals, while methods for encoding cell-cell relationships often either reduce a cell's microenvironment to proximity alone, discarding direction, or rely on absolute coordinates tied to an arbitrary tissue frame. Consequently, cells with similar neighbor distances but distinct spatial organization may receive overly similar representations, despite experiencing different biological contexts that shape their cellular states. We introduce Tessera, a spatial representation learning framework that addresses both molecular selection and cellular context. Tessera combines spatially informed gene selection with a geometric inductive bias that contextualizes each cell within its local tissue environment. By modeling relative cell-cell relationships, Tessera is translation-invariant while preserving direction, allowing neighboring cells to contribute differently according to their spatial context and cellular state. Across held-out tissues and technologies, Tessera outperforms existing spatial foundation models in representation quality and generalizes zero-shot to contexts up to 16×16\times larger than those seen during training.

Introduction

Spatial transcriptomics (ST) measures gene expression while preserving the physical organization of cells within tissue, enabling cellular states to be studied in their native spatial context [29, 30]. Because cellular phenotypes are shaped by neighboring cells, local signaling, and tissue organization, spatial context is an integral component of cellular state. This is particularly relevant to drug discovery, where therapeutic targets, mechanisms of action, and treatment response can depend on the tissue context in which molecular programs arise [20, 5]. Learning transferable representations that jointly capture cellular state and spatial context could therefore support context-aware target discovery, biomarker identification, and patient stratification across tissues and disease settings [2].

Recent foundation models have demonstrated the value of large-scale representation learning for single-cell transcriptomics [7, 10], motivating their extension to spatial omics [28, 34, 4]. Spatial data introduce two complementary challenges for representation learning: (i) selecting spatially informative genes to represent each cell, and (ii) leveraging intercellular spatial relationships to capture cellular states within their native tissue context. Existing gene-selection strategies capture only part of the information needed for the first challenge. Highly expressed genes can be dominated by broadly expressed housekeeping programs [24, 11], HVGs prioritize expression variability without explicitly accounting for spatial organization [25], and SVGs emphasize tissue-level spatial patterns without considering the cell-specific informativeness of each gene [27, 6, 15].

The second challenge is to encode the spatial context that shapes cellular state. A cell’s microenvironment is inherently relational: neighboring cells influence its state through their spatial organization relative to the cell of interest, rather than through absolute slide coordinates. Existing approaches represent this context using neighborhood or graph structure, pairwise distances, or absolute positional information [32, 34, 4]. Each captures only part of the underlying tissue geometry: neighborhood-based encodings discretize continuous spatial relationships, pairwise distance preserves proximity but discards direction, and absolute coordinates retain direction but depend on an arbitrary tissue frame. Yet tissue organization can be directionally structured [13, 4], so equally distant cells may provide distinct biological context. This motivates representing the full relative displacement between cells, preserving both distance and direction while remaining independent of absolute position.

To address these complementary gaps, we introduce Tessera, a spatial representation learning framework that jointly models spatially informative gene expression and the relative organization of surrounding cells. For each cell, Tessera constructs a spatially informed top gene set kk by combining cell specific expression signals with tissue level spatial expression patterns, and encodes the resulting cell profile with a pretrained scRNA-seq foundation model [7]. The resulting embeddings are then contextualized through displacement-relative spatial attention, instantiated with two-dimensional RoPE [26]. This imposes a geometric inductive bias that preserves both distance and direction, allowing the model to distinguish similarly distant cells that provide different biological contexts rather than treating them as equivalent based on proximity alone. The resulting spatial representation is biologically grounded and highly transferable, consistently improving expression imputation across held-out tissues and technologies and generalizing zero-shot to spatial contexts up to 16×16 \times larger than those seen during training.

Our main contributions are: (i) a spatially informed gene-ranking strategy that integrates cell-level and tissue-level measures of spatial gene informativeness; and (ii) direction-sensitive spatial attention that is translation-invariant while preserving relative distance, direction, and physical spatial scale.

Spatially informed gene ranking

To construct informative gene sets for each cell, we introduce spatially informed ranking (SIR), which combines cell-specific expression relevance with tissue-level spatial structure. TF–IDF assigns each gene a cell-specific score that favors genes enriched in that cell but less ubiquitous across the section, while Moran’s II measures tissue-level spatial autocorrelation. Because these statistics lie on different scales, we combine their ranks rather than their raw values to construct a spatially informed gene ranking for each cell [1]. The complete formulation and implementation details are provided in Appendix C.

Direction-Sensitive Attention for Spatial Transcriptomics

Let ci\mathbf{c}_i denote the representation of cell ii and pi∈R2\mathbf{p}_i \in\mathbb{R}^{2} its physical position in micrometres. We seek to contextualize each cell using the geometry of surrounding cells without tying the representation to the arbitrary coordinate origin of a tissue section. Existing approaches encode spatial context through absolute positions, pairwise distances, or neighborhood graphs [32, 34, 4], but these representations retain different aspects of the underlying geometry. We instead model the full relative displacement

Δij=pj−pi,\Delta_{ij} = \mathbf{p}_j - \mathbf{p}_i,

between cells ii and jj. This induces three desirable properties:

  1. Translation invariance: attention depends on relative displacement, and is therefore independent of the tissue-section origin.

  2. Direction sensitivity: both the distance and bearing of neighboring cells are retained, allowing equally distant cells to provide distinct spatial context.

  3. Physical-scale parameterization: spatial relationships are expressed in physical units, providing a consistent notion of distance across technologies.

We realize this geometric inductive bias using two-dimensional RoPE [26], adapting rotary positional encoding to continuous tissue coordinates. Spatial frequencies are parameterized in radians per micrometre, so the attention interaction depends on relative cell displacement while retaining both distance and direction.

RoPE. For each attention head of width dhd_h, we split the head into dh/2d_h/2 two-dimensional planes. Plane cc has a learnable frequency θc∈R2\boldsymbol{\theta}_c \in\mathbb{R}^{2}, defining the phase

ψc(p)=θcTp.(1)\psi_c(\mathbf{p}) = \boldsymbol{\theta}_c^{\mathsf{T}}\mathbf{p}. \tag*{(1)}

Stacking the corresponding planar rotations gives the block-diagonal matrix

R(p)=diag⁡cR2(ψc(p)),(2)\mathbf{R}(\mathbf{p}) = \operatorname{diag}_c \mathbf{R}_2(\psi_c(\mathbf{p})), \tag*{(2)}

where

R2(ψ)=(cos⁡ψ−sin⁡ψsin⁡ψcos⁡ψ).(3)\mathbf{R}_2(\psi) = \begin{pmatrix} \cos\psi& -\sin\psi\\ \sin\psi& \cos\psi \end{pmatrix}. \tag*{(3)}

The attention logit for head hh is

Aij(h)=⟨R(pi)WQ(h)ci,R(pj)WK(h)cj⟩dh+mij,mij={0,∥Δij∥≤dmax⁡,−∞,otherwise,(4)A_{ij}^{(h)} = \frac{ \left\langle \mathbf{R}(\mathbf{p}_i)\mathbf{W}_Q^{(h)}\mathbf{c}_i, \mathbf{R}(\mathbf{p}_j)\mathbf{W}_K^{(h)}\mathbf{c}_j \right\rangle }{\sqrt{d_h}} + m_{ij}, \qquad m_{ij} = \begin{cases} 0, & \lVert\Delta_{ij}\rVert\le d_{\max},\\ -\infty, & \text{otherwise}, \end{cases} \tag*{(4)}

where ci∈Rd\mathbf{c}_i \in\mathbb{R}^{d} is the cell token from the frozen encoder (Figure 1), WQ(h),WK(h)∈Rdh×d\mathbf{W}_Q^{(h)}, \mathbf{W}_K^{(h)} \in\mathbb{R}^{d_h \times d} are the query and key projections, and dmax⁡=200 μmd_{\max} = 200\,\mu\mathrm{m}. The values are left unrotated, so the positional transformation affects how cell representations are compared rather than what is transported; mijm_{ij} is a hard spatial cutoff rather than a learned function of distance.

Figure 1. TESSERA learns spatially contextualized cell representations in two stages. Spatially informed ranking (SIR) selects spatially informative genes to represent cells, encoded by a pretrained scRNA-seq foundation model. The resulting cell embeddings are then contextualized by a geometry-aware aggregator with 2D-RoPE, letting neighbors contribute according to their relative distance and direction while remaining translation-invariant. Learning proceeds by masking cells and reconstructing masked cell expression from their spatial neighborhood.

Define

qi(h)=WQ(h)ci,kj(h)=WK(h)cj.(5)\mathbf{q}_i^{(h)} = \mathbf{W}_Q^{(h)}\mathbf{c}_i, \qquad \mathbf{k}_j^{(h)} = \mathbf{W}_K^{(h)}\mathbf{c}_j. \tag*{(5)}

Because planar rotations compose additively and ψc\psi_c is linear,

⟨R(pi)qi(h),R(pj)kj(h)⟩=qi(h)TR(Δij)kj(h).(6)\left\langle \mathbf{R}(\mathbf{p}_i)\mathbf{q}_i^{(h)}, \mathbf{R}(\mathbf{p}_j)\mathbf{k}_j^{(h)} \right\rangle = \mathbf{q}_i^{(h)\mathsf{T}}\mathbf{R}(\Delta_{ij})\mathbf{k}_j^{(h)}. \tag*{(6)}

Thus, Aij(h)A_{ij}^{(h)} depends on position only through Δij\Delta_{ij}, giving translation invariance by construction. Because θc\boldsymbol{\theta}_c is a vector rather than a scalar, the relative phase θcTΔij\boldsymbol{\theta}_c^{\mathsf{T}}\Delta_{ij} depends on the bearing of the displacement as well as its length, giving direction sensitivity. Finally, ∥θc∥=2π/ℓc\lVert\boldsymbol{\theta}_c\rVert= 2\pi/\ell_c defines a wavelength ℓc\ell_c in micrometres. We initialize {ℓc}\{\ell_c\} on a geometric grid from 10 μ\mum to 2000 μ\mum, with the bearings of θc\boldsymbol{\theta}_c uniformly distributed on [0,π)[0,\pi).

PoPE. In spatial omics, cell identity and spatial location provide distinct signals, suggesting that their contributions to attention should be separable. However, RoPE may couple content and position within each query–key component [9], which can make the positional phase depend on the content being matched. PoPE removes this coupling by representing each component with a non-negative magnitude and a phase determined solely by position [9]. We therefore also adapt PoPE to continuous two-dimensional tissue coordinates. The resulting attention score takes the form

AijPoPE=∑cμi,cQμj,cKcos⁡(θcTΔij+δc)+mij,(7)A_{ij}^{\mathrm{PoPE}} = \sum_c \mu_{i,c}^{Q}\mu_{j,c}^{K}\cos\left(\boldsymbol{\theta}_c^{\mathsf{T}}\Delta_{ij}+\delta_c\right)+m_{ij}, \tag*{(7)}

where μi,cQ,μj,cK≥0\mu_{i,c}^{Q},\mu_{j,c}^{K}\ge0 are the query and key magnitudes, θc∈R2\boldsymbol{\theta}_c\in\mathbb{R}^{2} is a spatial frequency, and δc\delta_c is a fixed phase offset. This preserves the displacement-relative, direction-sensitive geometry of RoPE while removing the content-dependent phase interaction, providing a controlled alternative under the same physical-scale parameterization.

Learning objective. We train Tessera with cross-cell masked reconstruction, holding out 10% of cells in each window by replacing their cell embeddings with a learned mask token while retaining their coordinates. Because no expression-derived information from a masked cell enters the spatial attention module, its profile must be inferred from neighboring cells and their geometry. A gene-wise negative-binomial decoder reconstructs raw counts, with loss computed only on masked cells; gradients update only the spatial aggregator and decoder. Full masking, offset, and likelihood details are provided in Appendix § 9.

Experiments

We organize our experiments around the main design choices of Tessera. We first evaluate spatially informed gene ranking (Appendix § 11), then isolate the contribution of spatial geometry and compare positional encodings under a controlled architecture. We next characterize the learned attention in terms of locality, direction sensitivity, and invariance, and assess zero-shot extrapolation beyond the spatial scale seen during training. Finally, we benchmark Tessera against existing spatial foundation models. Models, optimization, and the full experimental protocol are described in Appendix § 10.

Impact of spatial geometry

TESSERA outperforms all non-geometric baselines on every held-out section (Table 1), improving Pearson correlation by +0.141 over the strongest baseline and by +0.184 over the otherwise identical geometry-free ablation. The gain is consistent across seeds, and coordinate-permutation controls further confirm that the improvement arises from spatial geometry (Appendix § 10).

PredictorPearson rrΔ\Delta vs. TESSERAtt
TESSERA without geometry0.26565−0.18370-0.18370−10.49-10.49
HVG-PCA0.29072−0.15863-0.15863−8.22-8.22
scGPT (no aggregator)0.29985−0.14950-0.14950−7.97-7.97
Smoothed PCA0.30282−0.14653-0.14653−7.81-7.81
Neighbour average0.30806−0.14129-0.14129−7.41-7.41
TESSERA0.44935——

Table 1. Impact of spatial geometry. Held-out expression-imputation Pearson correlation across nine sections. Δ\Delta and tt are paired section-wise comparisons with TESSERA. The geometry-free ablation differs only by removing positional information.

Relative geometry drives performance

Holding the architecture and training protocol fixed, we vary only the positional encoding. Absolute sinusoidal encoding provides negligible improvement (+0.0005), whereas relative encodings improve Pearson correlation by +0.160–0.174 across all nine sections. RoPE performs best among the relative variants, although differences within this group are small and treated as descriptive. Beyond predictive performance, the learned attention patterns reveal distinct spatial behaviors (Figure 2). Relative encodings exhibit spatial locality, while RoPE shows the strongest directional variation within a fixed distance range, in contrast to the approximately isotropic distance-only bias. Full positional-encoding results and angular analyses are provided in Appendix § 12, with per-section results in Table 8.

Figure 2. Direction sensitivity of learned spatial attention. Attention patterns for four positional encodings on a held-out MERSCOPE breast tissue section. Top: Mean attention weights as a function of relative cell displacement, aggregated across eight attention heads using a shared logarithmic scale. Middle: Radial attention profiles showing spatial locality. Bottom: Angular attention profiles within a fixed 25–75 µm distance range, normalized by their mean. The coefficient of variation (CV) quantifies directional sensitivity, with higher values indicating stronger anisotropy. RoPE exhibits the strongest directional variation (CV = 0.43), while the distance-only bias remains approximately isotropic (CV = 0.05).

SectionnoneabsolutePoPEradialRoPE
Xenium breast, invasive lobular0.23660.23790.35920.34810.3636
Xenium colon0.33720.33700.52100.51940.5232
Xenium lung, non-diseased0.12370.12310.23480.23320.2440
Xenium melanoma0.33380.33710.53620.53240.5453
MERSCOPE breast, patient 10.22730.22760.47650.47130.4868
MERSCOPE lung, patient 20.32650.32640.50310.47740.5086
MERSCOPE ovary, patient 20.25830.25970.46150.45660.4745
MERSCOPE uterus, patient 10.29230.29220.46780.46210.4705
MERFISH liver, HCC0.18140.18080.25130.25830.2630

Table 8. The encoding comparison, all nine held-out sections, no selection. Values are held-out imputation Pearson at 18,000 steps, seed 0.

Invariance and spatial extrapolation

Directional encoding raises a natural question: tissue sections have no canonical orientation, so why preserve direction rather than enforce rotation invariance? While absolute orientation is arbitrary, relative direction can still carry biological information because local tissue organization is often anisotropic: cells at the same distance but different bearings may occupy distinct spatial contexts and therefore provide different signals about cellular state. Translation invariance removes dependence on the arbitrary section origin while preserving these relative directional relationships. RoPE and PoPE therefore retain direction by design, whereas a distance-only bias is isotropic and cannot distinguish equally distant cells at different bearings (Appendix § 12). Transformation tests confirm that RoPE and PoPE preserve attention under translation but change it under rotation, whereas the radial distance bias remains invariant to both (Figure 4; Table 6).

Figure 4. Attention under spatial transformations. Attention patterns for a fixed query cell under translation, rotation by 37∘37^\circ, and both combined. RoPE and PoPE are translation-invariant but rotation-sensitive; the radial bias is invariant to both, while absolute sinusoidal encoding is sensitive to both. Tables report maximum absolute changes in attention logits and weights, evaluated in float64.

Encodingtranslationrotation 37°reflectionlive ∣A∣|A|
no positional information00026.56
absolute sinusoidal1.2560.4600.39520.94
PoPE027.6333.7930.72
radial distance bias00021.76
RoPE (this work)035.0530.9026.38

Table 6. Sensitivity to rigid motion. Largest absolute change in the attention logit when a held-out window is translated (12.3 × 8.9 mm), rotated (37° about its centroid) or reflected, over eight windows. LIVE ∣A∣|A| is the largest untransformed logit, so no row can appear invariant by producing no signal. Zeros are exact in float64 and asserted: for a relative encoding the translation entry is an identity, so a non-zero raises an error rather than being reported.

This relative formulation also supports spatial extrapolation. Because displacement-based encodings are defined continuously in physical space, they can be evaluated beyond the spatial scale observed during training, whereas fixed-range distance representations are tied to their predefined support. When evaluated zero-shot from N=256N = 256 to N=4096N = 4096 cells, RoPE and PoPE exhibit only 1.6% and 2.0% degradation, respectively, compared with 23% for the fixed-range distance bias (Figure 3). The corresponding attention statistics further characterize how locality and attention concentration evolve as the spatial context expands. Additional analyses are provided in Appendix § 13.

Zero-shot spatial extrapolation beyond the training window

Figure 3. Zero-shot spatial extrapolation beyond the training window. Comparison of four positional encodings as the spatial context expands from 256 (1×) to 4096 (16×) cells, without retraining or positional rescaling. Top left: Held-out cross-cell masked reconstruction loss across increasing window sizes. Top right: Illustration of the training and extrapolation windows, showing the corresponding spatial radii and scaled attention cutoffs. Bottom: Attention entropy relative to log⁡N\log N (left), attention mass within 25 μm\mu\mathrm{m} (middle), and self-attention weight (right), characterizing attention diffusion, locality, and collapse. RoPE and PoPE exhibit limited performance degradation (1.6% and 2.0%, respectively), compared with 23% for the radial distance bias, demonstrating stronger zero-shot extrapolation to larger spatial contexts.

Comparison with spatial foundation models

TESSERA substantially outperforms existing spatial foundation models under the same linear-probe protocol, reaching r=0.6246r = 0.6246 on neighborhood-density prediction versus 0.2526 for scGPT-spatial and 0.2130 for Nicheformer (Table 2). This comparison is conservative, as Nicheformer was pretrained on the evaluation sections whereas TESSERA was not. The advantage also transfers across technologies: training on Xenium and evaluating on MERSCOPE yields r=0.409r = 0.409 for TESSERA versus 0.004 for Nicheformer, consistent with learning a transferable physical spatial representation. Additional radius sweeps, seed analyses, and validation controls are reported in Appendix § 14.

ModelNeighbourhood density rr95% CIX→XM→MM→XX→M
HVG→PCA0.1452[0.0543, 0.2414]0.1870.110−0.0320.034
Nicheformer0.2130[0.1037, 0.3459]0.3490.1730.2370.004
scGPT-spatial0.2526[0.1150, 0.4112]0.3890.2090.1250.037
TESSERA0.6246[0.4897, 0.7517]0.6940.5550.5400.409

Table 2. Comparison with spatial foundation models. Linear probes are trained on identical training-cell budgets and evaluated on the same nine held-out sections. Left: neighborhood-density prediction from individual cell embeddings (Pearson rr, 95% CI). Right: within- and cross-platform transfer between Xenium (X) and MERSCOPE (M).

Discussion and conclusion

Tessera addresses two complementary challenges in spatial representation learning: combining cell-specific expression relevance with tissue-level spatial informativeness for gene selection, and contextualizing cellular states through intercellular spatial relationships. Its geometric inductive bias reflects a simple property of tissue organization: cellular context is relational, and equally distant cells can provide different biological information depending on their relative position and cellular state. The RoPE-based mechanism preserves this directional structure while remaining invariant to arbitrary translations of the tissue coordinate system. Importantly, we do not assume a universal tissue orientation; rather, we avoid imposing isotropy by construction, allowing locally anisotropic tissue organization to be represented. Although our current evaluation focuses on expression imputation and spatial probing, such context-aware representations could ultimately support downstream applications including spatial biomarker discovery, target prioritization, and prediction of treatment response.

Related work

The taxonomy of §1 separates spatial models by whether the continuous displacement between two cells ever reaches attention. It does not in Nicheformer [21], which never consumes coordinates during pretraining and relies on expression to carry the spatial trace. It is collapsed to an unweighted mean in scGPT-spatial [31], a choice made deliberately so that the model transfers between sections. It enters absolutely in CellPLM [32], as sinusoidal embeddings of (x,y)(x, y). It enters as an isotropic scalar in SToFM [34], whose SE(2) Transformer is adopted from the molecular model of Zhou et al. [35] and whose distance matrix is described as ensuring SE(2) invariance in a straightforward manner. And it is binarised in the graph models [4, 16, 3].

Rotary encodings were introduced for one-dimensional token sequences [26]. Extending them beyond one dimension requires a commuting-generator construction, developed for vision transformers by Heo et al. [12], generalised by Ostmeier et al. [18], and given exact-invariance guarantees for arbitrary-dimensional continuous coordinates by Schenck et al. [22]. PoPE [9] argues that the rotary phase entangles content with position, because the two-dimensional subcomponents of the query and key carry a content-dependent angle that adds to the positional rotation, and removes it by applying a softplus so that every subcomponent has a positive first coordinate and a zero second. Our contribution is not the encoding but its application to physical tissue coordinates, the physical-units parameterisation that makes learned scales cross-platform, the controlled four-way comparison of §4.2, and the extrapolation result of §4.3.

Adding a learned function of pairwise distance to an attention logit originates with structure-aware graph and molecular transformers [33, 35, 14, 23].

Proof of exact translation invariance

Proof. By the block-diagonal construction of the rotary encoding,

R(p)TR(p′)=⨁cR2(ψc(p))TR2(ψc(p′))=⨁cR2(ψc(p′)−ψc(p)).(8)R(\mathbf{p})^{\mathsf{T}}R(\mathbf{p}') = \bigoplus_c R_2(\psi_c(\mathbf{p}))^{\mathsf{T}}R_2(\psi_c(\mathbf{p}')) = \bigoplus_c R_2(\psi_c(\mathbf{p}')-\psi_c(\mathbf{p})). \tag*{(8)}

Since the planar rotations compose additively and ψc(p)=θcTp\psi_c(\mathbf{p}) = \boldsymbol{\theta}_c^{\mathsf{T}}\mathbf{p} is linear,

ψc(p′)−ψc(p)=ψc(p′−p).\psi_c(\mathbf{p}')-\psi_c(\mathbf{p}) = \psi_c(\mathbf{p}'-\mathbf{p}).

Consequently,

R(p)TR(p′)=R(p′−p).R(\mathbf{p})^{\mathsf{T}}R(\mathbf{p}') = R(\mathbf{p}'-\mathbf{p}).

Substituting into the attention inner product in Eq. (4) gives

⟨R(pi)qi,R(pj)kj⟩=qiTR(Δij)kj,Δij=pj−pi.(9)\langle R(\mathbf{p}_i)\mathbf{q}_i, R(\mathbf{p}_j)\mathbf{k}_j\rangle= \mathbf{q}_i^{\mathsf{T}}R(\Delta_{ij})\mathbf{k}_j,\qquad\Delta_{ij}=\mathbf{p}_j-\mathbf{p}_i. \tag*{(9)}

Thus, the attention logit depends on spatial coordinates only through relative displacement, establishing exact translation invariance.

Numerical verification. We additionally verified the relative-phase identity numerically in float64, obtaining a maximum absolute deviation of 5.7×10−145.7 \times10^{-14}. The result remained unchanged under a translation of (12.3,−8.9)(12.3, -8.9) mm, consistent with the analytical result.

Extension to PoPE. The same translation-invariance property holds for the two-dimensional adaptation of PoPE. With spatial phase ψc(p)=θcTp\psi_c(\mathbf{p})=\boldsymbol{\theta}_c^{\mathsf{T}}\mathbf{p}, the attention logit is

AijPoPE=∑cμi,cQμj,cKcos⁡(θcTΔij+δc)+mij.(10)A_{ij}^{\mathrm{PoPE}}=\sum_c \mu_{i,c}^{Q}\mu_{j,c}^{K}\cos\left(\boldsymbol{\theta}_c^{\mathsf{T}}\Delta_{ij}+\delta_c\right)+m_{ij}. \tag*{(10)}

Here, the query and key magnitudes are independent of spatial coordinates, and the fixed phase offset δc\delta_c does not depend on absolute position. Assuming the spatial mask mijm_{ij} depends only on relative displacement, the complete attention logit is therefore invariant to arbitrary translations of the coordinate system. This property is also verified empirically in Table 6.

Frequency initialization and complexity. {∥θc∥}\{\lVert\theta_c \rVert\} is set on a geometric grid so that the wavelengths ℓc=2π/∥θc∥\ell_c = 2\pi/\lVert\theta_c \rVert span 10 µm to 2000 µm, with bearings spread uniformly on [0,π)[0,\pi). Frequencies carry a 0.1× learning-rate multiplier, which we found necessary to prevent an early collapse of attention entropy. Per window and layer, inter-cell attention costs O(N2d)O(N^2d): at N=256N = 256 that is 6.6×1046.6 \times10^4 pairs, negligible beside the backbone’s O(NK2d)O(NK^2d) gene-level computation at 4.2×1064.2 \times10^6 pairs, which is paid once and cached because the backbone is frozen. The trained aggregator is L=6L = 6 layers, 8 heads, d=512d = 512, about 19M parameters.

Why the construction generalises beyond one dimension. Equivalently R(p)=exp⁡(pxAx+pyAy)R(\mathbf{p}) = \exp(p^x A_x + p^y A_y) with Ax=ΘcθcxJA_x = \Theta_c \theta_c^x J, Ay=ΘcθcyJA_y = \Theta_c \theta_c^y J and J=(0−110)J = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}. These generators commute, [Ax,Ay]=0[A_x,A_y] = 0, because they are block-diagonal in a common basis with each block a scalar multiple of JJ. Commutativity is exactly the condition under which the relative property of one-dimensional rotary encodings [26] survives in more than one dimension; with non-commuting generators the Baker–Campbell–Hausdorff correction leaves a residual dependence on absolute position and the property fails [12, 22].

Why physical units make a learned scale portable. In the original formulation θc\theta_c is dimensionless, because positions are integer sequence indices. Here ∥θc∥\lVert\theta_c \rVert carries units of radians per micrometre, so 2π/∥θc∥2\pi/\lVert\theta_c \rVert is a physical wavelength. The consequence is that a length scale learned on one platform denotes the same relationship on another. A rule of the form “attend to my six nearest neighbours” reaches roughly 25 µm on a single-cell imaging panel and roughly 250 µm on a 100 µm spot array, and so means something different on each; “attend at 30 µm” means the same thing everywhere.

Spatially informed gene ranking

For each cell, Tessera selects K=500K = 500 genes using spatially informed ranking (SIR), which combines cell-specific expression relevance with tissue-level spatial informativeness. We select the top K=500K = 500 genes according to rj,ir_{j,i} for each cell. Thus, each cell receives an adaptive gene set that reflects both its own expression profile and the spatial organization of gene expression across the surrounding tissue. Let X∈RM×GX \in\mathbb{R}^{M \times G} denote the gene-expression matrix for a tissue section, where MM is the number of cells and GG the number of genes.

We first compute a cell-specific TF–IDF score. For gene gig_i in cell sjs_j,

TF⁡(gi,sj)=log⁡(1+Xj,i)∑k=1Glog⁡(1+Xj,k)+ϵ(11)\operatorname{TF}(g_i,s_j) = \frac{\log(1+X_{j,i})}{\sum_{k=1}^{G}\log(1+X_{j,k})+\epsilon} \tag*{(11)}

and

IDF⁡(gi)=log⁡(1+M1+∑j=1M1[Xj,i>0]).(12)\operatorname{IDF}(g_i) = \log\left(\frac{1+M}{1+\sum_{j=1}^{M}\mathbf{1}[X_{j,i}>0]}\right). \tag*{(12)}

The resulting TF–IDF weight

wj,i=TF⁡(gi,sj)IDF⁡(gi)(13)w_{j,i} = \operatorname{TF}(g_i,s_j)\operatorname{IDF}(g_i) \tag*{(13)}

prioritizes genes that are prominent in a given cell while downweighting genes that are broadly expressed across the section.

To incorporate tissue-level spatial organization, we additionally compute Moran’s II [17] for each gene over the spatial coordinates of the section using SQUIDPY [19]. Because TF–IDF and Moran’s II have different numerical scales, SIR combines their ranks rather than their raw values. Let ρj,itf\rho^{\mathrm{tf}}_{j,i} denote the TF–IDF rank of gene ii in cell jj, and ρisp\rho^{\mathrm{sp}}_i its Moran’s-II rank across the section. We define

rj,i=1−λκ+ρj,itf+λκ+ρisp,κ=60,λ=0.6,(14)r_{j,i} = \frac{1-\lambda}{\kappa+\rho^{\mathrm{tf}}_{j,i}} + \frac{\lambda}{\kappa+\rho^{\mathrm{sp}}_i}, \qquad\kappa= 60,\quad\lambda= 0.6, \tag*{(14)}

and select the top K=500K = 500 genes according to rj,ir_{j,i} for each cell. Thus, each cell receives an adaptive gene set that reflects both its own expression profile and the spatial organization of gene expression across the surrounding tissue.

Learning objective in full

Masking. Let W\mathcal{W} be a window of NN cells with coordinates pi∈R2\mathbf{p}_i \in\mathbb{R}^{2} in µm and raw integer counts xi∈Z≥0Kx_i \in\mathbb{Z}_{\geq0}^{K} over the KK gene tokens the cell carries. We draw a held-out set M⊂W\mathcal{M} \subset\mathcal{W} of ⌈ρN⌉\lceil\rho N\rceil cells uniformly at random, with ρ=0.10\rho= 0.10. Masking is applied to whole cells, never to individual genes or individual values. Writing ziz_i for the embedding produced by the frozen single-cell encoder, the masked cell’s token is replaced after the input projection, so that no quantity derived from its counts reaches the first attention layer:

hi(0)={m,i∈M,LN⁡(Winzi),otherwise,(15)h_i^{(0)} = \begin{cases} m, & i \in\mathcal{M},\\ \operatorname{LN}(W_{\mathrm{in}}z_i), & \text{otherwise}, \end{cases} \tag*{(15)}

where m∈Rdm \in\mathbb{R}^{d} is a learned mask embedding. Coordinates are retained for every cell, masked or not; position is never held out. Because cell embeddings are precomputed and the encoder is bypassed during training, this ordering is enforced by construction rather than by convention.

Library-size offset. The negative binomial mean is offset by a library size ℓi\ell_i. A masked cell’s own sequencing depth is itself part of what is held out, so using it would leak the quantity being predicted; we replace it by the median depth of the visible cells in the same window:

ℓi={median⁡{∑kxjk:j∈W∖M},i∈M,∑kxik,otherwise.(16)\ell_i = \begin{cases} \operatorname{median}\left\{\sum_k x_{jk}: j \in\mathcal{W}\setminus\mathcal{M}\right\}, & i \in\mathcal{M},\\ \sum_k x_{ik}, & \text{otherwise}. \end{cases} \tag*{(16)}

Decoder. The geometry-aware representation hi(L)h_i^{(L)} is decoded by two linear heads into the parameters of a gene-wise negative binomial over the decoder vocabulary of size GG:

log⁡μig=log⁡ℓi−log⁡G+egThi(L)+bg,(17)\log\mu_{ig} = \log\ell_i - \log G + e_g^{\mathsf{T}}h_i^{(L)} + b_g, \tag*{(17)}
log⁡θig=clip⁡(wgThi(L)+cg,−τ,τ),τ=10.(18)\log\theta_{ig} = \operatorname{clip}\left(w_g^{\mathsf{T}}h_i^{(L)} + c_g, -\tau, \tau\right), \qquad\tau= 10. \tag*{(18)}

The −log⁡G-\log G term initialises the decoder at a uniform expression profile, and log⁡μ\log\mu is clipped above at 30 for numerical stability.

Loss. Writing gikg_{ik} for the vocabulary index of the kk-th gene token of cell ii, the objective is the negative binomial negative log-likelihood on the raw counts of the held-out cells only:

L=1∣M∣K∑i∈M∑k=1K−log⁡NB⁡(xik∣μigik,θigik),(19)\mathcal{L} = \frac{1}{|\mathcal{M}|K}\sum_{i\in\mathcal{M}}\sum_{k=1}^{K} -\log\operatorname{NB}\left(x_{ik}\mid\mu_{ig_{ik}},\theta_{ig_{ik}}\right), \tag*{(19)}

with

−log⁡NB⁡(x∣μ,θ)=−[log⁡Γ(x+θ)−log⁡Γ(θ)−log⁡Γ(x+1)+θ(log⁡θ−log⁡(θ+μ))+x(log⁡μ−log⁡(θ+μ))].(20)-\log\operatorname{NB}(x\mid\mu,\theta) = -\left[\log\Gamma(x+\theta)-\log\Gamma(\theta)-\log\Gamma(x+1) +\theta\left(\log\theta-\log(\theta+\mu)\right)+x\left(\log\mu-\log(\theta+\mu)\right)\right]. \tag*{(20)}

The loss is gathered onto the KK gene tokens each cell actually carries, so genes outside a slide’s panel contribute no gradient, and the single-cell encoder is frozen throughout.

Experiments

All results are evaluated on held-out whole sections. We use the spatially resolved subset of SpatialCorpus-110M [21], comprising 43 sections and 20,068,822 cells, split 30/4/9 by section. The nine held-out sections span two imaging technologies and seven tissues and are used only for final evaluation. Our primary statistic is the paired held-out imputation Pearson correlation, computed as a section-wise difference over n=9n = 9 sections (df =8= 8, two-sided critical value 2.306) and bootstrapped over sections rather than cells. All thresholds reported below were preregistered before the corresponding results were observed; the complete register, including failed criteria, is given in Appendix J.

Models. TESSERA combines a frozen scGPT whole-human backbone [7] with a trainable spatial attention module. For each cell, the backbone encodes K=500K = 500 gene tokens selected through spatially informed ranking into a single 512-dimensional cell representation. The spatial attention module consists of L=6L = 6 layers, 8 attention heads, and a hidden dimension of dmodel=512d_{\mathrm{model}} = 512, comprising approximately 19M trainable parameters. It operates on windows of N=256N = 256 spatially contiguous cells with a dmax⁡=200 μmd_{\max} = 200\ \mu\mathrm{m} distance cutoff.

The positional-encoding comparison in § 4.2 evaluates four spatial encoding strategies within this shared architecture: absolute sinusoidal embeddings of (x,y)(x, y), RoPE, PoPE [9], and an additive radial distance bias parameterized using 32 Gaussian basis functions [35, 34]. We additionally include a geometry-free baseline without positional information. All five configurations share the same pretrained backbone, spatial attention architecture, training windows, masking strategy, and optimization protocol. They differ in their spatial encoding mechanisms, including the query–key parameterization associated with PoPE.

We also evaluate five non-spatial predictors under matched evaluation conditions. Four non-learned baselines comprise mean_profile, neighbour_average, PCA on highly variable genes, and PCA on neighbourhood-averaged expression. The fifth baseline, scgpt_no_aggregator, uses the frozen scGPT backbone embeddings directly to assess the contribution of spatial contextualization.

For the comparison with existing spatial foundation models in § 4.4, we use the released pretrained weights and original preprocessing pipelines of Nicheformer [21] and scGPT-spatial [31]. All three models produce 512-dimensional per-cell embeddings, verified at runtime, so no additional dimensionality matching is required.

Training details. All models are trained with the cross-cell cloze objective: a fraction ρ=0.1\rho= 0.1 of cells in each window is masked, and the negative-binomial loss is computed on masked cells only over a fixed decoder vocabulary of 1,245 genes. For each cell, we select the top K=500K = 500 genes according to the spatially informed ranking score in Eq. (14), with λ=0.6\lambda= 0.6 and κ=60\kappa= 60 fixed on development sections before held-out evaluation. The selected genes are encoded by the frozen scGPT backbone, and the resulting cell embeddings are cached for spatial model training and evaluation. We optimise with AdamW (β=(0.9,0.95)\beta= (0.9, 0.95), weight decay 0.05) at a peak learning rate of 3×10−43 \times10^{-4}, linearly warmed up over 500 steps and then cosine-annealed to zero, with gradients clipped to a global norm of 1.0, in bf16, at a batch of eight windows (2,048 cells) per step and one accelerator per arm with arms run concurrently. The aggregator and the decoder share the same learning rate; the only parameters on a separate schedule are the rotary and PoPE frequency grids, which carry a 0.1×0.1\times multiplier and so train at 3×10−53 \times10^{-5}, a choice we found necessary to prevent an early collapse of attention entropy. Rotary frequencies are initialised on a geometric grid spanning 10 μm\mu\mathrm{m} to 2 mm with bearings uniform on [0,π)[0,\pi). The main results use 50,000 steps; the positional-encoding comparison of § 4.2 and the six-seed replication use 18,000 steps on a narrower 948-gene decoder vocabulary. The two budgets are identical in every optimisation setting above and differ only in the step count and hence in the cosine decay horizon, and their absolute values are not comparable, so no comparison in this paper crosses that boundary. Within each budget every arm is byte-identical in configuration and seed.

Datasets and Evaluation details. Training masks whole cells. For a fraction ρ=0.1\rho= 0.1 of each window we replace the cell token by a learned mask embedding while retaining the coordinate, so a masked cell’s output state ziz_i is a function of the cells around it, their positions and its own position, and of nothing else about it. A negative-binomial head decodes counts, with log⁡μ^g=[MLP⁡(zi)]g+log⁡σi\log\hat{\mu}_g = [\operatorname{MLP}(z_i)]_g + \log\sigma_i, and the loss ∑i∈M∑g−log⁡NB⁡(xig∣μ^g,ϕg)\sum_{i \in\mathcal{M}} \sum_g -\log\operatorname{NB}(x_{ig} \mid\hat{\mu}_g, \phi_g) is computed on masked cells only. Reconstructing a cell from its neighbourhood is an established objective family [8, 32, 34]. The task cannot be solved without geometry, since position is the only cell-specific information retained about a masked cell. Masking is applied after the frozen backbone and input projection: each masked cell’s projected embedding is replaced by a learned mask token before entering the spatial attention module, while its coordinates are retained (Figure 1; Appendix § 9). Thus, the masked cell’s own expression-derived embedding is not available to the spatial attention module.

Measuring what a component buys usually means comparing a model against a re-implementation of a baseline, which mixes the mechanism under test with everything else two codebases differ in. We remove that confound structurally: the output projection of every inter-cell attention block is zero-initialised, so at step 0 the aggregator is the identity map and a model with a positional encoding emits outputs identical to one without. The observed deviation is exactly 0 on real checkpoints rather than merely within tolerance, and in the positional-encoding comparison of § 4.2, all five configurations, including the geometry-free baseline, begin training at an identical loss to numerical precision. Arms share the seed, the window stream, the mask draw, the split and the schedule, and differ only in the encoding under test. The baseline is not an approximation of our model without geometry; it is our model without geometry.

MethodkNN Purity ↑ARI ↑Silhouette ↑
HVG0.62360.2957-0.0323
SVG0.76660.2928-0.0280
SIR (Ours)0.81490.5107-0.0007

Table 3. Effect of gene selection on spatial representation quality. Clustering of the HER2 cohort using the same downstream pipeline while varying only the input gene-selection strategy. Higher is better for all metrics.

EncodingPearson rrΔr\Delta rttMass <25 µmRose CV
No positional information0.2575——0.0680.008
Absolute sinusoidal0.2580+0.00051.180.0670.007
PoPE [9]0.4235+0.16609.040.7590.207
Additive radial distance bias0.4176+0.16029.070.4680.050
RoPE (Ours)0.4311+0.17369.440.8260.490

Table 4. Effect of positional encoding on spatial gene reconstruction. Four spatial encoding strategies are compared against a geometry-free baseline under a matched training protocol. Pearson correlation is averaged across nine held-out sections; Δ\Delta and tt report the improvement and paired test statistic relative to the baseline (df = 8). MASS denotes the fraction of attention within 25 µm, and ROSE CV measures directional anisotropy (higher is more directional). Relative encodings substantially improve reconstruction, with RoPE achieving the highest correlation, spatial locality, and directional anisotropy.

Spatially informed gene ranking improves spatial representations

We further evaluate whether spatially informed gene ranking (SIR) improves representations for a downstream spatial transcriptomics task. On the HER2 cohort, we cluster cells using an identical Scanpy pipeline while varying only the gene-selection strategy: HVG, SVG, or SIR. HVG and SVG assign a fixed gene set across a tissue section, whereas SIR constructs a cell-specific ranking by combining local expression informativeness with tissue-level spatial structure through TF–IDF and Moran’s II. SIR consistently yields more discriminative spatial representations, achieving the highest kNN purity (0.8149), ARI (0.5107), and Silhouette score (−0.0007) (Table 3). These results suggest that jointly modeling cell-specific and tissue-level spatial signals selects genes that better preserve biologically relevant heterogeneity for downstream spatial analysis.

Positional encoding comparison

Table 4 gives the full four-arm comparison summarised in § 4.2. All four arms share the architecture, the seed, the cached cell tokens, the window stream, the mask draw and the schedule, and differ only in the positional term of the attention logit. Because every added component is zero-initialised, the four begin training at an identical loss to sixteen digits, so each Δ\Delta is attributable to the encoding rather than to any difference in initialisation or data order. Figure 2 shows what the encodings do rather than how well they score, and the per-section values in Table 8 confirm that the ordering is not driven by any one section. Table 6 reports what changes under a rigid motion. This appendix states why the rotation entry is a design property rather than a defect.

Because ψc(p)=θcTp\psi_c(\mathbf{p}) = \boldsymbol{\theta}_c^{\mathsf{T}}\mathbf{p} and hence ψc(Qp)=(QTθc)Tp\psi_c(Q\mathbf{p}) = (Q^{\mathsf{T}}\boldsymbol{\theta}_c)^{\mathsf{T}}\mathbf{p} for any rotation QQ, rotating the tissue is exactly equivalent to rotating the frequency field. We verified this: rotating the data alone changes the logits by 2.874, while rotating the data and setting θ←Qθ\boldsymbol{\theta} \leftarrow Q\boldsymbol{\theta} changes them by 3.6 × 10−1410^{-14} in float64.

The encoding is therefore rotation-equivariant rather than rotation-invariant, and the direction it reads is expressed in the laboratory frame.

Encodingtranslationrotationreflectionuses direction
no positional informationinvariantinvariantinvariantno
absolute sinusoidalnononoyes, and absolute position
PoPEinvariant, exactly equivariantnoyes
radial bias brad(d)b_{\mathrm{rad}}(d)invariantinvariantinvariantno
angular bias in a local frameinvariantinvariantinvariantyes, co-rotating frame
RoPE (this work)invariant, exactly equivariantequivariantnoyes, in the lab frame

Table 5. What each encoding can see. “Uses direction” means the attention logit depends on the bearing of Δij\Delta_{ij} and not only on its magnitude. “Equivariant” means a rotation of the tissue is exactly equivalent to a rotation of the frequency field, so the representation transforms predictably rather than staying fixed.

Two entries deserve comment. An angular bias measured against a data-derived local axis uses direction while remaining rotation-invariant, because the frame co-rotates with the tissue; direction and rotation invariance are therefore not strictly incompatible in general, though they are for any encoding that reads direction in the laboratory frame, as ours does. Conversely, a full pairwise distance matrix determines a configuration up to rigid motion and reflection, so an SE(2) architecture built on one is more expressive than the per-pair bias; what it cannot do at any depth or capacity is distinguish a configuration from its mirror image. Our encoding does, with a reflection drift of 30.90 against a live signal of 26.38.

Extrapolation beyond the training window

We evaluate zero-shot extrapolation by increasing the window size from N=256N = 256 to N=4096N = 4096 cells without retraining or rescaling positional frequencies. In the primary experiment, the attention cutoff scales with the measured window radius, using the same rule for all four positional encodings. This expands both the number of cells and the physical range available to attention. Under this protocol, held-out reconstruction loss increases by 1.6% for RoPE and 2.0% for PoPE, compared with 23% for the radial distance bias (Figure 3).

As a control, we increase the window size while holding the attention cutoff fixed at 200 µm. The fraction of cell pairs within the cutoff decreases from 0.919 to 0.186, while reconstruction loss changes only modestly. This supports the interpretation that the differences in Figure 3 primarily reflect extrapolation to a larger physical attention range rather than an increase in cell count alone.

Benchmark protocol and full results

The task list, the probe protocol, the validation gate and its threshold, the fit budget and the cell-intersection rule were all written before any baseline was staged. Two tasks were declared unevaluable in advance and are reported unevaluated rather than dropped.

The cohort is 39 sections and 18,319,942 cells: 30 training sections on which probes are fitted, and nine held-out sections on which every number is scored. Cell ordering was verified against the cached representation on all 39 sections for every model. No model was scored until it passed a strict weight load with zero missing and zero unexpected tensors, an embedding rank equal to the model width, exact determinism on repeated embedding, and a gene-shuffle negative control; observed degradation fractions under the shuffle were 0.733 for TESSERA, 0.818 for Nicheformer and 0.856 for scGPT-spatial, against a pre-registered bar of 0.50.

Every model is scored on the same 4,986,465 cells, an intersection over all models. The 43,850 excluded cells are all ones scGPT-spatial cannot embed, because their counts over the matched panel are entirely zero and a frozen per-cell encoder that keeps only non-zero genes has nothing to tokenise. Such cells carry a missing row rather than a zero row, since a zero row is a fabricated embedding at the origin, and TESSERA was denied those cells too.

Niche composition and cell-type annotation require cell-type labels, which the nine held-out sections do not carry. Scoring them on the three labelled training sections was refused, since TESSERA trained on those sections and the baselines did not. Neighbourhood density is the closest label-free substitute and is what we report. A third registered task, imputation through the shared linear probe, placed all three models below a constant predictor: one ridge cannot map a 512-dimensional embedding onto a 1245-gene count vector, and it fails identically for all three, so we report a failed readout rather than a result and did not substitute a statistic that works better.

The 400 and 800 µm entries are interval failures rather than ordering failures: the sign holds on all six seeds at every radius, and even at 800 µm the weakest seed reaches 0.3417 against the best baseline’s 0.1941. Two caveats belong with this table. The seeds are 18,000-step checkpoints against a 50,000-step headline, so the spread measures training-seed variability at the smaller budget; and the baselines are released frozen artefacts with no seed, so the single-seed limitation is removed on our side only.

Figure 5. Neighbour-count decodability against target radius; bands are 95% bootstrap intervals over nine sections and the dashed line marks the 200 μm\mu\mathrm{m} attention cutoff. Had the model learned its own cutoff the curve would peak there; it does not, decreasing monotonically and reaching its maximum at the finest radius tested. The registered criterion holds at 50/100/200 μm\mu\mathrm{m} and fails at 400/800 μm\mu\mathrm{m}, and the verdict is unanimous across six training seeds.

RadiusTESSERA (50k)best baselinesix-seed mean ±\pm SDseeds aboveverdict
50 μm\mu\mathrm{m}0.76510.33320.7234 ±\pm 0.02416/6holds 6/6
100 μm\mu\mathrm{m}0.71130.28580.6698 ±\pm 0.02296/6holds 6/6
200 μm\mu\mathrm{m}0.62460.25260.5894 ±\pm 0.01976/6holds 6/6
400 μm\mu\mathrm{m}0.49380.23120.4762 ±\pm 0.01586/6fails 0/6
800 μm\mu\mathrm{m}0.36300.19410.3708 ±\pm 0.02226/6fails 0/6

Table 7. Neighbour-count decodability by target radius. Left: a single checkpoint at 50,000 steps with the best baseline for reference. Right: six seeds at 18,000 steps, mean ±\pm standard deviation, with the per-seed verdict under the registered criterion.

On technology decodability, a probe recovers the generating platform from our embedding at AUC = 0.986, third of four behind HVG→PCA at 0.457 and scGPT-spatial at 0.866 and ahead only of Nicheformer at 0.99998. Compressing every embedding to 32 dimensions does not remove it — ours rises slightly to 0.993 — so the platform signal lives in the leading variance directions rather than spread thin. Notably, being platform-decodable did not prevent the biology from transferring: Nicheformer is the most decodable model of the four and also the one that collapses to 0.004 across platforms.

Per-section results

Our margin over the no-position arm ranges from +0.082 to +0.260 and is positive on every section, whereas the absolute encoding’s ranges from −0.0006 to +0.0033.

Limitations

The backbone is frozen, so TESSERA is an aggregator over a single-cell embedding rather than an end-to-end spatial foundation model, and its ceiling is that of the embedding it consumes. Unfreezing it did not change the result, but four factors change together between those two arms, so we register and report that comparison as descriptive rather than as an isolated measurement.

References

  1. [1]Azim Dehghani Amirabad, Junchao Zhu, Pushpak Pati, Walid Abdelmoula, Tommaso Mansi, and Rui Liao. Pastel: Anchoring histology in spatial transcriptomics via multi-scale hierarchical bio-prior contrastive pretraining. arXiv preprint arXiv:2608.14924, 2026.
  2. [2]Thazin N. Aung, James Monkman, Jonathan Warrell, Ioannis Vathiotis, Katherine M. Bates, Niki Gavrielatou, Ioannis P. Trontzas, Chin Wee Tan, Aileen I. Fernandez, Myrto Moutafi, Ken O’Byrne, Kurt A. Schalper, Konstantinos Syriogos, Roy S. Herbst, Arutha Kulasinghe, and David L. Rimm. Spatial signatures for predicting immunotherapy outcomes using multi-omics in non-small cell lung cancer. Nature Genetics, 57(10):2482–2493, 2025. doi: 10.1038/s41588-025-02351-7.DOI
  3. [3]Sebastian Birk, Irene Bonafonte-Pardàs, Adib Miraki Feriz, et al. Quantitative characterization of cell niches in spatially resolved omics data. Nature Genetics, 57:897–909, 2025.DOI
  4. [4]Quentin Blampey, Hakim Benkirane, Nadège Bercovici, Kevin Mulder, Grégoire Gessain, Florent Ginhoux, Fabrice André, and Paul-Henry Cournède. Novae: a graph-based foundation model for spatial transcriptomics data. Nature Methods, 22:2539–2550, 2025. doi: 10.1038/s41592-025-02899-6.DOI
  5. [5]Junxian Cao, Caifeng Li, Zhao Cui, Shiwen Deng, Tong Lei, Wei Liu, Hongjun Yang, and Peng Chen. Spatial transcriptomics: A powerful tool in disease understanding and drug discovery. Theranostics, 14(7):2946–2968, 2024. doi: 10.7150/thno.95908.DOI
  6. [6]Carissa Chen, Hani Jieun Kim, and Pengyi Yang. Evaluating spatially variable gene detection methods for spatial transcriptomics data. Genome Biology, 25(1):18, 2024. doi: 10.1186/s13059-023-03145-y.DOI
  7. [7]Haotian Cui, Chloe Wang, Hassaan Maan, Kuan Pang, Fengning Luo, Nan Duan, and Bo Wang. scGPT: toward building a foundation model for single-cell multi-omics using generative AI. Nature Methods, 21:1470–1480, 2024. doi: 10.1038/s41592-024-02201-0.DOI
  8. [8]David S. Fischer, Anna C. Schaar, and Fabian J. Theis. Modeling intercellular communication in tissues using spatial graphs of cells. Nature Biotechnology, 41:332–336, 2023.DOI
  9. [9]Anand Gopalakrishnan, Róbert Csordás, Jürgen Schmidhuber, and Michael C. Mozer. Decoupling the “what” and “where” with polar coordinate positional embeddings. In International Conference on Machine Learning (ICML), 2026. arXiv:2509.10534.arxiv.org/abs/2509.10534
  10. [10]Minsheng Hao, Jing Gong, Xin Zeng, Chiming Liu, Yucheng Guo, Xingyi Cheng, Taifeng Wang, JianZhu Ma, Xuegong Zhang, and Le Song. Large-scale foundation model on single-cell transcriptomics. Nature Methods, 21:1481–1491, 2024. doi: 10.1038/s41592-024-02305-7.DOI
  11. [11]Bryan He, Ludvig Bergenstråhle, Linnea Stenbeck, Abubakar Abid, Alma Andersson, Åke Borg, Jonas Maaskola, Joakim Lundeberg, and James Zou. Integrating spatial gene expression and breast tumour morphology via deep learning. Nature Biomedical Engineering, 4(8):827–834, 2020. doi: 10.1038/s41551-020-0578-x.DOI
  12. [12]Byeongho Heo, Song Park, Dongyeon Han, and Sangdoo Yun. Rotary position embedding for vision transformer. In European Conference on Computer Vision (ECCV), 2024.arxiv.org/abs/2403.13298
  13. [13]Jian Hu, Xiangjie Li, Kyle Coleman, Amelia Schroeder, Nan Ma, David J. Irwin, Edward B. Lee, Russell T. Shinohara, and Mingyao Li. SpaGCN: Integrating gene expression, spatial location and histology to identify spatial domains and spatially variable genes by graph convolutional network. Nature Methods, 18:1342–1351, 2021. doi: 10.1038/s41592-021-01255-8.DOI
  14. [14]John Jumper, Richard Evans, Alexander Pritzel, et al. Highly accurate protein structure prediction with AlphaFold. Nature, 596:583–589, 2021.DOI
  15. [15]Yuchen Liang, Guowei Shi, Runlin Cai, Yuchen Yuan, Ziying Xie, Long Yu, Yingjian Huang, Qian Shi, Lizhe Wang, Jun Li, et al. Prost: quantitative identification of spatially variable genes and domain detection in spatial transcriptomics. Nature Communications, 15:600, 2024. doi: 10.1038/s41467-024-44835-w.DOI
  16. [16]Hiren Madhu, Joao Felipe Rocha, et al. HEIST: A graph foundation model for spatial transcriptomics and proteomics data. arXiv preprint arXiv:2506.11152, 2025.arxiv.org/abs/2506.11152
  17. [17]Patrick A. P. Moran. Notes on continuous stochastic phenomena. Biometrika, 37(1/2):17–23, 1950.
  18. [18]Sophie Ostmeier, Brian Axelrod, Michael Moseley, Akshay Chaudhari, and Curtis Langlotz. LieRE: Generalizing rotary position encodings. arXiv preprint arXiv:2406.10322, 2024.
  19. [19]Giovanni Palla, Hannah Spitzer, Michal Klein, et al. Squidpy: a scalable framework for spatial omics analysis. Nature Methods, 19:171–178, 2022.DOI
  20. [20]Zhengyuan Pang, Benjamin F. Cravatt, and Li Ye. Deciphering drug targets and actions with single-cell and spatial resolution. Annual Review of Pharmacology and Toxicology, 64:507–526, 2024. doi: 10.1146/annurev-pharmtox-033123-123610.DOI
  21. [21]Anna C. Schaar, Alejandro Tejada-Lapuerta, Giovanni Palla, and Fabian J. Theis. Nicheformer: a foundation model for single-cell and spatial omics. Nature Methods, 2025.
  22. [22]Connor Schenck, Isaac Reid, Mithun George Jacob, et al. Learning the RoPEs: Better 2D and 3D position encodings with STRING. In International Conference on Machine Learning (ICML), 2025.arxiv.org/abs/2502.02562
  23. [23]Muhammed Shuaibi, Adeesh Kolluru, Abhishek Das, Aditya Grover, Anuroop Sriram, Zachary Ulissi, and C. Lawrence Zitnick. Rotation invariant graph neural networks using spin convolutions. arXiv preprint arXiv:2106.09575, 2021.arxiv.org/abs/2106.09575
  24. [24]Rory Stark, Marta Grzelak, and James Hadfield. Rna sequencing: the teenage years. Nature Reviews Genetics, 20(11):631–656, 2019. doi: 10.1038/s41576-019-0150-2.DOI
  25. [25]Tim Stuart, Andrew Butler, Paul Hoffman, Christoph Hafemeister, Efthymia Papalexi, William M. Mauck, Yuhan Hao, Marlon Stoeckius, Peter Smibert, and Rahul Satija. Comprehensive integration of single-cell data. Cell, 177(7):1888–1902.e21, 2019. doi: 10.1016/j.cell.2019.05.031.DOI
  26. [26]Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. RoFormer: Enhanced transformer with rotary position embedding. Neurocomputing, 568:127063, 2024.arxiv.org/abs/2104.09864
  27. [27]Shiquan Sun, Jiaqiang Zhu, and Xiang Zhou. Statistical analysis of spatial expression patterns for spatially resolved transcriptomic studies. Nature Methods, 17(2):193–200, 2020. doi: 10.1038/s41592-019-0701-7.DOI
  28. [28]Alejandro Tejada-Lapuerta, Anna C. Schaar, Robert Gutgesell, Giovanni Palla, Lennard Halle, Marija Minaeva, Lars von Horvath, Leander Dony, Francesca Drummer, Till Richter, et al. Nicheformer: a foundation model for single-cell and spatial omics. Nature Methods, 22:2525–2538, 2025. doi: 10.1038/s41592-025-02814-z.
  29. [29]Luyi Tian, Fei Chen, and Evan Z. Macosko. The expanding vistas of spatial transcriptomics. Nature Biotechnology, 41:773–782, 2023. doi: 10.1038/s41587-022-01448-2.DOI
  30. [30]Benjamin L. Walker, Zixuan Cang, Honglei Ren, Eric Bourgain-Chang, and Qing Nie. Deciphering tissue structure and function using spatial transcriptomics. Communications Biology, 5: 220, 2022. doi: 10.1038/s42003-022-03175-5.DOI
  31. [31]Chloe X. Wang, Haotian Cui, Andrew H. Zhang, Ronald Xie, Hani Goodarzi, and Bo Wang. scgpt-spatial: continual pretraining of single-cell foundation model for spatial transcriptomics. bioRxiv, 2025. doi: 10.1101/2025.02.05.636714.DOI
  32. [32]Hongzhi Wen, Wenzhuo Tang, Xinnan Dai, Jiayuan Ding, Wei Jin, Yuying Xie, and Jiliang Tang. CellPLM: Pre-training of cell language model beyond single cells. In International Conference on Learning Representations (ICLR), 2024.DOI
  33. [33]Chengxuan Ying, Tianle Cai, Shengjie Luo, et al. Do transformers really perform badly for graph representation? In Advances in Neural Information Processing Systems (NeurIPS), 2021.
  34. [34]Suyuan Zhao, Yizhen Luo, Ganbo Yang, Yan Zhong, Hao Zhou, and Zaiqing Nie. SToFM: a multi-scale foundation model for spatial transcriptomics. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pages 77589–77607. PMLR, 2025.arxiv.org/abs/2507.11588
  35. [35]Gengmo Zhou, Zhifeng Gao, Qiankun Ding, et al. Uni-Mol: A universal 3D molecular representation learning framework. In International Conference on Learning Representations (ICLR), 2023.DOI

Paper details

vlnc:W_tyxr3kee
Version
v1 · latest
Published
Added
License
CC BY 4.0
Usage

views · 10

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Agricultural and Biological Sciences

Not recorded for this paper

View statement
Looking for related papers…
Contents