Gram-negative bacteria exhibit more antibiotic resistance than gram-positive bacteria due to their cell wall structure and composition differences. Porins, or protein channels in these bacteria, can allow small, hydrophilic antibiotics to diffuse, affecting their susceptibility. Mutations in porin protein genes can also impair antibiotic entry. Predicting drug-gene associations of extended-spectrum beta-lactamases (ESBLs) is crucial as they confer resistance to beta-lactam antibiotics, challenging the treatment of infections. This aids clinicians in selecting suitable treatments, optimizing drug usage, enhancing patient outcomes, and controlling antibiotic resistance in healthcare settings. Graph-based neural networks can predict drug-gene associations in periodontal infections and resistance. The aim of the study was to predict drug-gene associations of ESBLs in periodontal infections and resistance. The study focuses on analyzing drug-gene associations using probes and drugs. The data was converted into graph language, assigning nodes and edges for drugs and genes. Graph neural networks (GNNs) and similar algorithms were implemented using Google Colab and Python. Cytoscape and CytoHubba are open-source software platforms used for network analysis and visualization. GNNswere used for tasks like node classification, link prediction, and graph-level prediction. Three graph-based models were used: graph convolutional network (GCN), Graph SAGE, and graph attention network (GAT). Each model was trained for 200 epochs using the Adam optimizer with a learning rate of 0.01 and a weight decay of 5e-4. The drug-gene association network has 57 nodes, 79 edges, and a 2.730 characteristic path length. Its structure, organization, and connectivity are analyzed using the GCN and Graph SAGE, which show high accuracy, precision, recall, and an F1-score of 0.94. GAT's performance metrics are lower, with an accuracy of 0.68, precision of 0.47, recall of 0.68, and F1-score of 0.56, suggesting that it may not be as effective in capturing drug-gene relationships. Compared to ESBLs, both GCN and Graph SAGE demonstrate excellent performance with accuracy, precision, recall, and an F1-score of 0.94. These results indicate that GCN and Graph SAGE are highly effective in predicting drug-gene associations related to ESBLs. GCN and Graph SAGE outperform GAT in predicting drug-gene associations for ESBLs. Improvements include data augmentation, regularization, and cross-validation. Ethical considerations, fairness, and open-source implementations are crucial for future research in precision periodontal treatment.