Higher-order epistasis drives evolutionary unpredictability toward novel antibiotic resistance
Antibiotics are among the most important discoveries in human history, enabling not only the treatment of bacterial infections but also complex medical interventions such as surgeries, organ transplants, and cancer therapies. However, antibiotic resistance has become a critical public health problem, rendering many antibiotics ineffective. In particular, the evolution of extended-spectrum beta-lactamases (ESBLs) threatens beta-lactams, the cornerstone of bacterial infection treatment. We investigated the evolution of TEM-1 beta-lactamase into ESBLs by constructing a combinatorial mutant library comprising all 55,296 possible TEM-1 variants generated from 18 clinical mutations across 13 residues. We obtained over 8,000,000 fitness values under both native (ampicillin) and novel (aztreonam) antibiotic selection, generating one of the largest fitness landscapes for beta-lactamases to date. Graph-theoretic and epistatic analyses revealed that ampicillin selection produced weak epistasis and predictable evolutionary trajectories, whereas aztreonam selection induced extensive higher-order epistasis, increasing phenotypic unpredictability. Machine learning analyses identified interpretable epistatic rules that shaped these fitness landscapes. Evolutionary statistics, including direct coupling analysis and latent generative landscapes, showed that top-performing ESBL variants followed conserved epistatic patterns observed in natural beta-lactamases. Our integrated experimental-computational framework provides a foundation for predicting ESBL evolution and quantifying the contributions of mutations to ESBL variants.