Locality-Controlled Out-of-Distribution Guidance for Robust Regulatory DNA Sequence Design
Organizations: Wellcome Sanger Institute
Abstract
Designing regulatory DNA sequences for targeted gene-expression control is an important challenge. Recent approaches frame this task as property-conditioned generation, where diffusion models trained on natural sequences are guided toward high predicted activity through reward-based fine-tuning or sampling-time guidance. We show that single-reward evaluation can obscure reward-hacking behavior. By decomposing evaluation into property, novelty, and plausibility, we identify an empirically underexplored region of the evaluation space in which all three objectives are satisfied, but no existing baseline succeeds. We postulate that this gap arises because prior methods treat guidance primarily as a matter of magnitude. In regulatory DNA, however, sequence grammar is spatially nonuniform: motif positions are sensitive to perturbation, while background regions allow more exploration. We therefore propose LOCOGEN by reformulating guidance as a problem of locality. LOCOGEN learns an invariant motif mask through sequence-level invariance learning to protect motif positions, while applying OOD damping only to background positions. It operates at sampling time on a frozen diffusion backbone, without retraining the backbone. Across HepG2, K562, and SK-N-SH, LOCOGEN reaches this previously underexplored region of the property-novelty-plausibility space. Code is available at https://github.com/Lotfollahi-lab/LocoGen.
Figures & tables
| Property | Novelty | Plausibility | ||||
| Method | Pred-activity | ATAC_acc | Authenticity | Rarity (IQR) | ||
| Train | 2.406 | 0.244 | 0.728 | - | - | - |
| MDLM | 0.157 0.024 | 0.329 0.198 | 0.777 0.033 | 0.03 | 0.051 0.006 | 0.071 0.001 |
| MDLM+CG | 4.516 0.151 | 0.481 0.022 | 0.809 0.014 | 0.02 | 0.169 0.013 | 0.043 0.007 |
| DNA-Diff | 2.595 0.087 | 0.688 0.293 | 0.821 0.015 | 0.03 | 0.002 0.002 | 0.010 0.002 |
| DRAKES | 5.610 0.070 | 0.804 0.159 | 0.873 0.004 | 0.09 | 0.261 0.007 | 0.060 0.010 |
| Component | Property | Novelty | Plausibility | |||||
| CG | Glob. OOD | Loc. OOD | Pred-activity | ATAC_acc | Authenticity | Rarity (IQR) | ||
| – | 0.157 0.024 | 0.329 0.198 | 0.777 0.033 | 0.03 | 0.051 0.006 | 0.071 0.001 | ||
| ✓ | – | 0.300 0.028 | 0.314 0.008 | 0.946 0.002 | 0.03 | 0.246 0.002 | 0.167 0.007 | |
| Learnt | 0.309 0.020 | 0.311 0.009 | 0.947 0.003 | 0.03 | 0.244 0.004 | 0.166 0.006 | ||
| ✓ | – | 4.516 0.151 | 0.481 0.022 | 0.809 0.014 | 0.02 | 0.169 0.013 | 0.043 0.007 | |
| ✓ | ✓ | – | 4.608 0.061 | 0.691 0.041 | 0.887 0.012 | 0.11 | 0.065 0.021 | 0.044 0.015 |
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Description |
| Sequences and diffusion (§ 3 ) | |
| Nucleotide alphabet | |
| Alphabet size | |
| DNA sequence length ( in all experiments) | |
| Position index and nucleotide-channel index | |
| Sample index within a minibatch and minibatch size | |
| Symbol | Value | Description | Source |
| 128 | hidden dim of CNN backbones | model.hidden_dim | |
| stacks | 5 | dilated-CNN stack depth | model.num_cnn_stacks |
| dropout | 0.1 | per-conv dropout | model.dropout |
| 0.3 | target invariant mask density | init_rho | |
| 1.0 | V-REx weight | config | |
| 5.0 | mask-anchoring weight | config |
| Symbol | Value | Description |
| 0.7 | OOD damping strength ( , Eq. 9 ) | |
| 0.5 | mask threshold; damping acts where | |
| 0.5 | damping time threshold (active only for ) | |
| 3.0 | target property-pull-to-prior magnitude ratio (Eq. 10 ) | |
| 20 | cap on when is small | |
| sentinel cutoff | threshold below which is excluded from the norm |
| Property | Novelty | Plausibility | ||||
| Method | Pred-activity | ATAC_acc | Authenticity | Rarity (IQR) | ||
| Train | 2.700 | 0.281 | 0.717 | - | - | - |
| MDLM | 0.106 0.028 | 0.367 0.227 | 0.777 0.033 | 0.03 | 0.049 0.005 | 0.067 0.001 |
| MDLM+CG | 6.433 0.052 | 0.852 0.196 | 0.810 0.006 | 0.03 | 0.260 0.007 | 0.093 0.005 |
| DNA-Diff | 2.979 0.046 | 0.479 0.311 | 0.841 0.007 | 0.03 | 0.028 0.020 | 0.038 0.008 |
| DRAKES | 6.493 0.155 | 0.863 0.140 | 0.873 0.004 | 0.08 | 0.251 0.008 | 0.069 0.011 |
| Property | Novelty | Plausibility | ||||
| Method | Pred-activity | ATAC_acc | Authenticity | Rarity (IQR) | ||
| Train | 2.376 | 0.212 | 0.713 | - | - | - |
| MDLM | 0.112 0.026 | 0.391 0.217 | 0.777 0.033 | 0.03 | 0.071 0.006 | 0.080 0.001 |
| MDLM+CG | 5.047 0.101 | 0.429 0.295 | 0.828 0.010 | 0.06 | 0.120 0.003 | 0.007 0.005 |
| DNA-Diff † | 0.033 0.015 | 0.079 0.087 | 0.821 0.015 | 0.03 | 0.024 0.000 | 0.034 0.000 |
| DRAKES | 6.992 0.169 | 0.879 0.145 | 0.873 0.004 | 0.09 | 0.241 0.008 | 0.095 0.011 |
| ATAC | Auth. | Rarity (IQR) | ||||
| Segmentation | Replacement | Property | Novelty | Plausibility | |||
| Pred-act. | ATAC acc | Authent. | Rarity (IQR) | ||||
| JASPAR PSSM | Uniform random | 0.275 | 0.206 | 0.928 | 0.155 | 0.114 | |
| JASPAR PSSM | Dinuc.-preserving | 0.122 | 0.092 | 0.815 | 0.069 | 0.066 | |
| GC content | Uniform random | 0.359 | 0.252 | 0.907 | 0.148 | 0.129 | |
| GC content | Dinuc.-preserving | 0.078 | 0.086 | 0.809 | 0.054 | 0.076 | |
| Saliency | Uniform random | 0.288 | 0.249 | 0.961 | 0.167 | 0.138 | |
| Activity | Accessibility | |||
| Method | DRAKES Pred-activity | SVDD DNA_evaluation alternative training split | DRAKES ATAC_acc | human-atac-catlas different data source |
| MDLM | 0.157 (6) | (6) | 0.329 (6) | (6) |
| MDLM+CG | 4.516 (4) | (4) | 0.481 (4) | (5) |
| DNA-Diff | 2.595 (5) | (5) | 0.688 (3) | (4) |
| DRAKES | 5.610 (2) | (2) | 0.804 (1) | (1) |
| SVDD | 6.830 (1) | (1) | 0.442 (5) | (3) |
| Activity | Accessibility | |||
| Method | DRAKES Pred-activity | SVDD DNA_evaluation alternative training split | DRAKES ATAC_acc | human-atac-catlas different data source |
| MDLM | 0.106 (6) | (6) | 0.367 (6) | (6) |
| MDLM+CG | 6.433 (3) | (2) | 0.852 (4) | (4) |
| DNA-Diff | 2.979 (5) | (5) | 0.479 (5) | (5) |
| DRAKES | 6.493 (2) | (4) | 0.863 (3) | (3) |
| SVDD | 9.479 (1) | (1) | 0.928 (1) | (1) |
| Activity | Accessibility | |||
| Method | DRAKES Pred-activity | SVDD DNA_evaluation alternative training split | DRAKES ATAC_acc | human-atac-catlas different data source |
| MDLM | 0.112 (5) | (6) | 0.391 (4) | (6) |
| MDLM+CG | 5.047 (4) | (4) | 0.429 (3) | (3) |
| DNA-Diff | 0.033 (6) | (5) | 0.079 (6) | (5) |
| DRAKES | 6.992 (2) | (2) | 0.879 (1) | (1) |
| SVDD | 7.989 (1) | (1) | 0.356 (5) | (4) |
Diffusion Model Guidance
Diffusion model guidance steers denoising toward desired conditions, rewards, constraints, or away from unwanted concepts.
See all 395 papers