Introduction
Pretrained transformer embeddings have become a cornerstone of molecular machine learning, providing rich, high-dimensional representations of proteins and peptides. However, adapting these general-purpose embeddings to specific downstream tasks—such as predicting antimicrobial activity—remains a challenge. Standard approaches like fine-tuning often destroy the learned geometric structure and lead to overfitting on small datasets, while linear probing often lacks the expressivity to capture complex task-specific signals.
This paper introduces Freeze, Diffuse, Decode (FDD), a novel framework designed to expressively adapt frozen embeddings without compromising their original geometric integrity. By treating the embedding space as a manifold and applying supervised diffusion, FDD creates task-aware, low-dimensional representations that excel in property prediction, retrieval, and generative design.
The Freeze, Diffuse, Decode Framework
The FDD framework operates in three distinct stages, leveraging the strengths of both frozen representations and supervised learning.
- Freeze: Input amino acid sequences are passed through a frozen pretrained transformer (Hyformer) to extract high-dimensional embeddings. By keeping the weights frozen, the model preserves the broad biological knowledge captured during large-scale pretraining.
- Diffuse: This core stage projects the high-dimensional embeddings into a lower-dimensional latent space using an autoencoder. This projection is regularized via a supervised diffusion process. Using Random Forest-based affinities (RF-GAP), the framework constructs a similarity kernel that propagates task-specific labels across local neighborhoods, aligning the latent geometry with the target property.
- Decode: The resulting geometry-aware embeddings are then utilized by lightweight decoders for various downstream tasks, including classification, regression, and sequence reconstruction.
To enable the generation of novel peptides, the authors implement Neural ODEs guided by Optimal Transport (Sinkhorn loss). This allows for the discovery of continuous, smooth trajectories in the latent space that connect inactive peptide regions to active ones.
Experimental Evaluation
The authors evaluated FDD using a pretraining set of 1.4 million peptide sequences and two primary downstream datasets: a general Antimicrobial Peptide (AMP) classification dataset and an E. coli-specific activity dataset.
Predictive Performance
FDD demonstrated significant improvements over baseline methods. For AMP classification, FDD achieved a peak AUC of 0.965, substantially higher than raw embeddings (0.844) or standard dimensionality reduction techniques like t-SNE (0.704). Interestingly, the best performance was observed using intermediate transformer layers (L5-L6), suggesting that these layers capture a balance of feature complexity and generalizability that the diffusion process can effectively exploit.
Retrieval and Latent Space Analysis
In retrieval tasks aimed at identifying novel active peptides, FDD reached a retrieval accuracy ($P_{amp}$) of 0.90, outperforming specialized state-of-the-art classifiers such as AMPlify and HydrAMP.
Visual analysis of the latent space reveals a clear separation between active and inactive peptides. The Neural ODE trajectories are not only mathematically smooth but also biologically meaningful; moving along these paths corresponds to a monotonic increase in critical physical properties like net charge and hydrophobicity, which are essential for antimicrobial function.
Conclusion and Future Directions
The FDD framework provides a principled method for task-specific adaptation of large-scale pretrained models. By combining the robustness of frozen embeddings with the expressivity of supervised diffusion, it achieves state-of-the-art results in AMP design and property prediction. While the auxiliary training of random forests and autoencoders adds some complexity, the resulting biologically coherent latent space offers powerful tools for molecular discovery. Future work aims to extend FDD to multi-modal data, potentially unifying molecular embeddings with cellular and phenotypic information.
Summary updated