Generalized cell phenotyping for spatial proteomics with language-informed vision models

Xuefei Wang, Rohit Dilip, Yuval Bussi, Caitlin S. Brown, Elora Pradhan, Yashvardhan Jain, Kevin Yu, Shenyi Li, Martin Abt, Katy Börner, Leeat Keren, Yisong Yue, Ross Barnowski, David Van ValenbioRxiv 2024

Abstract: We present DeepCell Types, a novel approach to cell phenotyping for spatial proteomics that addresses the challenge of generalization across diverse datasets with varying marker panels collected across different platforms. Our approach utilizes a transformer with channel-wise attention to create a language-informed vision model; this model's semantic understanding of the underlying marker panel enables it to learn from and adapt to heterogeneous datasets. Leveraging a curated, diverse dataset named Expanded TissueNet with cell type labels spanning the literature and the NIH Human BioMolecular Atlas Program (HuBMAP) consortium, our model demonstrates robust performance across various cell types, tissues, and imaging modalities. Comprehensive benchmarking shows superior accuracy and generalizability of our method compared to existing methods. This work significantly advances automated spatial proteomics analysis, offering a generalizable and scalable solution for cell phenotyping that meets the demands of multiplexed imaging data.

Introduction

Spatial proteomics, or multiplexed imaging, allows researchers to visualize the spatial distribution of dozens of proteins within intact tissue samples. However, analyzing this data at scale is hindered by the "brittleness" of existing automated tools. Every experiment typically utilizes a unique "marker panel" tailored to specific biological questions, and different imaging hardwares (such as CODEX or MIBI) introduce platform-specific artifacts. Bridging the gap between these heterogeneous datasets currently requires tedious manual gating or extensive model retraining, creating a significant bottleneck for large-scale biological discovery.

Methods

To address these challenges, we developed DeepCellTypes, a hybrid architecture that treats biological markers as semantic tokens rather than fixed indices. The model consists of several key components:

  1. Visual Encoder: A CNN processes pixel patches for each marker channel, capturing cell morphology and protein spatial distribution.
  2. Language Encoder: Utilizing GPT-4, the system generates detailed biological descriptions of markers and cell types. These are converted into embeddings, allowing the model to understand the functional meaning of a marker (e.g., recognizing that "CD3" is associated with T cells).
  3. Channel-wise Transformer: This module applies self-attention across different marker channels without positional encodings, making the model invariant to the order or number of markers in a panel.
  4. Adversarial Training: A Gradient Reversal Layer is used to force the model to "unlearn" platform-specific features, focusing purely on the underlying biological signals.
The DeepCellTypes framework utilizes an expert-in-the-loop training cycle to refine automated predictions and improve model robustness.

Datasets: Expanded TissueNet

We introduced Expanded TissueNet, a massive curated dataset designed as a foundation for the field. It comprises 10.5 million labeled cells from 6 imaging platforms (IMC, CODEX, MIBI, IBEX, MICS, and MxIF) across 13 tissue types. The dataset includes 177 unique protein markers and 28 specific cell types organized into a hierarchical structure of 7 broad lineages.

The Expanded TissueNet dataset organizes 28 specific cell types into 7 broad lineages, providing a comprehensive hierarchy for spatial phenotyping.

Labels were generated using a "human-in-the-loop" framework where experts used the cloud-based DeepCell Label software to refine automated predictions, ensuring high-quality ground truth across diverse tissues.

Key Insights and Results

DeepCellTypes demonstrates several critical capabilities:

  • Semantic Generalization: By understanding biological context through text, the model handles "unseen" markers. For example, it successfully identified plasma cells in a dataset using the unique marker IgA instead of the standard CD138, because the language encoder recognized their functional relationship.
  • Zero-Shot Performance: In hold-out tests on entirely new datasets, DeepCellTypes significantly outperformed standard machine learning baselines like XGBoost and MAPS.
  • Interpretability: The transformer's attention weights provide built-in explanations, allowing researchers to see which markers the model prioritized for a specific classification.
  • Platform Invariance: The adversarial approach successfully separated biological signals from technical noise, enabling consistent performance across different imaging machines.

Limitations and Future Work

While DeepCellTypes represents a significant advance, some limitations remain. The model currently processes small 64x64 patches, missing the larger tissue architecture (e.g., proximity to tumor borders) that often provides vital phenotyping clues. Additionally, while 28 cell types cover major populations, future work will aim to expand this hierarchy to capture more nuanced, specialized cell states. Expanding the model's domain to even more diverse tissues and modalities will continue to be a priority for the field.

Summary updated

BibTeX
@misc{wang2024generalized,
  author = {Xuefei Wang and Rohit Dilip and Yuval Bussi and Caitlin S. Brown and Elora Pradhan and Yashvardhan Jain and Kevin Yu and Shenyi Li and Martin Abt and Katy Börner and Leeat Keren and Yisong Yue and Ross Barnowski and David Van Valen and David Van Valen},
  title = {{Generalized cell phenotyping for spatial proteomics with language-informed vision models}},
  year = {2024},
  doi = {10.1101/2024.11.02.621624},
  howpublished = {bioRxiv},
}
Figure