Towards Physics-Based Generalizable Convolutional Neural Network Models for Indoor Propagation

—A fundamental challenge for machine learning models for electromagnetics is their ability to predict output quantities of interest (such as ﬁelds and scattering parameters) in geometries that the model has not been trained for. Addressing this challenge is a key to fulﬁlling one of the most appealing promises of machine learning for computational electromagnetics: the rapid solution of problems of interest just by processing the geometry and the sources involved. The impact of such models that can “generalize” to new geometries is more profound for large-scale computations, such as those encountered in wireless propagation scenarios. We present generalizable models for indoor propagation that can predict received signal strengths within new geometries, beyond those of the training set of the model, for transmitters and receivers of multiple positions, and for new frequencies. We show that a convolutional neural network can “learn” the physics of indoor radiowave propagation from ray-tracing solutions of a small set of training geometries, so that it can eventually deal with substantially different geometries. We emphasize the role of exploiting physical insights in the training of the network, by deﬁning input parameters and cost functions that assist the network to efﬁciently learn basic and complex propagation mechanisms.


I. INTRODUCTION
Radio propagation modeling is a prerequisite for the efficient planning and management of any communication system [1].In indoor environments, propagation modeling can be utilized for the efficient placement of wireless access points (WAPs), for localization purposes, as well as for ensuring appropriate quality of service (QoS) to users.Typically, extensive measurement campaigns are performed to derive a propagation model.However, these are both labor intensive and site-specific; new measurements have to be taken to model a different environment.
As a result, site-general, empirical propagation models have been formulated, enabling approximate, yet fast propagation modeling in a variety of different indoor environments [2], [3].These models are based on a small number of input parameters, flexible and helpful for preliminary propagation studies.However, site-general models do not capture the wide range of wave propagation mechanisms present in an environment.In such cases, site-specific physics-based solvers, such as ray tracing (RT) and full-wave methods, can be used instead [4], [5].Such methods utilize detailed information about the geometry of the environment, to model all propagation mechanisms present.Thus, these models are highly accurate, especially when calibrated with measured data [6].However, their development requires a high level of relevant expertise and computational resources that can be prohibitive for real-time application.Moreover, small changes to the communication channel or the geometry necessitate new runs of the solver.
Machine learning (ML) methods offer an alternative route to formulating propagation models that can potentially combine the efficiency of empirical models with the accuracy of physics-based models [7]- [9].These methods are based on training a model, such as an artificial neural network (ANN), with measured and/or simulated data corresponding to various quantities of interest, such as path loss and received signal strength (RSS) [10]- [12].A fundamental challenge for such models is their ability to "generalize": to rapidly and accurately solve problems with specifications (geometry, position and type of transmitter/receiver (T x /R x ) antennas, frequency of operation) that are beyond those included in the training set.Such "generalizable" models will clearly have a profound impact on propagation modeling studies, overcoming the classical dichotomy between computational efficiency and accuracy that has dominated this area.
To achieve this goal, the model has to essentially "learn" the physics of radiowave propagation during training.Therefore, the challenge of generalizability includes three interconnected problems.The first problem is the choice of input parameters, in addition to the geometry itself, that can assist the training and generalizability of the model.For example, empirical path loss models include parameters such as the number of obstructions between the transmitter and the receiver that can be defined in any new environment [2].Naturally, such parameters are good candidates as inputs to a learned model.The second problem is the selection of a training set that is relatively compact, yet effective at "teaching" propagation physics to the model in a generalizable manner, without using an exhaustively large training set.Third, the model itself (the type of neural network employed) has to be computationally efficient.
In an effort to meet this fundamental challenge, we present ML models for indoor propagation that can generalize with respect to the geometry, position of transmitter and receiver and operating frequency.Our end goal is to produce models with "electromagnetic vision" [13], i.e. the ability to recognize the propagation characteristics of an environment based on its geometry and the source specification (transmitting antennas and frequency).
The most difficult component of this effort is the generalization with respect to the geometry.Networks that generalize with respect to the position to transmitters and receivers in a fixed environment have been demonstrated before [14], [15].To that end, we consider the three problems that are associated with the challenge of generalizability.First, we select a small set of input parameters inspired by the physics of radiowave propagation.For example, one of these parameters indicates whether the receiver is at line of sight (LoS) or not from the transmitter; another indicates the proximity of a receiver to a diffracting edge.We demonstrate that using these parameters as inputs to the model, along with the geometry, is a key to achieving generalizable models.Second, we build a training set, consisting of basic and complex geometries, that helps the model learn basic and complex indoor propagation phenomena.Third, we use a convolutional neural network (CNN) as our learning structure, driven by cost functions that are physics-informed.A flowchart of our work is shown in Fig. 1.For training, we use data generated by a shooting and bouncing ray (SBR) ray-tracer incorporating the imaging method to adjust the ray paths [16].The structure of the paper is as follows.In Section II, we give a brief overview of previous work on ML-based propagation models with emphasis on their generalizability, which is the main challenge that our paper is focused on.In Section III, we introduce our approach for the formulation of generalizable indoor propagation models and describe the data generation and training process.In Section IV, we present results regarding the generalizability of our ML model with respect to new transmitter/receiver positions and frequencies, yet within the training geometries.The generalizability of the trained CNN to new geometries is demonstrated successfully in Section V. We also show the important role of the physicsinspired parameters (added as inputs to the model) in the successful generalizability of the model.Summary and conclusions of our work are included in the final section.

II. ML-BASED PROPAGATION MODELS
A. Generalizability ML-based models, such as ANNs and CNNs, have been extensively used for propagation modeling over the past few years, in a variety of different environments [7], [17].ML models are usually trained by RSS measurements [18]- [20].Hence, their scope is often limited to propagation modeling in small-scale areas, where it is easier to collect an adequate volume of measured data.Most measurement-based ML models generalize with respect to different transmitter/receiver locations inside an already known geometry.This is the case in user localization applications [18], [21].Others are trained using data collected from specific user trajectories, and then tested on data from different routes that a user follows in user tracking scenarios [12], [20], [22], [23].The geometry remains fixed in these cases as well; the test routes are selected inside the same geometry.An exception can be found in [24], where measurements from many different types of outdoor areas (urban, semi-urban, rural) were used to train the ML model.
Training ML models requires a large volume of training data.Hence, creating highly generalizable propagation models using only measured data is an expensive and time-consuming process.Instead, the use of simulated data can enlarge training datasets at a cost that is significantly smaller to that of a measurement campaign.Thus, data generated by physicsbased methods, such as RT [14], [25]- [27], or other sources of data that are readily available (like satellite images in outdoor environments [28], [29]) have been used to train ML models.In indoor environments, where RT-based training is more extensively used, the availability of synthetic data offers more possibilities for geometry generalization.However, research so far has been restricted to specific geometries.For example, [25] presented an ML model trained with RT-generated RSS values in urban environments of uniformly and non-uniformly distributed buildings.However, the model was evaluated at different receiver points than those used for training, rather than in new geometries.A similar procedure was followed in [15], where the network was trained to generalize to new receiving points and frequencies in a fixed geometry.Likewise, in [14], the designed ANN was trained using RT-generated data inside two indoor environments.Then, it was tested on different receiving points in those specific geometries.

B. Input features
Many physics-based features have been used in MLbased propagation modeling in the past.Most of them are implementation-dependent [7].For example, if the model has to be used in a wide range of frequencies, a feature should account for the relationship of the output of the model to frequency.Others may indirectly connect the output of the ML model to a generalizable feature.For example, a feature defining whether a receiving point is at the line of sight (LoS) of the transmitter can indirectly account for the geometry (generalizable feature) or the complexity of the environment.
Most measurement-based papers use simple input features, such as the distance between T x and R x or the height of transmitting/receiving antennas [7].The same applies to papers that rely on path loss models to augment their dataset or use them as a benchmark to evaluate the accuracy of their ML model.The features used are similar to the ones used by the site-general, path loss models [1]- [3].These include the frequency, the distance and the number of floors between T x and R x and others.One of the features that can give useful information about the propagation environment is the path loss exponent, that can be calculated from tables based on the type of the indoor environment, such as an office or a corridor.However, this feature does not account for specific layouts of a given environment.
ML propagation models that are trained by simulated data usually incorporate additional input features that are solverspecific [26].For example, the model of [30] included parameters such as the number of reflected and diffracted rays that reach the receiver according to a ray-tracer.Moreover, a variety of different input features can be used to account for the geometry of the modeling environment.Those include features describing LoS conditions, transmission losses through walls, diffraction losses over edges, the position and the height of obstacles between the transmitter and the receiver [11], [27], [31], [32].While some of them are straightforward and easy to compute, such as the LoS points, others are more involved.For example, the authors of [31] used the reflection losses from walls and the orientation of walls relative to the receiving points, as computed via the appropriate reflection coefficients.Computing these parameters requires significant computation time that compromises the advantages of such a model compared to a standard ray-tracer.

C. ML model
Next, we discuss ML models that have been used in propagation modeling studies.Older propagation modeling papers used ANNs or simple ANN-based models, such as radial basis function (RBF)-ANNs [7].However, these networks do not exploit the parameter-sharing scheme of CNNs [33].The CNNs use 2-dimensional filters that share parameters, i.e. the same filter is applied to different parts of the input [33].This is an efficient way of learning mappings between geometry-encoding features and the output of the CNN.CNNs are more efficient than ANNs [18].Recently, they have been used to encode geometry-based information into their input channels [11], [18], [23], [34].Other ML models, such as RNNs, are more suitable and often used when modeling data with temporal dependencies [12].Finally, more complex ML models can be used, such as models that are based on ensemble methods [10].However, these models are more computationally intensive than CNNs.
In this paper we use the CNN as our ML model for two reasons.First, the parameter-sharing scheme of the CNN fits our goal of encoding the geometry in our input parameters.Second, CNNs strike an appealing balance between accuracy and efficiency.

III. PROPOSED APPROACH FOR GENERALIZABLE MODELS
This section describes our approach for building generalizable ML-based indoor propagation models.To that end, we address the following challenges: 1) Determining a set of input features that leads to generalizable propagation models, that can also deal with new geometries.2) Choosing training geometries that can help the ML model in its task of geometry generalization.3) Choosing an ML model that is computationally efficient and accurate.4) Choosing cost functions that account for the physics of propagation in an environment.In the following, we elaborate on these directions, introduce the solver used for generating our dataset, and explain our evaluation metrics.To begin with, we discuss the general function of an ML-based propagation model.The flowchart of the CNN-based propagation model is shown in Fig. 2. The ray-tracer is first configured based on input parameters, x RT , that include the coordinates of the receiving and transmitting points, the frequency, and other RTrelated parameters, such as the number of allowed reflections, diffractions and transmissions that a ray can undergo.Then, the solver computes RSS values, y, at the specified receiving points.These values are used as target values for the CNN, along with appropriately chosen input features x that are used as its input.The CNN is trained on the generated pairs of (x, y), aiming to minimize its loss function L(ŷ, y), where ŷ are its predicted RSS values.After training, the CNN

B. Geometry and RT configuration
The modeling environment consists of a small office, 15 m wide, 22 m long and 3 m in height.These dimensions remain fixed among the different geometries that are used to train and test the CNN.However, the placement of the inner walls differs in each one of them.The outer walls of the office, including the floor and ceiling, are concrete.The inner walls, separating the rooms, are made of plasterboard.They have a thickness of 0.02 m, a dielectric permittivity of 2.5 F/m and a conductivity of 0.03 S/m, while the outer walls are 0.02 m thick, have a permittivity of 9 F/m and a conductivity of 0.09 S/m.These values are typical of materials used in office environments.
We start by creating some basic geometries, horizontally and/or vertically placing up to 4 single walls.The goal of these simple geometries is to help the CNN learn basic wave propagation mechanisms, such as diffraction from an edge, reflection from and transmission through one or more walls.As an example, Fig. 3 illustrates two of these basic geometries.In total, 16 such geometries are used to train the CNN.We also add more complex geometries to the training dataset, such as the ones shown in Fig. 4.These geometries represent more realistic and complex scenarios for the CNN, aiming to help it learn multipath features of the communication channel.In total, 12 such geometries are created and added to the 16 basic ones.All training geometries are provided in Appendix I.
An in-house RT solver [16] is used to model radiowave propagation inside the various geometries created.The solver is based on the SBR method.It uses triangular cross-section ray tubes and the imaging method to adjust the ray paths, to determine whether rays may reach a receiver [35].The ray-tracer is configured after performing a convergence study.This is done by monitoring the convergence of the RSS values computed by the solver, as we increase the number of reflections, transmissions and diffractions accounted for per ray.The simulated RSS values converge after a number of six reflections and four transmissions.The same procedure is followed for the number of allowed diffractions, where using more than one has negligible impact on the simulated RSS values.
Both receiving and transmitting antennas are assumed to be vertically polarized half-wave dipoles.The transmit power is 15 dBm.The simulated RSS points lie along 2-dimensional grids (RSS maps) that can be defined as the set of points A = {R(x, y, z) : where z o is a constant value and x min , x max , y min , y max are the sampling limits along the x and y axis of the geometry, respectively.The dimensions of the grid are (n w , n l ) = (29,43), where n w is the number of grid points along the width of the office, and n l is the number of grid points along its length.The resulting RSS maps that the solver generates are used as a benchmark to evaluate the performance of the CNN.

C. Input Features
Propagation from the transmitter to a receiver is possible through direct, reflected, transmitted and diffracted waves.We include input features that are connected to these propagation mechanisms.In particular, we use the following input features: 1) the coordinates of the receiving and transmitting antennas inside the office; 2) the frequency of operation; 3) the number of obstructions between T x and R x ; 4) the presence of LoS at each receiving point; 5) the presence of a diffracting edge close to a receiving point; 6) the layout of the geometry of the environment.The first feature corresponds to as many input features as the number of transmitting or receiving coordinates that are trainable (not constant).Regarding the third feature, obstructions are the inner walls of each geometry.Generally, they can represent any object that intersects the line from T x to R x .Regarding the fifth feature, the closest to each diffracting edge receiving point is used.However, this is a hyperparameter that can be tuned.The first two features are fixed for each run of the solver, while the other four features are computed for each receiving point.As an example, a plot of these four features for the geometry of Fig. 4a is shown in Fig. 5.It should be noted that these features are computed on each horizontal plane, z = z o .Moreover, they are not part of the input to the ray-tracer, x RT , unlike the first two features.
Regarding the first two features, the transmitter is located at (x T = 0.25m, y T , z T = 2.5m), while the receiver is at (x R , y R , z R ).The range of their coordinates, as well as the range of the frequencies used, are listed in Table I.The features that vary, ξ = f, x R , y R , z R , y T , are sampled according to the following formula: where i = 0, 1, 2, ..., N ξ is an index to the i-th sample, ξ i , of a given input feature, N ξ is the total number of sampling points, and ξ min and ξ max is the minimum and maximum value of each feature, respectively.The increments of Table I are computed by setting the required number of sampling points N ξ for each feature in the fraction of Eq. ( 1).For the validation and test set, we use random samples of the input features, instead of selecting the samples in a deterministic way (as we did in Eq. ( 1)).The validation set is used for tuning the hyperparameters of the CNN, such as the number of layers, nodes per layer, and the learning rate.The test set is used to evaluate the CNN; it represents various propagation scenarios outside its training set.Each input feature is represented by a 2-dimensional input channel of the same size as that of the simulated grid of our geometry.Stacking the input channels on top of each other creates a 3-dimensional input tensor x t for a single sample to the CNN, i.e. for a sample that has constant input channels of z = z o , f = f o and y T = y T o .Its dimensions are (n w , n l , n c ) = (29,43,9), where n c is the number of different input channels used.Hence, a vertical slice along the input channels represents the input features for a single receiving point in space.An example of the 3-dimensional input to the CNN is shown in Fig. 6.The input tensor x t to the CNN is paired with its corresponding RSS map, a vector y containing n w × n l = 1247 RSS entries, one for each point in the 2dimensional grid.Then, all pairs of (x t , y) are passed on to the CNN for its training.

D. CNN
The specific architecture of the CNN is based on the computed error on the validation samples, while evaluating different sets of hyperparameters.These included varying numbers of convolutional layers and filters per layer, and the convolutional and padding stride [33].We selected 4 convolutional layers for the CNN, since the validation error of that architecture was very close to the error of deeper CNNs we tried, while also being faster to train.The architecture of the CNN is depicted in Fig. 7.Each hidden layer consists of a convolutional and an average pooling layer [33].The initial input to the CNN, a batch of RSS maps, is convolved with the filter parameters (weights) of the first layer.Batchnormalization [36], which normalizes the input into each layer based on the statistics (mean and variance) of each training batch, is applied to the convolutional output, followed by a tanh activation.The resulting activation (feature map) is passed through an average pooling layer, that is used to reduce the size of the input data.This is done by only keeping the average value of the sections of the feature map that the pooling layer is applied to.The output of the first layer is used as an input for the second layer.This process is repeated for every hidden layer, to generate the output of the forward pass of the CNN.Then, a backward pass will generate the weight increments for the filters of the network, to minimize its cost function.As shown in Fig. 7, the number of channels increase as we move deeper in the network, by using an increased number of filters.More specifically, we use 16, 32, 64 and 128 filters for each of the hidden layers, respectively.Finally, the output of the convolutional part of the CNN is flattened and passed through a single feed-forward layer of 23,760 nodes, which produces the final output of the network ŷ.The output has the same dimensions as its target y.
We also experiment with 3 different cost functions.First, we use an L 1 cost function: where |P| is a vector containing the target RSS values of the batch, | P| is the prediction vector of the network, || • || n corresponds to the n-norm, and N is the total number of receiving points of the batch.An L 2 cost function is also used: Finally, the third cost function is a modified L 2 cost function that penalizes differently LoS and nLoS receiving points.The L 2 cost function for the LoS points is computed as follows: where N LoS is the number of LoS receiving points.Likewise, the L 2 cost function of the nLoS points is: where N nLoS is the number of nLoS points.Then, a modified cost function, L 2, mod is defined as a weighted sum of the LoS and nLoS L 2 cost functions: This type of cost function is selected based on our intuition that nLoS points may be more difficult to optimize for.Finally, an L 2 regularization penalty term is applied to every cost function to combat overfitting.As an example, the final form of the L 2 cost function is: where λ is a hyperparameter that controls the regularization and w is a vector containing all the weights of the network.Finally, the CNN's training took less than an hour on a GTX 1080, whereas during test time, predictions were generated at real-time (< 1s).

E. Evaluation metrics
The predictions of the network are evaluated on the test set by computing the L 1 error (or mean absolute error (MAE)) of Eq. ( 2) over all test samples.Due to the strong multipath in the office environment, a comparison of fast-varying RSS values solely on an L 1 norm is not reliable.Hence, as an additional metric to quantify not only the deviations in the magnitude between the predicted and target RSS values, but also their features, the feature selective validation (FSV) algorithm is used [37].Succinctly, its three metrics are the amplitude difference measure (ADM), the feature difference measure (FDM) and the global difference measure (GDM).From a propagation perspective, a good ADM score corresponds to a good prediction of the slow fading profile of the signal and relevant parameters such as the path loss exponent.The FDM score represents the accuracy of the model with respect to fast fading effects.Apart from a single numerical value for each Fig. 7: The high-level CNN architecture from its input to the output.Regarding notation; s stands for stride, and p is the type of padding.Filter parameters are specified according to the form (f w × f h × f n ), where f w is the width of the filter, f h its height, and f n the number of filters used.
of the three metrics, the method includes a natural language interpretation of the ADM, FDM and GDM scores, as shown in Table II.More information about the FSV algorithm is provided in Appendix II.

IV. SIMULATION RESULTS: TRAINING GEOMETRIES A. Impact of cost functions
We first investigate how the different cost functions impact the accuracy of the CNN.This is done by training the CNN using the three cost functions described in Section III; the L 1 , L 2 and L 2,mod cost functions.Then, we evaluate the generalization abilities of the CNN at the 28 fixed geometries of Appendix I.This is done by computing the test MAE at different frequencies, receiving and transmitting points than those that the CNN is trained on.The results when minimizing the three cost functions are presented in Table III.The resulting differences between the test MAE when using the L 1 and L 2 cost functions are not large.However, the L 2 cost results in smaller FDM and subsequently GDM errors for the test samples.This shows that the CNN actually tries to learn more of the fast fading profile of the communication channel.This is expected, since the L 2 cost function penalizes larger errors more than the L 1 .For the case of the L 2,mod cost function, we vary w LoS to see how it affects the accuracy of the CNN.Figs.8a, 8b display the mean MAE, modified, LoS and nLoS L 2 errors for various values of w LoS , for the training and test samples, respectively.Theoretically, increasing w LoS penalizes the L 2 norm of the nLoS points, reducing their corresponding error.The LoS error increases on the other hand, as the network starts overfitting to the nLoS points.Hence, for the training cases, a trade-off exists between these two errors, as can be seen in Fig. 8a.However, the trade-off relationship between LoS and nLoS errors is not that clear for the test cases, as can be observed in Fig. 8b.The error of LoS points is easier for the network to be minimized.This can be deduced by the small reduction in the nLoS error for the training samples of Fig. 8a, as we increase w LoS .Moreover, as the network learns to minimize the nLoS error, it learns in the process helpful latent features (at its filters) that are also applicable for the LoS points.
The best results for the test geometries are achieved for w LoS = 0.3, i.e. assigning more weight for LoS than nLoS points.That may seem surprising, given the fact that nLoS points incur larger errors than LoS points, as can be seen in Fig. 8.However, the error of LoS points is easier for the network to minimize.Moreover, we are interested in the total MAE, irrespective of whether the point is LoS or not, and in the calculation of that specific metric, the ratio of LoS to nLoS points does not matter, contrary to the computation of the other losses.Finally, even if the differences between the observed MAE between the three cost functions are small, using the L 2,mod improves the FSV metrics even more.We will revisit the topic of the cost functions in the next section, when we will evaluate the CNN on unknown geometries.

B. Generalization for the training geometries
We now present additional results to showcase the generalization abilities of the CNN that was trained on minimizing the L 2,mod cost function for the case of w LoS = 0.3.The mean training and test MAE for that case have already been presented in Table III.As expected, the test error is higher than the training error, by about 1 dB.However, the network does not overfit to the training cases.This can be validated in Fig. 9  With respect to the changing transmitter location, the network is able to generalize its RSS predictions by capturing the dominant ray paths that are associated with the new locations, as shown in the predicted RSS maps of Figs.9a and Figs. 9c.The absolute deviation: between the target RSS map, P map , and the predicted map, Pmap , for these two test cases is shown in Figs.9b and Figs.9d, respectively.High-error points are usually located in areas where nLoS conditions exist.This observation motivated the search for another cost function to treat nLoS and LoS receiving points differently; in our case the L 2,mod cost function.
One of the areas of high-error points is also enclosed by a red  rectangle for the 1st test case.These error points are within a pillar, as can be seen in Fig. 4c, where RSS predictions are not needed.
To further evaluate the goodness of fit between the predicted and target data, we use the FSV method.Histograms of the FSV metrics are shown in Fig. 10.The mean ADM is very good, with most of the points having an "excellent" score.That is an indication that the predicted slow fading characteristics of the channel are very accurate.The FDM score, although not as low as the ADM, is labeled as "good".The network does not capture all the variations of the signal, hence, the worse performance of the CNN for this metric.A similar score is achieved for the GDM, further confirming an overall "good" agreement between the predicted and target RSS values.It is also important to note that the percentage of "poor" and "very poor" points is less than 7%.Moreover, the test ADM metrics are very close to the training ones.The difference between training and test MAE is due to fast fading effects, as shown by the difference between the training and test FDM scores.

V. SIMULATION RESULTS: GENERALIZATION TO NEW GEOMETRIES
In this Section, we investigate the generalization abilities of the network with respect to unknown geometries.To that end, we study 4 new geometries, shown in Fig. 11.All these geometries have the same outer size as the training geometries.However, the placement of the inner walls is different.The first geometry is similar to those included in the training set.Hence, we expect the test error for this geometry to be close to the training error.Geometries 2-4 are significantly different from those that were used to train the CNN.For example, geometry 2 includes multiple small partitions adjacent to each other, with no main hallway.Also, geometries 3 and 4 have a combination of vertical and horizontal partitions that is not encountered in the training set.Our goal is to show that the proposed CNN deals with these new geometries successfully.Moreover, we determine the key reasons behind this success and whether they are related to the input features we selected and the training geometries (basic and/or complex).

A. Generalization results for the new geometries
We test the trained CNNs on the 4 test geometries of Fig. 11.The mean MAE for all test cases, for the three different cost functions, is presented in Table IV.It is evident that using the L 2,mod improves the accuracy of the ANN for generalizing to new geometries.In our case, it improves the test MAE by about 0.4 dB compared to the L 1 cost, while having better FSV metrics than both L 1 and L 2 cost functions.The predicted versus target RSS maps for one test sample from each of the four geometries can be seen in Fig. 12.There is a generally good agreement between the actual and generated RSS maps, although some of the main ray paths are not captured.For example, in the actual RSS map of the 4th test geometry, there is strong reception in the rightmost upper and lower rooms of Fig. 11d.However, in the predicted RSS maps, the predicted RSS is overall lower.That is one of the reasons why this test geometry experiences the highest MAE among the 4 geometries.Like before, most high-error points are nLoS points behind walls.This can be also seen in Fig. 13, that contains maps of the absolute deviation of the predicted RSS map compared to the target RSS map.It is especially apparent for the 2nd test geometry, where most of the LoS points exhibit small errors, contrary to the nLoS points.

B. Impact of geometry-encoding input features
Features describing the environment and the physics of wave propagation in it, improve the ability of the ML model to generalize to unknown geometries.For that reason, we evaluate the relative contribution of each input feature, i.e. the features regarding the number of obstructions, LoS, diffraction and the geometry, to the accuracy of the CNN.To do so, we compute the absolute value of the weights among all the filters that multiply each of the corresponding input channels.Here, we use the CNN that is trained to minimize the L 2,mod cost function.The largest weights are assigned by the network to the filter channels that multiply the channel that encodes the number of obstructions.Second in importance is the channel defining the LoS receiving points.Interestingly, the importance of the input channel that encodes the geometry comes third, for two reasons.First, the outline of the inner walls can be indirectly deduced by the two highest in importance input features (LoS points and number of obstructions).Second, the network is asked to "learn" only 28 geometries during its training, whereas there are hundreds of different configurations of simulated receiver points for a single geometry.Regarding what the filters learn, the small size of them makes it difficult to interpret their values.However, some conclusions can still be deduced for the filters of the first layer that are larger in size.One such example is presented in Fig. 14 for eight of the filters of the first convolutional layer that are associated with the LoS input feature.These filters seem to learn transitions between high and low RSS values that are indicative of the presence of a wall.That, in turn, influences the LoS conditions of the receiving points.We also test how important the physics-based features are for geometry-generalization tasks.To that end, we remove them altogether and train the network only on the remaining features, on all 28 geometries.Then, the network is evaluated on the 4 test geometries.The results are summarized in Table VI.The test MAE and ADM for all cases are now higher than the respective cases using the additional geometryencoding features of Table V.The test MAE of the 2nd test geometry has especially seen a sharp increase.The FDM scores are also worse.Consequently, GDM metrics are worse.More importantly, the network is incapable of differentiating between the different propagation scenarios.This is shown in Fig. 15.Even though the two cases correspond to two different test geometries, the network cannot distinguish them.Thus, its output for the two test cases looks identical, and resembles only the target RSS map of the first geometry of Fig. 15a.This shows that geometry-encoding features are important in learning the various wave-propagation characteristics in an environment.

VI. CONCLUSION
We presented a CNN-based indoor propagation model that can generalize with respect to geometries defined by arbitrarily repartitioning an indoor space.In addition to generalizing with respect to new geometries, our model can deal with new transmitter/receiver locations and frequencies within a fixed bandwidth.Hence, this work advances the state of the art with respect to the key challenge of formulating ML models that can learn the physics of indoor propagation and rapidly solve new problems, well beyond those that they were trained for.An important aspect of our approach was that we used physical insights as we built the CNN model, selecting its input parameters and cost functions.Instead of relying on just the geometry, we added physics-inspired input parameters that proved to be critical in enabling the development of   APPENDIX II -THE FSV ALGORITHM [37] The FSV algorithm quantifies the difference between two datasets.The algorithm compares the datasets by decomposing their data into amplitude and feature information.This is done by Fourier transforming the data and then passing the transformed data through a low-pass and a high-pass filter.The cut-off point of these two filters can be determined empirically.The comparison between the low-pass filtered data of the two datasets, x lp,1 , x lp,2 determines the ADM score for a datapoint k according to: where N is the total number of datapoints.The mean ADM is computed by averaging the ADM scores over all datapoints.The FDM score is computed in a similar fashion, by involving the first derivatives of x lp,1 , x lp,2 , as well as the first and second derivatives of the high-pass filtered data x hp,1 , x hp,2 .Finally, the GDM combines the ADM and FDM for a datapoint k as: The final GDM score is the mean of GDM(k) over all k points.Generally, the ADM metric gauges the slow-changing features (envelopes) of the two signals.On the other hand, the FDM metric scores their fast-changing features.Finally, the algorithm assumes two 1-dimensional datasets.In our case, where the output RSS maps are by definition 2-dimensional, we extract the corresponding FSV scores by using line segments along x, of the form y = y o .There exist 29 such segments in total, containing 43 receiving points each (the number of sample points used along the length of the office).Hence, the reported values of ADM, FDM and GDM throughout the paper represent mean values over all those segments and across all samples.

Fig. 1 :
Fig. 1: The main function of the trained CNN-based propagation model.Given a geometry, a transmitting antenna location and receiving points at a given frequency, the CNN is tasked with generating RSS predictions at the specified receiving points.

Fig. 2 :
Fig. 2: The flowchart of the proposed CNN-based propagation model.
Fig. 3: 3-and 2-dimensional figures for two of the basic geometries.Also visible in the upper figures are the diffracting edges (in red) and the different type of materials of the inner and outer walls, in each one of them.
Fig. 4: 3-and 2-dimensional figures for two of the complex geometries.Also visible in the upper figures are the diffracting edges (in red) and the different type of materials of the inner and outer walls, in each one of them.

Fig. 5 :
Fig. 5: An example of the 2-dimensional representation of the geometry-based features on a horizontal plane for the geometry of Fig 4a.In clockwise order, the number of obstructions, the LoS points, the location of diffracting edges, and the geometry of the environment.The location of T x is noted with red.

Fig. 6 :
Fig.6: The 3-dimensional representation of the input features.Also visible is the simulation grid in the topmost channel.

Fig. 8 :
Fig. 8: Comparison between the MAE, L 2,mod , L 2,LoS and L 2,nLoS errors for various values of w LoS for the training and test samples.
that shows the predicted versus the target RSS maps for two sample test cases.Both of these correspond to test scenarios simulated in the geometry of Fig. 4a.For the first, y T = 9.18 m, f = 5.313 GHz and z R = 1.81 m.For the second, y T = 6.67 m, f = 5.282 GHz and z R = 1.38 m.
∆-map of the 2nd test case

Fig. 9 :
Fig. 9: A comparison between predicted and target RSS maps for two arbitrarily selected test cases utilizing the training geometries.The left plots represent the target RSS maps, while the right ones are the CNN's predictions.The location of T x is noted with red.

Fig. 12 :
Fig. 12: A comparison between predicted and target RSS maps for the four test geometries.The left plots represent the target RSS maps, while the right ones are the predictions of the CNN.The location of T x is noted with red.

Fig. 14 :
Fig. 14: Eight of the learned filters of the first hidden layer, that are associated with the LoS input feature.

Fig. 15 :
Fig. 15: A comparison between the predicted and target RSS maps for two test samples at different geometries, with no physics-based featuers.The right plots are the CNN's predictions, while the left ones represent the target RSS maps.The location of T x is noted with red.

Future
work will extend to further generalizing the geometries that the CNN can simulate (removing the need for generating geometries by repartitioning a fixed frame) and to integrating measured data in the training process.APPENDIX I -THE TRAINING GEOMETRIESHere we present the top-down view of the training geometries, both simple and complex, in Figs.16 and 17, respectively.

TABLE I :
RT-used variable input features

TABLE III :
Error metrics for the training geometries

TABLE IV :
Error metrics for the test geometries Also, the CNN that uses the L 2,mod cost function exhibits the smallest test MAE increase, compared to the test MAE of the training geometries of the previous section.The same is observed for the FSV metrics.Moreover, the maximum increase in the test MAE of about 0.5 dB, is observed for the L 1,mod cost function.This is a modest increase, considering that the geometries are very different from those of the training set.TableIVpresents the MAE for each test geometry separately, when the L 2,mod cost function is used.Regarding each test geometry, the 1st has the lowest MAE among the four.This is a result of that geometry being similar to the training ones.The test MAE for the 4rd geometry, 4.21 dB, is also comparable to the mean test error of the training geometries.The test MAE of the remaining geometries is within 0.4 dB of the error measured for the test geometries of Section IV.

TABLE V :
Error metrics: test geometries for the L 2,mod case

TABLE VI :
Error metrics without geometry-encoding features