Improving Inverse Folding for Peptide Design with Diversity-Regularized Direct Preference Optimization

## Abstract

Abstract Inverse folding models play an important role in structure-based design by predicting amino acid sequences that fold into desired reference structures. Models like ProteinMPNN, a message-passing encoder-decoder model, are trained to reliably produce new sequences from a reference structure. However, when applied to peptides, these models are prone to generating repetitive sequences that do not fold into the reference structure. To address this, we fine-tune ProteinMPNN to produce diverse and structurally consistent peptide sequences via Direct Preference Optimization (DPO). We derive two enhancements to DPO: online diversity regularization and domain-specific priors. Additionally, we develop a new understanding on improving diversity in decoder models. When conditioned on OpenFold generated structures, our fine-tuned models achieve state-of-the-art structural similarity scores, improving base ProteinMPNN by at least 8%. Compared to standard DPO, our regularized method achieves up to 20% higher sequence diversity with no loss in structural similarity score.

## 1 Introduction

Engineering biopolymers that fold into desired 3D structures, a computational challenge known as inverse protein folding problem, has broad applications in drug discovery and material science (Yang et al., ; Dill et al., ; Abascal & Regan, ). Several approaches for inverse folding have been adopted over the past decades, from molecular dynamics simulations to machine learning approaches (Dauparas et al., ; Shanker et al., ; Hsu et al., ; Yi et al., ; Correa, ). In the standard machine learning approach, a molecular backbone chain serves as input, and a model generates sequences that adopt folding topologies compatible with the reference backbone. Sequences do not necessarily share sequence homology, as multiple diverse sequences can fold into similar structures (Hsu et al., ; Yue & Dill, ; Godzik et al., ).

Peptides, which are small biopolymers comprising 2-50 residues, are interesting targets for inverse folding given their role in diverse biological functions, acting as hormones, neurotransmitters, signalling molecules, or nanostructures assemblers (Chockalingam et al., ; Torres et al., ; Copolovici et al., ; Ulijn & Smith, ). Only about 225,000 protein structures have been experimentally determined(^1^11Updated figures available at https://www.rcsb.org/stats/growth/growth-released-structures.) and made available via the Protein Data Bank (PDB). Training inverse-folding machine learning models in a supervised fashion is a challenging task, due to the complexity of the problem and the limited amount of experimental data.
The challenge is aggravated in the peptide domain as fewer than $3.5$% PDB structures contain 50 residues or less. In fact, applying the SCOP classification filter in the PDB to display structures labelled as “Peptide” reveals only 509 entries, circa $0.2$% of all experimentally determined structures available.

In addition to the lack of data, sequences are subject to composition bias. The incidence of certain amino acids may differ depending on the sequence length , as longer proteins have more options for accommodating multiple secondary structures and folding loops (Tiessen et al., ). Popular models like ProteinMPNN (Dauparas et al., ), PiFold (Gao et al., ) and ESM-IF1 (Hsu et al., ) are primarily trained on data derived from longer proteins, leading to poor performance for peptide design tasks. Additionally, shorter sequences fold into simpler structures. Indeed, Milner-White & Russell () argue that short peptides are notoriously “structureless” and tend to flicker between conformations. For example, a structural conformation of a single alpha helix or beta sheet – or a combination of two or three of them – is not necessarily stable and can fluctuate.

Existing inverse folding models optimize sequence residue-recovery accuracy and structural similarity via template modeling (TM) score (Zhang & Skolnick, ). However, they often suffer from low sampling diversity (Gao et al., ). Ideally, the inverse folding model generates maximally diverse candidate sequences, as additional design filters, such as synthesizability and thermal stability, reduce the number of potential hits downstream of the design process.

To address these issues, we apply Direct Preference Optimization (DPO) (Rafailov et al., ), a fine-tuning method, to improve inverse-folding methods for peptide design. To the authors’ knowledge, we are the first to apply DPO to this task. We propose several enhancements to DPO to address specific problems that arise in inverse folding. Particularly, we forward fold generated sequences and derive an online regularized algorithm for optimizing structural similarity to the reference and sequence diversity simultaneously. We show empirically that this algorithm targets the differential entropy in log-probability space. Furthermore, we present a simple reward scaling approach to incorporate scalar reward information, showing that reward scaling adaptively selects a KL divergence penalty (Kullback, S. and Leibler, R. A., ) to improve performance on harder structures.

## 2 Preliminaries

Inverse folding is the problem of inferring the sequence of amino acids $y$ that fold into a given protein structure. This protein structure is represented by a set of coordinates $x={(x_{i},y_{i},z_{i})\>|\>i=1,\ldots,n}\in\mathbb{R}^{3n}$,where each $(x_{i},y_{i},z_{i})$ represents the 3D position of a backbone atom and $n$ the number of atoms. The inverse folding problem is underconstrained; there may be many solutions $y$ that fold into structures similar to $x$ (Koehl & Levitt, ). Prior research is primarily concerned with recovering the ”ground-truth” sequence $y_{x}$ from the experimental (reference) structure (Dauparas et al., ; Hsu et al., ; Jing et al., ; ). Recently, forward folding models like AlphaFold (Jumper et al., ), ESMFold (Lin et al., ), and OpenFold (Ahdritz et al., ), have made it possible to estimate the structural similarity between generated sequences and the reference structure. In this work, we focus on measuring structural similarity of generated sequences to the reference structure via the self-consistency TM-score (sc-TM) (Gao et al., ).

ProteinMPNN (Dauparas et al., ) is a popular inverse-folding method that produces full protein sequences from backbone features (distances and orientations between backbone atoms, backbone dihedral angles, accounting for a virtual C$\beta$ atom). ProteinMPNN is a 6-layer encoder-decoder message-passing neural network based on the ’Structured Transformer’ (Ingraham et al., ). Unlike autoregressive methods like ESM-IF1 (Hsu et al., ), ProteinMPNN decodes residues in a random decoding order, as opposed to a fixed left-to-right order from N-terminus to the C-terminus. ProteinMPNN is trained on examples from the Protein Data Bank (PDB) to determine the most likely residues for a given protein backbone. On native protein backbones, it achieves a sequence recovery of 52.4%, compared to 32.9% for Rosetta (Leman et al., ). In this work we build upon ProteinMPNN by proposing methods for adapting it to peptide design.

DPO for inverse folding. Direct Preference Optimization (DPO) is a popular method for aligning Large Language Models to a dataset of human-produced preference assignments, that discriminate amongst the responses grouped by prompt (Rafailov et al., ). We adapt DPO to fine-tune inverse-folding models by replacing human preference labels on generated sentences with TM-score rankings on generated sequences. Specifically, we generate a dataset of sequences conditioned on a set of reference structures, and score each sequence with the TM-score computed between its predicted structure and the reference structure. These scores define preference pairs over the generated sequences, for each reference structure.

Let $r(x,y)$ be the TM-score between structure $x$ and the predicted fold of sequence $y$, and $\pi_{\text{ref}}$ be a conditional distribution over $y$ given $x$. Given a dataset $D$ mapping structures (“prompts”) to $K$ generated sequences per structure (“responses”), DPO is derived within the KL-constrained reward-maximization objective (Ouyang et al., ; Rafailov et al., ):

$$ $\max_{\pi_{\theta}}\mathbb{E}_{x\sim D,y\sim\pi_{\theta}(y|x)}[r(x,y)]-\beta \mathbb{D}_{\text{KL}}[\pi_{\theta}(y\>|\>x)\;||\;\pi_{\text{ref}}(y\>|\>x)]$ (1) $$

where $\beta$ controls the trade-off between reward maximization and deviation from the base model. The solution to Equation 1 is well-known (Ouyang et al., ; Rafailov et al., ):

$$ $\pi_{r}=\frac{1}{Z(x)}\pi_{\text{ref}}(y\>|\>x)\exp{\left(\frac{1}{\beta}r(x,y )\right)}$ (2) $$

where $Z(x)$ is the partition function to normalize $\pi_{r}$. Therefore, for any policy $\pi_{r}$, there is a corresponding reward function (DPO ”implicit reward”) for which $\pi_{r}$ is optimal:

$$ $r(x,y)=\beta\log\frac{\pi_{r}(y|x)}{\pi_{\text{ref}}{(y|x)}}+\beta\log Z(x).$ (3) $$

Substituting Equation 3 into the Bradley-Terry preference model (Bradley & Terry, ) and optimizing the policy under a maximum likelihood objective produces the DPO loss, typically solved via gradient descent:

$$ $\mathcal{L}_{\mathrm{DPO}}\left(\pi_{\theta};\pi_{\mathrm{ref}}\right)=- \mathbb{E}_{\left(x,y_{w},y_{l}\right)\sim\mathcal{D}}\left[\log\sigma\left( \beta\log\frac{\pi_{\theta}\left(y_{w}\mid x\right)}{\pi_{\mathrm{ref}}\left(y _{w}\mid x\right)}-\beta\log\frac{\pi_{\theta}\left(y_{l}\mid x\right)}{\pi_{ \mathrm{ref}}\left(y_{l}\mid x\right)}\right)\right]$ (4) $$

where $y_{w}$ represents the sequence that is preferred or considered better, and $y_{l}$ represents the sequence that is less preferred or considered worse according to TM-score ranking.

## 3 Preference optimization for peptide design

In this section, we consider designing fine-tuning methods well-suited for peptide design. While DPO in its original formulation is useful for fine-tuning in biology (Park et al., ; Widatalla et al., ; Mistani & Mysore, ), we consider how it may be improved to tackle specific problems arising in inverse-folding for peptides (i.e., poor generation diversity and lack of peptide data in initial training). First, we derive a diversity-optimized DPO loss by incorporating an online diversity penalty directly into the top-level Reinforcement Learning objective. Next, we propose an ad-hoc modification to the DPO reward that incorporates scalar TM-scores instead of solely preference pairs, and address the distribution shift between peptides and longer-length proteins.

### 3.1 Online diversity optimization

To encourage diversity in generated sequences while simultaneously maximizing reward (TM-score), we consider a modified DPO objective incorporating an auxiliary diversity reward:

$$ $\displaystyle\max_{\pi_{\theta}}\mathbb{E}_{x\sim D,y\sim\pi_{\theta}(y|x)}[r( x,y)]-\beta\mathbb{D}_{\text{KL}}[\pi_{\theta}(y\>|\>x)\;||\;\pi_{\text{ref}}( y\>|\>x)]+\alpha\Gamma_{\gamma}(\pi_{\theta})$ $\displaystyle=\max_{\pi_{\theta}}\mathbb{E}_{x\sim D,y\sim\pi_{\theta}(y|x)} \left[r(x,y)-\beta\log\left(\frac{\pi_{\theta}(y\>|\>x)}{\pi_{\text{ref}}(y\>| \>x)}\right)-\alpha\mathbb{E}_{y^{\prime}\sim\pi_{\theta}(y^{\prime}\>|\>x)} \left[\gamma(y,y^{\prime})\right]\right]$ (5) $$

where $\alpha$ controls the strength of diversity regularization, $\gamma$ is a pairwise distance between sequences, and $\Gamma(\pi_{\theta})$ is the diversity of policy $\pi_{\theta}$ under the distance $\gamma$, i.e. $\Gamma(\pi)=\mathbb{E}_{y,y^{\prime}\sim\pi}\left[\gamma(y,y^{\prime})\right]$. In practice, we let $\gamma$ be the fraction of pairwise different tokens in equal-length sequences $y$ and $y^{\prime}$. This is equivalent to the diversity metric defined in (Gao et al., ).

This is similar in form to the auxiliary reward objective proposed by Park et al. () and Zhou et al. (), but the auxiliary reward (diversity) depends on the policy $\pi_{\theta}$. As a result, the standard analytic solution to Eq. 1 (Ziebart et al., ; Ouyang et al., ; Rafailov et al., ) is no longer valid. Instead, we consider an approximate objective, leveraging the fact that the DPO loss is solved via iterative gradient descent. Let $\tilde{\pi}=\pi_{\theta}^{(t-1)}$ be an approximation of $\pi_{\theta}^{(t)}$. That is, we will use the policy from a previous iteration to estimate diversity, while updating the policy in the current iteration. Then, let $\tilde{r}(x,y)=r(x,y)-\alpha\mathbb{E}_{y^{\prime}\sim\tilde{\pi}(y|x)}\left[
\gamma(y,y^{\prime})\right]$. We can approximate Eq. 3.1 as:

$$ $\max_{\pi_{\theta}}\mathbb{E}_{x\sim D,y\sim\pi_{\theta}(y|x)}\left[\tilde{r}( x,y)-\beta\log\left(\frac{\pi_{\theta}(y\>|\>x)}{\pi_{\text{ref}}(y\>|\>x)} \right)\right].$ (6) $$

The rest of the derivation follows from Rafailov et al. (). We produce the diversity-regularized implicit reward after writing the $\tilde{r}$-optimal policy $\pi_{\tilde{r}}=\frac{1}{Z(x)}\pi_{\text{ref}}(y\>|\>x)\exp\left({\frac{1}{
\beta}\tilde{r}(x,y)}\right)$:

$$ $r(x,y)=\beta\log\frac{\pi_{r}(y|x)}{\pi_{\text{ref}}{(y|x)}}-\alpha\mathbb{E}_ {y^{\prime}\sim\tilde{\pi}(y^{\prime}\>|\>x)}\left[\gamma(y,y^{\prime})\right] +\beta\log Z(x)$ (7) $$

The resulting MLE loss under the Bradley-Terry preference model is:

$$ $\displaystyle\mathcal{L}_{\mathrm{DPO}}\left(\pi_{\theta};\pi_{\mathrm{ref}} \right)=-\mathbb{E}_{\left(x,y_{w},y_{l}\right)\sim\mathcal{D}}\Big{[}\log \sigma\Big{(}$ $\displaystyle\beta\log\frac{\pi_{\theta}\left(y_{w}\mid x\right)}{\pi_{\mathrm {ref}}\left(y_{w}\mid x\right)}-\beta\log\frac{\pi_{\theta}\left(y_{l}\mid x \right)}{\pi_{\mathrm{ref}}\left(y_{l}\mid x\right)}$ $\displaystyle+\alpha\mathbb{E}_{y^{\prime}\sim\tilde{\pi}(y^{\prime}\>|\>x)} \left[\gamma(y_{l},y^{\prime})\right]$ $\displaystyle-\alpha\mathbb{E}_{y^{\prime}\sim\tilde{\pi}(y^{\prime}\>|\>x)} \left[\gamma(y_{w},y^{\prime})\right]\Big{)}\Big{]}$ (8) $$

The $\alpha$-weighted scalar penalties require sampling from the approximate policy $\tilde{\pi}$ to compute the expectation. In practice, we only update $\tilde{\pi}$ a few times during training to minimize the cost of sampling. See Appendix A.2 for a detailed description of the diversity-regularized algorithm.

Unlike prior methods incorporating auxiliary rewards into DPO
(Park et al., ; Zhou et al., ), ours includes an online sampling term. Empirically, we show that this online term is crucial. In the middle part of Fig. 1, we show that diversity of samples from the static dataset (the auxiliary reward prescribed in an offline approach) does not correlate with the diversity of samples from the trained policy (our auxiliary reward). That is, to accurately estimate – and therefore encourage – diversity over the course of training, online sampling is required. By optimizing the approximate objective in Equation 6, we provide principled motivation for including this online sampling term.

### 3.2 Leveraging domain-specific priors

Aligning train set and base model. Supervised fine-tuning (SFT) is a standard part of the DPO pipeline (Rafailov et al., ),where a gradient-based optimizer maximizes the log-probability of a target sequence prior to applying DPO. The left part of Fig. 1 shows that the distribution of tokens sampled from base ProteinMPNN and the peptide training dataset differs significantly. SFT assuages the token distribution problem by improving alignment with training distribution, and ensures consistency with previous research, where DPO has been applied to related biological tasks (Park et al., ; Widatalla et al., ; Mistani & Mysore, ).

Incorporating scalar rewards. Given multiple responses from a single prompt, DPO is derived
assuming access to pairwise preferences. However, since we measure
the reward of a sequence generation by the TM-score between the original structure
and the generated sequence’s predicted structure, we have access to a total ordering over generations
through scalar rewards for each response. Widatalla et al. () derives weighted DPO to incorporate scalar rewards,
but it does not substantially outperform standard DPO.

We consider a simple ad-hoc method to incorporate these scalar scores. Given a structure $x$,
$K$ generated sequences $y_{k}\>|\>x$, and $K$ corresponding TM-scores $r_{k}\>|\>x$, we scale the log-probabilities
of $\pi_{\text{ref}}$ by the average of $r_{k}\>|\>x$. To see the effect of this scaling, consider
the modified implicit reward:

$$ $\displaystyle r_{\text{scale}}(x,y)$ $\displaystyle=\beta\left[\log\pi_{\theta}(y\>|\>x)-R(x)\cdot\log\pi_{\text{ref }}{(y\>|\>x)}\right]+\beta\log Z(x)$ $\displaystyle=\beta R(x)\left[\log\pi_{\theta}(y\>|\>x)-\log\pi_{\text{ref}}{( y\>|\>x)}\right]+(\beta-\beta R(x))\log\pi_{\theta}(y|x)+\beta\log Z(x)$ $\displaystyle=\underbrace{\left[\beta R(x)\right]\>r(x,y)}_{\text{Reweighted standard reward}}+\underbrace{\left[\beta-\beta R(x)\right]\>\log\pi_{\theta}( y\>|\>x)}_{\text{Maximum entropy bonus}}+\underbrace{\beta\log Z(x)}_{\text{ Partition function}}.$ (9) $$

When $R(x)$ is large, the first term (mirroring the standard DPO reward, Eq. 3) has larger weight, and the second term
(a penalty on the entropy $\mathcal{H}(\pi_{\theta})=-\mathbb{E}\left[\log\pi_{\theta}(y\>|\>x)\right]$)
has smaller weight. Since the weight on the DPO reward controls the strength of KL divergence regularization
(Rafailov et al., ), large $R(x)$ corresponds to less aggressive optimization and a lower-entropy policy.

When $R(x)$ is near $1.0$, the data-generating policy (i.e., base ProteinMPNN) already produces high-quality sequences on structure $x$. Therefore, we perform less aggressive optimization when $R(x)$ is large, and vice versa. Effectively, per structure, this reward scaling adapts the KL divergence penalty to the strength of the
dataset-generating policy. The right part of Fig. 1 shows that this reward scaling method indeed helps ProteinMPNN accurately recover the total ordering over generated sequences. Scaling log-probabilities improves their ability to rank sequences by TM-score, which provides a more accurate reference model for DPO to start with.

Figure: Figure 1: Motivation for DPO design choices. Left. Frequency of amino acid across ProteinMPNN generations conditioned on the peptide train set, vs. frequency over the peptide sequences. Middle. When conditioned on the same structure, the diversity of sequences generated by base ProteinMPNN does not correlate with the diversity of sequences generated by fine-tuned ProteinMPNN. Right. Distribution of rank correlation coefficient between model log-probabilities and TM-score.
Refer to caption: extracted/5953723/figs/aa_dist.png

## 4 Results

Here we present results on benchmarks across a suite of inverse folding models evaluated on peptide design tasks, as well as an exploration into the behavior of the two proposed algorithm enhancements (diversity regularization and reward scaling). We find that diversity regularization is effective in improving sampling diversity, and provide justification as to how this improvement happens. Additionally, we find reward scaling produces a small improvement in TM-score, enabling fine-tuned ProteinMPNN to reach SOTA performance in some situations.

### 4.1 Experimental overview

Datasets. We fine-tune trained ProteinMPNN from Dauparas et al. () on a set of 211,402 deduplicated peptide structures with length up to 50 amino acids, derived from the ColabFold database (Mirdita et al., ) by filtering for predicted local distance difference test (pLDDT) $\geq$ 80. Each structure was used to generate 4 candidate sequences using pretrained ProteinMPNN with $T=0.1$. Each sequence, including the true reference sequence from the structure, was folded with OpenFold (Ahdritz et al., ). TM-scores were computed to create a ranking over generated sequences for every structure prompt. Each structure therefore contributed ${4\choose 2}=6$ chosen-rejected pairs for DPO, for a total of 1,268,412 training pairs. Details of the folding process can be found in Appendix A.1.

Benchmarks. We consider two non-overlapping benchmarks. First, we take 50 sequences from the OpenFold set, enforcing a sequence identity threshold of $0.4$ from the train set and filtering for sequence length $L\leq 50$. Next, we take the CATH 4.3 test split, as used in Hsu et al. (), filter for sequence identity threshold of 0.4 and $L\leq 60$, and use the resulting 173 peptides as a second benchmark. The OpenFold set contains structures resolved via OpenFold, while the CATH split has structures from the PDB. For evaluation, we sample 4 sequences per benchmark structure at $T=0$. We compute diversity, TM-score, and recovery metrics as in Gao et al. (). Following Section 3.1, we define diversity as the average fraction of non-identical amino acids, computed pairwise across all sampled sequences for the same structure.

Hyperparameters. Supervised fine-tuning was run for 2 epochs with Adam through the PyTorch implementation (Paszke et al., ; Kingma & Ba, ), with structures’ true sequence as the target. DPO was run for 20 epochs with default Adam hyperparameters on pairs of generated sequences. We vary $\beta$ based on the method used to facilitate a fair comparison across similar KL budgets. For more details, see Appendix A.1.

Sweeps. We run DPO with diversity penalties $\alpha=\{0.0,0.1,0.2,0.5\}$ and DPO with/without reward scaling, all on the same training set. All training is done with per-GPU batch size of 32 on a single node with 8xA100 80GB GPUs. Each run takes about 8 hours wall-clock time.

### 4.2 Benchmark sweeps

We benchmark our trained models against standard inverse-folding methods (Jing et al., ; ; Hsu et al., ; Dauparas et al., ) across both the OpenFold and CATH benchmarks, filtered for peptide-length proteins. We consider TM-score to be the most important metric, as unlike sequence recovery, it can more accurately reflect the quality of generated sequences at high diversities. As shown in Table 1, on OpenFold structures, all DPO methods outperform base ProteinMPNN and other models by at least 8%. Diversity-regularized DPO ($\alpha=0.1$) achieves state-of-the-art (SOTA) diversity, improving base DPO by 20% and even exceeding the diversity of base ProteinMPNN. This is notable, as fine-tuning tend to decrease generation diversity (Wang et al., ). Combining reward scaling with diversity regularization does not have a strong beneficial effect, with similar performance compared to the regularized method.

**Table 1: Comparison of models on TM-score, sampled sequence diversity, and native sequence recovery for the OpenFold benchmark. The best results are bolded, and the second-best results are underlined. Means and standard errors are reported in each cell.**
| Models | OpenFold benchmark $(n=50)$ |  |  |
| --- | --- | --- | --- |
| TM-Score $\uparrow$ | Diversity $\uparrow$ | Recovery $\uparrow$ |  |
| GVP-GNN (Jing et al., ) | 0.62 $\pm$ 0.02 | 0.19 $\pm$ 0.01 | 0.27 $\pm$ 0.01 |
| ProteinMPNN (Dauparas et al., ) | 0.62 $\pm$ 0.01 | 0.31 $\pm$ 0.01 | 0.23 $\pm$ 0.01 |
| ESM-IF1 (Hsu et al., ) | 0.61 $\pm$ 0.01 | 0.00 $\pm$ 0.00 | 0.31 $\pm$ 0.01 |
| ProteinMPNN + DPO | 0.66 $\pm$ 0.02 | 0.27 $\pm$ 0.01 | 0.33 $\pm$ 0.01 |
| ProteinMPNN + DPO (scaled) | 0.67 $\pm$ 0.02 | 0.28 $\pm$ 0.01 | 0.31 $\pm$ 0.01 |
| ProteinMPNN + DPO ($\alpha=0.1$) | 0.67 $\pm$ 0.02 | 0.32 $\pm$ 0.01 | 0.31 $\pm$ 0.01 |
| ProteinMPNN + DPO (scaled, $\alpha=0.1$) | 0.67 $\pm$ 0.02 | 0.31 $\pm$ 0.01 | 0.32 $\pm$ 0.01 |

On the CATH benchmark, DPO does not help much (Table 2). This is likely due to the fact that our training method leveraged OpenFold structure predictions, while the CATH benchmark contains experimentally resolved protein structures. However, diversity regularization and reward scaling allow fine-tuned ProteinMPNN to nearly reach the performance of ESM-IF1, which was trained on experimentally resolved structures and is a much larger model. Diversity regularization is still effective in promoting diversity, beating base ProteinMPNN and improving standard DPO by 7%.

**Table 2: Comparison of models on TM-score, sampled sequence diversity, and native sequence recovery for the CATH 4.3 benchmark. The best results are bolded, and the second-best results are underlined. Means and standard errors are reported in each cell. Since all values are rounded to 2 decimals, standard errors are not actually zero.**
| Models | CATH 4.3 benchmark $(n=173)$ |  |  |
| --- | --- | --- | --- |
| TM-Score $\uparrow$ | Diversity $\uparrow$ | Recovery $\uparrow$ |  |
| GVP-GNN (Jing et al., ) | 0.69 $\pm$ 0.01 | 0.21 $\pm$ 0.00 | 0.35 $\pm$ 0.01 |
| ProteinMPNN (Dauparas et al., ) | 0.68 $\pm$ 0.01 | 0.30 $\pm$ 0.00 | 0.32 $\pm$ 0.01 |
| ESM-IF1 (Hsu et al., ) | 0.72 $\pm$ 0.01 | 0.00 $\pm$ 0.00 | 0.34 $\pm$ 0.01 |
| ProteinMPNN + DPO | 0.70 $\pm$ 0.01 | 0.28 $\pm$ 0.00 | 0.32 $\pm$ 0.01 |
| ProteinMPNN + DPO (scaled) | 0.71 $\pm$ 0.01 | 0.29 $\pm$ 0.00 | 0.32 $\pm$ 0.01 |
| ProteinMPNN + DPO ($\alpha=0.1$) | 0.70 $\pm$ 0.01 | 0.31 $\pm$ 0.01 | 0.32 $\pm$ 0.01 |
| ProteinMPNN + DPO (scaled, $\alpha=0.1$) | 0.71 $\pm$ 0.01 | 0.30 $\pm$ 0.00 | 0.32 $\pm$ 0.01 |

We find that both reward scaling and diversity regularization are effective in improving TM-score over base DPO, achieving SOTA performance on the OpenFold benchmark. Diversity regularization is particularly effective in improving diversity across both benchmarks. Despite CATH structures being out-of-distribution from the train set, given that they were not produced by OpenFold, our DPO enhancements allow ProteinMPNN to approach the performance of ESM-IF1.

### 4.3 Pareto front with diversity regularization

Figure: Figure 2: Exploring the effect of online diversity optimization. Left. Improvement in diversity across temperatures 0, 0.5, and 1.0, with and without random decoding order. Middle. Sampling distribution entropy (average negative log-probability over samples) over various $\alpha$ values. Right. Entropy of log-probability distribution over validation reference sequences across $\alpha$ sweep.
Refer to caption: extracted/5953723/figs/fixed_vs_random_decoding.png

In this section, we consider the impact of diversity regularization on DPO. We train four DPO models on top of fine-tuned ProteinMPNN ($\alpha=\{0.0,0.1,0.2,0.5\}$), and generate sequences across a range of temperatures on the OpenFold test split. As temperature increases, the diversity of generated sequences increases, but the average TM-score (reward) decreases. We consider this reward-diversity tradeoff on the left side of Figure 3. At sufficiently low $\alpha$ values, diversity-regularized DPO produces a new Pareto frontier. With $\alpha=0.1$, regularized DPO consistently achieves higher reward at the same diversity, indicating this regularization provides a strictly favorable reward-diversity tradeoff compared to simply increasing temperature. At temperature $0.0$, $\alpha=0.1$ yields a 20% relative improvement in diversity along with a small increase in TM-score (1.5%) over standard DPO.

However, at high $\alpha$ values, diversity regularization hurts both diversity and reward. We see symptoms of this in the KL divergences between trained DPO policies and initial fine-tuned ProteinMPNN (middle of Fig. 3). While for $\alpha=\{0.0,0.1,0.2\}$, KL divergence trajectories are similar during training, DPO with $\alpha=0.5$ produces much higher divergences (i.e., the trained policy deviates significantly more from base ProteinMPNN). In this case, aggressive diversity optimization led to a collapse in model capacity via excessive deviation from the initial policy.

### 4.4 Diversity regularization targets differential entropy

Figure: Figure 3: Pareto front and KL divergences. Left. Pareto front for various $\alpha$ values over temperature sweep. Middle. KL divergence from $\pi_{\text{ref}}$ for various $\alpha$ values. $\alpha=0$ has $\beta=0.5$, all other have $\beta=0.1$. Right. KL divergence for DPO with reward scaling ($\beta=0.1$) and without ($\beta=0.5$).
Refer to caption: extracted/5953723/figs/div_pareto.png

We consider the mechanism behind diversity regularization, showing that diversity improves due to randomness in the token decoding order during sampling. Naively, we would expect diversity regularization to improve the entropy of the sampling distribution $\mathcal{H}(\pi)=-\mathbb{E}_{x\sim\mathcal{D},y\sim\pi}\left[\log\pi(y|x)\right]$. In the middle part of Fig. 2, we show that this is not the case. Apart from $\beta=0.5$ (an outlier as discussed in Section 4.3), increasing diversity does not increase entropy, which seems contradictory.

We develop a new understanding of ProteinMPNN to explain this. ProteinMPNN performs random-order token decoding during sampling and all forward passes. So, for a fixed policy $\pi$, sequence $y$, structure $x$, we highlight that $\log\pi(y\mid x)$ is a random variable, depending on a distribution over token decoding orders. Let $\ell_{(\pi,x,y)}=\log\pi(y\mid x)$ denote this random variable, and let $f_{\pi}(d)$ be a function parameterized by $\pi$ that takes decoding orders $d$ to log-probabilities $s$. In practice, $f_{\pi}$ is a forward pass through ProteinMPNN, and $d$ is a uniformly chosen permutation over indices $\{1,2,\dots,|y|\}$. For a decoding order $d\sim\mathcal{U}$ sampled from the uniform decoding order distribution $\mathcal{U}$, we can compute a log-probability $s=f_{\pi}(d)$. For this $s$, $\ell_{(\pi,x,y)}(s)$ gives the probability, over all possible $d$, that the log-probability of $y|x$ under $\pi$ is $s$.

Revisiting training with random log-probabilities. This new viewpoint allows us to re-evaluate the training of random-order decoder models, like ProteinMPNN. The implicit rewards in Eqs.3 and 7, from which a MLE loss is derived, hide the stochastic nature of $\log\pi(y|x)$. In the explicit decoding order notation, we can write Eq. 3 as

$$ $r(x,y)=\beta\left[\log\left(f_{\pi_{r}}(d)\right)-\log\left(f_{\pi_{\text{ref} }}(d)\right)\right]+\beta\log Z(x),~{}~{}~{}d\sim\mathcal{U}$ (10) $$

with a similar substitution for Eq. 7. This applies to SFT as well, as the loss function has a $\log\pi(y|x)$ term to which we can apply the same substitution. Note that Eq. 10 is computed over a single sample $d$. That is, training random-order decoders usually involves computing losses with a single-sample estimate of $\log\pi(y|x)=\mathbb{E}_{d\sim\mathcal{U}}\left[\ell_{(\pi,x,y)}(f_{\pi}(d))\right]$. While not explored here, a simple approach to improving the quality of this estimate is to compute log-probabilities over multiple decoding orders, though this would linearly scale training time as well.

Explaining diversity with differential entropy. This view also offers insight into how diversity increases without token entropy increasing as well. Within the random log-probability view, there is another source of entropy to account for: the differential entropy $\mathcal{H}_{d}$ of the distribution over log-probabilities, defined separately for each tuple $(\pi,x,y)$:

$$ $\mathcal{H}_{d}(\ell_{(\pi,x,y)})=\mathbb{E}_{d\sim\mathcal{U}}\left[-\log \left[\ell_{(\pi,x,y)}(f_{\pi}(d))\right]\right]=-\int_{-\infty}^{0}\ell_{(\pi ,x,y)}(s)\log\left[\ell_{(\pi,x,y)}(s)\right]ds$ (11) $$

We claim that optimizing for diversity increases differential entropy in the continuous log-probability space, rather than increasing discrete entropy in token space. To test this, we draw 128 samples from $\ell_{(\pi,x,y)}$ for all $(x,y)$ structure-sequence test pairs, i.e., compute log-probabilities with 128 different decoding orders. In the right part of Fig. 2, we show that the estimated $\mathcal{H}_{d}$ increases with larger $\alpha$, as expected under this theory. This agrees with our intuition, since $\mathcal{H}_{d}$ controls variability in model log-probabilities, which decide the next token during sampling. That is, larger $\mathcal{H}_{d}$ leads to greater log-probability variability, leading to greater diversity.

Effects at higher temperatures. In the left half of Fig. 2, we conduct a small ablation study to isolate the effect of random decoding order across temperatures. We find that at low temperatures, random decoding order is necessary for diversity. This is because the next token is chosen deterministically at $T=0$, so entropy in the log-probabilities is the sole contributor to diversity. However, at higher temperatures, the influence of using random decoding orders is less pronounced, i.e., temperature has a larger effect on next-token sampling compared to an increasing $\mathcal{H}_{d}$. Therefore, this analysis applies only for random decoding order models at $T=0$. For example, left-to-right autoregressive methods have fixed decoding orders, meaning $\ell_{(\pi,y,x)}$ collapses around a single scalar and the differential entropy is zero. At $T=0$, this means that we cannot improve diversity by boosting $\mathcal{H}_{d}$, and at higher $T$, $\mathcal{H}_{d}$ does not empirically affect diversity much anyways.

Increased token entropy does not help diversity. We also try optimizing for discrete token-level entropy, and achieve around a 15% increase in this entropy. However, in line with the differential entropy formulation, this method does not improve sample diversity at temperature 0. See Appendix A.3 for more details and a complete derivation of the token-entropy regularized algorithm.

### 4.5 Sequence recovery with diversity-regularized models

Figure: Figure 4: Sequence recovery with diversity optimization. Left. Stronger diversity regularization seems to hurt sequence recovery, though all fine-tuned models improve over ProteinMPNN. Middle. Diversity does not hurt the correlation between log-probabilities and TM-score. Right. Best-of-N sampling allows diverse models to achieve sequence recoveries comparable to standard models.
Refer to caption: extracted/5953723/figs/temp_vs_recovery.png

In this section, we consider how diversity optimization affects ProteinMPNN’s ability to recover native sequences from structures, and accurately predict the quality of generated sequences.

First, we explore whether sequence recovery (i.e., the ability to recover the conditioning structure’s sequence) is still possible with diversity-regularized fine-tuning. Intuitively, it may seem that models with higher sampling diversity have lower native sequence recovery rate. In the left half of Fig. 4, it seems like this is the case, with sequence recovery rates decreasing as $\alpha$ increases across all temperatures. However, for small alpha ($\alpha=0.1$), the drop in sequence recovery compared to standard DPO is small. Additionally, this recovery gap disappears if we allow for more compute during inference time. In the right side of Fig. 4, we take $N$ samples from each model and compute the best-of-$N$ sequence recovery rate. As $N$ grows, the gap between standard DPO recovery rate and $\alpha=0.1$ recovery rate shrinks to nearly zero. Therefore, optimizing for diversity does not significantly impact sequence recovery rate, particularly as more sequences are sampled.

Gao et al. () claims that log-probabilities may correlate with sequence quality, e.g. TM-score. Given that diversity regularization increases log-probability entropy as shown in Section 4.4, one might expect this correlation to be less strong under more diverse models. As shown in the middle of Fig. 4, this is not the case. Indeed, across all models, log-probabilities do not correlate with TM-score.

### 4.6 Reward scaling reinforces biological priors

Figure: Figure 5: Reward scaling improves DPO. Left. Reward-scaled DPO is a Pareto improvement over standard DPO over a temperature sweep. Middle. Left axis is the KL divergence between the token frequencies in the peptide train set vs. model samples (lower is better), right axis is the fraction of non-repeating tokens (higher is better). Right. TM-score improvement over base DPO. Lower TM-score buckets contain structures for which base ProteinMPNN generated low-quality sequences.
Refer to caption: extracted/5953723/figs/scaled_pareto.png

Next, we consider the effect of reward scaling on DPO’s behavior. On the left side of Fig. 5, the reward-diversity curves for DPO and reward-scaled DPO are computed across $T=\{0.0,0.1,0.2,\dots,1.0\}$. Reward-scaled DPO achieves consistently higher reward at the same diversity, indicating it is a Pareto improvement over standard DPO. Moreover, as in the right side of Fig. 3, reward-scaled DPO operates on a slightly smaller KL divergence budget compared to standard DPO. Despite maintaining a smaller deviation from pretrained ProteinMPNN, the policy trained with reward-scaled DPO is still strictly better than the policy trained with standard DPO.

The motivation for reward scaling, as presented in Eq. 3.2, is dynamic $\beta$ selection based on the strength of the initial policy (or equivalently, the difficulty of the prompt), where $\beta$ controls the KL divergence from the reference model. On the right side of Fig. 5, we show the empirical effect of reward scaling matches this intuition. For structure prompts whose ProteinMPNN-generated sequences had low reward (i.e., where the base model performed poorly), reward-scaled DPO outperforms standard DPO by around 5%. However, as the average TM-score of the generated sequences increases, the performance gain from reward scaling drops to nearly 0. Therefore, reward-scaled DPO targets hard examples where the data-generating policy is weak, agreeing with the motivation in Section 3.2.

## 5 Limitations

While we illustrate an empirical connection between diversity optimization and differential entropy, we do not establish a mathematical framework for how this optimization happens. Furthermore, during the derivation of diversity-regularized DPO, we approximate $\pi^{\star}$ with the latest iteration of gradient descent. Exploring the bounds on this approximation, and establishing a theory-first perspective for the differential entropy framework, are promising directions for future research.

Since DPO and the variants proposed here are model-agnostic, they can be used to fine-tune any inverse-folding model. Applying DPO to other inverse-folding models may produce even better results compared to ProteinMPNN Gao et al. (). For example, it may be possible to further push the frontier of peptide sequence design by fine-tuning stronger base models like PiFold (Gao et al., ) or KW-Design (Gao et al., ).

## 6 Conclusion

We fine-tuned ProteinMPNN, a widely adopted inverse folding model, for diverse and structurally consistent peptide sequence generation and proposed diversity-regularized DPO with an online sampling term to accurately estimate and encourage diversity. Domain-specific priors were also incorporated into our methodology to account for peptides’ residue distribution and dynamically control the strength of KL divergence regularization. Our approach results in improvements on sampling diversity, sequence recovery and structural similarity of the generated peptide sequences. Furthermore, we give additional intuition on the impact of diversity regularization on differential and discrete entropy. While our results are reported using ProteinMPNN as a base model for fine-tuning, our proposed methods are agnostic to the inverse folding model, setting the grounds for future research in peptide design via fine-tuning.

## Appendix A Appendix

### A.1 Additional experimental details

Folding peptide sequences.
Folding of peptides was done with the OpenFold module in NVIDIA BioNeMo Framework(^2^22https://catalog.ngc.nvidia.com/orgs/nvidia/teams/clara/containers/bionemo-framework), version 1.8, with default settings. We used mmseqs2(Steinegger & Soeding, ) to generate multiple sequence alignments (MSAs), referencing against UniRef90, Small BFD and MGnify datasets, as the input. For template searches, hhsearch was used with the PDB70 database. OpenFold inferencing was performed with a single set of weights, converted from an AlphaFold2 (Jumper et al., ) model checkpoint params-model-4; typically AlphaFold2 is run with five checkpoints. Folding was run on 8 to 32 NVIDIA A100-SXM4-80GB GPUs, with the overall folding throughput around 1.4 seconds per sequence per GPU. We did not perform structural relaxation after folding. For model checkpoint download scripts, and database download scripts, see github.com/aqlaboratory/openfold.

Choosing $\beta$ fairly. Since $\beta$ is a proxy for specifying the amount of allowable deviation from the base (reference) policy (Rafailov et al., ), we ensure fair comparison between DPO and its variants by modifying $\beta$ so that all methods operate on a similar same KL divergence budget. For the diversity-regularized and reward-scaled methods, we choose $\beta=0.1$; for base DPO, we choose $\beta=0.5$. In the middle and left parts of Fig. 3, we show that these choices allow all models to deviate from the base policy by around the same amount, with standard DPO still dominating the other model’s KL divergences. DPO with $\alpha=0.5$ is an exception, but we consider this model to be an outlier as described in Section 4.3.

Method evaluations. While recent inverse-folding methods like PiFold and KW-Design show strong performance compared to ProteinMPNN (Gao et al., ) and ESM-IF1 Hsu et al. (), we were unable to get their implementation working on the necessary timeline. As a result, we did not include them in our benchmarks.

### A.2 Details of online diversity regularization

In Algorithm 1 we present the full online diversity-regularized DPO algorithm. Note that $\gamma$ computes the pairwise diversity between a sequence $y$ and $N$ other sequences $y^{\prime}$, so it returns an $N$-length vector. $\tilde{\pi}$ is updated only once every $K$ epochs, so in practice we only have to sample once every $K$ epochs. Between these updates, samples are cached and take up only a few megabytes of GPU memory. The modifications compared to base DPO (Rafailov et al., ) are highlighted in blue.

Figure: Algorithm 1 Diversity-regularized DPO

### A.3 Entropy-regularized DPO

Here, we consider optimizing for discrete entropy over the sequences sampled from ProteinMPNN. The derivation is the same as in Section 3.1, but with the entropy $\mathcal{H}(\pi)=-\mathbb{E}_{y\sim\pi}\left[\log\pi(y)\right]$ as the diversity penalty instead of $\Gamma(\pi)$. The objective is:

$$ $\displaystyle\max_{\pi_{\theta}}\mathbb{E}_{x\sim D,y\sim\pi_{\theta}(y|x)}[r( x,y)]-\beta\mathbb{D}_{\text{KL}}[\pi_{\theta}(y\>|\>x)\;||\;\pi_{\text{ref}}( y\>|\>x)]+\alpha\mathcal{H}(\pi_{\theta})$ $\displaystyle=\max_{\pi_{\theta}}\mathbb{E}_{x\sim D,y\sim\pi_{\theta}(y|x)} \left[r(x,y)-\beta\log\left(\frac{\pi_{\theta}(y\>|\>x)}{\pi_{\text{ref}}(y\>| \>x)}\right)-\alpha\log\pi_{\theta}(y\>|\>x)\right]$ (12) $$

With the same approximation $\tilde{\pi}$ and modified reward $\tilde{r}(x,y)=r(x,y)-\alpha\log\tilde{\pi}(y\>|\>x)$:

$$ $\displaystyle\mathcal{L}_{\mathrm{DivPO}}\left(\pi_{\theta};\pi_{\mathrm{ref}} \right)=-\mathbb{E}_{\left(x,y_{w},y_{l}\right)\sim\mathcal{D}}\Big{[}\log \sigma\Big{(}$ $\displaystyle\beta\log\frac{\pi_{\theta}\left(y_{w}\mid x\right)}{\pi_{\mathrm {ref}}\left(y_{w}\mid x\right)}-\beta\log\frac{\pi_{\theta}\left(y_{l}\mid x \right)}{\pi_{\mathrm{ref}}\left(y_{l}\mid x\right)}+$ $\displaystyle\alpha\log\tilde{\pi}(y_{l}\mid x)-\alpha\log\tilde{\pi}(y_{w} \mid x)\Big{)}\Big{]}$ (13) $$

Figure: Algorithm 2 Entropy-regularized DPO

The full algorithm is described in Algorithm 2, with deviations from base DPO (Rafailov et al., ) highlighted in blue. We find that this algorithm does not produce diversity gains (Table 4) or TM-score gains (Table 3). After entropy regularization, sample entropy does increase by around 25% compared to standard DPO; however, diversity does not improve at temperature 0. This supports the differential entropy theory from Section 4.4, since explicitly increasing discrete entropy does not help improve diversity.

Interestingly, as shown in Table 4, at higher temperatures, entropy-regularized DPO does slightly increase diversity. This again aligns with the analysis in Section 4.4, as at higher temperatures, the randomness introduced by the token sampling distribution dominates the randomness introduced by log-probability variations due to random decoding orders.

**Table 3: Comparison of TM-Score for ProteinMPNN, standard DPO, and DPO with entropy regularization across different temperatures (T). Same evaluation setting as the OpenFold benchmark.**
| Method | TM-Score |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| T=0.0 | T=0.1 | T=0.2 | T=0.3 | T=0.4 | T=0.5 | T=0.6 | T=0.7 | T=0.8 | T=0.9 |  |
| ProteinMPNN | 0.62 | 0.61 | 0.62 | 0.61 | 0.62 | 0.61 | 0.60 | 0.57 | 0.56 | 0.56 |
| Standard DPO | 0.66 | 0.66 | 0.65 | 0.66 | 0.65 | 0.65 | 0.65 | 0.64 | 0.63 | 0.61 |
| DPO ($\alpha=0.1$) | 0.66 | 0.67 | 0.66 | 0.66 | 0.65 | 0.64 | 0.63 | 0.63 | 0.61 | 0.60 |

**Table 4: Comparison of diversity for ProteinMPNN, standard DPO, and DPO with entropy regularization across different temperatures (T). Same evaluation setting as the OpenFold benchmark.**
| Method | Diversity |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| T=0.0 | T=0.1 | T=0.2 | T=0.3 | T=0.4 | T=0.5 | T=0.6 | T=0.7 | T=0.8 | T=0.9 |  |
| ProteinMPNN | 0.31 | 0.35 | 0.39 | 0.47 | 0.54 | 0.59 | 0.65 | 0.71 | 0.74 | 0.78 |
| Standard DPO | 0.27 | 0.29 | 0.35 | 0.42 | 0.50 | 0.56 | 0.62 | 0.67 | 0.71 | 0.75 |
| DPO ($\alpha=0.1$) | 0.26 | 0.30 | 0.38 | 0.46 | 0.53 | 0.60 | 0.65 | 0.70 | 0.73 | 0.77 |

### A.4 Sampled sequence example structures

In Figures 7 and 7, we present some sequence samples conditioned on structures from both the OpenFold and CATH 4.3 benchmarks. We select pairs where reward scaled DPO and diversity-regularized DPO outperform base ProteinMPNN for visualization.

Figure: Figure 6: Sequence samples on three randomly chosen structures from the CATH 4.3 peptide benchmark, all folded with OpenFold. Gray is the reference structure (OpenFold), red is a sample from base ProteinMPNN, blue is from diversity-regularized DPO, and green is from reward-scaled DPO.
Refer to caption: extracted/5953723/figs/renders/cath/cath_pair_1_pmpnn_render.png

## Peer Reviews

confidence: 5
contribution: 2
initial_rating: 5
presentation: 3
questions: See Weaknesses
soundness: 3
strengths: - The paper is well-written and easy to follow.
- The authors observe that popular inverse folding models perform poorly for peptide design.
- This paper applies DPO to improve diversity.
summary: This paper studies an important problem in protein design, inverse folding. The authors propose to fine-tune ProteinMPNN with DPO to generate diverse and structurally consistent peptide sequences. In experiments, the fine-tuned ProteinMPNN achieves state-of-the-art structural similarity scores and diversity.
weaknesses: - ProteinDPO [1] has applied DPO to fine-tune ESM-IF to design more stable proteins. More comparisons are desired.
- The modified DPO algorithm is mostly based on vanilla DPO and is similar to ProteinDPO.
- In Table 1, the DPO fine-tuned ProteinMPNN does not achieve better diversity than vanilla ProteinMPNN significantly.
- In Table 2, even with fine-tuning, ProteinMPNN + DPO is worse than ESM-IF in TM-Score. Therefore, its interesting to fine-tune ESM-IF with the same algorithm.

[1] Aligning protein generative models with experimental fitness via Direct Preference Optimization

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 2
questions: - As the paper compared to GVP, ProteinMPNN, and ESMIF, why doesn’t the paper compare with some more recent approaches? Since the paper cited the ProteinInvBench, it provided a model zoom and colab demo to re-run the newer models easily if the input sequence is ready.
- Could there be an appendix for analyzing the statistical features of the dataset used in training?
soundness: 3
strengths: - The introduction of DPO into inverse folding is interesting. Finetuning Graph-based models may provide some insights into designing a smaller structural encoder.
- The paper integrates structural information into training (maximizing TM-score) in the inverse folding tasks. It is a nice try but it may also include bias (seen in the next part)
- The design of the reward function and the loss function avoids the reliability of the policy term, it is an interesting approximation!
summary: This paper proposes a novel approach that could help design peptide sequences. It mainly uses an advanced DPO structure to finetune ProteinMPNN. The proposed model obtained a significant improvement in various metrics. The paper is easy to follow.
weaknesses: - In line 58, the use of Tmscore appears abruptly, as the models listed in the previous paragraph are purely structure-to-sequence models, there needs to be a further explanation about the idea of Inverse Folding, which is actually a structure-sequence-structure pipeline. Although it has been addressed in the Part 2.
- The use of the TM-score in training may lead to bias since the TM-score is obtained through a static structure prediction model. Although it may not be easy to analyze the reason, I think at least the authors can mention that and do some analysis (like using multiple structure prediction tools to calculate the TM-score to average the bias). It might be a little bit time-consuming, so it doesn’t have to be done in the rebuttal phase and it would have no effect on my rating. Just a concern.
- The approach itself is a bit target-specific, it did not work well on the co-optimization purpose as the author claims. From Table 1, the diversity and recovery do not excel from others, I am not blaming the results but curious about the reason.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: 1. The author should provide more comparisons to prior works, highlighting the differences, such as online optimization or ad-hoc scalar weighting. If possible, please include the original diversity regularization DPO and scalar weighting DPO in your baselines to study the improvements over these methods.
2. The baseline results are limited and may not be convincing.
+ Clarify how the baselines are used: are they pretrained or fine-tuned? Since baseline methods like GVP-GNN are not trained on the OpenFold benchmark, this comparison may not be fair. Please provide clarification.
+ In line 267, the paper claims to use 4 samples and T=0, which is an unusual hyperparameter setting. T=0 implies deterministic sampling of ProteinMPNN (T=0.1 by default), and 4 samples are too few. I encourage using more samples (e.g., 64) and the original T setting.
+ Additionally, I recommend including more baselines, particularly fixed-backbone models specific to peptide design tasks (e.g., PepFlow by Li et al. 2024).
3. In Section 4.4, the paper introduces a new method using entropy instead of pairwise distance as a regularization term. However, this setting is not presented in the main results. Please include this in the main results.
soundness: 2
strengths: 1. The concept of employing DPO for fine-tuning peptide inverse folding models is innovative.
2. Leveraging ColabFold and the Openfold database to address the data scarcity issue in peptide entries shows great promise.
3. The online diversity formulation appears to be an improvement over the original diversity-regularized objectives, and the inclusion of differential entropy is particularly inspiring.
summary: This paper introduces a novel DPO method to finetune inverse folding models on peptide design task, by adding online diversity regularization objective function and incoporating scalar reward into original DPO.
weaknesses: 1. As discussed in Sections 3.1 and 3.2, incorporating diversity regularizations and scalar weighted control into DPO is not a novel technique; it has been extensively studied in prior work, which may limit the paper's novelty.
2. The experimental setup is not comprehensive, particularly in terms of baseline details and sampling settings.
3. The presentation in Section 4 is somewhat unconventional; the theoretical analysis in Section 4.4 appears confusing and out of place.

---

confidence: 5
contribution: 2
initial_rating: 3
presentation: 3
questions: 1. Why you choose different filtering process of two benchmark datasets?
2. Why the diversity of ESM-IF on both datasets is zero?
3. Once the DPO-based method is effective to inverse folding methods, why the experiments are only conducted to the general protein. It is because I believe that the challenges you stated also exist in the general proteins. 
4. In the paragraph "Explaining diversity with differential entropy", can you please try to explain the interpretability via a mathematical proof to clearly state the connections between log-probabilities and diversity?
soundness: 3
strengths: 1. The proposed challenges are attractive in this field. The inverse folding samples often suffers low TM-Scores, and diversity. Specially, towards peptide sequenes, the recovery rates are often lower than the samples with other lengths. 

2. The motivation behind the method is clear and reasonable. DPO-related methods on auto-regressive-based models work on the field of NLP. Furthermore, the diversity improvement is also impressive. 

3. The experiment is comprehensive w.r.t. analysis metrics.
summary: This paper claims two main problems: 

The first one is current inverse folding methods cannot generate samples that can be folded to accurate structures sharing high similarity with the input ones (RMSD and TM-Score). The second one is current human verified peptide (<50 AA) structures is limited, leading to poorer performance in the inverse folding models. 

The authors propose a novel optimization method to address this problem via DPO while promoting sampling diversity, and obtain State-Of-The-Art performance on peptide deisgn tasks, with the evaluation metrics inculding TM-Score, Diversity, and Recovery.
weaknesses: 1. The verfication of the proposed method is limited. There's so many popular approaches on protein inverse folding, such as PiFold, ESM-IF, LM-Design, VFN, and InstructPLM [1-5]. Regarding recovery and self-consistency TM-Score, there are approaches performing better than or competitive than ProteinMPNN. Thus, a robust method with board application should include more experiments to verify the effectiveness of the proposed methods. 

2. The proposed metric is not comprehensive enough, the self-consistency RMSD is also required to verifying the quality of sequence samples. 

3. The method is simple but the experiement results are not impressive enough to prove the effectiveness of DPO-based improvement. In Table1, the relative improvement over all metrics is smaller than or equal to 1% except TM-Score with 6%. The ablation results cannot indicate the power of proposed method enhancement. 

4. The length scale of main experiments are somehow not consistent, which makes the paper unclear to the readers. In Table1&2, the author states that they have had experiments on CATH4.3 (n=173) and Openfold (n=50), but 1) the filtering process is not clear in Openfold benchmark; 2) the filtering criteria of two benchmarks are inconsistent. 

Reference:

[1] Gao Z, Tan C, Chacón P, et al. PiFold: Toward effective and efficient protein inverse folding[J]. arXiv preprint arXiv:2209.12643, 2022.

[2] Hsu C, Verkuil R, Liu J, et al. Learning inverse folding from millions of predicted structures[C]//International conference on machine learning. PMLR, 2022: 8946-8970.

[3] Zheng Z, Deng Y, Xue D, et al. Structure-informed language models are protein designers[C]//International conference on machine learning. PMLR, 2023: 42317-42338.

[4] Mao W, Zhu M, Sun Z, et al. De novo protein design using geometric vector field networks[J]. arXiv preprint arXiv:2310.11802, 2023.

[5] Qiu J, Xu J, Hu J, et al. InstructPLM: Aligning Protein Language Models to Follow Protein Structure Instructions[J]. bioRxiv, 2024: 2024.04. 17.589642.

Meta-review: The paper applies Direct Preference Optimization (DPO) to fine-tune the inverse-folding method ProteinMPNN (a message-passing encoder-decoder model), for peptide design. A modified DPO objective is introduced to incorporate a diversity promoting penalty and to leverage domain-specific priors. The approach is demonstrated on popular benchmarks datasets.

The paper is a pleasure to read and the proposed approach is elegant and well-motivated. The connection between diversity and differential entropy is very interesting. 

Overall the AC and reviewers all agree that the methodology is promising, but unfortunately several concerns remain in terms of the evaluation to convincingly demonstrate the value and generality of the approach. In particular it is essential to evaluate how general the applicability and benefits of the proposed approach is, by testing against more recent approaches, and by evaluating the benefit of the authors 'versions of DPO on other inverse folding approaches beyond ProteinMPNN wherever possible. It would also important to  bootstrap the computation of TM-score and report self-consistency RMSD for a more complete assessment.

It is unfortunate that the authors encountered data access issues and could not perform additional experiments during rebuttal. We strongly encourage them to do so and resubmit their work.

Decision: Reject