Abstract
BACKGROUND: The heterogeneity of the tumor microenvironment (TME) is a critical determinant of outcomes in immune checkpoint blockade (ICB) therapy. However, robust methodological frameworks for systematically characterizing this heterogeneity and identifying causal regulators of treatment response are still lacking. METHODS: We developed TMEtyper, a comprehensive computational framework for TME characterization. This was achieved by constructing a pan-cancer TME signature that integrates cellular compositions, pathway activities, and intercellular communication networks. We employed consensus clustering coupled with topological feature extraction to delineate seven distinct TME subtypes. Key hub genes specific to each subtype were identified through an integrative machine learning approach, and their regulatory mechanisms were elucidated using structural causal modeling. RESULTS: TMEtyper integrates 231 TME signatures to characterize the TME via network-based clustering, defining seven subtypes with distinct prognostic implications. Its analytical pipeline combines ensemble machine learning with a convolutional neural network for robust subtype classification and employs structural causal modeling to reconstruct underlying regulatory networks. Validation across 11 independent immunotherapy cohorts confirmed its strong predictive power, with the Lymphocyte-Rich Hot subtype being consistently associated with superior clinical outcomes. TMEtyper is implemented as an open-source R package with an interactive web interface, facilitating TME analysis and biomarker discovery for the research community. CONCLUSIONS: TMEtyper establishes an integrative framework that advances TME characterization beyond conventional classifications, delivering both biological insights and clinical utility. Its deployment as an accessible analytical resource opens new avenues for personalized immunotherapy strategies and biomarker development.