STRIDE: Post-Training LLMs to Reason and Refine Bio-Sequences via Edit Trajectories
Abstract
Discrete biological sequence optimization often requires goal-directed, parser-valid edits to an existing protein or molecule. Diffusion models support iterative refinement but do not expose a controllable discrete-edit interface, while autoregressive LLMs can be myopic when planning constrained edits over multiple steps. We introduce STRIDE (Sequence Trajectory Refinement via Iterative Discrete Editing), a post-training framework that trains an LLM to emit executable INSERT/DELETE/REPLACE trajectories for variable-length refinement. STRIDE first learns Levenshtein-aligned shortest-edit demonstrations, then uses supervised fine-tuning and group-based policy optimization to align trajectories with task rewards while preserving coherent editing. On an oracle-based full-action protein stress test, STRIDE raises success over Vanilla SFT from 42% to 89% and novelty among unique improvements from 47% to 97%. On instruction-conditioned molecular editing, the GSPO-aligned variant improves strict success, controllability, and SMILES validity over the SFT-only STRIDE model (code: https://github.com/daiheng-zhang/STRIDE).
Lay Summary
Designing a better protein or drug molecule often means making small, targeted changes to one that already works — adding, removing, or swapping a single building block — while keeping the result a valid biological sequence. Language models can read and write such sequences, but tend to rewrite them from scratch and break the rules. STRIDE instead teaches a language model to output a transparent, step-by-step recipe — like an editor's track-changes — saying, for example, "delete position 21, insert C at position 8." We train it in two phases: imitating shortest edit recipes that turn known examples into improved ones, then rewarding recipes that score well on a fitness predictor. On a standard fluorescent-protein benchmark, STRIDE roughly doubles success (42% → 89%); on drug-molecule editing it improves both success and chemical validity.