Fig. 1
From: stDyer enables spatial domain clustering with dynamic graph embedding

The workflow of stDyer. a stDyer accepts gene expression profiles and a KNN spatial graph (K = 6, units 1 to 6 for the shallow unit) from SRT data as inputs. GMVAE with GATs generates the unit embeddings and the probabilities of a unit belonging to Gaussian mixtures. The parameters for GMMs (\(\mu\) and \(\sigma\)) and temporary spatial domain labels of units are estimated by maximizing the log-likelihood of the marginal distribution across all units (“Methods” section). In the latent space, stDyer encourages the embedding of a unit to be reconstructed by its neighboring units in a KNN (dynamic) graph (e.g., 6 neighbors for a KNN spatial graph and 12 neighbors for a dynamic graph in this example). The temporary spatial domain label (red and blue) for each unit is generated by GMMs after each epoch. At the first training epoch, the KNN spatial graph is updated by connecting each target unit (e.g., shallow unit) to 6 additional units (e.g., units 7 to 12), where all these 7 units should share the same temporary spatial domain label. This dynamic graph and temporary spatial domain labels will be continuously updated after each epoch. stDyer also enables the identification of spatially variable genes using integrated gradient analysis. b The structure of GAT. GAT first takes the target unit and its neighbors’ expression profiles to generate query (Q), keys (K), and values (V) and uses the first two to obtain attention scores (a). The values are then weighted by the attention scores to generate the aggregated representation