Ahmed Doghri Logo Image
Ahmed Doghri

proteinmask

Generative biology demos love implying they're one commit away from curing something. I wanted the opposite: a demo that stays honest about being a toy. proteinmask uses toy protein-like strings, recovers conserved motifs at 0.915, and makes no wet-lab claim.

proteinmask, a toy masked protein sequence infilling benchmark

A Bio Demo That Knows Its Own Size

Generative biology is full of huge claims from weekend side projects, which should be met with polite skepticism every single time. I wanted the opposite: a safe toy benchmark that borrows the shape of masked sequence modeling without borrowing credibility real biology hasn't earned yet.

proteinmask builds synthetic protein-like families with conserved positions, trains a profile model, fills masks, and writes toy sequences to FASTA. The README says plainly, more than once, that these are not wet-lab candidates.

Recover The Motif Or Stop Talking

The benchmark hides conserved positions in held-out sequences and checks whether the learned profile can actually recover them. That's the smallest honest version of this task, and the only one worth trusting.

The generator also tracks novelty so it can't pass the test by quietly copying the training strings. It has to preserve the motif while producing sequences that are genuinely new.

The Number

Profile motif recovery is 0.915. The random baseline is 0.000. Generated toy sequence novelty is 1.000, which means it earned that recovery number instead of memorizing its way to it.

3 tests pass locally and on GitHub Actions across Python 3.9, 3.11, and 3.13, with `artifacts/designs.fasta` regenerated by the benchmark every run.

Tools Used

Python
Masked Modeling
Sequence Design
Motif Recovery
FASTA
pytest
GitHub Actions CI