GRIP: Graph Representation of Immune Repertoire Using Graph Neural Network and Transformer

Yongju Lee, Hyunho Lee, Kyoungseob Shin, Sunghoon KwonAAAI 2023 · DOI

Abstract

Predicting cancer prognosis from the immune repertoire—the collection of T-cell and B-cell receptors—is a complex challenge due to the vast diversity and structural relationships within these cell populations. Traditional deep learning approaches treat the immune repertoire as an unordered set, neglecting the biological reality of evolutionary lineages. We present GRIP (Graph Representation of Immune Repertoire), a novel framework that models the immune repertoire as a hierarchical graph. By utilizing Graph Neural Networks (GNNs) and Transformers to capture subclone structures and their interactions, GRIP significantly improves survival prediction across 17 tumor types, outperforming state-of-the-art set-based methods.

Introduction

The immune repertoire of a single individual can contain millions of unique receptors. Analyzing this data for cancer prognosis is a classic Multiple Instance Learning (MIL) problem: a patient (the "bag") contains many immune receptors (the "instances"), but only a small fraction are disease-relevant.

Previous deep learning approaches treated the repertoire as a set—an unordered collection of independent sequences. However, biology dictates that when B-cells encounter pathogens, they undergo Somatic Hypermutation, creating "lineages" or family trees of related receptors. Set-based models ignore these structural relationships, treating every receptor as an independent island and missing the context of how the immune system evolves to fight a tumor.

Comparison of immune repertoire representation: (a) raw sequences and embeddings, (b) conventional set-based MIL, and (c) the proposed graph-based representation capturing evolutionary lineages.

Methods

GRIP represents the immune repertoire as a hierarchical graph, incorporating biological structure as an inductive bias. The architecture follows a cascaded approach:

  1. Graph Construction: Receptors are nodes, with edges drawn between those with high sequence similarity (normalized edit distance) to capture evolutionary links.
  2. Feature Encoding: Initial features are extracted using Prot-BERT, a pre-trained protein language model, and combined with receptor isotype and frequency data.
  3. Hierarchical Learning: A repertoire-level GNN (GINE) processes the initial graph to learn local relationships. Similar receptors are then clustered into "subclones" via graph pooling. A second-level GNN and a Transformer aggregate these subclone embeddings into a single patient-level "repertoire embedding."
  4. Survival Analysis: The final embedding is processed by a Cox regression module to predict the patient's risk of death.
The GRIP architecture: a hierarchical GNN and Transformer cascade that processes repertoire graphs into subclone embeddings and finally a global patient representation.

Results and Key Insights

The researchers evaluated GRIP using data from The Cancer Genome Atlas (TCGA), covering 4,970 patients across 17 tumor types. Receptors were extracted from bulk RNA-seq data using the TRUST algorithm.

  • Superior Accuracy: GRIP outperformed leading set-based methods like Set Transformer and DeepRC by 3% and 6% respectively in terms of C-index. It achieved the highest performance in 15 out of 17 tumor types.
  • Better Stratification: In Kaplan-Meier survival analysis, GRIP was significantly more effective at separating patients into high-risk and low-risk groups, providing clearer prognostic signals through significantly lower p-values.
  • Interpretability: Using Integrated Gradients (IG), the authors identified that GRIP successfully flags specific mutation patterns, such as Class Switching Recombination, which are known favorable prognostic factors but are often missed by set-based models.

Discussion and Limitations

The core innovation of GRIP is the use of biology as an inductive bias. The graph structure is not merely a mathematical convenience but a reflection of biological reality. Ablation studies confirmed that the hierarchical processing—specifically the subclone-level GNN and graph pooling—is essential for performance.

However, some limitations remain. The graph structure is most naturally suited for B-cell receptors (BCRs) due to hypermutation; while applicable to T-cell receptors (TCRs), the evolutionary lineages are less pronounced. Additionally, the multi-layer GNN approach is more computationally intensive than simple set models. Future work will involve wet-lab validation of the identified receptor sequences as physical biomarkers.

Conclusion

GRIP demonstrates that the connections between immune cells are as vital as the cells themselves. By modeling the "evolutionary conversation" within a tumor, GRIP provides a clearer picture of patient outcomes and a robust framework for future immunological research.

Summary updated

BibTeX
@inproceedings{lee2023grip,
  author = {Yongju Lee and Hyunho Lee and Kyoungseob Shin and Sunghoon Kwon},
  title = {{GRIP: Graph Representation of Immune Repertoire Using Graph Neural Network and Transformer}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i4.25645},
}
Figure