## 2 Proposed Optimization Method  
The proposed optimization-oriented algorithm consists of two sequential phases: (i) constructing the initial configuration of implanted MIMO antennas by employing the hierarchy TDO method, and (ii) optimizing the included design parameters using the regression DNN where LSTM layers are employed. This section provides comprehensive explanations about the used two sequential methods for modeling and sizing the implanted MIMO antennas, automatically. Algorithm 1 (at the end of this section) briefly summarizes the employed optimization methods and the comprehensive flowchart of the proposed method is summarized in Figure 1.  
``` Phase I (TDO method)
1: Define the biological tissues and define the dielectric properties of each tissue;
2: Mount all the tissues over together with the sequence of bone, liquid, and plexiglass;
3: Design the MIMO antenna on the substrate and ground planes;
4: Determine the design parameters and specifications of the MIMO configuration;
5: Run parametric sweep for achieving the training and testing dataset for constructing DNN;
6: Achieve the optimal hyperparameters of the hidden layer using the BO method;
7: Train the LSTM-based regression DNN;
8: Predict the optimal design parameters by using the trained DNN. ### Top-Down Optimization for Configuring the Implanted MIMO Antenna

Providing the initial configuration for sizing the design parameters of antennas, especially implanted antennas, is an important task due to the complexity of designs. Hence, a strong method is required for designing and analyzing complicated designs. The top-down method is a hierarchy method where the design is broken into the smaller parts [17]. As the implanted antennas are the hierarchical designs, the TDO method can be an effective solution in generating the initial configuration. Figure 2 presents the hierarchy TDO method for generating the initial configuration of the implanted MIMO antenna. In this paper, we aim to design implanted MIMO antennas where biological tissues or their equivalent are mounted over them (Step-1). For top-optimization, the biomedical tissues as 'bone' and 'liquid' are employed that are covered by a 'plexiglass' layer (Step-2). Then the MIMO antenna is designed by setting the single antennas, feeding structures, substrate and ground plane. Afterwards, in the _bottom-optimization_ phase, any small partitions of MIMO antenna are arranged in order. Thus, this method tackles the difficulty of constructing the complex geometry of antenna designs and provides the initial configuration for sizing the design parameters (Step-3). Figure 1: Comprehensive graphical representation of the proposed method. Figure 2: Hierarchy top-down optimization for configuring the implanted MIMO antenna geometry (width and length are in mm; drawing not in scale). ### Regression DNN for Sizing the Design Parameters of Implanted MIMO Antenna

After generating the initial structure of the implanted MIMO antenna, determining the optimal design parameters is crucial leads to enhance their performance. For this case, deep learning approach is employed due to its suitable accuracy in modeling and predicting the various employed variables in the complex designs [16]. Figure 3 presents the proposed regression DNN in sizing the constructed implanted MIMO antenna in Section 2.1. As it is shown, each DNN structure includes input layer, hidden layers, and output layer. For our problem, the input layer features include the various design parameters presented in Table 1 and the output layer features predict the scattering parameters (S-parameters) and total active reflection coefficient (TARC) specifications in a large bandwidth (Step-4). The TARC is one the main characteristics used in MIMO designs which presents the total incident power to the total outgoing power as Equation (1) defines for zero phase weighting [18].