arXiv:2611.11997cs.LGNov 2026

Manuscript Offprint

arXiv:2611.11997

HyInv Technical Report

Haowei Lin, Cai Zhou, Xiangxin Zhou

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Inverse folding designs amino-acid sequences for a given protein backbone, and screening needs many candidates that are both diverse and well folded. We present HyInv, a 1.96-million-parameter backbone-conditioned graph network with an encoder-decoder architecture, trained by Hyra 2.0, the research agent developed by our team: pretrained with random-order autoregressive sequence modeling, followed by structure-reward reinforcement learning. At inference, a grouped draft-and-rewrite sampler that uses separate draft and rewrite temperatures improves refolding TM-score at matched diversity. An optimized implementation with BF16 numerics designs 128 sequences for a 402-residue backbone in 50.6 ms on a single NVIDIA H20 GPU, about 52× faster than the reference sampler, and an exact FP32 path that returns the reference sequences is 8.7× faster. Across five benchmark datasets and seven dataset-predictor combinations, HyInv reaches a higher average scTM than all ten external baselines at comparable or higher sequence diversity, with large margins over ProteinMPNN and ProteinZero V2. The same default setting supports de novo backbones, pocket-constrained libraries, enzyme redesign with the catalytic site kept, and loop redesign. We have released our code and model at https://github.com/Tencent-Hunyuan/Hyra-results/tree/main/AI4Science/hyinv.

1 Introduction

Inverse folding designs amino-acid sequences that fold into a given backbone, and it underlies scaffold design, enzyme engineering and the construction of sequence libraries for screening. Screening needs many diverse candidates rather than one best sequence, so a model is useful in proportion to the diversity it offers at a given structural quality. ProteinMPNN made inverse folding routine (Dauparas et al., 2022), language-model-assisted and parallel decoders extended it (Hsu et al., 2022; Gao et al., 2023; Zheng et al., 2023; Wang et al., 2025a), and ProteinZero showed the value of reinforcement learning (RL) against a structure predictor (Wang et al., 2025b). The structural consistency of designed sequences can be evaluated using scTM, the TM-score (Zhang and Skolnick, 2004) between their predicted structures and the input backbones. We use ESMFold2 (Candido et al., 2026) as the primary structure predictor. Evaluation at a single sampling temperature can obscure the trade-off between structural consistency and sequence diversity, so we compare models at comparable diversity.

We present HyInv, a 1.96-million-parameter message-passing graph network (Ingraham et al., 2019; Dauparas et al., 2022) with an encoder-decoder architecture, trained by Hyra 2.0, the research agent developed by our team, in two stages: pretraining by maximizing sequence likelihood under a random residue decoding order on natural and predicted structures, and subsequent RL (Ahmadian et al., 2024) primarily rewarded by predicted structural self-consistency on a pool of 50,000 backbones filtered against the benchmark datasets with a homology mask. At inference time, we introduce a draft-and-rewrite sampler that generates an initial sequence at a higher temperature and then refines it through groupwise resampling at a lower temperature, leading to a higher scTM while preserving diversity. An optimized implementation makes sampling fast enough to screen libraries in seconds.

Figure 1 summarizes the results. Averaged over the benchmark panels and structure predictors, HyInv has a higher scTM than each of the ten external baselines, at comparable or higher sequence diversity; the average margin is +0.013 over ProteinMPNN and +0.008 over ProteinZero V2 (Figure 1a, Section 5). Separate draft and rewrite temperatures raise scTM at equal diversity (Figure 1c). An optimized implementation designs 128 sequences for a 402-residue backbone in 50.6 ms, 52.1× faster than the reference sampler (Figure 1d), and the same default setting serves four single-chain design tasks (Figure 1b).

Our contributions are:

a Quality versus speed CATH4.3 test

Figure

b Applications

Figure

c Draft + rewrite sampling higher scTM at equal diversity

Figure

d Inference speed cumulative optimizations

Figure

Figure 1: HyInv designs sequences that fold like the input backbone, and does so fast. a, scTM against design speed on CATH4.3 test (ESMFold2) for HyInv and ten published baselines; speed is the time to design 128 sequences for a 402-residue backbone on one NVIDIA H20 (logarithmic axis). scTM is measured on sequences from the reference sampler, which the exact FP32 path (open circle) reproduces; the BF16 path (filled) is faster still (Section 4). b, The same default setting applied to four single-chain design tasks (ribbons: designs in blue, input backbones in gray; the highest-scTM designs are shown; pocket: the backbone shown, mean pass rate over twelve backbones, 43%). c, Separate draft and rewrite temperatures give a higher scTM than plain sampling at equal diversity (development panel; star: HyInv). d, Cumulative inference optimizations reduce the time for 128 designs from 2.6 s to about 51 ms.

  • A compact inverse-folding model with structure-based RL. We train a 1.96-million-parameter graph network using random-order autoregressive pretraining and structure-reward RL (Section 2).

  • Test-time scaling via draft-and-rewrite decoding. We develop a two-temperature sampler that separates initial sequence construction from groupwise revision, which gives a higher scTM at equal diversity (Section 3).

  • Inference optimization. We implement batched inference across sequences that enables 52× faster sampling with BF16 numerics (Section 4).

  • Comprehensive benchmark evaluation and computational design case studies. We report a five-panel comparative evaluation in which HyInv achieves the highest scTM at a comparable or higher diversity relative to ten baselines, and study four applications spanning practical tasks (Sections 5–6).

References (49)