Spatial Mapping of the Precancer-to-Cancer Transition in Breast and Prostate Authors: Erik Storrs, Chia-Kuei Mo, Wen-hung Chou, Gaurav Bhatt, Siqi Chen, Xiyi Wei, Andrew Houston, Alla Karpova, Reyka G. Jayasinghe, Preet Lal, Peter Bayguinov, John M. Herndon, Xiang Li, Faria Anjum Simin, Xiangwei Fang, Michael C. Wendl, Xinhao Liu, Hongyu Zheng, Sherri R. Davies, Julia T. Wang, Andrew Shinkle, Robert S. Fulton, Jennifer Ponce, Michael Heinz, Richard Head, De Chen, Yuting Zhao, David Fenyo, Yang E. Li, Cynthia X. Ma, Rebecca Aft, Melissa A. Reimers, Albert H. Kim, Sidharth V. Puram, James A.J. Fitzpatrick, Kooresh I. Shoghi, R. Sherburne Figenshau, Foluso O. Ademuyiwa, Tao Ju, Graham A. Colditz Published: 2026 ABSTRACT Integrating intact-tumor imaging with spatial transcriptomics defines structural, molecular, and immune changes during the precancer-to-cancer progression in breast and prostate adenocarcinomas, revealing distinct transition drivers and spatial hallmarks. Introduction Breast and prostate cancers are among the most common invasive cancers in women and men, respectively. Although they originate in distinct organs, there are notable similarities in their development, progression, and underlying biological mechanisms (Fig. 1A; ref. 1). Both cancers rely on steroid hormones for growth and development, leading to similar therapeutic strategies targeting hormone signaling (2–4). They also share underlying hereditary genetic mechanisms for cancer initiation, such as alterations in BRCA1 and BRCA2 (5, 6), and morphologic similarities, particularly in the organization of their epithelial structures. Both tissues are composed of glandular structures with two primary cell layers, an inner luminal cell layer and an outer basal cell layer, and are responsible for secretory functions (production of milk in the breast and prostatic fluid in the prostate; refs. 7, 8). 3D spatial omic cohort for epithelial transition in breast and prostate cancers. A, Similarities between breast and prostate cancers in terms of sex hormone regulation, genetic predisposition, developmental processes, tissue architecture, physiologic functions, and disease progression timelines. B, Composition of the breast-and-prostate cancer transition cohort analyzed in this study, encompassing stacked 3D and native 3D and 2D cohorts. Left, breakdown of each cohort. Right, assay and case counts for each assay. Stacked 3D cohort: samples with serial sections reconstructed into 3D tumor volumes. This cohort utilizes Xenium, Visium HD, Visium, CosMx, CODEX, and H&E imaging. Native 3D cohort: samples processed with lightsheet microscopy to capture intact 3D structures. 2D cohort: individual sample sections without serial sections. These tissues also share a similar path to tumorigenesis, in which carcinoma typically arises from luminal cells. The surrounding basal layer remains intact during early precancer states, those being ductal carcinoma in situ (DCIS) in the breast and high-grade prostatic intraepithelial neoplasia (HGPIN) in the prostate (9, 10). Luminal cells in both cancers also typically express hormone receptors, such as estrogen receptor (ER) and progesterone receptor (PR) in the breast and androgen receptor (AR) in the prostate. During the transition from precancer to malignancy in both tumor types, the basal cell layer is broken, and neoplastic cells spread into the surrounding environment (11, 12). As such, precancerous lesions often have an attenuated basal layer, indicating progression toward loss of this barrier. Additionally, DCIS and HGPIN can both display similar epithelial cell patterns, such as cribriform architecture (13). Despite the clinical importance of tumor progression, the spatial and molecular dynamics of these transitions, particularly in breast and prostate cancers, remain poorly understood. This is, in part, due to the inability of conventional two-dimensional (2D) single-modality approaches to capture the full complexity of tumor topology and tumor–microenvironment interactions in situ. In this study, we developed a new volumetric approach that combines native three-dimensional (3D) and vertically reconstructed 2D data modalities to investigate malignant transition in breast and prostate tissues. We first imaged 14 tissue blocks from four cases with 3D lightsheet microscopy, providing high-resolution 3D immunofluorescence (IF) data for tissue blocks in their entirety. We report differences between the 3D morphologies of precancerous lesions and invasive carcinoma in both cancer types. To investigate the molecular signatures associated with these transitions, we developed a multimodal 3D serial sectioning approach, combining spatial transcriptomics (ST), multiplex imaging, and histologic staining. We assembled a cohort of 319 assays spanning 51 cases, nine of which were serially sectioned, and imaged with a variety of spatial data types (Fig. 1B; Supplementary Tables S1–S3). Additionally, we supplemented our 3D serial section cohort with 69 nonserial sections of Xenium, CosMx, CODEX, Visium, and Visium HD data. This 3D serial section approach enables reconstruction of 3D tissue structures from 2D sections, providing a unified framework for analyzing molecular and morphologic changes across 3D space. By leveraging Xenium, CosMx, Visium, Visium HD, and CODEX platforms, we interweave data at varying resolutions and biomarker coverage depth, overcoming important limitations inherent to single-platform analyses. Using this new approach, we reveal mechanisms underlying the progression of DCIS to intraductal carcinoma (IDC) in breast cancer and the transition from normal glands to Gleason pattern 3 (GP3) in prostate cancer. We have identified differentially expressed genes (DEG), spatial relationships, and tumor microenvironment (TME) features integral to epithelial cell state transitions. Furthermore, we have provided functional and mechanistic insights into the potential involvement of some of these genes in the key transitions. In addition to technical pipelines relevant to other cancer types, this study offers a blueprint for understanding breast and prostate cancer progression and suggests potential processes for therapeutic intervention. Results Breast and Prostate Cancer Transition Study Cohort Overview We profiled 319 tumor and normal sections (2D) and blocks (3D) from 51 cases, encompassing breast cancer (112 assays, 21 cases) and prostate cancer (207 assays, 30 cases) as part of the NCI Human Tumor Atlas Network (HTAN; Fig. 1B; Supplementary Tables S1–S3). The samples were divided into three cohorts based on the assay method and analysis strategy: stacked 3D, native 3D, and 2D cohorts. The stacked 3D cohort comprised 233 assays, including 76 assays from breast cancer and 157 from prostate cancer. Five spatial omics platforms (Xenium, CosMx, Visium, Visium HD, and CODEX), together with hematoxylin and eosin (H&E) imaging, were used to reconstruct 3D tumor structures and investigate molecular markers associated with the transition from noninvasive to invasive states (Supplementary Tables S2–S5). We also added additional 2D sections to form a nonserial 2D analysis cohort to increase sample size for DEG analyses, which included a total of 305 sections from 47 cases. Additionally, we performed native 3D assays using fluorescent lightsheet microscopy (FLSM) to trace the glandular structures in 3D and directly observe the transition from noninvasive to invasive states in both breast and prostate cancers. Volumetric Lightsheet Microscopy Reveals Tumor Architecture To investigate the architecture of precancerous and invasive tumor volumes within intact samples, we utilized FLSM to image cleared and immunostained tumor tissues (Fig. 2A and B). This analysis included five samples from two patients with breast cancer and nine samples from two patients with prostate cancer (Fig. 2A, “Methods”). Cytokeratin-5 (CK5) and pan-cytokeratin (PanCK) were used to label basal cells and epithelial cells, respectively, enabling the delineation of normal, precancerous, and invasive lesions in both breast and prostate cancer tissues (Fig. 2C and D). Volumetric lightsheet microscopy reveals 3D tumor architecture. A, Lightsheet cohort information. Samples used for the following detailed analysis were highlighted in pink and blue for breast and prostate tumors, respectively. B, Schematic of the experimental workflow for lightsheet microscopy. Tumor samples (“Methods”) were tissue-cleared and antibody-labeled before imaging by lightsheet microscopy. C, 3D view of the breast cancer sample HT944B1. D, 3D view of the prostate cancer sample HT957Z1. E, Two representative regions of DCIS were observed in a given breast cancer sample, surrounded by IDC and normal ductal structures. Regions are indicated in C. Scale bars, 100 μm. F, Fraction of PanCK-positive regions that are IDC (yellow) vs. DCIS (blue) across the whole structure in ROI1. G, 3D surface reconstruction of ROI1 in E. Scale bars, 300 μm. H, Selected region ROI3 of HT957Z1 in D, with HGPIN (blue dotted curves) to GP3/4 (yellow dotted curves) transitioning in prostate cancer sample. The IDC-P region is highlighted with orange dotted curves. Scale bars, 100 μm. I, Ratio between CK5-positive and PanCK-positive area decreases with the invasive transition across Z. J, 3D reconstruction of the high-grade PIN to GP3/4 transition in H. Scale bars, 200 μm. IDC-P, IDC of the prostate. In all images, CK5 is in white and PanCK is in red. (B, created with Biorender.com.). To investigate the differences between DCIS and IDC architectures, we focused our analysis on HT944B1 with confirmed IDC and DCIS features by pathologist’s review. This 7 mm by 2.5 mm by 1 mm sample (Supplementary Mov. S1) was filled with large but scattered regions positive with PanCK staining but little to no CK5 staining on the periphery, indicative of IDC and a discontinuous or absent basal layer (Fig. 2C, yellow arrowhead in E; Supplementary Mov. S2 and S3). Although IDC regions seem separated and scattered on a 2D section, they are interconnected throughout the tumor sample and can span large volumes (Supplementary Mov. S1, S2, and S4; Supplementary Fig. 1A), consistent with a pattern of invasion and uncontrolled growth in the 3D space. There are also six distinct PanCK-positive areas with CK5 staining surrounding their periphery. Some regions feature a thin layer of PanCK staining within the CK5 boundary, indicative of normal ductal structures in which a single layer of basal epithelial layer surrounds a single layer of luminal epithelial layer (Fig. 2E, green dashed line). Others feature an enlarged PanCK patch inside of the CK5 boundary, indicative of DCIS regions in which malignant luminal cells in the breast duct start to proliferate but the basal layer is still intact (Fig. 2E, blue dashed line). DCIS morphology either resembles a large homogeneous mass [Fig. 2E, region-of-interest (ROI)1] or an enlarged ductal structure (Fig. 2E, ROI2). For example, the DCIS structure highlighted in ROI1 spans more than 750 μm in the z-dimension, which is the direction perpendicular to the sections (Fig. 2F). The regions with intact CK5+ basal layers seem to retain the CK5 layer throughout the volume we observed, which leads us to hypothesize that the invasive lesion exists outside of the sampled region. Nonetheless, DCIS regions can be embedded within IDC regions (Fig. 2G; Supplementary Mov. S4). Lastly, we observed one region with multiple DCIS-like areas nested into a single larger structure, with strong CK5 staining interwoven with PanCK-stained precancer cells (Supplementary Fig. S1B and S1C; Supplementary Mov. S5). We propose that the observed structure is a breast lobule filled with neoplastic cells. As lobular carcinoma in situ was not indicated by our pathologist, we hypothesize that the cancer cells originated from DCIS regions outside of the sample but invaded through the ductal system. To investigate differences between high-grade PIN and invasive prostate tumor structures, we focused our detailed analysis on HT957Z1 that has coexisting normal glandular structures, high-grade PIN, and invasive adenocarcinoma. The pathology report of this patient indicates prostatic acinar adenocarcinoma with a Gleason score of 4 + 3. We observe bright but unspecific staining of spherical structures throughout many prostate samples, which we suspect originate from antibodies trapped by corpora amylacea (Fig. 2D; Supplementary Fig. S1D and S1E; Supplementary Mov. S6). We postulate that this reflects the overall inflammatory status of the patient. Similar to breast cancer samples, normal prostate ducts and acini are marked by an outer layer of CK5 and a thin inner layer of PanCK (Supplementary Fig. S1E). Some ductal structures feature an enlarged inner PanCK layer (25–50 µm thick rather than the typical ∼10 μm thick) with an intact CK5 boundary, suggestive of high-grade PIN structures (Fig. 2H, blue dashed line). These high-grade PIN structures are adjacent to, and seemingly connected to, disordered PanCK+ branching structures without CK5 on the periphery, consistent with the invasive pattern of Gleason score 4 (Fig. 2H, yellow dashed line, and Supplementary Mov. S7). Indeed, the CK5 to PanCK ratio decreased with the transition from 0.4 to 0.1 (Fig. 2I). This observed transition offers a detailed view of the architectural changes during the neoplastic transition (Fig. 2J; Supplementary Mov. S8). In addition, we observed ductal structures with strong CK5 staining on the basal layer and a lumen filled with PanCK-positive cells, similar to the DCIS morphology observed in breast cancer. These could be IDC of the prostate (Fig. 2H; Supplementary Fig. S1F orange dashed line). In summary, FLSM of intact breast and prostate tumors revealed that regions appearing disconnected in 2D are in fact highly interconnected in 3D, with DCIS and high-grade PIN lesions embedded within and/or transitioning into invasive carcinoma. These analyses highlight how basal layer integrity and epithelial expansion define architectural shifts, providing a direct volumetric view of noninvasive and invasive morphology. Gene Discovery Serial Section Workflow and Computational Framework To understand the molecular drivers associated with the structural transition, we devised a multimodal workflow integrating spatial assays across different platforms. Although the archetypical 2D section is blind to transition dynamics in the third dimension, it does provide large amounts of data, thanks to lower imaging costs. With a view to optimizing 2D tradeoffs of cost versus the limited field-of-view provided by 2D spatial assays, we developed an experimental and computational framework for volumetric integration of 2D sections from a tissue block using five platforms, namely H&E, Xenium, CosMx, CODEX, and the Visium family (Supplementary Fig. S2A). The data from the intermingled sections are computationally combined, furnishing a comprehensive view of spatial and structural variations (Supplementary Fig. S2B). Briefly, sections are cut at specific intervals and optimally arranged on slides according to the respective imaging area of each platform. Following imaging, sections are spatially registered using a keypoint workflow, enabling precise computational alignment across sections (arXiv:1511.01154), and the resulting data are annotated for gene discovery (“Methods”). The product is a block-specific atlas of computationally registered sections that can be examined for precancer-to-cancer transitions and interconnected tumor volumes. Single-platform 2D sections are generally unable to fully characterize transitions, unless the transition region is both sufficiently linear and there is a serendipitous match between it and the section orientation (Supplementary Fig. S2B). The computationally registered multisections in our method capture both linear and nonlinear transition regions within the section area, leaving no topologically disconnected image fragments of the transition region. The integration of platform data and the respective genes they cover support further computational inferences of the transition continuum by proximal correlations of expression (Supplementary Fig. S2C). The approach is used here for finding ROI level DEGs associated with cancer transition in volumetric tumor blocks. Effectively, this allows regions, for example, DCIS, microinvasion (MI), and IDC in breast cancer, to be examined holistically along a spatial continuum. We developed two methods to discover genes associated with these interconnected transition regions: path-based and morphology-based (“Methods”). Briefly, in the path-based method, we calculated a single correlation value across multiple spatial platforms within each interconnected 3D volume. The regression was run on expression values for each region along the path of the transitioning epithelial structure. In the morphology-based method, all regions morphologically annotated as noninvasive (e.g., DCIS) were compared WITH the all invasive regions (e.g., IDC) within the same platform. We also supplement these 3D ROI-level DEGs with 2D approaches that involve assessing regions’ myoepithelial intensity using basal layer markers. Using these markers, we are able to assign each region an invasiveness score, which is an indication of the basal layer marker gene abundance for the region and serves as a continuous metric reflecting the degree of morphologic and molecular progression along the transition axis within each ROI. This score was then correlated with gene expression, allowing the identification of cohort-level genes associated with myoepithelial integrity (“Methods”). Transitionary regions in all ROIs were reviewed and validated by board-certified pathologists. Biomarkers for DCIS-to-IDC Transition in Breast Cancer First, we applied our methodology to ascertain biomarkers correlated to the DCIS-to-IDC transition in breast cancer. Nine tissue samples were serially sectioned (“Methods”). Two samples having greater sectioning depths (460 and 120 µm) were selected for ROI-based analysis, as their increased depths enabled visualization of more pronounced morphologic changes along the Z-dimension of the tissue blocks. HT704B1, a 450-µm deep breast carcinoma specimen with regions of DCIS and IDC, was analyzed using five spatial platforms: Xenium (n = 6), CODEX (n = 12), H&E (n = 20), CosMx (n = 4), and Visium HD (n = 2; Fig. 3A; Supplementary Mov. S9 and S10). The 3D analysis of these sections revealed that regions separated in 2D space by more than 5 mm were in fact interconnected in the Z plane (Fig. 3B; Supplementary Table S6), underscoring the value of serial sectioning for understanding true morphologic relationships. We analyzed two regions of interest, ROI1 and ROI2, and identified common metabolic, epithelial integrity, and proliferation modules associated with the transition from DCIS to MI and to IDC (Fig. 3C–E; Supplementary Mov. S11 and S12). For example, DCIS in ROI1 demonstrated sustained expression of HMGCS2 (R2 = 0.79, P = 0.003: path-based) and TFF1 (R2 = 0.82, P = 0.002: path-based), which was lost in the interconnected IDC volume (Fig. 3D). Additionally, DCIS in ROI2 demonstrated strong expression of PLAT that significantly decreased at the site of MI (Fig. 3E). Both TFF1 and PLAT may play a role in maintaining epithelial integrity, potentially limiting neoplastic cell migration and invasiveness (14–18). HMGCS2 facilitates ketogenesis, enabling the production of lipid-derived energy (19), possibly enhancing precancerous cells' survival under hypoxic conditions often present in DCIS regions (20). In IDC, we observed upregulation of two genes involved in cell proliferation, TCIM (FC = 0.60: morphology-based on Xenium; ref. 21) and MKI67 (FC = 0.47: morphology-based on Xenium), in ROI1, and angiogenic factor VEGFA (R2 = 0.74, P ≤ 0.001; path-based; ref. 22) in ROI2 (Fig. 3D and E). TCIM, acting through the activation of Wnt/β-catenin pathway (21), may play a role in inducing invasive cancer cell proliferation marked by MKI67. 3D DCIS-to-IDC transition in breast cancer. A, Serial section schematic showing data gathered for HT704B1 (a breast carcinoma) with 44 sections from Xenium (n = 6), CODEX (n = 12), H&E (n = 20), CosMx (n = 4), and Visium HD (n = 2) spanning a depth of 460 μm. 3D ROIs ROI1 (teal) and ROI2 (blue) are shown on an H&E section. B, 3D display of the top 20 largest interconnected epithelial regions colored by volume. Overlaid is a linear cross section (orange line) stretching between two epithelial regions more than 5.5 mm apart in 2D distance. Offset (right) shows regions across the collection of serial sections that connect the two epithelial regions through the z-dimension. Regions displayed span a depth of 200 um and are colored by data type. C, Left, the interconnected regions of HT704B1 ROI1 are shown. Each region is colored by data type, and the DCIS axis and IDC axis of the path are shown. Right, 2D cross sections displaying each interconnected region (yellow outline). Morphology of each region (DCIS, MI, and IDC) is shown above each section. Each section is labeled by depth in the Z-axis, as well as colored by data type (blue, Xenium; green, Codex; purple, H&E; brown, CosMx; and gold, Visium HD). D, Left, the interconnected regions of HT704B1 ROI1. Right, gene expression changes from DCIS-to-IDC for the interconnected regions (yellow outline) are shown. Xenium and Visium HD regions are displayed. Transcripts for TFF1 (cyan, DCIS-associated) and TCIM (orange, invasive-associated), as well as HMGCS2 (blue, DCIS-associated) and MKI67 (yellow, invasive-associated), are displayed. For Xenium sections, each transcript location is shown as a point. For Visium HD, each 2-µm grid square with ≥ 1 transcript for the given gene is shown as a point. E, Interconnected regions of HT704B1 ROI2 are shown. Each region is colored by data type. Region morphology (DCIS and MI) is shown for each section. HMGCS2 (blue, DCIS-associated) and MYC (orange, invasive-associated) are displayed for Xenium sections for Z0 and Z245 (top). PLAT (green, DCIS-associated) and VEGFA (yellow, invasive-associated) are displayed for Visium HD sections for Z5 and Z250 (bottom). For Xenium sections, each transcript location is shown as a point. For Visium HD, each 2-µm grid square with ≥ 1 transcript for the given gene is shown as a point. F, Changes in gene expression across each interconnected region as it transitions from DCIS to IDC (ROI1) and DCIS to MI (ROI2) are shown. DCIS-associated (left) and IDC-associated (right) genes are grouped by their dominant biological function. Area normalized, Z-scaled expression is shown for each interconnected region in the ROI. Background color corresponds to the morphology of the interconnected region at the given cross section. A positive slope for a gene indicates association with the invasive axis of the region, whereas a negative slope indicates association with the DCIS axis. R2 and P values are included for each gene where the number of data points for that gene was ≥ 3. Values are color coded by ROI1 (teal) and ROI2 (blue). In addition to HT704B1, we also annotated ROIs in HT206B1, a triple-negative breast cancer (TNBC) sample (Supplementary Fig. 3A; Supplementary Mov. S13). In ROI1, we identified an interconnected region transitioning from DCIS to IDC (Supplementary Fig. S3B; Supplementary Mov. S14). In the IDC areas of ROI1, we visualize upregulation of MYC (R2 = 0.89, P ≤ 0.001; path-based) and MKI67 (R2 = 0.68, P = 0.006; path-based), both markers of proliferation and invasiveness (23, 24). Conversely, DCIS areas showed elevated expression of CDKN1A (R2 = 0.90, P = 0.05, path-based) and CA9. In contrast to MYC and MKI67, CDKN1A is a negative regulator of the cell cycle that may play a role in maintaining a less proliferative phenotype in DCIS areas (25). Additionally, the upregulation of hypoxia-induced marker CA9 in hypoxic regions of DCIS suggests that CA9, in addition to the lipid-derived energy provided by HMGCS2, may support the survival of DCIS cells by facilitating adaptation to hypoxic environments often found in DCIS (26, 27). Beyond the aforementioned genes, we identified additional mechanisms shared across multiple ROIs that may help to drive the DCIS-to-IDC transition (Fig. 3F; Supplementary Fig. S3C and S4). In DCIS regions, there was higher expression of genes involved in tissue architecture and remodeling (TFF1, PLAT, and MGP; refs. 14–16, 18, 28), ductal formation and differentiation (KIT and PIP; refs. 29, 30), and metabolism (HMGCS2; ref. 19). IDC regions exhibited upregulation of genes associated with proliferation (TCIM and MKI67; ref. 21), angiogenesis (VEGFA and CP; refs. 22, 31, 32), and metabolism (GLUL and FASN; refs. 33, 34). Together, these shifts in gene expression reflect the transition from organized, less invasive phenotypes to more highly proliferative and invasive cancer cell states. Quantification of the Normal–HGPIN–GP3 Transition in Prostate Cancer Similar to our approach in breast cancer, we aimed to identify 3D expression patterns that demonstrate transition from normal prostate gland tissue to invasive GP3 regions. We analyzed two samples, HT891Z1 and HT913Z1, which have morphologies spanning normal glands, HGPIN, and GP3 regions (Fig. 4A and B; Supplementary Mov. S15 and S16). These samples were serially sectioned to depths of 575 µm (HT891Z1) and 620 µm (HT913Z1). Using the aforementioned DEG exploration procedure, we identified putative marker genes associated with this progression and likewise selected two ROIs from each sample for detailed 3D analysis (“Methods”). 3D normal-to-GP3 transition in prostate cancer. A, Serial section schematic showing data gathering for HT891Z1 (a prostate adenocarcinoma) with 54 sections from Xenium (n = 10), CODEX (n = 16), H&E (n = 24), CosMx (n = 2), and Visium HD (n = 2) spanning a depth of 575 μm. 3D ROIs ROI1 (teal) and ROI2 (blue) are shown on an H&E section. B, A zoomed-in view of the H&E section has annotations for normal, HGPIN, and GP3 epithelial regions. Adjacent Xenium and CODEX images are also shown. C, Left, the interconnected regions of HT891Z1 ROI1 are shown. Each region is colored by data type, and the normal axis and GP3 axis of the path are shown. Right, 2D cross sections displaying each interconnected region (yellow outline) are shown. Morphology of each region (normal, HGPIN, and GP3) are shown above each section. Each section is labeled by depth in the Z-axis and colored by data type (blue, Xenium; green, Codex; purple, H&E; brown, CosMx; and gold, Visium HD). D, Gene expression changes from normal-to-GP3 for the interconnected regions (yellow outline) are shown. Xenium and Visium HD regions are displayed. Transcripts for FAS (cyan, normal-associated) and MYC (orange, invasive-associated), as well as SOX9 (green, normal-associated) and GDF15 (yellow, invasive-associated), are displayed. For Xenium sections, each transcript location is shown as a point. For Visium HD, each 2-µm grid square with ≥ 1 transcript for the given gene is shown as a point. Yellow and white indicator arrows in Z340 and Z290 image tiles indicate where the two branched regions merge together. E, Interconnected regions of HT891Z1 ROI2 are shown. Each region is colored by data type. Region morphology (normal, HGPIN, and GP3) is shown for each section. FAS (cyan, normal-associated) and MYC (orange, invasive-associated) transcripts are displayed for Xenium sections Z100, Z215, and Z400 (top). SOX9 (green, normal-associated) and GDF15 (yellow, invasive-associated) are displayed for the same sections (bottom). F, Changes in gene expression across each interconnected region as it transitions from normal to GP3 are shown. Normal-associated (left) and HGPIN/GP3-associated (right) genes are grouped by their dominant biological function. Area-normalized, Z-scaled expression is shown for each interconnected region in the ROI. Background color corresponds to the morphology of the interconnected region at the given cross section. A positive slope for a gene indicates association with the HGPIN/GP3 axis of the region, whereas a negative slope indicates association with normal axis. R2 and P values are included for each gene where the number of data points for that gene was ≥ 3. Values are color coded by ROI1 (teal) and ROI2 (blue). In HT891Z1, we analyzed two ROIs, ROI1 and ROI2, that capture the transition from a normal gland, through HGPIN, to GP3 morphology (Supplementary Mov. S17 and S18). In HT891Z1 ROI1, the transition showed distinct differences in gene expression along the normal–HGPIN–GP3 axis (Fig. 4C). In less invasive and normal regions, we observed higher expression of FAS (R2 = 0.53, P = 0.026; path-based). FAS, encoding the Fas cell surface death receptor that promotes apoptosis via the formation of the death-inducing signaling complex, initiates a cascade of caspases, culminating in programmed cell death (Fig. 4D and E; refs. 35, 36). Conversely, along the normal to GP3 transition, we observed upregulation of GDF15 (R2 = 0.68, P = 0.006; path-based) and MYC (R2 = 0.58, P = 0.016, path-based), whose expression also goes up as breast cancer progresses (Fig. 4E). GDF15, a member of the TGF-β superfamily, has been implicated in bone metastasis and progression to castration-resistant prostate cancer (37) but not in earlier stages of prostate cancer. Notably, in section Z290 of ROI1, we observed a striking dichotomy between normal and HGPIN expression patterns on the same section. On the right side of the gland, FAS was detected, whereas the left side exhibited elevated expressions of MYC and GDF15. Subsequent Z-sections revealed these two sides diverging into distinct morphologies, with the right retaining normal features of the prostatic gland and the left progressing toward HGPIN morphology. In HT913Z1, ROI1 shows a normal duct transitioning into GP3 morphology (Supplementary Fig. S5A and S5B; Supplementary Mov. S19). In the normal axis, we observed elevated expression of SORL1 across multiple sections with Xenium (Supplementary Fig. S5C), a gene not previously described in prostate cancer but which plays a role in lipid metabolism and trafficking through interactions with receptors like low-density lipoprotein receptor (38). In the invasive axis of HT913Z1, we observed upregulation of SERPINA3, with a distinct expression pattern localized only to specific GP3 areas. SERPINA3 has been implicated in a variety of processes, including mediating apoptosis, autophagy, and aerobic glycolysis, thereby affecting cell survival and metabolic pathways (39). Additionally, in melanoma, high SERPINA3 expression has been associated with extracellular matrix (ECM) remodeling, increased invasion, metastasis, and poorer overall survival, suggesting a similar proinvasive role (40). Finally, we identified pathways shared across multiple ROIs that may help to drive the normal-to-GP3 transition (Fig. 4F; Supplementary Fig. S4 and S5C). In areas having essentially normal glandular morphology, we observed upregulation of genes associated with gland differentiation and hormone signaling (FHL2 and SOX9; refs. 41, 42), inhibition of epithelial–mesenchymal transition (EMT; SORL1, NTN4, and FLRT3; refs. 43–45), tissue integrity (UPK1A; ref. 46), survival (FAS; ref. 35), and metabolism (SLC40A1; ref. 47). In contrast, regions with more aggressive HGPIN and GP3 morphology displayed increased expression of genes involved in migration and angiogenesis (GDF15, MYC, and EPHA6; refs. 37, 48, 49), metabolism and cell–cell communication (ALDH1A3; ref. 50), tissue integrity (SCIN; refs. 51, 52), survival (SERPINA3; ref. 39), and cell proliferation and differentiation (NPDCD1; ref. 53). In all, changes in the expression of these genes reflect biological transformations that occur from noninvasive to invasive transition in prostate cancer. Impact of the TME on Malignant Transition in Breast and Prostate Cancers In addition to epithelial cell markers, we explored changes in the TME that might facilitate the transition from normal to more invasive epithelial cells. We identified two TME cell types potentially involved in this transition: tumor-associated macrophages (TAM) and cancer-associated fibroblasts (CAF). Using our 2D automated gene discovery workflow (Fig. 5A), we identified two markers, SPP1 and MS4A6A, that distinguish TAM populations across different morphologic regions in non-TNBC breast cancer (Fig. 5B). In HT704B1 ROI1, we analyzed the expression of SPP1 and MS4A6A throughout the z-dimensional section stack, in which there is a clear association of MS4A6A+ TAMs infiltrating DCIS regions, whereas SPP1+ TAMs are more prevalent within IDC regions (Fig. 5C and D; Supplementary Fig. S6A and S6B). Interestingly, only luminal cell-of-origin breast tumors displayed this relationship, whereas sections from basal tumors differed in that their SPP1+ and MS4A6A+ TME expression was associated with noninvasive morphology. Similarly to TNBC, in prostate cancer, we observed localization of MS4A6A+ TAMs with noninvasive morphology. To further evaluate this association in three dimensions, we performed an analysis using all Xenium sections from HT704B1. For each TAM, we computed the shortest 3D distance to the nearest epithelial region. We then quantified the basal-layer intensity score of the corresponding epithelial region as a measure of invasiveness. Across five of the six sections analyzed, SPP1+ TAMs were preferentially associated with more invasive epithelial regions characterized by lower basal-layer integrity scores, whereas MS4A6A+ TAMs were more frequently localized near less invasive regions with higher basal-layer integrity scores (Supplementary Fig. S6C). Impact of TAMs and CAFs on malignant transition. A, Diagram of TME region enrichment gene identification process. Genes in an area within 20 µm of invasive and noninvasive regions were used to correlate with basal marker expression across cohort. B, Plot of noninvasive and invasive enriched genes in TAMs and CAFs. Distribution of negative basal-layer correlation is shown for all sections across the 2D and 3D datasets. Each dot (colored by data type) represents the correlation value for one section. A low invasiveness score indicates a gene’s overexpression in regions with highly expressed basal-layer markers at the region boundary (i.e., association with noninvasive regions; light green background), whereas a high invasiveness score indicates underexpression (i.e., association with invasive regions; light red background). Dotted horizontal lines denote cutoff for mean invasiveness score. C, Distribution of transcripts for MS4A6A+ (cyan, invasive-associated) and SPP1+ (orange, noninvasive-associated) TAMs are shown for Xenium, CosMx, and Visium HD sections in 3D ROI1 for HT704B1. D, Zoomed-in areas of HT704B1 ROI1 are shown with MS4A6A (cyan), SPP1 (orange), and other TAM markers (purple, CD14; green, CD68; and yellow, CD163). Area 1 displays a DCIS region with MS4A6A+ infiltrating TAMs, whereas area 2 shows IDC infiltrated with SPP1+ TAMs in Xenium section Z0. Areas 3 and 4 show DCIS-infiltrating MS4A6A+ TAMs and IDC-infiltrating TAMs, respectively, in Visium HD sections Z5 and Z250. E, IDC-associated CAF markers MFAP5 and ASPN are shown. Transcript densities for each gene (top) as well as a zoomed-in area with individual transcript locations for EPCAM (epithelial), ACTA2 (fibroblast), as well as MFAP5 and ASPN are displayed (bottom). CAFs also exhibit distinct associations with neoplastic cell states and play a critical role in modulating the TME. In non-TNBC breast sections, we observed upregulation of key stromal genes around invasive regions—MFAP5 and ASPN—that contribute to tumor progression (Fig. 5B and E). MFAP5, a fibroblast-secreted ECM glycoprotein, facilitates cancer cell invasion by remodeling the ECM and activating PI3K/AKT and TGF-β signaling pathways, which drive the EMT (54–56). It also enhances angiogenesis by upregulating VEGF, promoting tumor vascularization (57). ASPN, a proteoglycan secreted by CAFs, regulates ECM stiffness by interacting with collagen and other ECM components (58, 59). In summary, the spatial enrichment of SPP1+ macrophages at invasive fronts suggests that inflammatory signaling, ECM remodeling, and immune modulation converge to create a permissive niche for epithelial escape (60, 61). In parallel, MFAP5- and ASPN-expressing fibroblasts contribute to matrix remodeling and proangiogenic signaling, altering both biochemical and biomechanical properties of the tissue. The juxtaposition of these immune and stromal programs with transitioning epithelial cells suggests that malignant invasion arises from coordinated epithelial–microenvironmental interactions. Common and Diverse Mechanisms of Precancer-To-Cancer Transition in Breast and Prostate Tumor heterogeneity presents a major challenge, as no single molecular process is universally shared within a tumor or across all cases. However, our analyses highlight several patterns of gene expression associated with the transition from noninvasive to invasive states in breast and prostate cancers (Fig. 6A; Supplementary Fig. S7A and S7B). Broadly, these transition genes fall into three categories: genes enriched in breast, genes enriched in prostate, and genes shared across both cancer types. Common and diverse mechanisms of breast and prostate transition. A, Left, noninvasive markers (green slope) and invasive markers (purple slope) enriched in breast (red) and prostate (blue) cancers. Genes are annotated with known functions according to colored blocks. A, Right, noninvasive and invasive markers enriched in macrophages and fibroblasts. Shared genes between breast and prostate cancers are represented in bold and purple, respectively. B, CODEX validation for DCIS marker MGP in breast samples HT206B1, HT323B1, and HT397B1. Yellow boxes indicate regions of IDC, whereas green are regions of DCIS. Zoomed-in views of those locations are shown. C, CODEX validation for noninvasive luminal cell marker PLAT in HT704B1 breast cancer sample. D, IF validation of GDF15 (green) with DAPI (blue) and PanCK5 (red) in prostate sample HT935Z1, showing increased expression of invasion-associated gene GDF15 in GP3+ areas and no expression in normal glands. E, IF validation in prostate sample HT891Z1 for the invasive epithelial marker ALDH1A3 (red), with DAPI (nuclear, blue), CK5 (basal, green), and ECAD (epithelial, cyan), showing increased ALDH1A3 abundance in GP3+ areas. CK5 (green), ALDH1A3 (red), and ECAD (cyan) are also shown individually (right). In breast cancer, genes linked to tissue integrity and remodeling—including MGP and PLAT—were consistently enriched in noninvasive states (DCIS) across multiple samples (Fig. 6A; Supplementary Fig. S7A and S7B). Additional markers such as KIT and CA9 also localized to DCIS regions at the ROI-level in HT206B1 (Supplementary Fig. 3). In contrast, IDC was marked by angiogenesis-related genes, with KRT8 and VEGFA enriched at the cohort level and CP enriched within ROI analyses (Figs. 3F, 6A and B). IF validation further confirmed that MGP protein was significantly upregulated in DCIS relative to IDC (normal vs. IDC: P = 1.29e−4, DCIS vs. IDC: P = 3.81e−8; Student t test; two-sided. Fig. 6B; Supplementary Fig. S8A; Supplementary Mov. S20). MGP, a γ-carboxyglutamic domain containing protein, plays a critical role in inhibiting soft tissue calcification and maintaining ECM integrity by preventing inappropriate calcium deposition, ensuring ECM flexibility and function (62). In premalignant states, maintaining ECM organization is essential, as dysregulation—such as increased stiffness from mineralization—may facilitate tumor invasion and progression by altering ECM composition and structure (28, 63). Similarly, PLAT protein was significantly enriched in noninvasive breast regions (normal vs. IDC: P = 3.81e−4; DCIS vs. IDC: P = 0.009; Student t test; two-sided. Fig. 6C; Supplementary Fig. S8B). In prostate cancer, noninvasive regions expressed ECM-related genes such as UPK1A and FLRT3. ANPEP and ALDH1A3, linked to cell–cell communications and metabolism (64, 65), were upregulated in invasive prostate cancer regions but downregulated in invasive breast cancer areas. We also validated some invasive drivers by IF, including GDF15 (P = 0.031; Student t test; two-sided. Fig. 6D; Supplementary Fig. S8C) and ALDH1A3 (P = 3.46e−6; Student t test; two-sided. Fig. 6E; Supplementary Fig. S8D), both of which were significantly upregulated in invasive lesions compared with normal glands. GDF15, a stress-induced cytokine in the TGF-β family, is known to promote EMT and tumor progression (37, 66, 67). Finally, several genes were consistently enriched across both cancer types, including FASN (Supplementary Fig. S8E and F; fatty acid synthase), which promotes tumor progression by supplying lipids necessary for the energy demands of rapidly proliferating cells (68), and EPHA6 (Supplementary Fig. S8G), a member of the Eph receptor tyrosine kinase family that is involved in cell–cell communications and has been indicated as a metastasis-associated gene in prostate cancer (49). We then selected candidate transition markers, including those showing consistent trends both at the transcriptional and protein levels, for functional validation in patient-derived cell lines. In breast cancer, we used short hairpin RNA (shRNA)-mediated knockdown of noninvasive enriched tissue remodeling-related genes MGP and PLAT in patient-derived DCIS cell lines ETCC-006 and ETCC-010 (69). Real-time quantitative PCR (RT-qPCR) confirmed significant transcript reduction (P < 0.005), and functional assays showed significant effects associated with the gene knockdowns (Fig. 7A). CCK-8 assays showed that silencing either gene enhanced proliferation across 24- to 120-hour time points after transfection, and wound-healing assays demonstrated accelerated migration, as reflected by greater wound closure at 24 hours (Fig. 7B–D; Supplementary Fig. S9). These results indicate that loss of MGP or PLAT promotes proliferative and migratory behaviors, consistent with their protective roles in maintaining DCIS. Functional validation of breast and prostate transition markers. A, RT–qPCR confirming shRNA-mediated knockdown of MGP and PLAT in patient-derived breast cancer cell lines (ETCC-006 and ETCC-010). The ΔΔCt method was used for analyzing the RT–qPCR data using ACTB as the normalizing control. Expression levels were normalized to ACTB and shown relative to negative shRNA controls. The expression for one control sample was set to 1, and all other values were scaled relative to that control. Bars represent mean relative expression ± SE (n = 3). Significance values are calculated via two-sided Student t test. Asterisks represent significant results. (*, P < 0.05; **, P < 0.01; ***, P < 0.001). B, Proliferation assays reveal increased growth following MGP and PLAT suppression in breast cancer cell lines across 24–120 hours. Bars represent percent cell viability ±SE (n = 3). Significance values are calculated via two-sided Student t test. Asterisks represent significant results. (*, P < 0.05; **, P < 0.01; ***, P < 0.001). C, Wound-healing assays show accelerated migration upon MGP and PLAT knockdown within 24 hours. D, Representative images from wound-healing assays illustrate enhanced closure in MGP/PLAT knockdown breast cancer lines within 24 hours. E, RT–qPCR confirming shRNA-mediated knockdown of GDF15, FASN, ALDH1A3, and ANPEP in PC-3 prostate adenocarcinoma cells. Expression levels were normalized to GAPDH and shown relative to negative shRNA controls. Bars represent mean relative expression ± SE (n = 3). Significance values are calculated via two-sided Student t test. Asterisks represent significant results. (*, P < 0.05; **, P < 0.01; ***, P < 0.001). F, Proliferation assays reveal reduced growth following GDF15, FASN, ALDH1A3, and ANPEP suppression in PC-3 cells across 24- to 120-hour time points. Bars represent percent cell viability ± SE (n = 6). Significance values are calculated via two-sided Student t test. Asterisks represent significant results. (*, P < 0.05; **, P < 0.01; ***, P < 0.001). G, Wound-healing assays show impaired migration upon knockdown of GDF15, FASN, ALDH1A3, and ANPEP, with delayed wound closure observed at 72 hours. % relative expression was calculated as (0 hours area–72 hours area)/0 hours area. The percentage was then normalized to the control. H, Representative images from wound-healing assays illustrate reduced closure in knockdown PC-3 lines compared with controls from 0- to 72-hour time points. To interrogate the contribution of key transition genes to prostate cancer progression, we generated stable PC-3 knockdown lines for invasive-associated genes GDF15, FASN, ALDH1A3, and ANPEP. RT–qPCR confirmed efficient suppression of target transcripts (P < 0.005; Fig. 7E). Functional assays revealed consistent effects on proliferation and migration across all knockdown lines (Fig. 7F–H; Supplementary Fig. S10). Suppression of GDF15 led to a 35% reduction in proliferation and delayed wound closure over 24 to 72 hours, consistent with its role in promoting EMT, motility, and metastatic potential in prostate cancer (37). Knockdown of FASN reduced proliferation and migration by 37% over 24 to 120 hours, reflecting its role in sustaining lipogenic metabolism and invasive growth (68, 70). Likewise, ALDH1A3 knockdown attenuated proliferation (29%) and delayed migration, consistent with its association with stem-like plasticity, metabolic reprogramming, and castration resistance (64). Furthermore, suppression of ANPEP reduced proliferation (37%) and migration. In summary, proliferation and wound-healing assays in prostate cancer cell lines revealed a progressive, time-dependent reduction in growth and migration across all knockdown lines, indicating that sustained suppression of these genes impairs both cell proliferation and migration. Breast and prostate cancers display complementary paradigms of malignant transition, with breast cancer driven by loss of suppressive regulators (MGP and PLAT) that restrain ECM remodeling and prostate cancer sustained by upregulation of oncogenic effectors (GDF15, ALDH1A3, ANPEP, and FASN) that promote metabolic reprogramming, stemness, and invasive capacity. Functional assays reveal that these opposing alterations converge on a shared outcome, namely enhanced proliferation and migration. Discussion In this study, we presented a comprehensive framework for understanding the spatial dynamics of tumor progression in breast and prostate cancers that share several commonalities. Leveraging a multimodal 3D serial section workflow, complemented by lightsheet microscopy, we identified key mechanisms underlying the transition from normal epithelial, precancer, to invasive epithelial cell states. By integrating transcriptomics, multiplex imaging, and histologic staining, we moved beyond the inherent limitations of traditional 2D analyses to provide a unified view of tumor architecture and TME interactions across three dimensions and in the context of spatially defined gene expression patterns. Despite these advances, full integration across spatial platforms remains challenging due to differences in assay resolution, gene coverage, and sampling density, which may limit the consistency of feature detection across datasets. In addition, intrinsic tissue heterogeneity presents a challenge for 3D reconstruction and downstream analyses, as spatially distinct regions within the same tissue can exhibit divergent gene expression trends, contributing to variability in correlations observed across ROIs and between cohort-level and ROI-level analyses. Furthermore, the generation of large-scale 3D spatial datasets remains time and cost intensive, necessitating the incorporation of complementary 2D sections to increase statistical power and support the robustness of identified transition-associated features. We show a native 3D view of intact breast and prostate tumor tissues with volumes on the order of ∼10 mm3 by implementing advanced tissue clearing and lightsheet microscopy methodologies. The discovery of interconnected regions spanning millimeter-scale distances highlights the advantage of 3D analyses in understanding tumor topology and spatial relationships that would be missed by 2D imaging. In this study, we stained tumor samples with CK5 and PanCK to clearly distinguish precancerous lesions, invasive carcinoma, and adjacent normal structures, revealing that invasive carcinoma regions form an interconnected tree-like tumor structure in both cancers, despite being seemingly disconnected and scattered on a 2D section. Our native 3D imaging approach allows for a direct spatial visualization of intertumoral and intratumoral heterogeneity, as well as interactions between cancer cells and TME components. By tracing specific regions using a 3D serial sectioning approach, we were able to follow the neoplastic transition along continuous structures intersected with planes of spatial omics data, allowing a view into gene expression changes, a feat not possible with a 2D sectioning approach alone. We identified multiple 3D ROIs having transitional regions along the z axis. For example, we follow the transition of a prostate gland from normal, to HGPIN, to GP3 morphology, as well as a breast DCIS region through MI into the surrounding tissue and eventually into wholly invasive cells. Due to our approach of using different spatial platforms at strategic locations, we were able to trace these transitions with a variety of different high-dimensional sets of molecular features and cross-validate such features. With our integrated gene discovery approach, we highlight several key diverse and shared mechanisms driving the transition from normal to invasive epithelial cells, most of which are involved in four biological processes, including tissue integrity/ECM remodeling, cell–cell communications, metabolism/homeostasis, as well as proliferation and survival (Fig. 6B). Accumulating evidence indicates that microcalcification in the context of breast cancer can be proinvasive (71, 72). We identified MGP, a gene not previously known in DCIS-to-IDC transition, whose primary function is to prevent calcium deposition by directly binding Ca2+ and also by binding BMP2 and not allowing BMP2 signal to be transduced downstream (73–75). At the same time, BMP2 has been shown to induce EMT and promote metastasis in breast cancer models (76), which suggests why the loss of its inhibitor might be beneficial for invasive cancer. We also identify PLAT as common to both the prostate and breast transition and implicated in tissue remodeling. Additionally, we find genes that differ in their expression patterns between breast and prostate invasive cells, such as ANPEP and ALDH1A3 (overexpressed in prostate and underexpressed in breast). Furthermore, we identify shared markers, such as FASN and EPHA6, that are both overexpressed in invasive areas across both cancer types. Although many of the transition-associated genes are different between breast and prostate cancers, reflecting tissue specificity, the commonalities in the biological processes affected may indicate the key events required for cancers with glandular luminal cell origins to initiate and progress. Both DCIS and PIN are precancerous lesions trapped inside a ductal network with basal cells, basement membranes, and surrounding stromal components restricting their movement. Changes in proliferation/survival and metabolism inside the breast and prostate luminal cells are key for the intrinsic neoplastic transition and alterations in genes involved in tissue integrity/ECM remodeling and cell–cell communications are critical for the progression into more aggressive growth (IDC and PCa) outside of the confines of the ductal/glandular structures and in a completely different microenvironment with many more cells to interact with and signals to respond to. It is worth noting that several of these genes involved in the transitions, especially those shared between prostate and breast cancers, are hormone-regulated genes, including MYC, GDF15, and FASN. Estrogen directly upregulates MYC (77) in breast cancer, whereas in prostate cancer, androgen signaling can increase MYC expression (78). Similarly, both estrogens and androgens regulate FASN expression in several cancer types, including breast and prostate cancers (79, 80). Conversely, products of some of these genes can also modulate hormone signaling (81). In addition, some of the genes found uniquely in either cancer are also regulated by hormones. For example, androgen upregulates ALDH1A3 in prostate cancer cells (82). The precise mechanism of hormonal regulation of these genes and the potential reciprocal impact on hormonal signaling in the context of tumor transition remains to be elucidated. Furthermore, our analysis of the TME emphasizes the dynamic contributions of TAMs and CAFs to invasive transition. The spatial segregation of SPP1+ and MS4A6A+ TAMs suggests that these macrophage populations may differentially support progression depending on tumor subtype. Whereas SPP1+ TAMs have been broadly implicated in tumor-promoting and immunosuppressive functions (83–85), our data indicate a nuanced role in progression, with enrichment specifically at invasive fronts in non-TNBC breast cancers but not in TNBC breast or prostate tumors. In contrast, MS4A6A+ TAMs, previously observed in glioma and breast (84, 86, 87), were associated with noninvasive regions, indicating a role slowing invasive transition. Similarly, CAFs with expression of MFAP5 and ASPN were enriched around invasive regions, indicating their known roles in matrix remodeling, angiogenesis, and activation of pro-EMT signaling could be affecting invasive transition (54–56, 58, 59). Together, these findings support that epithelial invasion is not solely driven by tumor-intrinsic programs but also by specific TAM and CAF populations. The challenges of precisely defining precancerous states have now come to the forefront because of its immediate relevance to recognizing which cases will progress to full malignancy and when medical and/or surgical treatment should be commenced (88). Although changes like somatic mutations and epigenetic modifications can now be discerned, these alone do not paint a sufficiently specific picture for initiating clinical intervention. The approach developed here and the subsequent findings should contribute to better defining precancerous states across cancer types by further refining hallmarks, including spatial characteristics of cancer-related pathways and genes, telltale tissue remodeling patterns, and signals from the ECM and TME. The ability to distinguish what are essentially substeps along the normal-to-malignant continuum and the subsequent translation of same to the clinic should materially improve protocols for early intervention, which is still viewed as the option in which the greatest medical benefit can be provided to the patient (89). Methods Specimens and Sample Processing All samples were collected with written informed consent from patients at the Washington University School of Medicine in St. Louis [Institutional Review Board (IRB) protocol 201108117]. All studies were conducted in accordance with recognized ethical guidelines, including the Declaration of Helsinki, CIOMS guidelines, and the US Common Rule, and were approved by the IRB. After tumor identification, each portion was subdivided into multiple pieces which were then further divided into four transverse-cut pieces. These four pieces were then each respectively placed into a combination of formalin, snap-frozen in liquid nitrogen, and DMEM and snap-frozen before embedding in optimal cutting temperature (OCT). Relevant protocols can be found at protocols.io (https://doi.org/10.17504/protocols.io.bszynf7w). Visium Library Preparation and Sequencing Visium sections were generated using protocols reported previously (90–92). Specifically, for OCT-embedded samples, detailed methods have been described by Zhou and colleagues (91), whereas methods for formalin-fixed, paraffin-embedded (FFPE) samples are described in Wu and colleagues (92). Briefly, OCT-embedded tissue or FFPE tissue samples were sectioned and placed on a Visium Spatial Gene Expression Slide following the Visium Spatial Protocols–Tissue Preparation Guide. For OCT, fresh tissue samples were coated with room temperature OCT and then sectioned (10 μm). Sections were then fixed in methanol, stained with H&E, and imaged at 20× magnification using the brightfield imaging setting on a Leica DMi8 microscope. Tissue samples were then permeabilized for 18 minutes, and ST libraries were constructed following the Visium Spatial Gene Expression Reagent Kit user guide CG000239 (10x Genomics). For FFPE tissues, quality assessment was performed using the Visium Tissue Section Test Slide, along with an RNA quality check following the Visium Spatial Gene Expression for FFPE–Tissue Preparation Guide CG000408 (10x Genomics). Blocks were scored and sectioned to fit in the capture areas of the Visium Spatial Gene Expression Slide. Deparaffinization, H&E staining, and decrosslinking were performed following CG000409 (10x Genomics). ST libraries were constructed following Visium Spatial Gene Expression for FFPE user guide CG000407 (10x Genomics). Libraries were sequenced on a S4 flow cell of an Illumina NovaSeq-6000 system. Relevant protocols for ST for FFPE utilizing 10x Genomics Visium (dx.doi.org/10.17504/protocols.io.kxygx95ezg8j/v1) and ST for OCT using 10x Genomics Visium (dx.doi.org/10.17504/protocols.io.x54v9d3opg3e/v1) can be found on protocols.io. Visium Data Processing For each sample, we obtained the unfiltered feature–barcode matrix per sample by passing the demultiplexed FASTQ files and associated H&E image to Space Ranger (v.1.3.0, v.2.0.0 and v2.1.0 “count” command using default parameters with reorient-images enabled) and the prebuilt GRCh38 genome reference 2020-A (GRCh38 and Ensembl 98). Visium HD Library Preparation and Sequencing FFPE tissue samples were sectioned and placed onto a standard, charged glass slide following the Visium HD FFPE Tissue Preparation Guide CG000684 (10x Genomics). Following hybridization and ligation, the probes were released from the 5-μm sections and captured by Visium HD Slide (10x Genomics, 1000670) using the Visum CytAssist instrument (10x Genomics, 1000499). The standard workflow was followed for downstream library processing using the Visium HD Spatial Gene Expression Reagent User Guide CG000685 (10x Genomics). Barcoded libraries were then sequenced on the Illumina NovaSeq 6000 system with associated flow cells to a targeted run size of at least 250 mol/L read pairs. Visium HD Data Processing For each sample, we obtained the unfiltered feature–barcode matrix per sample by passing the demultiplexed FASTQ files, associated H&E image, and CytAssist image to Space Ranger (v2.1.0 “count” command using default parameters with reorient-images enabled) and the prebuilt GRCh38 genome reference 2020-A (GRCh38 and Ensembl 98). Xenium Data Generation FFPE blocks were sectioned at 5 µm and placed on Xenium slides following a modified version of the FFPE Tissue Preparation Guide (10x Genomics, CG000578, Rev B). Slides were deparaffinized via a series of xylene and ethanol washes prior to decrosslinking utilizing the FFPE tissue enhancer as described (10x Genomics, CG000580, Rev B). Overnight in situ probe hybridization was performed utilizing Human Multi-Tissue and Cancer Panel (10x Genomics, 1000626) of probes for 377 genes. Selected panels received an additional custom panel of probes for extra 100 genes (Supplementary Table S5). Probes were subsequently ligated and underwent rolling circle amplification. The background was quenched using an autofluorescence mixture. Nuclei were stained with DAPI to improve on-instrument sample tracking and cell boundary segmentation (10x Genomics, CG000582, Rev D). Samples were then loaded onto the 10X Xenium Analyzer instrument (10x Genomics, 1000481) for imaging and initial data processing following the manufacturer’s instructions (10x Genomics, CG000584, Rev C). H&E staining of the post-Xenium slide was performed after the run following the provided guidance (10X Genomics, CG000613, rev B). Relevant protocols for 10x Genomics Xenium for FFPE User Guides (dx.doi.org/10.17504/protocols.io.81wgbxjonlpk/v1) can be found on protocols.io. Xenium Prime (5K) Data Generation FFPE blocks were sectioned at 5 µm and mounted onto Xenium slides following a modified version of the FFPE Tissue Preparation Guide (10x Genomics, CG000578, Rev D). Slides were deparaffinized with sequential xylene and ethanol washes, followed by decrosslinking using the FFPE Tissue Enhancer and diluted Perm Enzyme B (10x Genomics, CG000580, Rev E). Xenium Prime predesigned and add-on custom priming oligos were hybridized to target RNAs in situ. After RNase treatment to release the RNA strand, a polishing step was performed, followed by overnight probe hybridization utilizing the Xenium Prime 5K Human Pan Tissue & Pathways Panel (10x Genomics, 1000724) of probes for 5001 genes and an additional custom panel of probes for extra 100 genes (Supplementary Table S5). Probes were subsequently ligated and underwent rolling circle amplification, generating multiple copies of the gene-specific barcode for each RNA target. Cell segmentation reagents were applied during a staining workflow to label nuclei, membranes, and cytoplasmic regions for automated morphology-based segmentation. The background was quenched using an autofluorescence mixture, and nuclei were counterstained with DAPI to aid in sample tracking and cell boundary segmentation (10x Genomics, CG000760, Rev C). Xenium slides were then loaded onto the 10X Xenium Analyzer instrument (10x Genomics, 1000481) for imaging and initial data processing following the manufacturer’s instructions (10x Genomics, CG000584, Rev F). Fluorescently labeled oligos bind to the amplified DNA probes, and iterative rounds of probe hybridization, imaging, and stripping generated optical signatures for each barcode, which were decoded to gene identities. The H&E staining of the post-Xenium slides was performed after the run following the guidance provided (10X Genomics, CG000613, Rev B). CosMx Sample Preparation and Data Generation CosMx SMI profiling was carried out on breast and prostate tumor FFPE blocks, ID HT704B1-S1H3Fp1 and HT891Z1-S2H3Fp1, using CosMx 1K and 6K Discovery Panel respectively. FFPE blocks were sectioned at 5 µm thickness and placed on VWR Superfrost Plus Micro slides. Slides were deparaffinized via a couple of xylene and ethanol washes prior to heat-induced target retrieval at 100°C for 15 minutes using 1× Target Retrieval Solution. The tissue sections were digested using 5 µg/mL Proteinase K incubated at 40°C for 30 minutes in a hybridization chamber. Slides were washed twice with 1× PBS and incubated in 0.0004% fiducials diluted in 2× SSCT for 5 minutes at room temperature in the dark. Excess fiducials were rinsed from the slides with 1× PBS and tissue sections were fixed with 10% neutral buffered formalin (NBF) for 1 minute at room temperature. Fixed samples were rinsed twice with Stop Buffer, composed of 0.1 mol/L glycine and 0.1 mol/L Tris-base in DEPC H2O, and once with 1× PBS for 5 minutes each before blocking with 100 mmol/L NHS acetate in CosMX NHS acetate buffer (Bruker Spatial Biology) for 15 minutes at room temperature. The sections were then rinsed with 2× SSC for 5 minutes and incubated with hybridization solution (Denatured CosMx RNA Probe mixes) on the hybridization chamber at 37°C for 18 hours. After 18 hours, washes with stringent solution (50% formamide in 2× SSC) and 2× SSC buffer were performed to rinse of excess probes. Nuclear staining was carried out for 15 minutes in the dark in the hybridization chamber, and slides were washed with 1× PBS to remove excess stain. Cell segmentation was carried using cell segmentation mix (CD292/B2M), marker mix (PanCK/CD45), and a la carte mix (CD68) for 1 hour at room temperature in the hybridization chamber and the samples were rinsed thrice with 1× PBS and twice with 2× SSC. The Flow cells with unique barcodes were assembled on the slides, which were then loaded on CosMx SMI, running on software v1.3.1, following instructions provided in CosMx SMI Instrument User Manual (Man-10161-02-1). The Raw data and flatfiles generated were downloaded from the AtoMx platform for subsequent analysis following the manufacturer’s guidelines. https://github.com/Nanostring-Biostats/CosMxDACustomModules. Tissue Clearing, Staining, and Imaging for 3D Lightsheet Tissue was obtained through the WU Solid Tumor Tissue Bank from surgical patients after written informed consent with the aid of an attending pathologist. Briefly, each tissue block is documented by photographing, weighing, and recording a description of anatomical landmarks and is further subdivided up into 4 to 6 smaller tissue blocks. Each of the smaller blocks is then subdivided into three pieces approximately 6 mm × 6 mm × 2 mm each and processed as follows: 1) 10% NBF for histologic characterization, e.g. H&E and CODEX; 2) snap-freezing in liquid nitrogen or embedding in OCT for genomic analysis; and 3) fixation in 4% paraformaldehyde for lightsheet. The piece that is designated for lightsheet is washed in PBS after 24 hours and is then ready for tissue clearing. For tissue clearing, samples were firstly infiltrated with SHIELD polyepoxy (93) for 6 days with constant agitation at 4 C, subsequently polymerized at 37°C for 24 hours, and then delipidated using a SmartBatch+ ETC active tissue clearing platform (LifeCanvas Technologies). Samples were washed in 1× PBS for 24 hours at room temperature before proceeding to antibody staining and were permeabilized with 1× PBS containing 0.2% Triton X-100 twice for one hour each at room temperature before blocking. Samples were blocked with 6% donkey serum at 37°C with PBS containing 0.2% Triton X-100 and 10% DMSO. After blocking, samples were washed with PBS containing 0.2% Tween-20 plus 10 µg/mL heparin twice at 37°C and then incubated with fluorescently conjugated antibodies for 4 days at 37°C. Antibodies included AF488-conjugated anti-CK5 (AB_2893023) and AF594-conjugated anti-PanCK (AB_3741555). All antibodies were diluted at 1:200 in PBS containing 0.2% Tween-20, 5% DMSO, 3% donkey serum, and 10 µg/mL heparin. On day 3, Hoechst was added to the solution at 1:10,000. After staining, samples were washed at least 5 times in PBS/0.2% Tween-20/10 µg/mL heparin, exchanging the solution every 1 hour. After staining, samples were refractive index–matched to 1.52 using EasyIndex RI matching media (LifeCanvas Technologies). Whole-sample images were acquired on a Miltenyi Ultra Microscope Blaze Gaussian lightsheet platform using a 4×/0.35 MI PLAN objective. Datasets were stitched together using Stitchy (Translucence Biosystems) and visualized using Bitplane Imaris 10.1.1 (Oxford Instruments). The lateral resolution of lightsheet microscopy can be estimated as the emission wavelength divided by two times the numerical aperture, yielding 0.741 μm for the CK5 channel and 0.881 μm for the PanCK channel. Because the structures of interest do not require sampling at the theoretical resolution limit, we used a lateral sampling interval of 1.62 μm. The axial resolution of our FLSM setup is determined by the thickness of the light sheet (7 μm) and was sampled at the Nyquist frequency. CODEX Preparation and Imaging Carrier-free monoclonal or polyclonal anti-human antibodies were purchased (Supplementary Table S4) and verified using IF staining in multiple channels. After the screening, antibodies were conjugated using the Akoya Antibody Conjugation Kit (Akoya Biosciences, SKU 7000009) with a specific barcode (Akoya Biosciences) assigned according to the IF staining results. Several common markers were directly purchased through Akoya Biosciences. Keyence protocol: CODEX staining and imaging were performed according to the manufacturer’s instructions (CODEX User Manual - Rev C). Briefly, 5 μm FFPE sections were placed on APTES (Sigma, #440140) coated coverslips and baked at 60°C overnight before deparaffinization. The next day, tissues were incubated in xylene, rehydrated in ethanol, and washed in ddH2O before antigen retrieval with TE buffer, pH 9 (Genemed, #10-0046), in boiling water for 10 minutes in a rice cooker. The tissues were then blocked using the blocking buffer (CODEX staining kit SKU 7000008) and stained with the marker antibody panel to a volume of 200 µL for 3 hours at room temperature in a humidified chamber. Imaging of the CODEX multicycle experiment was performed using a Keyence fluorescence microscope (model BZ-X810) equipped with a Nikon CFI Plan Apo λ 20x/0.75 objective, the CODEX instrument (Akoya Biosciences), and CODEX Instrument Manager (CIM; Akoya Biosciences). The raw images were then stitched and processed using the CODEX processor (Akoya Biosciences). After multiplex imaging was completed, H&E staining was performed on the same tissue. Panels for each codex section are listed in Supplementary Table S4. Phenocycler protocol: The immunostaining procedure was conducted using the PhenoCycler-Fusion sample kit (Akoya, cat. #7000017) following Akoya’s user guide. Selected FFPE samples were sectioned at 5 μm thickness, placed on charged slides (Fisherbrand, cat. #1255015), and dried at 42°C on a heat block. Prior to deparaffinization, the slides were baked at 65°C overnight. Deparaffinization was done using two times Xylene followed by rehydration in a graded series of ethanol (two times 100%, 90%, 70%, 50%, and 30%) and two times Milli-Q water (ddH2O). Antigen retrieval was performed for prostate cancer in 1× Tris-EDTA (pH 9) using a rice cooker for 18 minutes, and for breast cancer tissue for 20 minutes. After equilibrating to room temperature, sample slides were washed twice in the hydration buffer and then equilibrated in the staining buffer for 30 minutes. Subsequently, slides were incubated with all antibodies diluted in 200 µL staining buffer containing N Blocker, G Blocker, J Blocker, and S Blocker for 3 hours at room temperature in a humidified chamber. After staining, slides were washed twice in the staining buffer and fixed with 1.6% paraformaldehyde in the storage buffer for 10 minutes. Samples slides are then washed three times in PBS and incubated in ice-cold methanol for 5 minutes, followed by three times washes in PBS and incubation in the final fixative solution for 20 minutes. After three additional PBS washes, slides were stored in a storage buffer for a maximum of 3 days before imaging. The reporters were prepared following Akoya’s PhenoCycler-Fusion user guide and dispensed into a 96-well black plate. The experimental template for the PhenoCycler-Fusion Run was designed using Akoya’s PhenoCycler Experiment Designer software. Details about antibodies used for each codex run are available in Supplementary Table S4. The experimental run was executed using Akoya’s Fusion 1.0.8, and final images were generated on the PhenoImager Fusion microscope using default settings. 3D Serial Sectioning Procedure FFPE blocks were chilled on ice for at least 20 minutes before sectioning. Tissue was cut at a thickness of 5 μm to capture the full surface of the sample, continuing until the regions of interest were fully included. Once the optimal surface exposure and section quality were achieved, tissue ribbons were cut continuously until the tissue was exhausted or the required number of sections was obtained. The sections were labeled sequentially (U1, U2, U3, etc.) during the sectioning process. Upon completing the sectioning, the ribbons were gently placed on a clean surface and divided into smaller ribbons, each consisting of 8 to 10 sections. These smaller ribbons were slowly transferred to a water bath, ensuring they floated in a line without folds or breaks. Any section that folded or broke prior to slide mounting was discarded, whereas its section number was retained. The sections were carefully loaded one by one onto regular glass slides, Visium slides, or Xenium slides in the planned sequence. Subsequently, the slides were processed according to spatial platform–specific protocols. Section retention for each sample can be viewed in Supplementary Table S7. 3D Serial Section Registration Prior to registration, imaging data underwent the following transformations. Multiplex, Xenium, and CosMx images were converted to grayscale images of the nuclear intensity channel. The images were then downscaled by a factor of 5 before key point selection. For Visium and Visium HD, H&E images (also downsampled by a factor of 5) were used for keypoint selection. For registration, we used the BigWarp tool (arXiv:1511.01154), which was packaged in the Fiji/ImageJ software application. To register each collection of serial images, we use the first serial section as the fixed image and the second image as the moving image. After the second image is warped to the first image, the second image is used as the fixed image for the transformation of the third image. Key point registration proceeds in this fashion for all images in the serial section experiment. A total of 4 to 10 key points were selected per image transformation. Once key points were selected, a moving field was exported from BigWarp for each image transformation (thin plate spline). This dense displacement field (DDF) was then upscaled by a factor of 5 so it could be used to warp the full-resolution image data. The DDF was then also used to register corresponding point-based data (transcript locations for CosMx and Xenium, spot locations for Visium, and grid locations for Visium HD). The code used for registration is available at https://github.com/ding-lab/mushroom/blob/main/README.md#manuscript-materials. Breast 3D Connectivity Analysis We constructed 3D region volumes to analyze connectivity of serial section breast cancer cases (HT704B1, HT206B1, and HT397B1) using Xenium, CODEX, and H&E sections in a three-part process: (i) protein abundance prediction from H&E slides, (ii) automated epithelial region annotation, and (iii) interconnected region reconstruction. Due to gaps between Xenium and CODEX sections, we decided to fill in these gaps using H&E sections. Because H&E has no inherent marker for epithelial cells, we trained a deep learning model to predict marker abundance using H&E as input. To enable volumetric reconstruction of epithelial connectivity across serial sections, we used a deep learning model to approximate epithelial marker abundance in intervening H&E sections. This model was used exclusively for epithelial region segmentation to support 3D connectivity analysis. For training, we used an adjacent CODEX and H&E section to train a separate model for each of the three serial section cases. At inference time, the input to the model was an H&E section, and the output was protein abundance for certain CODEX markers (Supplementary Table S8). Model architecture, training methodology, and inference time mechanics are described below. Architecture and training parameters can be found in Supplementary Table S8. We use a U-net (arXiv:1505.04597) with a ResNet-18 backbone (arXiv:1512.03385, arXiv:2110.00476) followed by a prediction head composed of 2D convolutions for protein abundance prediction. We train a separate model for each case. For training, we select adjacent CODEX and H&E sections. The images are preprocessed in the following manner. First, each channel of the H&E and CODEX image is normalized by mean and standard deviation. Natively, these images are too large to pass through the model, so they must be tiled for training and inference. As such, we shred each image into 256 × 256 pixel tiles. However, when using tiles we remove the morphologic context of the area outside the tile that may be useful for protein abundance prediction. Appending additional regional context to a tile is one way to remedy this issue (94). To give each tile context of morphology outside its immediate surroundings, we also train additional Unets in parallel with their input being zoomed-out, low resolution (2×, 4×, 8×, and 16×) views centered on the given tile. After the forward pass through each Unet, the resulting activations are then concatenated prior to input into the prediction head. With this procedure, we are able to give each high-resolution tile regional morphologic context helpful to protein prediction. The model was implemented using the Pytorch Python library (arXiv:1912.01703). During training, we randomly select image tiles from a uniform distribution across the 2D section. Each tile is then horizontally or vertically flipped with 50% probability. Most serial H&E sections were imaged in the same batch to minimize batch effects across slides. As such, we did not perform other color-based image augmentations to the input image tiles. Following the forward pass through the Unet and prediction head, we are left with a C × W × H tensor in which height and width are the same shape as the input image tile and c is the number of CODEX proteins being predicted. For model loss, we use mean squared error (MSE) between the predicted values and the ground truth protein abundance, in which the ground truth values are the protein abundance in the CODEX section adjacent to the H&E section. Each model was trained for 640,000 steps with a batch size of 64. Following training, we performed model inference over all H&E serials sections, which generated protein abundance values for every H&E section. We then used expression of epithelial marker genes to identify epithelial regions (encompassing normal, DCIS, and IDC morphology) in an automated fashion. First, we selected epithelial marker genes for each sample based on what genes and proteins were available in a given Xenium or CODEX panel. First, we tiled all inputs to a resolution of 15 μm per pixel. To tile Xenium data, the area covered by the Xenium section was split into 15-µm grid squares. We then summed the aggregate expression counts of all cells within each grid square. For CODEX and H&E, we rescaled the images to a resolution of 15 μm per pixel. We selected a 15-µm tiling resolution because the primary objective was region-level epithelial segmentation. Given minor registration uncertainty and occasional missing serial sections, volumetric continuity is fundamentally constrained by z-axis sampling density rather than in-plane resolution. The 15-µm resolution provided an appropriate balance between epithelial segmentation accuracy and consistency with intersection spacing. A cutoff value was then defined via manual inspection for each of these markers in a case-independent fashion. The cutoff value was then applied in the following way to segment epithelial regions. First, all pixels with a value greater than the cutoff value were considered epithelial pixels. Then a binary hole filling algorithm was applied to fill holes in regions, for this we use the scipy.ndimage.binary_fill_holes function from the scipy Python package (arXiv:1907.10121). Interconnected areas of epithelial pixels were then identified by constructing a N × H × W array in which N is the total number of Xenium, CODEX, and H&E sections for a case. Each voxel was either positive (epithelial) or negative (nonepithelial). Adjacent epithelial voxels were considered connected. We used the skimage.morphology.label function from the scikit-image Python package (95) to then identify connected 3D regions. Manual Annotation of Interconnected Epithelial Regions We use manual region annotation to label interconnected epithelial regions for connectivity analysis and 3D ROI path construction. First, we generate an OME-TIFF for each region of interest. The OME-TIFF stores a stack of pseudo-color images representing each serial section. The OME-TIFF was then viewed with the QuPath (96) image viewing platform. Manual epithelial region annotation was then performed in QuPath. Annotated region coordinates were then exported in GeoJSON format (https://datatracker.ietf.org/doc/html/rfc7946) for downstream visualization and analysis. Selection and Annotation of 3D Serial Section ROIs ROIs were selected based on areas of region morphology. Searching for interconnected morphology was conducted with the Imaris 3D image viewing platform. We generated pseudo-color images for each serial section as described in the manual annotation section above, with these images then being converted to an .ims file using Imaris, following which we were able to view each pseudo-color image to identify interconnected epithelial regions undergoing noninvasive to invasive transition (normal, HGPIN, and GP3 in prostate; DCIS, MI, and IDC in breast). Cross sections of these transitioning regions were then annotated using the approach described in “Manual Annotation of Interconnected Epithelial Regions” (Supplementary Tables S9 and S10). Gene Discovery Overview We selected ROIs that had interconnected noninvasive to invasive morphology. Each 2D cross section of the interconnected structure was segmented to enable tracing of the continuity and transitions between progression states, enabling a more detailed understanding of the spatial and molecular dynamics of the progression within a singular structure. This analysis would not be possible with traditional, nonserial 2D image sections. To identify genes differentially expressed in IDC compared with DCIS, we leveraged both 2D and 3D ST datasets (Xenium, CosMx, Visium, and Visium HD). For 2D cohort-level gene discovery, we used both automated and manual annotation methods on ST sections. Automated differential gene expression discovery was performed in Xenium, CosMx, and Visium HD sections. This involved identifying epithelial regions and assessing myoepithelial intensity using basal layer markers, which were then correlated to gene expression (see “2D automated gene discovery”), allowing the identification of genes associated with myoepithelial integrity (Supplementary Table S11). To supplement the automated approach, we also implemented a manual workflow in which areas of DCIS (n = 5+) and IDC (n = 5+) morphology were randomly manually selected in Visium sections (Supplementary Table S12; see “2D manual gene discovery”). DEG identification was subsequently performed based on these manual annotations. For 3D ROI-level gene discovery, we identified DEGs specific to 3D ROIs to characterize gene expression changes across progression states within a single interconnected epithelial structure (Supplementary Tables S13 and S14). For 3D gene discovery, we use two approaches: morphology-based and path-based (see “3D gene discovery”). Briefly, for morphology-based, regions were annotated (DCIS, MI, or IDC in breast; normal, HGPIN, or GP3 in prostate) and expression differences between groups were quantified with the Student t test and fold change. In path-based discovery, regression was run on expression values for each region along the path of the transitioning epithelial structure. Together, this dual-layered approach provided a comprehensive view of the gene expression landscape, revealing key molecular pathways and biological processes involved in invasive transition. Manual curation and visual inspection further refined the identification of genes specific to luminal epithelial cells and linked to breast cancer progression. 2D Automated Gene Discovery We used both manual and automated methods for 2D DEG discovery. For automated discovery, we first annotated epithelial regions across Xenium, CosMx, and Visium HD sections with invasive and noninvasive morphology in the dataset. For Xenium and CosMx, the process consisted of first tiling all inputs to the same resolution: 10 µm per pixel. We then identified epithelial regions in an automated fashion. First, all tiled sections were normalized by standard deviation at the gene level. An epithelial mask was then constructed by thresholding each grid for EPCAM >1.0. This mask was then run through a hole-filling algorithm to fill in gaps present due to transcript sparsity and necrosis. All positive grids (i.e., pixels) were considered epithelial pixels. We then used the skimage.morphology.label function from the scikit-image Python package (95) to identify areas of connected pixels. Interconnected pixels with a tiled area of less than 10 were filtered out. These remaining areas of pixels were considered epithelial regions. For Visium HD, we had two annotation methods based on the data available. For sections that were included in the 3D stacked serial section dataset, we used outputs from the U-net model from “Breast 3D Connectivity Analysis” as epithelial “expression”. We then generated epithelial masks in an identical manner to the previous paragraph. For Visium HD sections that were not part of the stacked 3D dataset, we underwent the same procedure as Xenium and CosMx with the following changes: the normalized expression image was Gaussian-blurred (alpha = 5), and EPCAM was thresholded at 0.1. The expression image was Gaussian-blurred to account for the additional sparsity introduced by tiling with 2-µm Visium HD squares. Following identification of regions, we quantified feature expression for three areas of the region: the region itself (i.e., luminal cells), the region boundary (i.e., basal layer), and the area surrounding the region (i.e., TME). Masks were generated to identify pixels belonging to each of these areas and were defined in the following ways. The “region” mask is the same as the epithelial mask previously described but shrank by 10 μm. The “boundary” mask was defined by the area between the epithelial mask and the epithelial mask expanded by 20 μm. The “TME” mask was defined by expanding the epithelial region 40 μm and subtracting the “boundary” and “region” masks. Region area masks were not allowed to expand into another region’s area. The skimage.segmentation.expand_labels function from the scikit-image (95) Python package was used to expand epithelial regions. Expression was then quantified for each region, boundary, and TME mask. With expression values in hand, we were able to correlate feature expression within regions (“region” mask) to boundary (“boundary” mask) expression of basal layer markers. A positive correlation value for a feature in a section indicates that for regions within that section, intra-region expression of that gene is associated with higher expression of basal layer markers in the region boundary (i.e., the genes expression is associated with regions having a more intact basal cell layer). Negative correlations indicate the opposite association. The same metric was also obtained for the area outside regions (“TME” mask) in order to identify TME genes associated with region basal layer expression. We defined the TME as the peritumoral region extending 100 µm from the epithelial boundary. This distance captures stromal and immune cells within biologically relevant interaction range of tumor epithelium, consistent with spatial oncology studies that define cellular neighborhoods on the scale of tens to hundreds of μm (97–99). A 100-µm margin balances inclusion of the immediate invasive niche while minimizing incorporation of distant stromal regions unlikely to directly influence epithelial transition. Due to marker absence in panels between and within spatial platforms, the same basal layer marker could not be used for every section. The basal layer marker for a section was determined by selecting a gene out of the following list of markers: (KRT5, KRT14, KRT15, LAMB3, and ACTA2). For each sample, we iterated through the marker list, and once a basal marker gene was found to be in that sample, we used that gene as the marker gene for that sample. Additionally, for TNBC cases, in which the cell of origin tends to be basal, we used ACTA2 as the basal layer marker. Supplementary Table S11 contains correlation values for this analysis. 2D Manual Gene Discovery We also used manual annotation for Visium sections, in which resolution of expression is limited and not amenable to the techniques used in 2D automated gene discovery. For this, we implemented a manual workflow where a minimum of five areas each of normal, DCIS, and IDC in breast—or normal, HGPIN, and GP3+ in prostate—morphology were randomly manually annotated. Mean feature expression was then calculated for each area, and the Student t test was used to quantify differences between different morphologies. Annotated barcodes (Supplementary Table S12) and comparison statistics (Supplementary Table S11) can be found in the supplement. 3D Gene Discovery We further strengthened our gene discovery approach with multiplatform, 3D serial section DEG discovery. With this approach, we were able to quantify gene expression changes throughout a single region as it transitioned from noninvasive to invasive morphology. For this we use two methods, morphology group–based and path-based comparisons. For both approaches, we used regions annotated as described in “Manual Annotation of Interconnected Epithelial Regions”. Expression and correlation values can be found in supplementary Tables S13 and S14, respectively. For morphology group–based discovery, regions were annotated for morphology (DCIS, MI, or IDC in breast; normal, HGPIN, or GP3 in prostate), and mean gene expression was calculated for each region. We then, on a data type–specific basis, used the Student t test and fold change to quantify differences between morphology groups where possible. Due to variation in rate and location of region transition, the same spatial platform did not always capture each morphologic state for every interconnected region. Fold change was calculated as [(b + 1) − (a + 1)]/(a + 1), in which a and b are arrays of expression values associated with different morphology groups. For path-based discovery, we calculated a single correlation value across multiple spatial platforms for each interconnected region. First, expression values for each data type were z-scaled within each data type. We then ran a linear regression on the scaled expression values for each Xenium, CosMx, and Visium HD cross-section in the transitioning region. Values were ordered from least invasive end of the interconnect region to the most invasive. As such, positive correlations indicate increased expression toward the invasive end of the region, whereas negative values indicate the opposite, with increased expression in less-invasive areas of the region. 3D TAM Proximity Analysis For the six Xenium sections from sample HT704B1, we performed a 3D proximity analysis to evaluate the spatial relationship between macrophages and epithelial regions. First, TAMs were subtyped into two populations: SPP1+ TAMs and MS4A6A+ TAMs. Cell annotation was based on transcript detection using the following criteria. A cell was classified as an SPP1+ TAM if it contained at least one transcript of any macrophage marker (CD68, CD163, CSF1R, or CD14), at least one transcript of SPP1, and zero EPCAM transcripts. Similarly, a cell was classified as an MS4A6A+ TAM if it contained at least one transcript of any macrophage marker (CD68, CD163, CSF1R, or CD14), at least one transcript of MS4A6A, and zero EPCAM transcripts. Next, we computed the shortest 3D distance from each TAM to the nearest epithelial region using spatial coordinates across all sections. For each epithelial region, we calculated a basal-layer intensity score, defined as the z-scored transcript counts of basal-layer boundary markers described in the “2D Automated Gene Discovery” “Methods” section. Higher basal-layer intensity scores correspond to regions with stronger basal integrity, consistent with less invasive DCIS morphology, whereas lower scores indicate reduced basal integrity characteristic of more invasive IDC regions. This approach assigns each TAM the basal-layer intensity score of its nearest epithelial region, providing a quantitative measure of the invasiveness of the epithelial environment in which each TAM resides. IF Validation Immunostaining was performed as described (100). FFPE blocks were sectioned at 5 µm thickness and placed on Superfrost Plus slides and baked at 60°C overnight before deparaffinization. The next day, tissues were deparaffinized in xylene, rehydrated in ethanol, and washed in ddH2O before heat-induced antigen retrieval with 0.1 mmol/L Tris-EDTA buffer pH9 (#NB900-62085, Novus) for 10 minutes using a steamer. These slides were incubated with 100 mmol/L glycine for 2 × 10 minutes and a blocking solution (5% inactivated normal donkey serum and 10 mg/mL BSA) for 1 hour at room temperature. Subsequently slides were incubated with primary antibodies in a humidified chamber overnight at 4°C. After washing with PBST 3 × 5 minutes, samples were incubated with secondary antibodies for 1 hour at room temperature and washed with PBST 4 × 5 minutes. After incubation with Hoechst for 5 minutes, the slides were washed again in PBST for 5 minutes and mounted with VectaMount AQ Aqueous Mounting Medium (#H-5501-60; Southern Biotech). Primary antibodies used were from Abcam: rabbit monoclonal anti-ANPEP (AB_10866195;1:100), rabbit polyclonal anti-ALDH1A3 (AB_2937054;1:100), rabbit polyclonal anti-FASN (AB_732316,1:100), and rabbit monoclonal anti-GDF15 (AB_3099455, 1:100); LSBio: rabbit polyclonal anti-EPHA6 (AB_3741541; 1:100); Life Technologies: mouse monoclonal anti-PanCK (AB_10942225;1:200) and anti-CK5 (AB_2538529, 1:200) antibodies and Alexa Fluor 488-, 594-, and 647-conjugated secondary antibodies (1:1,000); and R&D Biosytems: goat polyclonal anti–E-cadherin (AB_355568;1:100). The fluorescence images were obtained using Keyence Fluorescence Microscope (BZ-X810; Keyence). Normal, precancer, and cancer regions were annotated using Napari, and average intensities were calculated within each region. Breast and Prostate Cancer Proliferation and Migration Assays Human breast and prostate cancer cell lines ETCC-006 (CVCL_6G19), ETCC-010 (CVCL_6G22), and PC3 (CVCL_E2RM) were obtained from the American Type Culture Collection (ATCC) in (March, 2022). Cell line profiling was not performed by the authors following receipt from the ATCC. Cells were used for experiments within 10 passages after thawing and were not maintained in culture for longer than 2 months. Cells were routinely tested for Mycoplasma contamination using the MycoAlert Mycoplasma Detection Kit (Lonza, #LT07-318), and the most recent test was performed in (August, 2025), with negative results. Cells were cultured in RPMI-1640 medium (Gibco, #11875093) supplemented with 10% fetal bovine serum (Gibco, #16140071) and 1% penicillin–streptomycin (Gibco, #15140122) and maintained at 37°C in a humidified incubator with 5% CO2. For prostate cancer experiments, we initially screened four commonly used prostate cancer cell lines for expression of the candidate genes (GDF15, FASN, ALDH1A3, and ANPEP). Among these, only PC3 cells expressed all four genes and were therefore selected for subsequent functional assays (Supplementary Fig. S11). To knock down the expression of the target gene (MGP and PLAT in breast cancer cells and GDF15, ANPEP, ALDH1A3, and FASN in prostate cancer cell), lentiviral particles encoding specific shRNA as well as control shRNA were purchased from Sigma using the pLKO.1 vector. Cells were seeded in six-well plates and transduced with lentivirus in the presence of 10 μg/mL polybrene (Sigma-Aldrich, #TR-1003-G). After 48 hours, cells were selected using 10 μg/mL puromycin (Sigma-Aldrich, #P8833) for 7 days to establish stable knockdown cell lines. Cells surviving puromycin selection were expanded and used for downstream experiments within five passages. Knockdown efficiency was confirmed by RT-qPCR. The shRNA sequence for MGP and PLAT was GCGGTAGTAACTTTGTGTTAT and CAAGGTTTACACAGCACAGAA, respectively. GDF15, FASN, ALDH1A3, and ANPEP shRNA target sequence was CCGGATACTCACGCCAGAAGT, CATGGAGCGTATCTGTGAGAA, GCTGTATTAGAACCCTCAGAT, and ACCAGTACAGCGAGGTTAATG, respectively. Total RNA from cell lines was extracted using RNA extraction Kit (Invitrogen) according to the manufacturer’s protocol. RNA concentration and purity were determined using a NanoDrop spectrophotometer. One microgram of total RNA was reverse transcribed using a cDNA synthesis kit (Themo Fisher Scientific, High-Capacity cDNA Reverse Transcription Kit with RNase Inhibitor, #4374966). qPCR was performed using SYBR Green Master Mix (BIO-RAD, iTaq Universal SYBR Green Supermix, #1725121) on a QuantStudio or ABI 7500 system. Relative gene expression was calculated using the 2−ΔΔCt method, with ACTB and GAPDH as the internal control. The primer sequence for MGP was TCCGAGAACGCTCTAAGCCT; GCAAAGTCTGTAGTCATCACAGG. The primer sequence for PLAT was AGCGAGCCAAGGTGTTTCAA; CTTCCCAGCAAATCCTTCGGG. The primer sequence for ACTB was CATGTACGTTGCTATCCAGGC; CTCCTTAATGTCACGCACGAT. The primer for GAPDH was purchased from Integrated DNA Technologies (Ref #580480971; 580480972). The primer sequence for FASN was TTCTACGGCTCCACGCTCTTCC; GAAGAGTCTTCGTCAGCCAGGA, and that for GDF15 was GTTAGCCAAAGACTGCCACTG; CCTTGAGCCCATTCCACA. The primer sequence for ALDH1A3 was TGGATCAACTGCTACAACGC; CACTTCTGTGTATTCGGCCA. The primer sequence for ANPEP was GACCAAAGTAAAGCGTGGAATCG; TCTCAGCGTCACCCGGTAG. Cell proliferation was assessed using the Cell Counting Kit-8 (CCK-8; Dojindo). Cells (2,000–4,000 per well) were seeded in 96-well plates in triplicate. At indicated time points (e.g., 0, 24, 48, 72, 96 and 120 hours), 10 μL of CCK-8 solution was added to each well and incubated for 2 hours at 37°C. Absorbance at 450 nm was measured using a microplate reader (BioTek or Thermo). Normal control, MGP-KD (knockdown), PLAT-KD, GDF15-KD, FASN-KD, ALDH1A3-KD, and ANPEP-KD cells were seeded in six-well plates and grown to about 100% confluence. A straight scratch was made using a sterile 200-μL pipette tip across the cell monolayer. Detached cells were removed by washing with PBS, and fresh serum-free medium was supplemented. Images were captured at 0 hours and after 24 hours using a light microscope (×5 magnification). The wound area was measured using ImageJ software, and migration was quantified as the percentage of wound closure. All data associated with cell line functional assays can be found in Supplementary Tables S15 and S16. Supplementary Material Supplementary Table 1. Clinical metadata Supplementary Table 2. 3D stacked serial sections overview Supplementary Table 3. 2D gene discovery sections overview Supplementary Table 4.CODEX panel information Supplementary Table 5. Xenium panel information Supplementary Table 6. HT704B1 distant region path metadata Supplementary Table 7: Section retention for 3D cohort Supplementary Table 8. Model architecture, hyperparameters, and training details for H&E protein prediction Supplementary Table 9. 3D serial section ROI summary metadata Supplementary Table 10. 3D serial section ROI path metadata Supplementary Table 11. 2D marker gene discovery: section-level feature metrics Supplementary Table 12. 2D marker gene discovery: visium barcode annotations Supplementary Table 13. 3D ROI manual marker gene discovery: feature expression for annotated regions Supplementary Table 14. 3D ROI manual marker gene discovery: feature fold change for annotated regions Supplementary Table 15: Data associated with breast functional assays Supplementary Table 16: Data associated with prostate functional assays. Supplementary Fig. 1. Lightsheet. Supplementary Fig. 2. 3D serial section workflow and motivation. Supplementary Figure 3. Serial section ROIs for HT206B1 (breast). Supplementary Fig. 4. Genes associated with 3D transition ROIs in breast and prostate. Supplementary Fig. 5. Serial section ROIs for HT913Z1 (prostate). Supplementary Fig. 6. 3D proximity of TAMs to non-invasive and invasive epithelial regions in HT704B1. Supplementary Fig. 7. Expression of cohort-level transition genes. Supplementary Fig. 8. Quantification and validation of transition markers. Supplementary Fig. 9. Wound healing assays for MGP and PLAT knockdowns in breast cancer cell lines. Supplementary Fig. 10. Wound healing assays for GDF15, FASN, ALDH1A3, and ANPEP knockdowns in PC-3 prostate cancer cell line. Supplementary Fig. 11. Expression for GDF15, ANPEP, ALDH3A1, and FASN in four prostate cancer cell lines, including PC-3. HT944B1_S2H3 whole 3D rotation. HT944B1_S2H3 DCIS_IDC ROI1 2Dscroll. HT944B1_S2H3 DCIS_IDC ROI2 2Dscroll. HT944B1 DCIS_IDC 3D rotation. HT944B1_S2H3 DCIS in lobule 2Dscroll. HT957Z1 whole 3D rotation. HT957Z1 HGPIN_GP4 2Dscroll. HT957Z1 HGPIN_GP4 3D rotation. HT704B1 full scroll. HT704B1 CODEX PanCKred CD68cyan KRT5white. HT704B1 ROI1 scroll. HT704B1 ROI2 scroll. HT206B1 full scroll. HT206B1 ROI1 scroll. HT891Z1 full scroll. HT913Z1 full scroll. HT891Z1 ROI1 scroll. HT891Z1 ROI2 scroll. HT913Z1 ROI1 scroll. HT206B1 PanCKred MGPyellow SMAwhite.