A Two-Stage ESM-Based Machine Learning Pipeline for Robust Hierarchically Evaluated Enzyme Function Prediction
Related Experiment Video
Updated: Oct 31, 2026

A Protocol for Computer-Based Protein Structure and Function Prediction
Published on: November 3, 2011
1Division of Biotechnology and Applied Microbiology, Department of Process and Life Science Engineering, Faculty of Engineering, Lund University, SE-221 00 Lund, Sweden.
Abstract:
Accurate enzyme annotation remains a major bottleneck in translating rapidly growing protein sequence data into biological knowledge. Enzyme Commission (EC) prediction is particularly challenging because enzyme functions are organized hierarchically, annotations are often imbalanced across classes, and sequence similarity alone may be insufficient to resolve functional differences. To address these challenges, we developed ESM-ECForest, a 2-stage framework that combines protein embeddings generated by the pretrained language model ESM-2 (Evolutionary Scale Modeling 2) with random forest classifiers. The first stage distinguishes enzymes from nonenzymes, whereas the second assigns one or more EC numbers to proteins predicted to be enzymatic. On an external benchmark comprising 25,778 protein sequences, ESM-ECForest achieved competitive weighted F1 scores among the evaluated off-the-shelf methods, decreasing from 0.94 at Level 1 to 0.90 at Level 4. The largest relative improvements were observed for lyases (EC 4), ligases (EC 6), and translocases (EC 7), although EC 6 and EC 7 remained the most difficult classes internally. Uniform manifold approximation and projection of the ESM-2 embedding space showed clustering patterns that broadly reflected enzyme functional relationships, suggesting that the pretrained representations capture functionally relevant information. These results support the use of pretrained protein language model embeddings as an effective foundation for enzyme annotation. By combining pretrained protein representations with a lightweight supervised classifier, ESM-ECForest provides a scalable approach for EC prediction and may facilitate functional annotation of proteins from large microbial genomic and metagenomic datasets within the taxonomic and EC-label space represented during model development.