Discrete Edit Adjoint Matching for Reward Fine-Tuning Variable-Length Discrete Generators
Abstract
Reward fine-tuning of variable-length discrete generators requires controlling insertion, deletion, and substitution rates while preserving the underlying continuous-time dynamics. We introduce Discrete Edit Adjoint Matching (DEAM), which extends adjoint matching to edit CTMCs, chains on sequences of any length whose transitions are single edits, using the full path-space likelihood ratio and a learned scalar potential whose differences define log-rate corrections. We amortize it into a direct edit head, avoiding a potential evaluation at every one-edit successor during sampling. On an enumerable Edit Flow with exact values and adjoints, DEAM approaches the discretized exact-adjoint reference without oracle access and substantially outperforms non-oracle rate-matching and trajectory-credit baselines. The same controller transfers to small-molecule design: on a pretrained 96M-parameter any-length insertion diffusion over SAFE strings, DEAM matches A2D2's reward at better synthetic accessibility, validity and diversity.