arXiv:2610.18481cs.LGOct 2026

Manuscript Offprint

arXiv:2610.18481

ProTok: Unified Protein Tokenization via Modular Multi-Codebook Quantization

Romain Hardy, Xiaoman Zhang, Pranav Rajpurkar

Abstract

Protein sequence, structure, and functional annotations each capture complementary aspects of protein biology, yet existing tokenizers encode each modality independently, limiting the expressiveness of discrete protein representations. We present ProTok, a unified protein tokenizer that maps all three modalities into a modular discrete vocabulary via product quantization with per-modality codebook groups and modality dropout. A single ProTok checkpoint supports flexible inference from any modality subset without retraining. On seven StructTokenBench benchmarks spanning 14 tasks and 28 test splits, ProTok achieves an average rank of 1.4 across all structure-only tokenizers, placing first on 21 splits and among the top two on 27 of the 28. These gains come without sacrificing reconstruction: ProTok's tokens reach 0.939 lDDT on CATH 4.2, showing that multi-codebook quantization and multi-modal training yield tokens that are both reconstructable and informative. ProTok's structure tokens further lead all baseline structure tokenizers on zero-shot functional retrieval across CATH, Enzyme Commission, and Gene Ontology label hierarchies. The vocabulary also supports generation: a compact language model trained from scratch over ProTok tokens jointly generates backbone and sequence, with 52% of sampled backbones designable versus 21% for a parameter-matched GeoBPE baseline. ProTok shows that structure, sequence, and function can share one discrete vocabulary, motivating protein language models that reason over a unified token stream.

1 Introduction

Proteins are characterized by amino acid sequences that fold into three-dimensional structures to carry out diverse biological functions. Understanding and modeling proteins computationally requires reasoning across all three levels: the structure determines molecular interactions, the sequence encodes evolutionary constraints, and functional annotations describe biological roles, binding properties, and phenotypic effects. Recent protein language models (Elnaggar et al., 2022; Lin et al., 2023; Hayes et al., 2025; Wang et al., 2025; Ye et al., 2025) have made substantial progress by learning from these information sources, but the tokenizers they rely on still encode each modality independently.

We identify two limitations of this independent encoding. First, existing protein tokenizers are typically designed for a single modality: structure tokenizers (van Kempen et al., 2024; Yuan et al., 2025; Li et al., 2024) discard evolutionary signal, while sequence tokenizers (Lin et al., 2023) capture limited geometric information. The rare attempts at joint sequence-structure tokenization (Gao et al., 2025; Su et al., 2024) omit functional supervision; no existing tokenizer

Figure

Figure 1: ProTok architecture. Four frozen encoders process global structure, local geometry, sequence, and function inputs. Each encoder output is quantized through a dedicated group of codebooks. During training, modality dropout randomly masks groups and replaces them with learnable mask tokens (illustrated on the function group), forcing the structure decoder and the auxiliary sequence and function decoders to reconstruct from any modality subset. A single-layer fusion module attends across active groups before decoding. At inference, the same checkpoint operates in different modes by selecting which groups are active.

jointly quantizes structure, sequence, and function into a modular vocabulary that supports flexible inference from any modality subset. Second, single-codebook quantizers (van den Oord et al., 2017) widely used in structure tokenizers suffer from codebook collapse at scale, where only a fraction of code vectors receive meaningful gradient updates, shrinking the effective vocabulary and limiting representational expressiveness. Multi-codebook product quantization (Jégou et al., 2011; Ma et al., 2025) alleviates the capacity problem, but existing designs remain modality-specific.

We propose ProTok, a unified protein tokenizer that addresses both limitations, mapping sequence, structure, and function into a single cross-modal vocabulary that serves as a substrate for protein language modeling and structure-sequence co-generation. We make three contributions:

• A unified multimodal tokenizer. ProTok extracts representations from four pretrained encoders (Hayes et al., 2025; Yuan et al., 2025; Hsu et al., 2022; Lin et al., 2023; Zhang et al., 2025) capturing global structural context, local backbone geometry, evolutionary sequence features, and protein-level functional semantics. Each encoder output is quantized through a dedicated group of 4 codebooks, yielding a total of 16 parallel codes per residue. Orthogonality-regularized SimVQ projections keep each codebook full-rank, so the product code's capacity remains usable. The quantized outputs are fused via cross-group attention and decoded to reconstruct backbone geometry, recover amino acid identity, and align with frozen sequence and functional embeddings.

• Any-subset inference from a single checkpoint. During training, codebook groups are randomly masked and replaced with learnable mask tokens, forcing the shared decoders to recover their targets from any active modality subset. This enables a single trained checkpoint to operate in structure-only, sequence-only, or combined mode at inference without retraining.

• One vocabulary, three capabilities. Among the tokenizers we evaluate, ProTok is the strongest overall on StructTokenBench, and its frozen tokens lead every baseline on zero-shot functional retrieval; the same tokens reconstruct structure with high fidelity and form a generative substrate from which a language model co-generates designable protein backbones and sequences. To our knowledge, no prior tokenizer demonstrates this combination.

We train ProTok in two stages on 311K protein chains from the Protein Data Bank (PDB) (Berman et al., 2000) and AlphaFold 2-predicted Swiss-Prot (Jumper et al., 2021; UniProt Consortium, 2023), and evaluate on StructTokenBench (Yuan et al., 2025) across seven benchmarks spanning functional site prediction, flexibility regression, remote homology classification, and conformational discrimination. ProTok achieves the strongest overall profile among structure-only tokenizers, with a mean rank of 1.4 across 28 test splits, placing first on 21 splits and among the top two on 27 of the 28. The same tokens are reconstructable and generative: they reconstruct backbone structure at 0.939 lDDT on CATH 4.2, and a language model over ProTok tokens jointly generates backbone and sequence, with 52% of generated backbones designable by self-consistency versus 21% for a parameter-matched GeoBPE baseline. Two further probes confirm that these tokens carry cross-modal signal: ProTok's structure tokens lead every baseline on zero-shot functional retrieval across CATH, Enzyme Commission, and Gene Ontology hierarchies, and activating additional codebook groups at inference monotonically improves functional site prediction.

References (52)