Table of Contents
Fetching ...

JanusDDG: A Thermodynamics-Compliant Model for Sequence-Based Protein Stability via Two-Fronts Multi-Head Attention

Guido Barducci, Ivan Rossi, Francesco Codicè, Cesare Rollo, Valeria Repetto, Corrado Pancotti, Virginia Iannibelli, Tiziana Sanavia, Piero Fariselli

TL;DR

This work tackles sequence-based prediction of protein stability changes $\Delta\Delta G$ from amino acid sequences alone. It introduces JanusDDG, a bidirectional cross-attention architecture that uses PLM embeddings (ESM2, 650M) to capture sequence-context while enforcing thermodynamic principles such as antisymmetry ($\Delta\Delta G(A,B) = -\Delta\Delta G(B,A)$) and transitivity across mutation pathways. Through a siamese design, antisymmetry is enforced by construction, and a transitivity-focused fine-tuning loss aligns multi-step mutation effects with state-function thermodynamics, yielding physically consistent predictions. Evaluated on blind, low-identity datasets (S669, S461, S96, PTmul-NR) and multi-point benchmarks (S2450, M28, PTmul-D), JanusDDG achieves state-of-the-art or competitive accuracy compared to both sequence-based and some structure-informed methods, while predicting stability changes using only sequence data. The approach holds promise for rapid protein stability assessments and design, particularly when structural data are unavailable or costly to obtain, with robust generalization to multi-residue mutations.

Abstract

Understanding how residue variations affect protein stability is crucial for designing functional proteins and deciphering the molecular mechanisms underlying disease-related mutations. Recent advances in protein language models (PLMs) have revolutionized computational protein analysis, enabling, among other things, more accurate predictions of mutational effects. In this work, we introduce JanusDDG, a deep learning framework that leverages PLM-derived embeddings and a bidirectional cross-attention transformer architecture to predict $ΔΔG$ of single and multiple-residue mutations while simultaneously being constrained to respect fundamental thermodynamic properties, such as antisymmetry and transitivity. Unlike conventional self-attention, JanusDDG computes queries (Q) and values (V) as the difference between wild-type and mutant embeddings, while keys (K) alternate between the two. This cross-interleaved attention mechanism enables the model to capture mutation-induced perturbations while preserving essential contextual information. Experimental results show that JanusDDG achieves state-of-the-art performance in predicting $ΔΔG$ from sequence alone, matching or exceeding the accuracy of structure-based methods for both single and multiple mutations. Code Availability:https://github.com/compbiomed-unito/JanusDDG

JanusDDG: A Thermodynamics-Compliant Model for Sequence-Based Protein Stability via Two-Fronts Multi-Head Attention

TL;DR

This work tackles sequence-based prediction of protein stability changes from amino acid sequences alone. It introduces JanusDDG, a bidirectional cross-attention architecture that uses PLM embeddings (ESM2, 650M) to capture sequence-context while enforcing thermodynamic principles such as antisymmetry () and transitivity across mutation pathways. Through a siamese design, antisymmetry is enforced by construction, and a transitivity-focused fine-tuning loss aligns multi-step mutation effects with state-function thermodynamics, yielding physically consistent predictions. Evaluated on blind, low-identity datasets (S669, S461, S96, PTmul-NR) and multi-point benchmarks (S2450, M28, PTmul-D), JanusDDG achieves state-of-the-art or competitive accuracy compared to both sequence-based and some structure-informed methods, while predicting stability changes using only sequence data. The approach holds promise for rapid protein stability assessments and design, particularly when structural data are unavailable or costly to obtain, with robust generalization to multi-residue mutations.

Abstract

Understanding how residue variations affect protein stability is crucial for designing functional proteins and deciphering the molecular mechanisms underlying disease-related mutations. Recent advances in protein language models (PLMs) have revolutionized computational protein analysis, enabling, among other things, more accurate predictions of mutational effects. In this work, we introduce JanusDDG, a deep learning framework that leverages PLM-derived embeddings and a bidirectional cross-attention transformer architecture to predict of single and multiple-residue mutations while simultaneously being constrained to respect fundamental thermodynamic properties, such as antisymmetry and transitivity. Unlike conventional self-attention, JanusDDG computes queries (Q) and values (V) as the difference between wild-type and mutant embeddings, while keys (K) alternate between the two. This cross-interleaved attention mechanism enables the model to capture mutation-induced perturbations while preserving essential contextual information. Experimental results show that JanusDDG achieves state-of-the-art performance in predicting from sequence alone, matching or exceeding the accuracy of structure-based methods for both single and multiple mutations. Code Availability:https://github.com/compbiomed-unito/JanusDDG

Paper Structure

This paper contains 37 sections, 12 equations, 11 figures, 12 tables.

Figures (11)

  • Figure 1: Overwie JanusDDG. a) JanusDDG Backbone. The model takes as input wild-type and mutant-type amino acid sequences without requiring 3D structural information, and provides a prediction of $\Delta\Delta G$ by leveraging the power of bidirectional cross-attention. This backbone model enables the prediction of stability changes resulting from single and multi mutations, capturing the underlying patterns of sequence-to-stability relationships effectively. b) Antisymmetry. To make the JanusDDG model antisymmetric by design, the base JanusDDG backbone is applied twice with inverted inputs. The resulting predictions are subtracted from each other and then divided by 2. This procedure leverages the antisymmetry as a fundamental property of the model, contributing to a more accurate representation of the relationship between mutations and stability changes. c) Transitivity. To enhance the transitivity of the model, fine-tuning is implemented based on the thermodynamic property that links the Gibbs free energy changes ($\Delta\Delta G$) between three mutations (A, B, U). The loss function is formulated such that the model learns the following relation:$\Delta\Delta G(A,B)=\Delta\Delta G^*(A,B)\equiv \Delta\Delta G(A,U)+\Delta\Delta G(U,B)$. This property stems from the fact that the Gibbs free energy is a state function, allowing the model to learn transitive relationships between mutations. This approach enables JanusDDG to be more robust and accurate in predicting stability changes in mutated protein sequences.
  • Figure 2: Results of the transitivity evaluation of JanusDDG.(a) Illustration of the transitivity property: Since $\Delta\Delta G$ depends only on the initial and final states, $\Delta\Delta G(A,B)$ should be equal to $\Delta\Delta G^*(A,B)$, where the latter is computed by summing the $\Delta\Delta G$ values of multiple intermediate mutations from step 1 to N. The protein figures have been created using PyMOL PyMOL. (b) Pearson correlation results between $\Delta\Delta G$ and $\Delta\Delta G^*$, calculated on S669 for different intermediate steps (1, 3, 5, 7, and 9). For each step, the Pearson correlation was computed 10 times for three different models: JanusDDG Base (the model without antisymmetry and fine-tuning), JanusDDG only Antisym. (the model with antisymmetry but without fine-tuning), and JanusDDG (the final model, incorporating both antisymmetry and fine-tuning). (c) Transitivity performance, evaluated on the external dataset $\text{S}^{\text{transitive}}$, for all three models.
  • Figure 3: Pearson correlation and MAE on S669 test set. The models' performance data, excluding JanusDDG, were taken from savojardo2025ddgemb.
  • Figure 4: Pearson correlation and MAE on S461 test set. The models' performance data, excluding JanusDDG, were taken from reeves2024zero.
  • Figure 5: Pearson correlation and MAE on S96 test set. The model performance data, excluding JanusDDG, were taken from montanucci2022ddgun.
  • ...and 6 more figures