TL;DR
This paper introduces ProtSent, a novel contrastive fine-tuning framework that transforms protein language models (pLMs) into powerful general-purpose embedding models. By training pLMs to better capture functional, evolutionary, and structural similarities between proteins, ProtSent significantly boosts performance on a wide range of downstream tasks, particularly those relying on understanding protein neighborhood relationships.
What Problem Does This Paper Address?
Protein language models (pLMs) like ESM-2 have revolutionized protein sequence analysis by learning rich, per-residue representations that encode evolutionary and structural information. However, a key limitation is that their standard sequence-level embeddings (e.g., after mean-pooling) aren't explicitly trained to reflect biological similarity. This means that proteins with similar functions or structures might not be close to each other in the embedding space, hindering tasks that rely on nearest-neighbor searches or clustering. The authors draw an analogy to natural language processing, where Sentence-BERT addressed a similar issue for sentence embeddings. They aim to create protein embeddings where semantically similar proteins are neighbors, making the embeddings directly useful for various downstream applications without requiring task-specific fine-tuning.
Methods
ProtSent employs a contrastive fine-tuning approach, building upon existing pLM architectures (specifically ESM-2). The core idea is to train the model to pull similar protein pairs closer together and push dissimilar pairs apart in the embedding space. This is achieved using the Multiple Negatives Ranking Loss (MNRL). In essence, for a given protein (the "anchor"), its known similar partner is treated as a positive example, while all other proteins in the training batch are treated as negative examples. The model is then optimized to maximize the similarity score between the anchor and its positive partner while minimizing the scores with the negative examples.
To provide diverse signals of biological relatedness, ProtSent integrates five distinct protein-pair datasets:
- Pfam families: Captures evolutionary and functional homology at the domain level.
- Structurally derived hard negatives: Specifically designed to be evolutionarily related but structurally distinct, forcing the model to learn finer-grained discriminative features.
- AlphaFold DB structural pairs: Leverages predicted protein structures to learn three-dimensional structural relationships.
- StringDB interaction pairs: Encodes functional associations, co-occurrence in pathways, and co-expression.
- Deep Mutational Scanning (DMS) data: Used with a CoSENT loss to capture continuous fitness landscapes, allowing the model to learn about variant effects.
The training utilizes a round-robin sampling strategy to ensure that each data source contributes equally to the gradient updates, preventing any single dataset from dominating the learning process.
Datasets
ProtSent is trained on a combination of five datasets:
- Pfam families: Derived from Pfam-A full-alignment domains.
- Pfam hard negatives: Generated to be evolutionarily related but structurally distinct.
- AlphaFold DB structural pairs: Based on Foldseek structural clusters of AFDB50 sequences.
- STRING-DB v12 PPI: Protein-protein interaction pairs from the STRING database.
- ProteinGym DMS / clinical: Data from ProteinGym, including substitution and indel scores, used with a CoSENT loss.
The evaluation is performed on 23 downstream tasks, categorized into binary classification, multiclass classification, and regression. These tasks cover a broad spectrum of protein-related problems, including remote homology detection, variant effect prediction, protein-protein interaction prediction, and structural retrieval (using the SCOPe-40 database).
Key Insights and Ideas
- Contrastive learning is a powerful tool for protein embeddings: The paper demonstrates that explicitly training protein embeddings for similarity significantly improves their utility across a wide range of tasks, moving beyond what self-supervised pre-training alone achieves.
- Diverse data sources are crucial: Combining evolutionary, structural, and functional interaction data provides a comprehensive signal for learning robust protein representations.
- Neighborhood quality is key: The most significant improvements are seen on tasks that heavily rely on the geometric structure of the embedding space, such as remote homology detection and structural retrieval.
- Scale matters, but the approach is general: Both smaller (35M parameters) and larger (150M parameters) ESM-2 models benefit from ProtSent fine-tuning, suggesting the framework is broadly applicable.
- Hard negatives can be tricky: While intended to improve discrimination, removing hard negatives surprisingly led to improvements on many tasks, suggesting that in-batch negatives might be sufficient or that hard negatives can sometimes introduce overly aggressive gradients.
Key Results
ProtSent achieves substantial improvements on downstream tasks when evaluated using a frozen embedding protocol with a k-nearest-neighbor (KNN) probe.
- ESM-2 150M:
- 15 out of 23 tasks improved.
- +105% improvement on remote homology detection.
- +17% improvement on variant effect prediction (GB1).
- +19.9% Recall@1 on SCOPe-40 structural retrieval.
- ESM-2 35M:
- 16 out of 23 tasks improved.
- +40.5% improvement on remote homology detection.
- +15.5% Recall@1 on SCOPe-40 structural retrieval.
Qualitatively, UMAP visualizations show that ProtSent embeddings are more clustered and separated compared to the baseline ESM-2 embeddings, especially at the fold level.
Limitations and Future Work
- Data limitations: The training data only captures specific types of protein relationships (family, structure, interaction). Relationships like enzymatic mechanism similarity or expression patterns are not explicitly optimized.
- Comparison to specialized models: The authors acknowledge that ProtSent is designed for general-purpose embeddings, not specialized retrieval systems. Direct comparisons with models optimized for specific tasks (like retrieval) would be valuable.
- Uncertainty estimates: The evaluation uses single training runs, and the authors suggest that multi-seed uncertainty estimates would strengthen the robustness claims, especially for few-shot evaluations.
- Hard negative investigation: The surprising results from removing hard negatives suggest further investigation into their optimal use and selection is warranted.
- Interactions between data sources: The ablation studies are single-factor, and exploring the interactions between different data sources could yield further insights.
The authors suggest that ProtSent provides a foundation for creating universally useful protein embeddings and that this approach is broadly applicable for adapting pLMs.
Summary updated