Antibiotic resistance threatens to return medicine to a pre-antibiotic era. This research uses machine learning to study how bacteria balance resistance to antibiotics and bacteriophages. By revealing genetic trade-offs between attack and defense, the work enables smarter combination therapies that exploit bacterial weaknesses and prevent otherwise deadly infections.