Single-cell spatial transcriptomics is increasingly used in cancer studies, where accurate cell-type identification benefits from jointly modeling transcriptional similarity and tissue organization. However, sequencing noise, cross-platform heterogeneity, uneven label coverage across regions, and limited annotation budgets remain major obstacles. We propose DyGFormer, a semi-supervised model for cell-type classification that uses an initial geometric spatial prior (e.g., a coordinate-derived neighborhood graph) as a scaffold and learns input-dependent cell-cell connectivities via self-attention to reweight interactions.We inject a resistance-distance-based relative positional bias and introduce a Neighbor Interaction History(NIH) encoder to stabilize cross-layer neighborhood interactions, and incorporate triplet-guided metric supervision from a small labeled subset to improve class separability. Experiments on multiple single-cell-resolution spatial datasets (e.g., NanoString/CosMx and MERFISH) across tissues and platforms show consistent improvements in Accuracy and Macro-F1 over competitive baselines under both random and spatially disjoint label-sampling settings.
Dang et al. (Thu,) studied this question.