Co-modeling the Sequential and Graphical Routes for Peptide Representation Learning

Zihan Liu, Ge Wang, Jiaqi Wang, Jiangbin Zheng, Stan Z. LiarXiv 2023 · DOI

Abstract

Peptides are essential components in drug discovery, typically represented as either 1D sequences or 2D molecular graphs. While both modalities describe the same molecule, models trained on them develop distinct biases. This paper presents RepCon (Regularization by Representation Contrasting), a framework that uses contrastive learning to fuse the strengths of sequential and graphical encoders. During training, RepCon maximizes mutual information between sequence and graph representations, effectively distilling structural chemical knowledge into the sequential model. At inference, the graphical branch is decoupled, ensuring high computational efficiency. Experimental results across four benchmark datasets demonstrate that RepCon consistently outperforms standalone models and traditional fusion techniques.

Introduction

Peptides—short chains of amino acids—are vital for precision medicine. Predicting their properties, such as toxicity or solubility, is a core task. Traditionally, researchers use either sequential representations (like text strings) or molecular graphs (atoms and bonds). However, Transformers and Graph Neural Networks (GNNs) focus on different features: Transformers on amino acid order and GNNs on local chemical environments. This paper addresses the gap between these "expert perspectives" by proposing a co-modeling approach that captures structural insights without increasing inference-time complexity.

Methods

The RepCon architecture employs a dual-encoder strategy. A sequential encoder (Transformer) and a graphical encoder (GraphSAGE) process the same peptide. To align these views, the framework utilizes a contrastive loss (InfoNCE), treating the sequence and graph of the same peptide as a positive pair. This forces the sequential model to internalize structural information typically reserved for GNNs. Crucially, the graphical branch is only used during training; for inference, only the sequential encoder is required, making the model fast and easy to deploy.

The RepCon architecture utilizes dual encoders and contrastive loss to align sequential and graphical representations during training.

Results and Discussion

Attribution analysis using Integrated Gradients reveals that standalone sequential and graphical models prioritize different amino acids. For instance, Transformers are more sensitive to negatively charged residues (D and E), whereas GNNs focus on sulfur-containing ones (C and M). RepCon bridges this gap, shifting the sequential model's attribution patterns to incorporate graphical "logic."

Attribution analysis shows that sequential and graphical models focus on different amino acid features, a gap bridged by RepCon's co-modeling approach.

In performance benchmarks, RepCon achieved an $R^2$ of 0.953 on the Aggregation Propensity (AP) dataset, surpassing standalone Transformer (0.947) and GraphSAGE (0.945) baselines. It also showed lower variance and higher stability compared to complex fusion methods like Compact Bilinear Pooling. The model was also validated on Retention Time (RT), Antimicrobial Peptide (AMP) classification, and the PepDB family classification dataset, consistently showing superior performance.

Conclusion

RepCon demonstrates that contrastive co-modeling can effectively distill structural knowledge into efficient sequential architectures. By aligning the divergent "expert perspectives" of sequence and graph models, the framework achieves state-of-the-art results without the computational burden of graph processing during inference. While currently focused on primary and secondary structures, future work could extend this framework to incorporate 3D tertiary structures or more advanced backbone encoders for broader molecular tasks.

Summary updated

BibTeX
@misc{liu2023co,
  author = {Zihan Liu and Ge Wang and Jiaqi Wang and Jiangbin Zheng and Stan Z. Li},
  title = {{Co-modeling the Sequential and Graphical Routes for Peptide Representation Learning}},
  year = {2023},
  eprint = {2310.02964},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.02964},
}
Figure