Abstract
The rapid emergence of biological foundation models (FMs) has created a significant infrastructure gap between pre-training and therapeutic application. While models like Geneformer and scGPT demonstrate potential in general biological tasks, their utility in drug discovery is often hindered by fragmented data sources and a lack of context-specific evaluation frameworks. We present PyTDC, an open-source, end-to-end platform designed to unify heterogeneous biological data and streamline the training, evaluation, and inference of multimodal foundation models. By introducing context-aware benchmarks and a standardized model server, PyTDC enables researchers to move beyond canonical tasks toward meaningful therapeutic discovery.
Introduction
The "Foundation Model" revolution has reached biology, promising to transform our understanding of cellular processes and disease mechanisms. However, a massive gap remains between pre-training these models on massive datasets and applying them to real-world drug discovery. Current biomedical benchmarks frequently focus on "canonical" tasks—such as distinguishing between T-cells and B-cells—which do not necessarily translate to therapeutic outcomes, such as identifying a viable drug target for Alzheimer's disease within a specific microglial context.
Furthermore, biological data is notoriously fragmented, distributed across gene expression atlases, protein-protein interaction networks, and chemical libraries. Researchers often spend a disproportionate amount of time on "boilerplate" code to fetch, align, and preprocess these disparate modalities. PyTDC addresses these challenges by providing a unified, API-first infrastructure that standardizes model evaluation within specific biological contexts.
System Architecture and Methods
PyTDC is built upon three core pillars designed to simplify the machine learning workflow for biological discovery:
- API-First & MVC Design: The platform utilizes a Model-View-Controller (MVC) pattern to decouple data logic from the user interface. This architecture allows PyTDC to unify distributed, heterogeneous data sources—ranging from the CZI CellXGene atlas to the PrimeKG knowledge graph—into standardized "data views" that are ready for model consumption.
- The PyTDC Model Server: To streamline the deployment of state-of-the-art (SoTA) models, PyTDC provides a unified interface to pull weights from repositories like Hugging Face. This component allows researchers to run inference or fine-tuning on complex models with significantly reduced code complexity, often reducing hundreds of lines of boilerplate to fewer than 30.
- Context-Specific Metrics: Recognizing that biological efficacy is often cell-type dependent, PyTDC introduces "slice-based" evaluation. Rather than relying on global performance averages, the platform measures model performance on specific biological contexts, such as the most predictive cell types for a given disease.
Data Integration
PyTDC integrates a vast array of multimodal data to support diverse therapeutic tasks:
- Single-Cell Genomics: Comprehensive gene expression data from the CZI CellXGene atlas.
- Knowledge Graphs: Integration with PrimeKG, which encompasses over 4 million relationships across 17,000+ diseases.
- Therapeutic Labels: Curated drug-target labels for conditions such as Rheumatoid Arthritis (RA) and Inflammatory Bowel Disease (IBD), sourced from the Open Targets Platform.
- Perturbation Data: Response data from genetic and chemical perturbations via scPerturb.
- Protein-Peptide Interactions: Specialized datasets like TCHard and PanPep for TCR-epitope binding analysis.
Key Insights and Results
The Importance of Context
Experimental results within the platform demonstrate that general-purpose Graph Neural Networks (GNNs) often perform poorly on therapeutic tasks. This is largely because biological pathways are frequently fragmented across networks. To be effective, models must be "context-aware," incorporating cell-type-specific information rather than relying on global network topology.
Case Study: Single-Cell Drug-Target Nomination (scDTN)
The authors evaluated the platform using a case study on scDTN, comparing specialized models against standard baselines:
- Superiority of Context-Aware Models: PINNACLE, a model engineered for cell-type-specific networks, significantly outperformed context-free models. In Rheumatoid Arthritis tasks, PINNACLE achieved an Average Precision (AP@5) of 0.917, whereas a standard GATv2 model achieved only 0.334.
- Failure of Traditional Baselines: Domain-specific baselines like Label Propagation performed nearly at random in several contexts (e.g., AP@5 of 0.105 for RA). This suggests that disease pathways do not always form well-connected clusters in protein networks, necessitating the advanced representation learning offered by foundation models.
- Operational Efficiency: The PyTDC interface allows researchers to load a foundation model, tokenize custom single-cell data, and execute inference in approximately 25 lines of Python code, demonstrating a significant reduction in technical overhead.
Discussion and Limitations
While PyTDC provides the infrastructure to bridge the gap between FMs and therapeutics, several research challenges remain. Out-of-Distribution (OOD) Generalization is a primary concern; current models struggle to generalize to unseen cell types (e.g., a model trained on lung tissue may not accurately predict targets in the brain). Additionally, while the platform supports multiple modalities, the development of a single foundation model capable of simultaneous reasoning across gene expression, 3D protein structures, and knowledge graphs remains an open frontier.
Finally, the methodology for Negative Sampling—identifying proteins that are not viable targets—remains a source of potential bias. Future work will focus on developing more robust heuristics to ensure models are learning biological signals rather than memorizing dataset artifacts.
Conclusion
PyTDC serves as a critical bridge between the development of large-scale biological foundation models and their practical application in drug discovery. By providing standardized data access, simplified model deployment, and context-aware evaluation, the platform accelerates the transition from general biological modeling to targeted therapeutic innovation.
Summary updated