Protein Language Models (PLMs) like ESM and ProtBert have revolutionized computational biology by treating amino acid sequences much like human language. However, these models possess a significant "blind spot": they primarily learn from the sequence itself, often missing the rich factual context—such as gene descriptions or functional annotations—found in Protein Knowledge Graphs (PKGs).
Existing attempts to fix this usually bake knowledge into the model's parameters during pre-training. This leads to three major headaches:
- Implicit Storage: Models struggle to remember "long-tail" or rare knowledge stored only in their weights.
- Structural Neglect: They often treat biological facts as isolated triplets, ignoring the complex network of relationships between proteins.
- Catastrophic Forgetting: When these models are fine-tuned for a specific downstream task (like predicting protein stability), they often "forget" the general biological knowledge they learned during pre-training because the fine-tuning process doesn't include the knowledge graph.
To address these limitations, researchers have introduced Kara (Knowledge-aware retrieval augmented protein language model). Kara explicitly integrates structured biological knowledge from knowledge graphs into protein encoding, overcoming catastrophic forgetting and achieving an average 5.1% performance boost across diverse biological tasks.
Methods: A Retrieval-Augmented Approach
Kara treats biological knowledge as an external resource to be actively queried rather than just a passive training signal.
Kara achieves this through three core mechanisms:
1. Contextualized Virtual Tokens
Instead of just feeding a sequence of amino acids into the model, Kara appends "virtual tokens" to the input. These come in two flavors:
- Knowledge Tokens: These represent "one-hop" neighbors in a knowledge graph, such as Gene Ontology (GO) terms.
- Structure Tokens: These represent "two-hop" neighbors, which are other proteins with similar functions. These tokens allow the model to "attend" to functional and structural context at every layer of the transformer, making the knowledge explicit.
2. The Knowledge Retriever
For proteins not already in a known database, Kara uses a dedicated retriever to predict potential linkages to the knowledge graph. It uses a cross-modal matching loss to ensure that text-based descriptions (like "viral budding") align accurately with amino acid sequence representations.
3. Unified Optimization
Kara uses a structure-based regularization (a margin loss) during both pre-training and fine-tuning. This ensures that proteins with similar biological functions stay close to each other in the embedding space, preventing the model from losing its "biological common sense" during task-specific training.
Datasets and Evaluation
The model was pre-trained on ProteinKG25, a massive graph containing 4.5 million triplets, 600,000 proteins, and 50,000 Gene Ontology entities. To prove its mettle, Kara was evaluated on six representative downstream tasks:
- Amino Acid Contact Prediction: ProteinNet.
- Protein-Protein Interaction (PPI): SHS27K, SHS148K, and STRING datasets.
- Homology Detection: Predicting protein folds.
- Stability Prediction: Assessing intrinsic protein stability.
- Binding Affinity: SKEMPI dataset.
- Semantic Similarity: Evaluating functional similarity.
Key Insights and Results
The biggest "aha moment" in Kara's design is moving knowledge from the loss function to the input sequence. By making knowledge explicit via virtual tokens, the model doesn't have to "guess" functional properties; it can "read" them. Furthermore, Kara’s retriever allows it to bring the knowledge graph along for the ride during fine-tuning, successfully bridging the inconsistency gap that causes catastrophic forgetting.
Kara consistently outperformed state-of-the-art models like KeAP and ESM-2:
- Broad Superiority: Achieved an average improvement of 5.1% across all tasks.
- Long-range Contact Prediction: Outperformed KeAP by 11.6%, showing that external knowledge is crucial when sequence-based patterns are stretched thin.
- Homology Detection: Achieved a 10.3% improvement, demonstrating a superior grasp of evolutionary relationships.
- Robustness: Even when tested with an "incomplete" knowledge graph (only 50% of data available), Kara still outperformed existing models that had access to the full graph.
Limitations and Future Work
While Kara is excellent at utilizing functional knowledge, the authors identify a primary limitation in structural modeling. The model still struggles to accurately align long-sequence proteins with ground-truth contact maps. The lack of explicit 3D structural information (like atomic coordinates) remains a hurdle. The next logical step for Kara is the integration of 3D structural data to complement its current mastery of sequence and functional knowledge graphs.
Summary updated