3.1. Bacterial Isolation Procedures
The initial step in implementing AI approaches, such as ANNs models, involves the collection and preparation of the necessary dataset. In this study, 103 clinical and 73 environmental isolates were collected from hospitalized patients and various locations across seven hospitals in Golestan province, northern Iran, over a one-year period (2021 - 2022). The samples were selected randomly using the convenience sampling method. The sample size was determined at a 95% confidence level using the following formula, where P1 represents the number of samples suspected of infection or pollution, and P2 denotes the number of samples with a positive test (α = 0.05, β = 0.10) (Equation 1):
Wound and burn specimens were collected by trained nursing personnel using a sterile wet cotton swab or a 3 mm punch weighing 0.03 grams. Respiratory and spinal fluid samples were obtained by a specialist physician and transferred to the laboratory. Environmental samples were collected at ambient temperature using sterile swabs from surfaces such as park tables, swimming pools, wheelchairs (4 × 4), and soil. Subsequently, the samples were homogenized using a homogenizer (BioMaster-Stomacher, Seward, England), and 0.1 cc of the resulting suspension was cultured on CHROMagar Acinetobacter (CMA, Sigma-Aldrich, USA).
Following phenotypic tests based on standard microbiological and biochemical methods (
4), molecular identification and final confirmation of
A. baumannii isolates were performed. Genomic DNA was extracted using the boiling method, and PCR was conducted to identify the blaOXA-51 gene using forward and reverse primers: F: 5'-TAATGCTTTGATCGGCCTTG-3' and R: 5'-TGGATTGCACTTCATCTTGG-3' (
13,
14). After DNA extraction, it was crucial to ensure the absence of contamination by proteins or organic solvents. Once DNA purity was confirmed, a Control Mix, including primers and a probe, was added to the reaction mix before amplification. The PCR reaction was carried out in a final volume of 25 µL, consisting of 1 µL DNA sample, 1 µL of each primer, 12 µL of 2X Master Mix (containing 20 μM dNTP and 1.5 μM MgCl
2), and 11 µL of distilled water. The reaction was performed in a thermocycler (Eppendorf, Germany) with the following cycling conditions: Initial denaturation at 94°C for 5 minutes, followed by 30 cycles of denaturation at 94°C for 60 seconds, annealing at 55°C for 1 minute, extension at 72°C for 1 minute, and a final extension at 72°C for 10 minutes. The resulting PCR products were then electrophoresed on a 1.5% agarose gel. The detection of 353 bp fragments confirmed the presence of isolates (
Figure 1).
Pseudomonas aeruginosa ATCC 27853 was considered as negative control and
A. baumannii ATCC 19606 as positive control.
Polymerase chain reaction (PCR) amplification of the blaOXA-51 gene
Clinical characteristics, including age, gender, sample source (e.g., burn wound, spinal fluid, sputum, lung secretions, urine, tissue biopsy), hospital sampling department (e.g., ICU, infectious, neurology, obstetrics, and gynecology), and the type of antibiotic used, were collected. Environmental characteristics included the antimicrobial agent used (biocide/antibiotic), sampling location (e.g., park table, yard soil, yard pool, wheelchair), material of the sample environment (e.g., metal, plastic, concrete, rubber, soil, water), infection contact risk (i.e., high to very high, moderate to high, low to moderate), and sampling season (i.e., summer, fall, winter, spring).
To determine the minimum inhibitory concentrations (MICs) of antibiotics — ciprofloxacin (CIP5), cefepime (FEP30), meropenem (MEM10), ticarcillin-clavulanic acid (TCC75 + 10), colistin (CS50), amikacin (AN30), doxycycline (DO30), gemifloxacin (GEM5), trimethoprim sulfamethoxazole (SXT1.25 + 23.75), ticarcillin (TIC75) — and biocides — benzalkonium chloride (BZK), benzethonium chloride (BZT), and chlorhexidine digluconate (CLX) — the broth microdilution method was used according to the CLSI-2021 standard tables guide (
15). In brief, initial stock and two-fold serial dilutions of antibiotics and biocides were prepared, and 100 μL was inoculated into each well. The antibacterial effect of antimicrobials on the growth of all
A. baumannii isolates after 24 hours was determined using optical density (OD560) and a final concentration of 10
6 - 10
7 CFU/mL.
Pseudomonas aeruginosa ATCC27853 and
Escherichia coli ATCC 25922 were used as controls for the susceptibility tests.
Clinical variables were assumed as input features of isolates, and the AMR class (i.e., R, I, S) of each isolate according to the MIC was considered the target value in the dataset. Similarly, environmental variables were assumed as input features, and the MIC class (i.e., H, M, L) was considered the target value. Since sampling locations had various access conditions for patients, medical staff, and hospital visitors, the qualitative parameter of infection contact risk was defined with respect to the number of people using the place within the sampling time slot. The weight of hospital visitors was considered as 1, while the weight of medical staff and patients was considered as 2 and 3, respectively. The weighted average was extracted, and if it was 2 or greater, the infection contact risk was assumed to be high to very high; if it was between 1.5 and 2, the risk was assumed to be moderate to high; and if it was between 1 and 1.5, the risk was assumed to be low to moderate. This procedure was repeated on three different days, and the average value of these days was used to determine the infection contact risk. Among the 30 environmental isolates, 50% had a high to very high infection contact risk, while 36.7% and 13.3% had moderate to high and low to moderate contact risks, respectively.
In the input features, only age and hospitalization period had a numeric nature, while others were categorical. With this data arrangement, there were six input and one output column for the ANNs model developed for both clinical and environmental datasets. Among the collected clinical isolates, the majority belonged to females, with 17 isolates (57%), and considering age, the majority belonged to the over 60 years old group, with 14 isolates (46.5%). Regarding the sample source and hospital sampling ward, most isolates belonged to the infectious and burn wound departments, with 63.5% and 33.5%, respectively. As for environmental isolates, the majority were extracted from park tables, with 16 (53.5%) samples, and most of these isolates were collected in spring, with 11 (36.5%) samples.
Table 1 shows details of the input data features used for developing the ANNs model in this study.
| Names | Value Ranges |
|---|
| Input features a | |
| Sex | 0, 1 means male, female |
| Age (y) | 31 - 78 |
| Sample source | Burn wound, spinal fluid, sputum, pulmonary secretions, urine, tissue biopsy |
| Sampling place | ICU, infectious department , neurology, obstetrics and gynecology |
| Hospitalization period (d) | 2 - 13 |
| Antibiotic name | CIP5, FEP30, MEM10, ticarcilin-clavunic acid, CS50, AN30, doxcycycline, GEM5, trimethoprim sulfametha xazole, tikarcilin |
| Target variables a | |
| Response to antibiotic | 3 categories: R, I, S (resistant, intermediate, sensitive) |
| Input features b | |
| Name of biocide | BZK, BZT, CLX, CIP5, FEP30, MEM10, ticarcilin-clavunic acid, CS50, AN30, doxcycycline, GEM5, trimethoprim sulfametha xazole, tikarcilin |
| Category | Antibiotic, biocide |
| Sample source | Park table, yard soil, yard pool, wheelchair |
| Sample environment | Metal, plastic, concrete, rubber, soil, water |
| Infection contact risk | 2 = < high-very high; 1.5 = < moderate-high < 2; 1 = < low-moderate < 1.5 |
| Sampling season | Winter, fall, spring, summer |
| Target variables b | |
| Biocide/antibiotic dose | 3 categories: H, M, L (high, moderate, low) |
Abbreviations: CIP5, ciprofloxacin; FEP30, cefepime; MEM10, meropenem; CS50, colistin; AN30, amikacin; GEM5 gemifloxacin.
a Clinical isolates.
b Environmental isolates.
3.2. Developing Artificial Neural Networks Model
The ANNs are computational models inspired by the structure and function of biological neural networks in the human brain (
16). They consist of interconnected nodes, or neurons, arranged in layers: An input layer, one or more hidden layers, and an output layer (
17). Neurons receive input signals, apply an activation function to process them, and transmit the result to neurons in subsequent layers, as illustrated in
Figure 2.
Function of a single neuron in artificial neural networks (ANNs) model (18)
In ANNs, many such structures, as shown in
Figure 2, can be interconnected to form layers. Consequently, the output of a neuron
j in layer
l is computed as follows (Equation 2):
- zj(l)is the weighted sum of inputs to neuron j in layer l.
- wij(l)is the weight of the connection between neuron i in layer l - 1 and neuron j in layer l.
- ai(l-1) is the output of neuron i in layer l -1.
- bj(l) is the bias term for neuron j in layer.
The output
aj(l) of neuron j in layer l is obtained by applying an activation function f to the weighted sum of
aj(l) =
f (
zj(l)). There are such common activation functions as Sigmoid, Hyperbolic tangent (tanh), Rectified Linear Unit (ReLU), and Softmax (
19).
During training, the network learns by adjusting the weights and biases to minimize a predefined loss function, which measures the difference between the predicted output and the actual output of the data. The loss function is typically defined as the difference between the predicted output
and the true output
y, often supplemented with regularization terms to prevent overfitting. To mitigate overfitting, regularization techniques such as L1 and L2 regularization, dropout, and batch normalization are utilized (
19). These methods help ANNs generalize better to unseen data by reducing model complexity or introducing noise during the training phase. The weights are updated iteratively using an optimization algorithm such as gradient descent. This process of updating the weights along with biases based on the gradient of the loss function is known as backpropagation. Activation functions introduce non-linearity to ANNs, enabling them to learn complex patterns and relationships in data.
With respect to the already arranged datasets corresponding to the categories of clinical and environmental isolates, where three distinct classes have been determined for each category, the ANNs model was developed to predict these three distinct classes. The ANNs model developed for the clinical dataset predicts the response class of various antibiotics (i.e., R, I and S) to these isolates according to their characteristics. Likewise, the implemented ANNs model for the environmental isolates dataset classifies the effective biocide dose into three classes (i.e., H, M, and L) to disinfect the isolates. Moreover, the first dataset comprises six features, while the second one encompasses seventeen features, which must be considered as the input layer of the ANNs models. The architecture of the ANNs models is akin to the conceptual framework illustrated in
Figure 3.
Conceptual architecture of the artificial neural networks (ANNs) models for A, clinical isolates; and B, environmental isolates
Although environmental isolates initially comprised six input features, the corresponding conceptual ANNs model encompasses 17 features at the input layer, as shown in
Figure 3. An empirical approach revealed that employing a traditional ANNs model with a six-neuron input layer yields inadequate accuracy scores, primarily due to all six features being categorical. Consequently, dummy variables were employed. A dummy variable, also referred to as an indicator variable, is a binary variable used mostly in statistical analysis to represent categorical data, taking the values 0 or 1 to signify the absence or presence of a particular category or characteristic. Dummy variables are instrumental in effectively incorporating categorical predictors into models (
20). For instance, regarding the input feature of biocide name in the original environmental dataset, each of the 13 existing values was represented using a unique set of four-bit predictors. Hence, instead of a categorical feature for biocide name, a set of four new numerical features was introduced. This technique was applied to other categorical features of the environmental dataset, increasing the six categorical input features to 17 numeric features.
The determination of an optimal architecture for ANNs models is a critical aspect of developing predictive models in various domains. When designing an ANNs, researchers often face the challenge of balancing model complexity with performance. This necessitates careful consideration of the number of layers and neurons in each layer to ensure that the model effectively captures the underlying patterns in the data while avoiding overfitting (
21). One approach for deciding on the architecture of an ANNs model is to commence with a simple structure and gradually increase complexity as needed. This iterative process involves experimentation with different configurations of layers and neurons in each layer while monitoring the model’s performance (
22).
To calibrate the two ANNs models and determine their well-balanced architecture, a fine-tuning procedure was employed as a general approach, as follows:
- Defining metrics: Apart from several metrics such as accuracy, precision, recall, and F1-score, the primary metric considered was the accuracy of the models.
- Splitting the datasets: Each dataset was divided into two subsets: A training set and a test set. The training subset consists of 70% of the entire dataset, while the remaining 30% is used as the test set.
- Initializing model: In this step, the architectures of the models are defined, including the number of hidden layers, neurons per layer, and activation functions.
- Training the models: The training data is used to train the models. During training, the models learn to minimize the difference between their predictions and the actual target values.
- Evaluating performance of the models: Based on the chosen metric, which was accuracy, the models’ performance was assessed using the test subsets. The architecture or hyperparameters of the models should be adjusted according to the results as needed in an iterative manner.
- Finalizing the models: Once satisfied with the performance on the training and test subsets, the models can be considered final.
The calibration approach mentioned above was employed to determine the architecture of the ANNs in terms of the number of hidden layers and the number of neurons in each layer. Accordingly,
Figure 4 illustrates the number of hidden layers versus the accuracy of ANNs models for both clinical and environmental isolates.
Number of hidden layers versus accuracy score of artificial neural networks (ANNs) models during calibration process corresponding to A, environmental isolates; B, clinical isolates.
As shown in
Figure 4A, two hidden layers represent the optimal point to achieve the best accuracy score for the ANNs model developed for environmental isolates, while the optimal number of hidden layers for the ANNs model for clinical isolates could be any number equal to or greater than five, based on
Figure 4B. Although six hidden layers result in slightly better accuracy for clinical isolates, it was decided to use five hidden layers to reduce complexity and computation time without sacrificing significant accuracy.
The same approach was employed to determine the optimal number of neurons for each layer of both ANNs models. In this way, the number of utilized neurons in the first hidden layer of the developed ANNs model for environmental isolates was determined to be 34, as shown in
Figure 5A. The same approach was employed for the second hidden layer, leading to the choice of eight neurons. Similarly, for the ANNs model of clinical isolates, the number of neurons utilized in each of the five hidden layers was determined. According to
Figure 5B, the number 18 appeared to be a suitable choice for the number of neurons in the first hidden layer of this model. While selecting any number greater than 18 seems to yield a slightly more accurate result, the desire to avoid complexity in the model compelled us to opt for 18 as the optimal number of neurons in the first hidden layer. Following the same procedure described for the first hidden layer, the numbers 30, 18, 12, and 6 were identified as suitable numbers of neurons for the respective subsequent hidden layers.
Number of neurons in the first hidden layer versus accuracy score of developed Artificial neural networks (ANNs) models during the calibration process for A, environmental isolates; B, clinical isolates.
Figures 6 and
7 depict detailed versions of the conceptual ANNs models developed for environmental and clinical isolates, respectively, using the training dataset. As seen in
Figure 6, the developed ANNs model for environmental isolates had two hidden layers, containing 34 and 8 neurons for the first and second hidden layers, respectively. In comparison, the ANNs model for antibiotics is more complex and consists of five hidden layers, encompassing 18, 30, 18, 12, and 6 neurons, consecutively.
Table 2 summarizes the specifications of the software, libraries, operating system, and hardware used for implementing the ANNs model.
The final architecture of artificial neural networks (ANNs) model developed for environmental isolates
The final architecture of artificial neural networks (ANNs) model developed for clinical isolates
| Categories | Details |
|---|
| Software | Python (v3.9) |
| Libraries | TensorFlow (v2.4), Seaborn (v0.11.2), NumPy (v1.19), Pandas (v1.2), Matplotlib (v3.5.0), SKlearn (v1.1) |
| Operating system | Ubuntu 20.04 LTS |
| Hardware | NVIDIA GeForce RTX 3080, 16GB RAM, Intel Core i7 8th Gen Processor |