Learning to estimate sample-specific transcriptional networks for 7,000 tumors

Caleb N. Ellington, Benjamin J. Lengerich, Anne Thomas, Jiekun Yang, Abhinav Adduri, Sazan Mahbub, Hanxi Xiao, Manolis Kellis, Eric P. XingProceedings of the National Academy of Sciences 2025

TL;DR

This paper introduces "contextualized learning" to infer personalized gene regulatory networks (GRNs) for individual tumors, overcoming limitations of traditional methods that group patients. By leveraging diverse patient data as "context," their approach builds highly specific GRNs, leading to improved cancer subtyping and survival prediction.

What Problem Does This Paper Address?

Cancer is incredibly complex and heterogeneous. Each tumor is shaped by a unique combination of genetic mutations, its surrounding microenvironment, and the patient's own characteristics. These factors profoundly influence how genes are expressed and regulated, leading to diverse cellular behaviors. Gene Regulatory Networks (GRNs) are powerful tools for understanding these complex regulatory mechanisms. However, inferring GRNs typically requires a large number of samples to be statistically robust. This often forces researchers to group patients into broad categories (e.g., by cancer type), which masks the crucial individual-level variations within these groups. This "cluster-level" analysis misses the fine-grained heterogeneity that drives individual patient outcomes and treatment responses, hindering the development of truly personalized medicine.

Methods

The core innovation is contextualized learning, a form of multitask learning. Instead of learning a single GRN for a group of patients, they learn a personalized GRN for each patient by incorporating their specific "context." This context is a rich collection of data, including:

  • Phenotypic information: Patient demographics (age, sex, race).
  • Molecular information: Somatic mutations (SNVs), copy number alterations (SCNAs), gene expression.
  • Environmental information: Tumor microenvironment data (e.g., immune cell infiltration).

The method uses a context encoder, implemented as a deep neural network, to map this contextual information to the parameters of a GRN model. This allows the model to adapt its GRN structure and parameters based on the unique context of each sample. They unify three common GRN model classes—Correlation, Markov, and Neighborhood Selection—under this contextualized framework, making them differentiable and amenable to optimization. A key concept is network archetypes, which act as building blocks for personalized GRNs, allowing for efficient sharing of information across samples and contexts. This approach enables sample-specific GRN inference and even generalization to entirely unseen tumor types or patient contexts.

Datasets

The primary dataset used is from The Cancer Genome Atlas (TCGA), comprising gene expression data from 7,997 tumor samples across 25 different cancer types. This data was augmented with clinical information, biopsy composition, SCNA, and cancer-driving SNV data. The authors also mention using simulated data to evaluate their methods.

Key Insights and Ideas

  • Personalization is key: Traditional methods that group patients miss critical individual-level variations that drive cancer progression and treatment response.
  • Context is king: Leveraging diverse patient data (genomics, clinical, environmental) as "context" is crucial for building accurate, personalized GRNs.
  • Generalization beyond clusters: Contextualized learning allows models to generalize to new, unseen contexts (e.g., rare cancer types or novel patient profiles) without explicit retraining.
  • Unifying network models: The framework provides a unified approach to inferring different types of GRNs (correlation, Markov, neighborhood selection), simplifying their application and comparison.
  • Prognostic power of GRNs: Sample-specific GRNs can reveal more accurate prognostic subtypes than traditional expression-based or molecular subtypes.

Key Results

  • Improved prediction accuracy: Contextualized networks reduced modeling error by 14.6% for Markov networks, 18.1% for neighborhood selection, and 20.2% for correlation networks compared to disease-specific models.
  • Pan-cancer generalization: The model achieved state-of-the-art performance on 22 out of 25 cancer types and demonstrated the ability to generalize to entirely new, unseen disease types.
  • Identification of novel prognostic subtypes: For thyroid carcinoma, GRN-based subtypes were more prognostic than existing reference subtypes, identifying distinct patient groups with significantly different survival outcomes.
  • Unifying disparate data: The approach effectively integrates molecular, clinical, and environmental data to provide a cohesive understanding of tumor states.

Limitations and Future Work

  • Interpretability of archetypes: While the network archetypes are crucial for the model's function, their direct biological interpretation is left for future work.
  • Statistical tests for heterogeneity: New statistical methods are needed to quantify the degree of heterogeneity and the impact of contextual features on model parameters.
  • Application to other domains: The authors suggest that this framework has potential beyond cancer, applicable to any domain with heterogeneous, multiview data.
  • Exploration of sample-specific model space: Further research is needed to understand how to interpret and traverse the space of sample-specific models generated by the framework.

Summary updated

Abstract

Cancers are shaped by somatic mutations, microenvironment, and patient background, each altering gene expression and regulation in complex ways, resulting in heterogeneous cellular states and dynamics. Inferring gene regulatory networks (GRNs) from expression data can help characterize this regulation-driven heterogeneity, but network inference requires many statistical samples, limiting GRNs to cluster-level analyses that ignore intracluster heterogeneity. We propose to move beyond coarse analyses of predefined subgroups by using contextualized learning, a multitask learning paradigm that uses multiview contexts including phenotypic, molecular, and environmental information to infer personalized models. With sample-specific contexts, contextualization enables sample-specific models and even generalizes at test time to predict network models for entirely unseen contexts. We unify three network model classes (Correlation, Markov, and Neighborhood Selection) and estimate context-specific GRNs for 7,997 tumors across 25 tumor types, using copy number and driver mutation profiles, tumor microenvironment, and patient demographics as model context. Our generative modeling approach allows us to predict GRNs for unseen tumor types based on a pan-cancer model of how somatic mutations affect gene regulation. Finally, contextualized networks enable GRN-based precision oncology by providing a structured view of expression dynamics at sample-specific resolution, explaining known biomarkers in terms of network-mediated effects and leading to subtypings that improve survival prognosis. We provide a SKLearn-style Python package https://contextualized.ml for learning and analyzing contextualized models, as well as interactive plotting tools for pan-cancer data exploration at https://github.com/cnellington/CancerContextualized.
BibTeX
@inproceedings{ellington2025learning,
  author = {Caleb N. Ellington and Benjamin J. Lengerich and Anne Thomas and Jiekun Yang and Abhinav Adduri and Sazan Mahbub and Hanxi Xiao and Manolis Kellis and Eric P. Xing},
  title = {{Learning to estimate sample-specific transcriptional networks for 7,000 tumors}},
  booktitle = {Proceedings of the National Academy of Sciences},
  year = {2025},
  doi = {10.1073/pnas.2411930122},
}
Figure