Flow Autoencoders are Effective Protein Tokenizers
Rohit Dilip, Evan Zhang, Ayush Varshney, David Van Valen
TL;DR
Kanzi introduces a flow-based protein structure tokenizer that operates directly on backbone coordinates and is trained with a flow matching loss, avoiding SE(3)-invariant components. The architecture uses a lightweight encoder, a diffusion decoder, and a finite quantization bottleneck to produce discrete tokens that condition a diffusion transformer, enabling high-quality reconstruction and scalable autoregressive generation. Across reconstruction and generation benchmarks, Kanzi matches or surpasses larger tokenizers with substantially less data and parameter count, and the autoregressive Kanzi-AR model achieves competitive designability and diversity, underscoring the viability of non-invariant tokenizers for protein modeling. The work also introduces the rFPSD metric for distribution-level reconstruction assessment and discusses limitations and avenues for extending tokenization to larger proteins and full-atom representations, with public code to support reproducibility and broader adoption.
Abstract
Protein structure tokenizers enable the creation of multimodal models of protein structure, sequence, and function. Current approaches to protein structure tokenization rely on bespoke components that are invariant to spatial symmetries, but that are challenging to optimize and scale. We present Kanzi, a flow-based tokenizer for tokenization and generation of protein structures. Kanzi consists of a diffusion autoencoder trained with a flow matching loss. We show that this approach simplifies several aspects of protein structure tokenizers: frame-based representations can be replaced with global coordinates, complex losses are replaced with a single flow matching loss, and SE(3)-invariant attention operations can be replaced with standard attention. We find that these changes stabilize the training of parameter-efficient models that outperform existing tokenizers on reconstruction metrics at a fraction of the model size and training cost. An autoregressive model trained with Kanzi outperforms similar generative models that operate over tokens, although it does not yet match the performance of state-of-the-art continuous diffusion models. Code is available here: https://github.com/rdilip/kanzi/.
