Manuscript Offprint

arXiv:2610.19738

ProtModernBERT: Compute-Efficient Protein Language Modeling

Alberto Martínez, Natalia Flechas Manrique, Llorenç Espinosa-Portalés, Luc Andrea

Alberto Martínez 1,†^{1,\dagger}, Natalia Flechas Manrique 1,†^{1,\dagger}, Llorenç Espinosa-Portalés 1,∗^{1,*}, and Luc Andrea 2^{2}

Abstract—Large protein language models provide a powerful framework for learning sequence-function relationships and guiding experimental design. However, architectural improvements are underexplored, especially in low-compute regimes of relevance for resource-constrained research laboratories. We show that the training cost for encoder-only transformer architectures can be reduced by leveraging modern architectural refinements, offering an encouraging performance / compute-efficiency trade-off. We introduce PROTMODERNBERT, a modernized BERT-style model pre-trained on amino acid sequences, and compare it with PROTBERT, AMPLIFY, and ESM2 across a set of supervised structural tasks — encompassing secondary structure prediction, disorder prediction, and subcellular localization — and ProteinGym's zero-shot functional benchmark. We find that PROTMODERNBERT matches or closely tracks the performance of AMPLIFY-120M and PROTBERT with up to 80-90% reduction in pre-training FLOPs, and narrows the gap to ESM2 when controlling for pre-training. Our analysis using a cluster-based validation protocol for hyperparameter selection and randomly initialized models disentangles the contributions of architecture and data, showing that modern components provide stronger inductive biases that are more consequential than parameter count in low-compute regimes.

Index Terms—protein language models, computational biology, efficient pre-training

I. INTRODUCTION

Transformer-based architectures [1], [2] have been a crucial innovation for both predictive and generative modeling across multiple disciplines (e.g. [3]–[5]). The similarity between protein sequences and natural language —where amino acids function as a finite vocabulary forming higher-order functional structures [6], [7]—suggests that both domains are amenable to similar modeling techniques. Consequently, models such as PROTBERT [8], ESM2 [9], and AMPLIFY [10] have successfully repurposed transformer designs for sequence-function prediction. We extend this trajectory by introducing ProtModernBERT, investigating whether recent architectural refinements can further reduce pre-training compute without degrading downstream performance.

Architectural innovations for language models have been the focus of intensive research aimed at improving both performance and efficiency. Notable examples include rotary positional embeddings as an alternative to absolute positional encodings [11], improvements to the attention mechanism such as FlashAttention [12], as well as revised normalization strategies and activation functions. While these advances have been critical for scaling modern LLMs, earlier architectures such as BERT [2], which remains widely used in industrial settings, have also been revisited and updated to incorporate these improvements, most notably in ModernBERT [13]. Importantly, recent work on genomic foundation models has suggested that downstream performance is not determined by pre-training scale alone, and that architectural choices can provide strong inductive biases even in randomly initialized models [14]. In this spirit, we seek to update PROTBERT [8] into a modernized variant, PROTMODERNBERT.

By introducing PROTMODERNBERT, which is a ModernBERT-derived encoder pre-trained on the UR100P corpus, we investigate whether recent architectural refinements can reduce pre-training compute for protein language models (PLMs) without degrading downstream performance. To this end, we compare it against PROTBERT, AMPLIFY, and ESM2 under both pre-trained and randomly initialized (randinit) conditions. These models span different architectural and training choices while remaining widely adopted benchmarks in the field. PROTBERT represents the adaptation of the BERT-style masked language modeling paradigm to protein sequences; ESM2 is a state-of-the-art transformer model extensively validated across diverse downstream biological tasks; and AMPLIFY emphasizes training efficiency and modern architectural refinements. Together, they provide a meaningful basis for comparison in terms of architectural design, computational efficiency, and downstream performance.

In our findings, we observe that across DeepLoc and secondary-structure benchmarks, PROTMODERNBERT matches or closely tracks the performance of PROTBERT and AMPLIFY-120M despite using substantially fewer pre-training FLOPs, and narrows the gap to ESM2 once we control for pre-training. In addition, we adopt a more principled dataset partitioning strategy for pre-training, which reduces information leakage and better reflects realistic generalization scenarios. As part of this comparison, we also examine the role of rotary positional embeddings and other ModernBERT-style components in protein sequence modeling. As we will discuss later on, we do not observe consistent accuracy improvements from RoPE under our pre-training budget.

Finally, our experiments highlight that secondary structure prediction remains a challenging task for current PLMs. Despite architectural and training improvements, performance gains on secondary structure datasets are limited, suggesting that additional inductive biases or task-specific supervision may be necessary to better capture structural information. At the same time, tasks such as disorder prediction appear closer to saturation, with comparatively smaller gains from pre-training and modest separation between architectures, underscoring the task-dependent impact of both architecture and pre-training compute.

1^{1} Multiverse Computing, Parque Científico y Tecnológico de Gipuzkoa, Paseo de Miramón 170, 20014 Donostia-San Sebastián, Spain.

2^{2} Multiverse Computing, 7 rue de la Croix Martre, 91120 Palaiseau, Paris, France

†^{\dagger} These authors contributed equally to this work.

References (24)