LEMON-ZEST: Evolution-Informed Tokenization for Efficient Protein Language Modeling

Biswajit Banerjee, Claudia Alvarez Carreno, Anton S. PetrovNeurIPS 2026

TL;DR

Instead of throwing thousands of GPUs at billion-parameter models to learn biology from scratch, what if we baked billions of years of evolution right into a model’s vocabulary? By grouping evolutionarily interchangeable amino acid patterns into single tokens (ZEST), the authors trained a compact 200M-parameter protein model (LEMON) on a single GPU in one week—and it outperforms giants up to 15× its size at spotting distantly related proteins.

What Problem Does This Paper Address?

Consider the Ship of Theseus: if you replace every plank of wood one by one, is it still the same ship? In biology, proteins play this game constantly. Over millions of years, mutations swap out amino acids until two evolutionary cousins share less than 20% of their sequence—yet they still fold into the exact same 3D shape and perform similar jobs. Spotting these disguised relatives from sequence alone is called remote homology detection, and it remains one of bioinformatics' hardest problems.

Protein Language Models (PLMs) have tackled this by copying the NLP playbook: feed raw characters (individual amino acids) into massive transformers and hope scale figures out the rest. Meanwhile, standard text compression tricks like Byte-Pair Encoding (BPE) fail on proteins because they merge characters based on raw frequency, ignoring whether a chunk actually means anything structurally. As a result, single-residue PLMs burn quadratic $O(L^2)$ attention compute on noisy sequences while struggling to see the structural forest for the amino-acid trees.

Methods

The authors introduce two main innovations—a biologically grounded tokenizer and a dual-head model architecture—paired with a clever regularization trick:

  • ZEST (Zoned Encoding of Sequence Traits): Rather than counting random substrings, the authors mined 765,248 evolutionary profiles (Multiple Sequence Alignments) to find conserved multi-residue motifs. Crucially, they clustered synonymous motifs (≥70% identity) and assigned every member of a cluster to the exact same token ID. Nature's synonymous mutations become identical at the input layer. A 32K vocabulary compresses sequences by ~3.3× to 4×, fitting ≥3,380 amino acids into a standard 1,024-token window.
  • Trie-Dropout: Because long conserved motifs often contain shorter sub-motifs, a greedy longest-match tokenizer leaves shorter tokens "dead" (never seen during training). Using a prefix tree (trie), the tokenizer randomly overrides the longest match with probability $p_{\text{drop}}$, decomposing motifs into valid sub-zones. At inference, this enables Test-Time Augmentation (TTA): running the same protein through 5 different random tokenizations and averaging the embeddings for a free accuracy boost.
  • LEMON (Y-Architecture): Compressing tokens is great for global fold recognition, but what if you lose local amino-acid details? LEMON uses a standard pre-norm Transformer encoder (with RoPE and SwiGLU) that splits into two heads: a Representation Head (trained via contrastive learning to group similar 3D folds) and a Sequence Head that broadcasts compressed tokens back out to individual residue positions to predict masked amino acids, keeping the encoder honest about fine-grained sequence details.

Datasets

No new benchmark datasets were created, though the authors performed strict sequence-identity auditing to ensure zero exact-match leakage between training and evaluation:

  • Vocabulary & Fine-Tuning: TEDLH (765,248 HMM profiles from The Encyclopedia of Domains) was used to build ZEST; 59.7M protein pairs from TEDLH labeled with the CATH structural hierarchy were used for contrastive fine-tuning.
  • Pre-training: A 50% subset of UniRef90 (~90M protein sequences) for masked language modeling.
  • Evaluation: SCOPe (segmented across 10%–95% sequence identity thresholds) and CATH-S20 for remote homology. Zero-shot transfer was tested on CIRPIN SCOPe40 (circular permutations), SwissProt shards (EC enzyme numbers), MZSGO / CAFA5 (Gene Ontology), and CATH-17287 (multi-domain boundaries).

Key Insights and Ideas

  • NLP heuristics break on proteins, and scale won't save them: In controlled head-to-head tests, standard BPE tokenization sped up training compared to single-character models, but tanked retrieval precision—and scaling the model up to 200M parameters (LEMON-BPE) actually widened the gap behind ZEST. Biological priors beat statistical frequency.
  • Tokenization can substitute for massive parameter scaling: Injecting evolutionary invariance at the input relieves the transformer from having to spend ratusan of millions of parameters relearning basic substitution rules.
  • Order-invariant fold intuition: In "circular permutations," evolution takes a protein sequence, chops it in half, and glues the front to the back—completely scrambling linear order while keeping the 3D fold intact. Standard PLMs like ESM-2 collapse to near-random guessing here, whereas LEMON's motif-driven contrastive space recognizes the shared fold immediately.

Key Results

Trained on a single H100 GPU in about a week (~169 hours total), the 200M-parameter LEMON punches well above its weight class:

Figure 1: SCOPe fold-level retrieval. (a) Fold AUROC restricted to proteins sharing at most t% sequence identity with the query. (b) Fold AUROC@95% versus parameter count (log scale). TM-Vec is trained with structural (TM-score) supervision. LEMON-BPE is the matched control with BPE tokenization, ESM2-CFT is ESM-2 650M contrastively finetuned end to end with LEMON’s representation head and data. SaProt (dashed) utilizes structure-derived 3Di tokens. HHblits (dotted) relies on Hidden Markov Model-profile based search.
  • Remote Homology: On SCOPe fold retrieval, LEMON leads all sequence-only models across every difficulty tier—from 0.91 AUROC at a brutal 10% sequence identity up to 0.98 at 95%—outperforming 650M–3B parameter models (ESM-2, ProtTucker, ESM3-open) and matching TM-Vec (which relies on 3D structural TM-score supervision). On CATH-S20 Architecture, LEMON takes first place overall (0.815 AUROC vs. TM-Vec's 0.716).
  • Blistering Speed & Memory: On an L40S GPU, LEMON processes medium proteins (500–999 residues) in 2.0 ms using 0.47 GB of VRAM—over 13× faster and 4× lighter than ESM2-650M (26.8 ms, 2.07 GB). For long proteins (1,000–1,999 residues), where ESM-2 hits context limits, LEMON runs in 2.8 ms vs. ProstT5's 60.5 ms.
  • Zero-Shot Transfer: Using frozen embeddings, LEMON sets a new sequence-only state-of-the-art on Circular Permutation detection (0.779 AUROC vs. ESM-2's 0.476) and beats specialized sequence-only domain-boundary tool Chainsaw (0.758 vs. ~0.72 NDO).

Limitations and Future Work

  • Indirect structural supervision: While LEMON only reads amino acid sequences at inference, its contrastive fine-tuning labels (CATH and TED boundaries) were originally derived from 3D structures.
  • Coarse vs. fine-grained trade-off: Grouping synonymous mutations into single tokens helps recognize broad 3D folds, but blurs fine-grained details. Consequently, residue-level models like TM-Vec and ProtTucker still beat LEMON on finer-grained Superfamily classification, and ESM-2 remains stronger at per-residue property prediction.
  • Single-domain focus & compute limits: LEMON was fine-tuned on single-domain sequence slices (leaving full multi-domain retrieval untested) and trained with a single random seed at the 200M scale due to academic compute budgets. Future work aims to extend ZEST-style vocabularies to multi-domain proteins, multimodal models, and direct 3D structure prediction.

Summary updated

Abstract

Protein Language Models (PLMs) have made remarkable progress following scaling laws established in natural language processing across sequence- and structure-based tasks, yet the potential of tokenization remains underexploited. Unlike human language, proteins preserve structure despite extensive sequence variation, a property standard tokenization strategies fundamentally fail to capture. We introduce ZEST (Zoned Encoding of Sequence Traits), an evolution-informed vocabulary derived from conserved regions of multiple sequence alignments. ZEST allows embedding domain-level biological priors directly at the tokenization stage rather than learning them implicitly through scale. ZEST natively compresses sequences to an average token length of 3.3 residues, enabling our model to process $\geq3380$ residues within a standard 1024-token context window. Building on this, we present LEMON (Layered Extraction of Molecular Ordering from Nature), a compact 200M-parameter sequence-based model for detection of remote homology between protein sequences trained on a single H100 GPU for one week. Despite its modest size, LEMON outperforms models of 600M to 3B parameters and is on par with TM-Vec. Our results demonstrate that evolution-informed tokenization can substitute for massive parameter scaling, opening a new direction for efficient, biologically-grounded protein representation learning. All code and model weights are publicly available (at github.com/LDWLab/ZEST) under the MIT license.
BibTeX
@inproceedings{banerjee2026lemon,
  author = {Biswajit Banerjee and Claudia Alvarez Carreno and Anton S. Petrov},
  title = {{LEMON-ZEST: Evolution-Informed Tokenization for Efficient Protein Language Modeling}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=IxAaZ6h5Cc},
}
Figure