SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.09925 · NeurIPS · 2022

Plug & Play Directed Evolution of Proteins with Gradient-based Discrete MCMC

Patrick Emami, Aidan Perreault, Jeffrey Law, David Biagioni, Peter St, John

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2212.09925.json · badge: /api/ran/2212.09925.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
pemami4911/ppde canonical (classifier label)
classifier basis: classifier_2025
3 ran · 2 no recorded run
FunctionStatusWhere it lives
mut_distance Ran
ran; our contract draft was wrong, not the code
pemami4911/ppde/ppde/protein_samplers/ppde.py
code served (permissive licence) · get_code("e0577472447a3af9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# x is [n_chains, seq_len, vocab_size]
# wt is [1, seq_len, vocab_size]

n_chains = 2
seq_len = 4
vocab_size = 3

x = torch.randint(0, vocab_size, (n_chains, seq_len, vocab_size)).float()
wt = torch.randint(0, vocab_size, (1, seq_len, vocab_size)).float()

ARGS = {
    "x": x,
    "wt": wt,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mutation_mask Ran
ran; our contract draft was wrong, not the code
pemami4911/ppde/ppde/protein_samplers/ppde.py
code served (permissive licence) · get_code("7693cc4c8dc7aea3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# x: a 3D tensor with shape (batch_size, height, width)
# The function uses x.size(0) to get batch size, x.device, and compares with wt
# wt: a 3D tensor that will be repeated to match x's batch dimension
# The function checks (x != wt) & (wt == 1), so wt should contain 0s and 1s

batch_size = 2
height = 4
width = 3

# Create x as a tensor with some 0s and 1s
x = torch.tensor([
    [[1, 0, 1], [1, 1, 0], [0, 1, 1], [1, 0, 0]],
    [[0, 1, 1], [1, 0, 1], [1, 1, 0], [0, 0, 1]]
], dtype=torch.long)

# Create wt with shape (1, height, width) so it can be repeated
wt = torch.tensor([
    [[1, 0, 0], [1, 1, 1], [0, 1, 0], [1, 0, 0]]
], dtype=torch.long)

ARGS = {
    "x": x,
    "wt": wt
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
safe_logits_to_probs Ran
ran; our contract draft was wrong, not the code
pemami4911/ppde/ppde/protein_samplers/ppde.py
code served (permissive licence) · get_code("b01165645c87c69f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small logits tensor
# Shape: (batch_size=2, num_classes=4)
logits = torch.randn(2, 4)

ARGS = {
    "logits": logits
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
BaseSampler Not yet run
unverified (harvested, no recorded run)
pemami4911/ppde/ppde/protein_samplers/ppde.py
code served (permissive licence) · get_code("25944f53dcf257fe")
How it ran

no invocation recorded.

PPDE_PAS Not yet run
unverified (harvested, no recorded run)
pemami4911/ppde/ppde/protein_samplers/ppde.py
code served (permissive licence) · get_code("d8b55890f1485dc3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2212.09925")
get_code_for_paper("2212.09925")
have("2212.09925")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2212.09925.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2212.09925.svg)](https://syntology.ai/paper/2212.09925)

Connect an agent — have() is free.