Residue Function Fusion in EnzyPGM
- Residue Function Fusion (RFF) is a module that integrates enzyme function priors into protein residue embeddings while preserving SE(3)-equivariance for accurate structural modeling.
- It uses stacked transformer blocks and a spatial neighborhood equivariant layer to jointly process sequence information and coordinate updates for enhanced enzyme-substrate interaction modeling.
- Empirical evaluations within the EnzyPGM framework show that RFF significantly improves amino acid recovery, structural similarity, and docking scores, underscoring its effectiveness in enzyme design.
Residue Function Fusion (RFF) is a module for functional protein design, introduced as a core component of EnzyPGM, a generative framework for substrate-specific enzyme design. RFF enables the explicit conditioning of amino acid residue representations on enzyme function priors, represented by their four-level Enzyme Commission (EC) classification, while enforcing geometric equivariance critical for protein structure modeling. Its primary purpose is to prepare residue embeddings and coordinates that are both function-aware and SE(3)-equivariant, thereby facilitating downstream pocket-substrate interaction modeling. The mechanism and impact of RFF have been empirically validated within the EnzyPGM model, yielding significant quantitative advances in amino acid recovery, structure similarity, and docking scores for enzyme-substrate complexes (Lin et al., 27 Jan 2026).
1. Role of Residue Function Fusion in EnzyPGM
The RFF module serves as the initial processing stage in the EnzyPGM architecture, operating prior to the Residue-atom Bi-scale Attention (RBA) module. RFF injects enzyme function priors, encoded as EC numbers, into each residue's learned representation and updates spatial coordinates via a local, message-passing mechanism that preserves SE(3)-equivariance. The function of RFF is twofold: (i) to produce embeddings of protein residues that are contextualized by annotated or desired enzyme activities, and (ii) to output SE(3)-equivariant coordinates compatible with geometric deep learning on protein structures. The “function-aware” residue representations thereby encode catalytic and structural constraints before fine-grained modeling of pocket–substrate interactions via RBA.
2. RFF Architecture and Computational Steps
Input to RFF consists of a partially masked residue sequence , C atomic coordinates for each residue, and a function label (the EC number). Functionally conserved residues, identified by multiple sequence alignment (MSA) within each EC family, are unmasked, while the remainder are replaced with a learnable mask token.
RFF processes inputs in distinct phases:
- Residue Embedding and Masking: For each residue index ,
- Functional Prior Fusion via Transformer Blocks: Over stacked Pre-LayerNorm transformer blocks, RFF fuses the function embedding into each residue’s hidden state. At block , for each residue,
followed by multi-head self-attention and position-wise feed-forward updates.
- Spatial Neighborhood Equivariant (SNE) Layer: For geometric consistency, each residue aggregates features from spatially local neighbors using
producing SE(3)-equivariant outputs for both features and structures.
Substrate atom embeddings are refined via analogous SNE layers, but without coordinate updates.
3. Mathematical Formalization
Key mathematical steps in RFF are listed below. For completeness, all notation is as in (Lin et al., 27 Jan 2026):
- Input Embedding:
- Transformer Fusion:
For
where .
- Spatial Neighborhood Messaging: For each and ,
4. Model Optimization and Loss Propagation
RFF is optimized jointly, without a task-specific loss; instead, it participates in the overall EnzyPGM end-to-end objective: where, for example,
and coordinate losses are Huber losses on the predicted and ground truth structures. RFF thus contributes to all gradients flowing through EnzyPGM, supporting residue and coordinate prediction as function of enzyme and substrate context.
5. Implementation via Pseudocode
The RFF process is summarizable as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
for i in 1..N: if i in M: h[i] = Emb_res(s[i]) else: h[i] = Emb_res([mask]) f_c = Emb_func(c) for t in 1..L_r: for i in 1..N: h_tilde[i] = h[i] + f_c H_tilde = LayerNorm(h_tilde) H_attn = MHA(H_tilde, LayerNorm(h_tilde)) for i in 1..N: h_mid[i] = h_tilde[i] + H_attn[i] h[i] = h_mid[i] + FFN(LayerNorm(h_mid[i])) for i in 1..N: m_sum = 0; weight_sum = 0 for k in neighbors(i): m_ik = FFN(concat(h[i], h[k], ||x[i]-x[k]||^2)) m_sum += m_ik w_ik = FFN(m_ik) weight_sum += w_ik * (x[i]-x[k]) h_out[i] = FFN(concat(h[i], m_sum)) x_out[i] = x[i] + weight_sum / |neighbors(i)| return h_out, x_out |
Processing of substrate atom features follows an analogous SNE-stack, but without coordinate refinement.
6. Empirical Evaluation and Ablation
The impact of RFF within EnzyPGM is quantified through ablation on the EnzyPock test set. When RFF is frozen (i.e., gradients are blocked and thus no learning occurs through this module), performance drops significantly across all major metrics:
| Metric | Full EnzyPGM | RFF Frozen |
|---|---|---|
| Amino-acid recovery (AAR) | 0.77 | 0.70 |
| Vina score (kcal/mol) | −7.12 | −6.82 |
| pLDDT | 74.87 | 69.75 |
| scRMSD (Å) | 3.10 | 6.16 |
| scTM | 0.91 | 0.84 |
These results demonstrate that both functional prior fusion and SE(3)-equivariant processing within RFF are essential for high-fidelity, substrate-aware enzyme design. In particular, the large increases in structural error (scRMSD) and drops in sequence and geometric metrics (scTM, AAR, pLDDT) support the necessity of this module for joint function–structure optimization (Lin et al., 27 Jan 2026).