Implementation of CapsNet for MHC Binding Prediction

Abstract

This report presents the implementation of Capsule Networks (CapsNet) for predicting MHC-peptide binding hit. The study covers dataset analysis, methodological explanation, experimental setup, and result evaluation. The advantages of CapsNet are explored through several experiments. This study is the implementation of CapsNet-MHS paper.

1. Introduction

Capsule Networks (CapsNet) have been proposed as an alternative to traditional Convolutional Neural Networks (CNNs) to better capture spatial hierarchies. This project aims to implement CapsNet for MHC-peptide binding prediction, evaluating its performance against conventional deep learning models.

2. Dataset Analysis

2.1 Dataset Overview

The dataset utilized is the NetMHC dataset. It comprises over 3.6 million peptide-allele pairs labeled for MHC class I binding. The distribution of alleles is heavily imbalanced.

Allele frequency distribution in the training set

Figure 1: Allele frequency distribution in the training set

Hierarchical distribution of alleles

Figure 2: Hierarchical distribution of alleles

2.2 Challenges

3. Method Explanation

3.1 Capsule Networks

Capsule Networks represent local features using vectors instead of scalars. Each vector's norm indicates probability, while the direction captures spatial relationships. Inputs \( u_i \) are transformed via matrices \( W_{ij} \), producing \( \hat{u}_{j|i} = W_{ij} u_i \). Outputs are computed as:

\( s_j = \sum_i c_{ij} \hat{u}_{j|i} \), and the final capsule output is: \( v_j = \frac{||s_j||^2}{1 + ||s_j||^2} \cdot \frac{s_j}{||s_j||} \)

Network architecture

Figure 3: Network architecture from reference [Kalemati 2023]

3.2 Implementation Details

4. Experiment Description

5. Result Analysis

Training loss for BLOSUM62

Figure 3: Training and validation loss, AUC Precision-Recal and Mathew's correlation coefficient curve for BLOSUM62 embedding

PR curve for BLOSUM62 after 30 epochs

Figure 4: The final precision-recal curve

Table 1: AUC-ROC values on validation set
BLOSUM MatrixAUC-ROC
BLOSUM450.8407
BLOSUM620.8375
BLOSUM800.8407
Table 2: Test set performance metrics for the final model trained for 30 epochs.
MetricValue
AUC PR0.370
MCC0.333
Accuracy0.798
F1-Score0.306
Table 3: Validation set performance metrics for the final model trained for 30 epochs.
MetricValue
AUC PR0.374
MCC0.339
Accuracy0.805
F1-Score0.314

Discussion

CapsNet-MHC showed strong results on imbalanced data. An alternative NLP-based approach using fastText-like embeddings was tested but was computationally prohibitive due to massive training pairs.

6. Conclusion

Capsule Networks effectively capture peptide-allele interactions. While promising, further tuning and training on all folds is necessary to realize full potential.

7. Further Work

Future efforts should focus on hyperparameter tuning, reconsidering the attention approach and deeper analysis of capsule outputs for the purpose of explainability.