FoldToken4: Consistent & Hierarchical Fold Language

Zhangyang Gao, Cheng Tan, Stan Z. LibioRxiv 2024

Abstract

Creating protein structure language has attracted increasing attention in unifying the modality of protein sequence and structure. While recent works, such as FoldToken1, 2, and 3, have made great progress in this direction, the relationship between languages created by different models at different scales is still unclear. Moreover, models at multiple scales (different code space sizes, like $2^5, 2^6, \dots, 2^{12}$) need to be trained separately, leading to redundant efforts. We propose FoldToken4 to learn the consistent and hierarchical nature of multiscale fold languages. By introducing multiscale code adapters and token mixing techniques, FoldToken4 can generate multiscale languages from the same model and discover the hierarchical token-mapping relationships across scales. To the best of our knowledge, FoldToken4 is the first effort to learn multi-scale token consistency and hierarchy in VQ research, representing a significant advancement in protein structure language learning.

Introduction

In structural biology, researchers are increasingly treating protein structures as a language, utilizing Vector Quantization (VQ) to transform 3D coordinates into discrete "tokens" analogous to words in a sentence. However, previous iterations of this technology—FoldToken1, 2, and 3—faced a significant hurdle regarding scale. To obtain both a coarse representation (small codebook) for rapid searching and a detailed representation (large codebook) for high-fidelity reconstruction, researchers were forced to train entirely separate models.

These models lacked a shared semantic framework; a token in a coarse model had no inherent relationship to a token in a fine-grained model. This lack of hierarchy made it impossible to translate between scales without redundant computations. FoldToken4 addresses these challenges by introducing a unified framework that learns to represent protein structures across multiple levels of detail simultaneously within a single model.

Methodology

FoldToken4 achieves multiscale consistency through four primary architectural innovations:

  1. Scale-aware Code Adapters: Instead of separate models, FoldToken4 uses a shared encoder (BlockGAT) to map protein features into a universal semantic space. "Adapters" then project masked binary codes of varying lengths (representing codebook sizes from $2^5$ to $2^{12}$) into this same space.
  2. Multiscale Mix-Token Training: During training, the model is exposed to different scales simultaneously. This "token mixing" forces the shared encoder and decoder to find a consensus across all levels of granularity, ensuring that the semantic meaning of a protein region remains consistent regardless of the bit-depth.
  3. Token Transition Matrices: By calculating the similarity between code embeddings across scales, the authors create a transition matrix. This allows for "zero-shot" translation, where a high-resolution 12-bit token can be instantly mapped to its 5-bit "parent" token without re-processing the data.
  4. Efficient SE-(3) Decoder: A simplified, plug-and-play SE-(3) frame-passing layer allows the model to be trained on the entire Protein Data Bank (PDB) in just one day using 8 NVIDIA-A100 GPUs.
Evolution of the FoldTokenizer architecture from version 1 to 4, highlighting the introduction of BlockGAT and Scale-aware Code Adapters.

Experimental Results

The model was trained on 162,000 proteins from the PDB and evaluated on several benchmarks, including T493, T116, and N128 (novel proteins released post-AlphaFold3).

As shown in the performance table, FoldToken4 (FT4) achieves reconstruction quality—measured by TMscore and RMSD—comparable to FoldToken3 and even the much larger ESM3 model, despite the added complexity of learning multiple scales at once. Notably, FT4 maintains high performance across all tested codebook sizes, from 32 to 4096 tokens. The results demonstrate that the model is robust across different datasets and scales, effectively balancing compression and structural detail.

Quantitative comparison of FoldToken4 against previous versions and ESM3 across multiple datasets and codebook scales.

Discussion and Key Insights

A primary discovery of this work is the emergence of a natural hierarchy. By forcing different scales into one semantic space, coarse tokens (e.g., codebook size 32) naturally capture the global fold or "gist" of the protein, while fine tokens (codebook size 4096) fill in secondary structure details like alpha-helices and beta-sheets. This efficiency allows FoldToken4 to reconstruct recognizable protein structures using as few as 32 "words."

Furthermore, FoldToken4 is remarkably parameter-efficient. With only 9.2M parameters—roughly 1/70th the size of the ESM3 model—it achieves competitive reconstruction performance. It is also the first in the series to effectively handle multi-chain protein complexes (evaluated on the M1031 dataset), proving that discrete codebooks can represent intricate protein-protein interfaces.

Conclusion and Future Work

FoldToken4 successfully unifies multiscale protein structure representation into a single, efficient model. While it faces some limitations, such as reduced performance on very short proteins (<30 residues) and a slight performance "tax" for its generalist nature, it provides a powerful foundation for future structural biology tasks. Future research will likely explore applying these hierarchical tokens to generative "coarse-to-fine" protein design, potentially revolutionizing how we engineer complex biological structures.

Summary updated

BibTeX
@misc{gao2024foldtoken,
  author = {Zhangyang Gao and Cheng Tan and Stan Z. Li},
  title = {{FoldToken4: Consistent \&amp; Hierarchical Fold Language}},
  year = {2024},
  doi = {10.1101/2024.08.04.606514},
  howpublished = {bioRxiv},
}
Figure