Tokenization—the process of translating complex 3D structures into discrete, sequential units—is the critical bridge enabling Large Language Model (LLM) architectures to process and generate biological data. However, the current generation of protein tokenizers relies heavily on local representations, creating significant bottlenecks for generative and representation tasks.
In a new approach, researchers introduce the Adaptive Protein Tokenizer (APT), a method that abandons local, residue-based tokenization in favor of a global, hierarchical representation. By generating a "coarse-to-fine" sequence of tokens, APT achieves state-of-the-art generative designability and produces highly effective fixed-size embeddings for downstream tasks.
The Bottleneck of Local Tokenization
Current state-of-the-art models, such as ESM3 and DPLM2, utilize local tokenizers that assign a token to every small neighborhood of amino acids. This localized approach introduces three major challenges:
- Poor Scaling: Token sequences grow linearly with protein length. For massive protein complexes, these sequences quickly exceed the efficient context windows of standard transformers.
- Error Accumulation: In generative tasks, a single mis-sampled local token early in the sequence can propagate errors throughout the structure, resulting in low designability (i.e., proteins that cannot physically fold in nature).
- Representation Squashing: Deriving a single, global "fingerprint" for an entire protein typically requires mean-pooling all local tokens, a reductive operation that washes out critical structural nuances.
Introducing APT: Global Hierarchy and Nested Dropout
To resolve these issues, APT employs a diffusion autoencoder with a discrete bottleneck. Rather than mapping local neighborhoods to tokens, APT forces the model to reconstruct the protein using a variable number of tokens.
The core innovation driving this is Nested Dropout. During training, tokens are randomly dropped from the end of the sequence. To minimize reconstruction loss, the model is forced to pack the most critical, global structural information into the very first tokens. Subsequent tokens then add increasingly fine-grained details.
APT pairs this with Finite-Scalar Quantization (FSQ), discretizing the latent space into roughly 1,000 effective tokens without the need for a massive, complex codebook. Furthermore, instead of a standard MLP decoder, APT utilizes a Diffusion Decoder (Flow Matching). This allows the model to learn "stochastic equivariance"—internalizing the symmetries of 3D space directly from the data rather than relying on hard-coded architectural constraints.
Breakthrough Capabilities
Because of its hierarchical training, APT unlocks several novel capabilities that are impossible with local tokenizers:
- Valid Prefixes: Any prefix of an APT token sequence (e.g., just the first 16 tokens) represents a valid, albeit "blurry," version of the entire protein. In contrast, a prefix in a local tokenizer only represents the first few amino acids of a chain.
- Protein Shrinking: APT decouples token count from protein length. Researchers can condition a structure on a specific number of global tokens but instruct the decoder to generate a smaller number of amino acids. This enables zero-shot "protein shrinking"—distilling a large protein's functional essence into a smaller, more therapeutically viable scaffold.
- Information-Theoretic Stopping: More tokens do not always yield better generation. APT allows for entropy-based sampling at inference time. By halting generation when the entropy (uncertainty) of the next token hits a local minimum, the model avoids "error exposure" and prevents the hallucination of unrealistic structural details.
Performance and Results
Trained on approximately 473,000 structures from the Foldseek clustered AlphaFold Database (AFDB), APT was rigorously evaluated on held-out datasets including CAMEO, CATH, and AFDB subsets.
The results demonstrate a massive leap in generative performance. APT achieved a designability score of 0.871, crushing the performance of other discrete models like DPLM2 (0.486) and ESM3 (0.270). Even under heavy compression—using only 32 to 64 tokens to represent proteins hundreds of residues long—the model maintained a self-consistency RMSD (scRMSD) of 1.352 Å, indicating highly realistic and foldable structures.
For representation tasks, APT's fixed-size embeddings outperformed both ESM3 and DPLM2 on CATH fold classification when using non-linear probes. The authors also demonstrated zero-shot affinity maturation, using a weak binder's early tokens as a prefix and re-generating the tail to discover stronger binders without explicit task retraining.
Limitations and Future Directions
While APT excels at global structural tasks, the authors note that local tokenizers still hold an edge for precise local motif scaffolding (e.g., positioning an enzyme's active site). Additionally, like many models trained on synthetic AlphaFold data, APT exhibits a slight bias toward over-predicting alpha helices.
Currently, APT only models the $C_\alpha$ backbone. Because real-world drug design requires atomic-level precision, future iterations will need to incorporate full sidechain modeling. Ultimately, APT paves the way for multi-modal integration, where these global structural tokens can be seamlessly combined with protein sequences and natural language functional descriptions to create unified biological foundation models.
Summary updated