{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/plug-play-directed-evolution-of-proteins-with","title":"Plug & Play Directed Evolution of Proteins with Gradient-based Discrete MCMC","arxiv_id":"2212.09925","date":"2022-12-20","proceeding":null,"authors":["Patrick Emami","Aidan Perreault","Jeffrey Law","David Biagioni","Peter C. St. John"],"abstract":"A long-standing goal of machine-learning-based protein engineering is to accelerate the discovery of novel mutations that improve the function of a known protein. We introduce a sampling framework for evolving proteins in silico that supports mixing and matching a variety of unsupervised models, such as protein language models, and supervised models that predict protein function from sequence. By composing these models, we aim to improve our ability to evaluate unseen mutations and constrain search to regions of sequence space likely to contain functional proteins. Our framework achieves this without any model fine-tuning or re-training by constructing a product of experts distribution directly in discrete protein space. Instead of resorting to brute force search or random sampling, which is typical of classic directed evolution, we introduce a fast MCMC sampler that uses gradients to propose promising mutations. We conduct in silico directed evolution experiments on wide fitness landscapes and across a range of different pre-trained unsupervised models, including a 650M parameter protein language model. Our results demonstrate an ability to efficiently discover variants with high evolutionary likelihood as well as estimated activity multiple mutations away from a wild type protein, suggesting our sampler provides a practical and effective new paradigm for machine-learning-based protein engineering.","url_abs":"https://arxiv.org/abs/2212.09925v2","url_pdf":"https://arxiv.org/pdf/2212.09925v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"plug-play-directed-evolution-of-proteins-with","repo_url":"https://github.com/pemami4911/ppde","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"protein-language-model","task_name":"Protein Language Model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2212.09925","atlas_url":"https://app.syntology.ai/?focus=2212.09925","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.09925"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pemami4911/ppde","reach":null}],"summary":{"ran_draft_wrong":3,"unverified":2},"by_repo_kind":{"official":{"samples":5,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"e0577472447a3af9","entry":"mut_distance","repo":"pemami4911/ppde","repo_kind":"official","path":"ppde/protein_samplers/ppde.py","file_url":"https://github.com/pemami4911/ppde/blob/HEAD/ppde/protein_samplers/ppde.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e0577472447a3af9"}},{"code_sha256_prefix":"7693cc4c8dc7aea3","entry":"mutation_mask","repo":"pemami4911/ppde","repo_kind":"official","path":"ppde/protein_samplers/ppde.py","file_url":"https://github.com/pemami4911/ppde/blob/HEAD/ppde/protein_samplers/ppde.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7693cc4c8dc7aea3"}},{"code_sha256_prefix":"b01165645c87c69f","entry":"safe_logits_to_probs","repo":"pemami4911/ppde","repo_kind":"official","path":"ppde/protein_samplers/ppde.py","file_url":"https://github.com/pemami4911/ppde/blob/HEAD/ppde/protein_samplers/ppde.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b01165645c87c69f"}},{"code_sha256_prefix":"25944f53dcf257fe","entry":"BaseSampler","repo":"pemami4911/ppde","repo_kind":"official","path":"ppde/protein_samplers/ppde.py","file_url":"https://github.com/pemami4911/ppde/blob/HEAD/ppde/protein_samplers/ppde.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"25944f53dcf257fe"}},{"code_sha256_prefix":"d8b55890f1485dc3","entry":"PPDE_PAS","repo":"pemami4911/ppde","repo_kind":"official","path":"ppde/protein_samplers/ppde.py","file_url":"https://github.com/pemami4911/ppde/blob/HEAD/ppde/protein_samplers/ppde.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d8b55890f1485dc3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}