Manuscript Offprint
arXiv:2608.24823BioKERN: Biological Kernel Regularization for Histology-to-Transcriptomics Neighborhood Retrieval
Abstract
Spatially resolved biology requires representations that preserve biological neighborhood structure rather than only exact cross-modal correspondences. Existing histology–transcriptomics objectives can emphasize instance-level matching even when non-paired spots share molecular or spatial context. We introduce BioKERN, a multimodal spatial representation-learning framework that incorporates biological structure as an explicit, learnable inductive bias. BioKERN constructs a training-time biological kernel by combining transcriptomic similarity and spatial proximity, then uses it to provide graded neighborhood supervision and regularize embedding geometry. Evaluation uses a fixed, model-independent biological neighborhood definition shared by all methods. Across Mouse Brain Visium and Human Liver GSE240429, BioKERN consistently improves biological-neighborhood retrieval over BLEEP in both single- and multi-scale settings. Controlled shared-architecture experiments show that most of the improvement arises from biological-kernel regularization rather than increased model capacity. These results support explicit biological geometry as an interpretable inductive bias for multimodal learning in spatial biology.
1 Introduction
Spatial transcriptomics measures molecular state while preserving tissue location, providing a direct view of how gene-expression programs are organized within anatomical structure [Stahl et al., 2016, Stickels et al., 2021, Chen et al., 2022]. Histology provides a complementary morphological view and is available at substantially larger scale in both research and clinical workflows [Campanella et al., 2019, Lu et al., 2021]. This asymmetry motivates a natural multimodal learning problem: given an H&E patch from a new tissue, retrieve transcriptomic profiles representing the same biological context from a profiled reference.
Exact image–spot correspondence is useful supervision, but it does not fully capture the organization of spatial tissue. Spatially adjacent observations, spots within the same tissue domain, or locations with similar transcriptional programs can represent related biological states even when they are not the same measured location. A representation optimized only for instance identity can therefore under-represent biologically meaningful neighborhood structure.
Biological similarity is also multi-factorial. Transcriptomic similarity reflects molecular programs, whereas spatial proximity reflects tissue organization [Palla et al., 2022, Dries et al., 2021]. Their relative utility can differ between tissue settings, motivating a learnable rather than fixed combination of these signals.
Corresponding author.
Preprint.
We introduce BioKERN (Biological KErnel Regularization for histology-to-transcriptomics Neighborhood retrieval), which incorporates explicit biological geometry into multimodal spatial representation learning. BioKERN constructs a reference kernel from transcriptomic similarity and spatial proximity, learns their relative weighting, and regularizes the H&E–transcriptomics representation to preserve this geometry.
We formulate the resulting task as biological neighborhood retrieval (BNR): given an H&E query, the representation should retrieve transcriptomic states belonging to the same biological neighborhood rather than being evaluated only by exact-pair matching.
Our main contributions are as follows.
• Biologically structured multimodal representation learning. BioKERN augments instance-level alignment with graded supervision derived from explicit biological neighborhood similarity.
• Learnable molecular–spatial weighting. BioKERN combines transcriptomic similarity and spatial proximity through a learned scalar weight, yielding a compact and interpretable biological prior.
• Controlled validation of the biological prior. Shared-architecture controls, shuffled-kernel controls, and ablations show that biological-kernel regularization accounts for most of the improvement in biological-neighborhood retrieval.
Structured relational supervision. Kernel alignment [Cristianini et al., 2002, Cortes et al., 2012], relational representation learning [Park et al., 2019, Tung and Mori, 2019], and supervised contrastive learning [Khosla et al., 2020] show that pairwise structure can guide representations beyond one-hot instance labels. BioKERN adapts this principle to spatial biology using a learnable molecular–spatial reference kernel. Extended related work is provided in Appendix A.
3 Method
BioKERN learns a multimodal spatial representation in which cross-modal similarity reflects paired image–gene correspondence together with biological neighborhood structure. The framework consists of multimodal representation learning, construction of a learnable biological reference kernel, and kernel-regularized neighborhood supervision (Figure 1).
Multimodal spatial representations. For each spatial-transcriptomics spot, we observe , where is an H&E image patch, is the corresponding gene-expression profile, and is its tissue coordinate. A frozen PLIP pathology encoder [Huang et al., 2023] extracts morphology features, while gene expression is normalized, log-transformed, standardized, and reduced with PCA. Lightweight ResidualAdapters project both modalities into a shared dimensional -normalized embedding space. We evaluate two image-context settings: the single-scale (SS) setting uses a H&E patch to capture local morphology, whereas the multi-scale (MS) setting combines representations from and patches using a learnable fusion weight, thereby incorporating both local morphology and broader tissue context. All backbone encoders remain frozen.

Figure 1: BioKERN overview. Multimodal image and gene representations are regularized during training using a biological reference kernel combining transcriptomic and spatial similarity. The kernel defines graded neighborhoods and supervises global and local embedding geometry; inference requires only the learned image and transcriptomic embeddings.
Learnable biological reference kernel. We describe biological relatedness using complementary transcriptomic and spatial RBF kernels,
Bandwidths are determined from training-set pairwise distances. Rather than fixing the relative weighting of molecular and spatial information, BioKERN learns their composition:
where is optimized end-to-end. For multi-section training, spatial affinities are defined only within the same tissue section; pairs from different sections have , while transcriptomic affinities remain available across sections. The resulting scalar gives a compact, interpretable weighting of the two sources of biological neighborhood structure.
Biological-neighborhood supervision. Standard bidirectional InfoNCE preserves exact image-gene correspondence,
BioKERN augments this objective with three biologically structured terms. For each observation, the soft neighborhood loss selects the minibatch top-k non-self neighbors under ( ) and normalizes their kernel affinities into graded targets. The exact paired observation is excluded from this biological-neighborhood set, so adds supervision for distinct but biologically related spots while retains exact-pair alignment.
To regularize representation geometry, image and gene embeddings are fused into a spot-level entity representation , yielding . The global alignment loss matches the overall entity-kernel geometry to , whereas the local alignment loss focuses on the strongest biological neighborhood edges. The complete objective is
where , , and . The biological kernel is a training-time supervisory signal; at inference, an H&E query is ranked directly against reference transcriptomic embeddings by cosine similarity. Detailed loss definitions are provided in Appendix B.
4 Results
Experimental setup. We evaluate on two Visium benchmarks with distinct tissue organization. Mouse Brain Visium uses 2,200 spots with a 1,650/550 train/test split. Human Liver GSE240429 uses a cross-slice transfer setting: A1+B1+D1 (6,963 spots) are used for training and C1 (2,273 spots) for testing. Single-scale (SS) experiments use a H&E patch, while multi-scale (MS) experiments combine and representations with learned fusion.
Table 1: Biological-neighborhood retrieval across tissues and scales. Bio-mAP uses the same fixed for every method; stochastic methods are mean±standard deviation over five seeds.
| Dataset / Scale | Ridge | PLIP linear | BLEEP | BLEEP* | BioKERN |
|---|---|---|---|---|---|
| Mouse Brain SS | 0.4902 | 0.5407±.0033 | 0.5087±.0033 | 0.5327±.0036 | 0.6190±.0023 |
| Mouse Brain MS | 0.5567 | 0.5831±.0023 | 0.4960±.0056 | 0.5541±.0040 | 0.6716±.0021 |
| Human Liver SS | 0.0383 | 0.0307±.0001 | 0.0302±.0005 | 0.0309±.0004 | 0.0396±.0007 |
| Human Liver MS | 0.0403 | 0.0319±.0005 | 0.0312±.0005 | 0.0321±.0005 | 0.0408±.0005 |
For every held-out H&E query, the retrieval gallery consists of the transcriptomic profiles from the same held-out test set. The exact paired profile remains in the gallery for exact-pair metrics but is excluded when defining biological-neighborhood positives. Bio-mAP uses one fixed, model-independent evaluation kernel, , for every method; query-side expression is used only to construct evaluation labels and is never provided to the retrieval model. We additionally report transcriptomic-neighbor recall, spatial-neighbor recall, cluster consistency, and exact-pair retrieval in Appendix C. We compare against CCA, Ridge regression, a naive PLIP zero-shot lower bound, PLIP linear, and BLEEP. BLEEP* uses the same ResidualAdapter backbone as BioKERN while retaining BLEEP's training objective, isolating architectural effects.
BioKERN improves biological-neighborhood retrieval. BioKERN achieves the highest Bio-mAP among the baselines shown in Table 1 across both tissues and image-context settings. Relative to BLEEP, Mouse Brain Bio-mAP increases from 0.5087 to 0.6190 in SS and from 0.4960 to 0.6716 in MS. BioKERN also exceeds BLEEP*, indicating that the gain is not explained by the ResidualAdapter architecture alone. The Human Liver gains are smaller in absolute magnitude, but persist in the cross-slice transfer setting and remain competitive with the strong Ridge baseline.
Biological regularization accounts for most of the gain. We decompose the improvement sequentially as BLEEP → BLEEP* (architecture), BLEEP* → Ret-only (objective change), and Ret-only → BioKERN (biological regularization). Under this additive decomposition, the biological-regularization step accounts for approximately 63–91% of the total Bio-mAP improvement across the four settings. On Mouse Brain SS, the architecture contributes +0.0240, the objective change +0.0037, and the biological-regularization step +0.0826. A shuffled-kernel control further shows that meaningful biological pairwise structure is important rather than merely adding another relational loss.
Graded neighborhood supervision is the strongest component. Ablations show that removing biological-kernel supervision substantially reduces Bio-mAP, while removing causes the largest degradation among the three biological objectives. The relative value of molecular and spatial structure varies across tissue settings: combining both signals performs best on Mouse Brain and Human Liver MS, whereas Human Liver SS favors the transcriptomic-only kernel. Consistent with this tissue-dependent behavior, the learned molecular–spatial weight is stable across multiple initializations, with Human Liver assigning greater weight to transcriptomic similarity than Mouse Brain. The strong fixed- control nevertheless shows that the primary gain arises from biological-neighborhood supervision rather than from learning alone. Full ablations and kernel-weight analyses are provided in Appendices F and G.
5 Conclusion
BioKERN introduces an explicit biological inductive bias for multimodal spatial representation learning. Rather than evaluating representation quality only through exact-pair matching, BioKERN uses a learnable molecular–spatial reference geometry to provide graded neighborhood supervision and relational regularization. Across mouse brain and human liver, this improves biological-context retrieval, and controlled experiments indicate that the biological regularization—rather than architectural complexity—accounts for most of the gain.
The current study remains limited to two single-donor benchmarks and a scalar kernel mixture. Future work should evaluate cross-donor and cross-platform transfer, richer region-dependent biological priors, and larger spatial resources. More broadly, BioKERN provides a simple mechanism for injecting explicit biological structure into foundation-model-based multimodal representations for spatial biology.
References
Patrik L Stähl et al. Visualization and analysis of gene expression in tissue sections by spatial transcriptomics. Science, 353(6294):78–82, 2016.
Robert R Stickels et al. Highly sensitive spatial transcriptomics at near-cellular resolution with Slide-seqV2. Nature Biotechnology, 39(3):313–319, 2021.
Ao Chen et al. Spatiotemporal transcriptomic atlas of mouse organogenesis using DNA nanoball-patterned arrays. Cell, 185(10):1777–1792, 2022.
Gabriele Campanella et al. Clinical-grade computational pathology using weakly supervised deep learning on whole slide images. Nature Medicine, 25(8):1301–1309, 2019.
Ming Y Lu et al. Data-efficient and weakly supervised computational pathology on whole-slide images. Nature Biomedical Engineering, 5(6):555–570, 2021.
Giovanni Palla et al. Squidpy: a scalable framework for spatial omics analysis. Nature Methods, 19(2):171–178, 2022.
Ruben Dries et al. Giotto: a toolbox for integrative analysis and visualization of spatial expression data. Genome Biology, 22(1):1–31, 2021.
Juannan Xie et al. BLEEP: Bi-modal embedding framework for spatially resolved gene expression prediction. In Advances in Neural Information Processing Systems, volume 36, 2023.
Mengqian Yang et al. Multimodal contrastive learning for spatial gene expression prediction using histology images. Briefings in Bioinformatics, 25(6), 2024.
Xu Zhou et al. ConGcR: Contrastive graph-based representation learning for spatial transcriptomics. bioRxiv, 2024.
Jian Hu et al. SpaGCN: Integrating gene expression, spatial location and histology to identify spatial domains and spatially variable genes by graph convolutional network. Nature Methods, 18(11):1342–1351, 2021.
Kangning Dong and Shihua Zhang. STAGATE: Deciphering spatial domains from spatially resolved transcriptomics with an adaptive graph attention auto-encoder. In Nature Communications, volume 13, page 1739, 2022.
Yahui Long et al. GraphST: Spatially informed clustering and integration of spatial transcriptomics data. Nature Methods, 20(7):1053–1063, 2023.
Nello Cristianini, John Shawe-Taylor, André Elisseeff, and Jaz Kandola. On kernel-target alignment. Advances in Neural Information Processing Systems, 14, 2002.
Corinna Cortes, Mehryar Mohri, and Afshin Rostamizadeh. Algorithms for learning kernels based on centered alignment. Journal of Machine Learning Research, 13:795–828, 2012.
Wonpyo Park, Dongju Kim, Yan Lu, and Minsu Cho. Relational knowledge distillation. In Conference on Computer Vision and Pattern Recognition, pages 3967–3976, 2019.
Frederick Tung and Greg Mori. Similarity-preserving knowledge distillation. In International Conference on Computer Vision, pages 1365–1374, 2019.
Prannay Khosla et al. Supervised contrastive learning. In Advances in Neural Information Processing Systems, volume 33, pages 18661–18673, 2020.
Zhi Huang et al. A visual-language foundation model for pathology image analysis using medical Twitter. In Nature Medicine, volume 29, pages 2307–2316, 2023.
Yu Wang et al. STMCL: Spatial transcriptomics multi-slice contrastive learning. bioRxiv, 2024.
Xin Li et al. Spatial transcriptomics expression prediction from histopathology based on cross-modal mask reconstruction and contrastive learning. Medical Image Analysis, 2025a.
Yu Wang et al. FineST: Fine-grained spatial transcriptomics prediction from histology. arXiv preprint, 2026.
Rahul Gindra et al. A large-scale benchmark of cross-modal learning for histology and gene expression in spatial transcriptomics. arXiv preprint arXiv:2508.01490, 2025.
Bryan He et al. Integrating spatial gene expression and breast tumour morphology via deep learning. Nature Biomedical Engineering, 4(8):827–834, 2020.
Minxing Pang et al. Leveraging information in spatial transcriptomics to predict super-resolution gene expression from histology images in tumors. bioRxiv, 2021.
Yuansong Zeng et al. Spatial transcriptomics prediction from histology jointly through Transformer and graph neural networks. Briefings in Bioinformatics, 23(5), 2022.
Shunxing Xu et al. GHIST: Single-cell resolution spatial gene expression prediction from histology. Nature Methods, 2025.
Yang Li et al. FmH2ST: Foundation model for histology-to-spatial transcriptomics. arXiv preprint, 2025b.
Guillaume Jaume et al. Cross-modal knowledge distillation from spatial transcriptomics to histology. In arXiv preprint arXiv:2311.09769, 2023.
Guillaume Jaume et al. HEST-1k: A dataset for spatial transcriptomics and histology image analysis. arXiv preprint arXiv:2406.16192, 2024.
Andrés Mejía et al. SpaRED: Standardized pipeline for reproducible evaluation of spatially resolved expression data. bioRxiv, 2024.
Wei Chen et al. spCLUE: Contrastive learning for spatial domain detection. bioRxiv, 2025.
Debidatta Dwibedi et al. With a little help from my friends: Nearest-neighbor contrastive learning of visual representations. In International Conference on Computer Vision, pages 9588–9597, 2021.
A Extended Related Work
Histology–transcriptomics alignment. Contrastive learning has emerged as a dominant paradigm for aligning H&E patches with gene-expression profiles. BLEEP [Xie et al., 2023] learns a bi-modal embedding space for retrieval-based expression prediction and uses similarity-smoothed targets derived from within-modality relationships. Thus, BioKERN is not distinguished simply by using non-one-hot supervision; its key difference is the use of an explicit molecular–spatial biological reference geometry for both retrieval supervision and representation regularization. mclSTExp [Yang et al., 2024] extends this with multimodal contrastive learning incorporating spatially contextualized expression representations, while ConGcR [Zhou et al., 2024] integrates gene expression, spatial location, and tissue morphology through contrastive representation learning.
More recent approaches including STMCL [Wang et al., 2024], CMRCNet [Li et al., 2025a], and FineST [Wang et al., 2026] combine cross-modal alignment with reconstruction objectives or foundation-model features. A large-scale benchmark of histology–gene-expression cross-modal learning [Gindra et al., 2025] further highlights the importance of dataset-specific gene-expression representations. These approaches differ in how they use paired supervision, reconstruction, and contextual information. BioKERN specifically studies an explicit biological target geometry over transcriptomic and spatial similarity and uses that geometry to regularize cross-modal retrieval.
Gene-expression prediction from histology. A parallel line of work directly predicts spatially resolved gene expression from H&E. ST-Net [He et al., 2020] and HisToGene [Pang et al., 2021] established the viability of deep learning for this task, while Hist2ST [Zeng et al., 2022] introduced graph-based spatial modeling. Recent methods use pathology foundation models [Xu et al., 2025, Li et al., 2025b] and cross-modal knowledge distillation [Jaume et al., 2023]. Larger resources including HEST-1k [Jaume et al., 2024] and SpaRED [Mejía et al., 2024] facilitate standardized evaluation. These methods principally optimize expression reconstruction; BioKERN instead studies retrieval of biologically related transcriptomic contexts.
Spatial neighborhood modeling. Spatial-transcriptomics analysis routinely depends on local neighborhood structure. Squidpy [Palla et al., 2022] and Giotto [Dries et al., 2021] provide spatial graphs, statistics, and neighborhood analyses. SpaGCN [Hu et al., 2021], STAGATE [Dong and Zhang, 2022], GraphST [Long et al., 2023], and spCLUE [Chen et al., 2025] learn representations that preserve spatial structure through graph convolutions, attention, or contrastive learning. BioKERN applies a related principle across modalities: the shared H&E–gene space is regularized to preserve a biologically interpretable reference geometry.
Kernel and relational regularization. Kernel-target alignment provides a classical framework for comparing learned similarities with a desired structure [Cristianini et al., 2002, Cortes et al., 2012]. Relational knowledge distillation [Park et al., 2019] and similarity-preserving learning [Tung and Mori, 2019] show that preserving pairwise relationships can improve representation transfer. Supervised contrastive learning [Khosla et al., 2020] and nearest-neighbor contrastive learning [Dwibedi et al., 2021] similarly extend instance discrimination to richer positive relations. BioKERN contributes a biological reference kernel combining transcriptomic and spatial signals and uses it for both soft retrieval supervision and direct embedding-geometry regularization.
B Additional Method Details
B.1 Problem Definition
Given a spatial-transcriptomics dataset,
denotes the H&E patch centered at spot , the corresponding gene-expression profile, and its spatial coordinate.
The goal is to learn a shared morphology–transcriptomics representation in which an H&E query retrieves spots whose transcriptional state belongs to the same biological neighborhood rather than only the exact paired spot.
B.2 Image and Gene Representation
A frozen PLIP encoder [Huang et al., 2023] maps each H&E patch to
Gene expression is normalized to 10,000 counts per spot, log1p transformed, filtered to highly variable genes, standardized per gene, and reduced with PCA to
Both modalities are projected into a common dimensional space using a ResidualAdapter:
Here is a linear projection, is a two-layer GELU network with hidden dimension 256 and 10% dropout, and is a learnable residual scale initialized to 0.1. All backbone parameters remain frozen.
We additionally define a fused entity representation
The learned entity kernel is
For multi-scale experiments,
where
B.3 Learnable Biological Reference Kernel
The transcriptomic kernel is
The spatial kernel is
Both bandwidths are determined using the median pairwise-distance heuristic on the training set. For datasets containing multiple tissue sections, is set to zero whenever i and j originate from different sections; no cross-section spatial coordinate is treated as a physical neighbor. The reference biological kernel is
B.4 Biological-Neighborhood Objective
The complete training objective is
We use
Exact retrieval loss. Let
Then
Soft neighborhood loss. For each anchor , the top- non-self neighbors () within the current minibatch under define
The bidirectional soft retrieval loss is
Global kernel alignment.
Local kernel alignment. Let
Then
The biological kernel is used as training-time supervision and is not required for query-time ranking. At inference, an H&E query is embedded as , and reference transcriptomic embeddings are ranked by cosine similarity,
C Experimental Details
C.1 Datasets
Mouse Brain Visium. We use the coronal 10× Visium mouse-brain dataset distributed through Squidpy [Palla et al., 2022]. A 2,200-spot subset is fixed before model training and used identically for all methods, with 1,650 training and 550 test spots. The split is performed before feature selection: highly variable gene selection, gene-wise standardization, and PCA are fitted on the training spots only, and the held-out spots are transformed using the fitted training parameters. Gene embeddings use PCA-128 representations from the top 3,000 training-selected highly variable genes. Leiden clustering at resolution 0.5 produces 10 evaluation domains.
Human Liver GSE240429. We use four 10× Visium slices from donor C73. We use the same cross-slice dataset setting as BLEEP, with slices A1+B1+D1 (6,963 spots) used for training and slice C1 (2,273 spots) used for testing. All gene preprocessing is fitted using A1+B1+D1 only: the union of the top 1,000 highly variable genes from the training slices is standardized with training statistics and reduced to PCA-128, after which C1 is transformed without refitting. Spatial affinities are computed only within a slice; cross-slice entries of are set to zero.
For both datasets, single-scale (SS) experiments use H&E patches, while multi-scale (MS) experiments combine and patch representations using a learned fusion weight.
C.2 Retrieval Protocol
For each held-out query, the input to the retrieval model is the H&E patch only. The gallery contains transcriptomic embeddings for all spots in the corresponding held-out test set, including the exact paired profile. The exact pair is retained when computing exact-retrieval metrics such as ExR@k and MedRank, but it is excluded from all biological-neighborhood positive sets. Query-side gene expression and spatial coordinates are used only to construct evaluation labels and are never supplied to the retrieval model at inference. Thus, all methods are evaluated on exactly the same query/gallery pairs.
C.3 Baselines
External baselines include CCA, Ridge regression, PLIP linear probe, and BLEEP [Xie et al., 2023]. We also report a naive PLIP zero-shot lower bound, which compares separately constructed image and gene PCA representations without learned cross-modal alignment.
Internal baselines use the same ResidualAdapter backbone as BioKERN: BLEEP*, Ret-only, Rank, and Shuffled Kernel.
PLIP linear trains one linear projection for each modality using exact bidirectional InfoNCE. BLEEP* applies BLEEP's smoothed-contrastive loss to the ResidualAdapter backbone. Ret-only uses the same exact bidirectional InfoNCE objective with the ResidualAdapter backbone but without biological-kernel supervision. Rank combines retrieval loss with a log-determinant regularizer. Shuffled Kernel retains the BioKERN objective but randomly permutes the biological kernel for each random seed.
C.4 Biological Neighborhood Metrics
Bio-mAP. To keep evaluation independent of the learned training kernel, every method is evaluated against the same fixed biological kernel,
For each query i, the exact paired/self index is removed before selecting the top-50 spots under as the biological-positive set . The fixed top-50 definition is used identically for all methods. Because this corresponds to different positive prevalence at different gallery sizes, we compare Bio-mAP values within a dataset rather than interpreting their absolute magnitude across Mouse Brain and Human Liver.
Bio-mAP is
where
BioR@p%. BioR@p% uses the same fixed and excludes the exact paired/self index before defining the top-p% biological neighborhood. Let
Then
We report .
GeneR@5% and SpatR@5%. GeneR@5% and SpatR@5% replace with and , respectively, and exclude the exact paired/self index before defining positives. They therefore quantify transcriptomic and spatial neighborhood retrieval independently of the learned training weight .
ClsHit@10. If denotes the fixed Leiden label associated with query i,
Mouse Brain uses the 10 Leiden domains defined above. For Human Liver, Leiden labels are constructed on held-out C1 from its training-fitted gene representation and are used only as evaluation annotations; cluster labels are never provided to any retrieval model.
Exact-pair metrics. We additionally report exact-pair and expression-profile metrics:
• ExR@k: fraction of queries whose exact paired spot appears in the top-k retrieved observations;
• MedRank: median rank of the exact paired spot; and
• PCC@k: query-wise profile correlation between the true gene expression vector and the mean expression profile of the top-k retrieved spots.
Specifically, with denoting the top-k retrieved spots,
C.5 Training
All neural models use AdamW with initial learning rate , weight decay , cosine annealing, batch size 256, and 60 epochs. Neighborhood size and loss weights are selected using held-out validation data from the training split and are fixed before final test evaluation. We use , , , and ; was selected as a conservative operating point that improves biological-neighborhood retrieval while retaining exact-pair alignment. All final stochastic results are reported as meanstandard deviation over five random seeds.
D Full Benchmark Results
Table D.1: Biological Neighborhood Retrieval on Mouse Brain Visium (single-scale, PLIP ). Meanstandard deviation over five random seeds. All methods use the same fixed ; bold indicates the best value in each column.
| Method | Bio-mAP | BioR@5% | GeneR@5% | SpatR@5% | ClsHit@10 | ExR@10 | MedRank | PCC@10 |
|---|---|---|---|---|---|---|---|---|
| CCA | ||||||||
| Ridge | ||||||||
| PLIP zero-shot | ||||||||
| PLIP linear | ||||||||
| BLEEP | ||||||||
| BLEEP* | ||||||||
| Ret-only | ||||||||
| Rank | ||||||||
| Shuffled Kernel | ||||||||
| BioKERN |
Table D.2: Biological Neighborhood Retrieval on Mouse Brain Visium (multi-scale, PLIP ). All methods use the same fixed . Bold indicates the best value in each column.
| Method | Bio-mAP | BioR@5% | GeneR@5% | SpatR@5% | ClsHit@10 | ExR@10 | MedRank | PCC@10 |
|---|---|---|---|---|---|---|---|---|
| CCA | ||||||||
| Ridge | ||||||||
| PLIP zero-shot | ||||||||
| PLIP linear | ||||||||
| BLEEP | ||||||||
| BLEEP* | ||||||||
| Ret-only | ||||||||
| Rank | ||||||||
| Shuffled Kernel | ||||||||
| BioKERN |
Table D.3: Biological Neighborhood Retrieval on Human Liver GSE240429 (single-scale). Train: A1+B1+D1; test: C1. All methods use the same fixed . Bold indicates the best value in each column.
| Method | Bio-mAP | BioR@5% | GeneR@5% | SpatR@5% | ClsHit@10 | ExR@10 | MedRank | PCC@10 |
|---|---|---|---|---|---|---|---|---|
| CCA | ||||||||
| Ridge | ||||||||
| PLIP zero-shot | ||||||||
| PLIP linear | ||||||||
| BLEEP | ||||||||
| BLEEP* | ||||||||
| Ret-only | ||||||||
| Rank | ||||||||
| Shuffled Kernel | ||||||||
| BioKERN |
Table D.4: Biological Neighborhood Retrieval on Human Liver GSE240429 (multi-scale). All methods use the same fixed . Bold indicates the best value in each column.
| Method | Bio-mAP | BioR@5% | GeneR@5% | SpatR@5% | ClsHit@10 | ExR@10 | MedRank | PCC@10 |
|---|---|---|---|---|---|---|---|---|
| CCA | ||||||||
| Ridge | ||||||||
| PLIP zero-shot | ||||||||
| PLIP linear | ||||||||
| BLEEP | ||||||||
| BLEEP* | ||||||||
| Ret-only | ||||||||
| Rank | ||||||||
| Shuffled Kernel | ||||||||
| BioKERN |
E Isolating the Effect of Biological Regularization
To avoid conflating architecture, objective, and biological supervision, we use a sequential additive decomposition:
where is BLEEP* minus BLEEP, is Ret-only minus BLEEP*, and is BioKERN minus Ret-only. The shuffled-kernel model is reported separately as a sanity check and is not part of the additive path.
Table E.1: Sequential effect decomposition on Mouse Brain Visium. “Step ” is the change from the preceding model in the additive path. The biological regularization step explains 74.9% (SS) and 63.4% (MS) of the total gain.
| Scale | Method | Bio-mAP | Step | Interpretation |
|---|---|---|---|---|
| SS | BLEEP | 0.5087 | - | baseline |
| BLEEP* | 0.5327 | +0.0240 | architecture | |
| Ret-only | 0.5364 | +0.0037 | objective | |
| BioKERN | 0.6190 | +0.0826 | biological regularization | |
| Shuffled Kernel | 0.4939 | - | sanity check | |
| MS | BLEEP | 0.4960 | - | baseline |
| BLEEP* | 0.5541 | +0.0581 | architecture | |
| Ret-only | 0.5602 | +0.0061 | objective | |
| BioKERN | 0.6716 | +0.1114 | biological regularization | |
| Shuffled Kernel | 0.5015 | - | sanity check |
Table E.2: Sequential effect decomposition on Human Liver GSE240429. The biological regularization step explains 88.3% (SS) and 90.6% (MS) of the total gain.
| Scale | Method | Bio-mAP | Step | Interpretation |
|---|---|---|---|---|
| SS | BLEEP | 0.0302 | - | baseline |
| BLEEP* | 0.0309 | +0.0007 | architecture | |
| Ret-only | 0.0313 | +0.0004 | objective | |
| BioKERN | 0.0396 | +0.0083 | biological regularization | |
| Shuffled Kernel | 0.0301 | - | sanity check | |
| MS | BLEEP | 0.0312 | - | baseline |
| BLEEP* | 0.0321 | +0.0009 | architecture | |
| Ret-only | 0.0321 | +0.0000 | objective | |
| BioKERN | 0.0408 | +0.0087 | biological regularization | |
| Shuffled Kernel | 0.0293 | - | sanity check |
F Ablation Studies
F.1 Mouse Brain Visium: Single Scale
Table F.1: Ablation study on Mouse Brain Visium, single-scale. All variants share the Residual-Adapter backbone and the same fixed evaluation kernel as the main benchmark.
| Setting | Bio-mAP | BioR@5% | GeneR@5% | SpatR@5% | ClsHit@10 | ExR@10 | MedRank | PCC@10 |
|---|---|---|---|---|---|---|---|---|
| Loss terms | ||||||||
| w/o | ||||||||
| w/o | ||||||||
| w/o |
F.2 Mouse Brain Visium: Multi Scale
Table F.2: Ablation study on Mouse Brain Visium, multi-scale. All variants use the same fixed evaluation kernel as the main benchmark.
| Setting | Bio-mAP | BioR@5% | GeneR@5% | SpatR@5% | ClsHit@10 | ExR@10 | MedRank | PCC@10 |
|---|---|---|---|---|---|---|---|---|
| BioKERN | ||||||||
| w/o Bio Kernel | ||||||||
| only | ||||||||
| only | ||||||||
| Fixed | ||||||||
| Shuffled Kernel | ||||||||
| w/o | ||||||||
| w/o | ||||||||
| w/o |
F.3 Human Liver: Single Scale
Table F.3: Ablation study on Human Liver GSE240429, single-scale. All variants use the same fixed evaluation kernel and cross-slice spatial masking as the main benchmark.
| Setting | Bio-mAP | BioR@5% | GeneR@5% | SpatR@5% | ClsHit@10 | ExR@10 | MedRank | PCC@10 |
|---|---|---|---|---|---|---|---|---|
| BioKERN | ||||||||
| w/o Bio Kernel | ||||||||
| only | ||||||||
| only | ||||||||
| Fixed | ||||||||
| Shuffled Kernel | ||||||||
| w/o | ||||||||
| w/o | ||||||||
| w/o |
F.4 Human Liver: Multi Scale
Table F.4: Ablation study on Human Liver GSE240429, multi-scale. All variants use the same fixed evaluation kernel and cross-slice spatial masking as the main benchmark.
| Setting | Bio-mAP | BioR@5% | GeneR@5% | SpatR@5% | ClsHit@10 | ExR@10 | MedRank | PCC@10 |
|---|---|---|---|---|---|---|---|---|
| BioKERN | ||||||||
| w/o Bio Kernel | ||||||||
| only | ||||||||
| only | ||||||||
| Fixed | ||||||||
| Shuffled Kernel | ||||||||
| w/o | ||||||||
| w/o | ||||||||
| w/o |
G Sensitivity and Learned Biological Weighting
Table G.1: Sensitivity to on Mouse Brain Visium single-scale (seed 42). The default setting is .
| Bio-mAP | BioR@5% | BioR@10% | ExR@10 | |
|---|---|---|---|---|
| 0.0 | 0.5556 | 0.4776 | 0.5209 | 0.5018 |
| 0.1 | 0.5863 | 0.4962 | 0.5509 | 0.4855 |
| 0.2 | 0.6048 | 0.5086 | 0.5709 | 0.4891 |
| 0.3 | 0.6216 | 0.5165 | 0.5855 | 0.4909 |
| 0.5 | 0.6412 | 0.5288 | 0.6018 | 0.4745 |
| 1.0 | 0.6671 | 0.5415 | 0.6127 | 0.4382 |
This post-hoc sensitivity analysis is not used for test-set hyperparameter selection. Increasing improves Bio-mAP in this run while reducing exact-pair retrieval, confirming the trade-off that motivated selecting on validation data as a conservative operating point.
Table G.2: Trajectory of the learned biological-kernel weight on Mouse Brain Visium (single-scale, five seeds).
| Epoch | α (mean±std) | Dominant signal |
|---|---|---|
| 5 | 0.6022±0.0003 | gene |
| 10 | 0.6048±0.0005 | gene |
| 20 | 0.6093±0.0008 | gene |
| 30 | 0.6124±0.0009 | gene |
| 40 | 0.6142±0.0009 | gene |
| 50 | 0.6149±0.0009 | gene |
| 60 | 0.6150±0.0009 | gene |
The kernel weight changes only modestly from its initialization of 0.600, converging to approximately 0.615 on Mouse Brain SS. Additional runs initialized at converge to similar final weights and yield Bio-mAP differences within the observed seed-level variability, indicating that the learned weighting is not an artifact of a single initialization. Across tissue settings, Human Liver consistently converges to a larger transcriptomic weight than Mouse Brain. Together with the strong fixed- ablation, these results suggest that the principal performance benefit comes from biological-neighborhood supervision itself, while provides a stable, compact summary of the relative molecular and spatial weighting rather than a quantitative measure of biological importance.
H Implementation and Reproducibility Details
Mouse Brain preprocessing. We use the coronal mouse-brain Visium dataset distributed through Squidpy [Palla et al., 2022]. A fixed 2,200-spot subset is selected before model fitting with random seed 42 and used identically for all compared methods. We split these observations into 1,650 training and 550 test spots before fitting any gene-level preprocessing. Counts are normalized to 10,000 per spot and log1p transformed. The top 3,000 highly variable genes are selected on the training split only; gene-wise standardization and PCA-128 are also fitted on training spots only, and the resulting transforms are applied to test spots without refitting. Leiden clustering at resolution 0.5 and random seed 42 yields 10 evaluation domains.
Human Liver preprocessing. GSE240429 contains four Visium slices from donor C73. Training uses A1+B1+D1 and testing uses C1. The union of the top 1,000 highly variable genes across the training slices produces 2,625 genes after deduplication. Gene-wise standardization and PCA-128 are fitted on A1+B1+D1 only, and C1 is transformed using the fitted training statistics. Spatial coordinates are used only within their native slice; cross-slice spatial-kernel affinities are masked to zero.
Image features. H&E patches are extracted at each spatial spot from the high-resolution tissue image using the tissue_hires_scalef parameter from Space Ranger. Single-scale experiments use native-image crops; multi-scale experiments additionally use crops from the same spot center. Each crop is resized to the PLIP image encoder input resolution and processed with the normalization associated with the public pretrained PLIP image processor. The PLIP backbone remains frozen, and its output features are normalized before the trainable adapters. No test-time gene or spatial information enters the image encoder.
Kernel construction. Both and are RBF kernels whose bandwidths are fixed using the median pairwise-distance heuristic on training data. During training, the biological kernel
is recomputed within each minibatch using the current learned . Self entries are removed before selecting top- biological neighbors. In Human Liver, for pairs from different slices, so slice-local coordinates are never interpreted as cross-slice physical proximity.
Evaluation is deliberately decoupled from the learned training weight. Every model is evaluated with the same fixed kernel
constructed independently of model predictions. The exact paired/self index is removed before defining Bio-mAP, BioR, GeneR, and SpatR positive sets.
Optimization. All experiments are implemented in PyTorch and trained on a single NVIDIA A100 40 GB GPU. We use AdamW with weight decay , , , initial learning rate , cosine annealing, batch size 256, and 60 training epochs without early stopping.
We parameterize the constrained mixture weights as , , and . The unconstrained parameters , , and , together with , , and , are initialized as , 0, 0, , 0.1, and 0.1, respectively.
Loss weights are fixed to
The reported and loss weights are selected on held-out validation data from the training split and are fixed before final test evaluation. The loss implementation uses mean normalization over anchors or valid pairwise entries, matching the equations in Appendix B; in particular, is averaged over the anchors and over the kernel entries.
All stochastic experiments report mean±standard deviation over five random seeds.
Baseline implementation. CCA uses 50 components and at most 1,000 iterations. Ridge regression uses regularization coefficient 1.0. The reported PLIP zero-shot result is a naive unaligned lower bound: PCA-128 is fitted to training PLIP features and compared by cosine similarity with the gene PCA representation without learned cross-modal alignment. PLIP linear trains one linear projection for each modality with exact bidirectional InfoNCE using the same optimizer and schedule as BioKERN. BLEEP uses its original two-layer MLP encoder and similarity-smoothed contrastive objective. BLEEP* replaces the BLEEP projection architecture with the ResidualAdapter backbone while retaining the BLEEP objective. Ret-only, Rank, and Shuffled use the same ResidualAdapter architecture and differ only in the applied loss.
I Limitations and Broader Directions
The current evaluation is restricted to two single-donor spatial transcriptomics benchmarks. Human Liver evaluates cross-slice transfer within one donor, while Mouse Brain uses a within-section split; neither setting captures the full variation expected across donors, disease states, sample-processing protocols, or spatial-transcriptomics platforms.
Biological neighborhoods are operationalized through transcriptomic similarity and spatial proximity rather than external expert annotations. Bio-mAP is therefore evaluated with a fixed, model-independent molecular–spatial kernel and should still be interpreted together with transcriptomic, spatial, cluster, and exact-pair metrics. The training-time mixture parameter is a single scalar for each trained model; although it is stable to initialization, it cannot represent region-specific changes in which biological signal is most informative.
Larger-scale validation will be necessary to determine whether the learned molecular–spatial weighting transfers across tissues and datasets. Future work will therefore evaluate BioKERN on resources such as HEST-1k [Jaume et al., 2024], study multi-donor and disease-stratified settings, and incorporate richer priors such as cell-type relationships, morphological neighborhoods, pathway activity, and cell–cell interaction structure. The formulation is also compatible with modalities beyond gene expression and histology, including spatial proteomics and multiplexed imaging.