A generative AI system called Raygun, developed by a team led by computational biologist Rohit Singh at Duke University, can shrink, expand or otherwise edit a natural protein’s sequence while aiming to preserve its three-dimensional fold and functional sites. The work, Miniaturizing and modifying natural proteins with Raygun (Devkota, Shonai, Mao, Ko, Wang, Soderling & Singh), was published in Nature on 29 July 2026 (volume 656, issue 8126), with an accompanying research briefing by Nature News the same day. As of this writing, the tool’s code is publicly available on GitHub (rohitsinghlab/raygun), and an earlier preprint version has circulated on bioRxiv since August 2024.
Why length was the constraint nobody could design against
Prior generative protein-design tools — including the family of protein language models built on large sequence databases — are generally good at producing plausible new sequences, and increasingly good at directed evolution-style edits such as substituting individual residues. What they have not handled well is length: shrinking or expanding a protein while keeping its fold and active sites intact requires the model to reason about structure at a scale most sequence-based representations do not preserve. That gap matters beyond biochemistry curiosity. A smaller version of a functional protein can fit into a delivery vehicle, a fusion construct, or an assay format that the natural-length version cannot — miniaturisation is a genuine engineering bottleneck, not just an efficiency preference, for anything built around a hard size ceiling. Raygun’s contribution is treating length itself as a designable axis rather than a fixed property of the input sequence.
How the system works
Raygun is built on ESM-2, a protein language model trained on large collections of protein sequences to learn the statistical patterns — described informally as an evolutionary “grammar” — that distinguish stable, functional proteins from random ones. Most protein language models represent a protein as a sequence of per-residue embeddings whose length scales directly with the protein itself, which makes it difficult to compare or generate proteins of different sizes on consistent terms. Raygun instead divides each protein into blocks and compresses their ESM-2 embeddings into a fixed-dimensional representation — reported in the paper as K = 50 block-averaged vectors — so that proteins of any length become comparable within a single standardized representation. The model learns to generate protein sequences at a chosen size from that fixed representation without discarding the structural rules it captures.
A second reported design choice distinguishes Raygun from prior in-painting-style editing methods, which typically require a researcher to pre-specify exactly which residues will be modified. Raygun is described as determining modification sites itself and natively handling both substitutions and indels (insertions and deletions) as part of the same generative process, rather than treating indels as a special case bolted onto a substitution-only model.
What was actually validated
The paper reports wet-lab and computational validation across several test cases: miniaturising fluorescent proteins and the proximity-labelling enzyme TurboID, and expanding variants of epidermal growth factor (EGF), while assessing whether structural integrity and functional activity were retained at the new size. The authors also report that Raygun’s fixed-length block representations grouped proteins by CATH structural classification more accurately than a simpler ESM-2 average-pooling approach, with the largest improvement at the broadest (“architecture”) level of the CATH hierarchy — evidence, if the comparison holds up under independent replication, that the block-averaging step captures structural information that plain sequence pooling misses. CASRAI has not independently reproduced this comparison and notes it here as reported by the study authors.
The validation gap this exposes
The more durable story for a research audience may not be what Raygun can generate, but what it cannot yet prove. Generative protein-design methods, Raygun included, can now propose large numbers of plausible candidate sequences far faster than any wet lab can express, purify and functionally test them. That asymmetry — cheap generation, expensive validation — is a known and widely discussed limitation across the generative-protein-design field, not one specific to this paper. It means a paper’s headline capability (resize a protein while preserving function) rests on however many candidates were actually tested experimentally, which for any single study is necessarily a small fraction of what the model could generate. Readers evaluating this and comparable tools for their own pipelines should look specifically at the ratio of computationally generated candidates to experimentally validated ones, and at whether validation covered the size range and protein family they actually need.
A dual-use question that current institutional policy does not yet name
Generative redesign of existing proteins — changing size, and by extension changing which delivery systems, assay formats or organisms a protein can function in — sits squarely inside the kind of capability that institutional high-risk life-sciences oversight is meant to cover. CASRAI’s coverage of the current federal push on institutional controls on high-risk life-sciences research does not yet address generative protein-modification tools of this kind specifically, and Raygun is a concrete illustration of why that framing needs to keep pace with what generative biology tools can now do. It sits alongside the broader question of how AI-assisted or AI-generated methodology gets disclosed and reviewed in published research, a question CASRAI has also tracked in coverage of the Agents4Science conference on AI-first-author research and the aiXiv preprint server for AI-written and AI-reviewed papers.
What to watch
- Independent replication of the CATH-clustering comparison and of the fold-preservation claims across a wider range of protein families.
- Whether journals and funders begin asking, as a matter of course, what fraction of a generative protein-design paper’s candidates were experimentally validated rather than only computationally scored — the same kind of reproducibility question already applied to other classes of generative AI research outputs.
- Whether institutional dual-use review processes are updated to explicitly name generative protein-modification tools, rather than only generative protein-design-from-scratch tools.







