# One-Layer vs. Two-Layer SOM in the Context of Outlier Identification: A Simulation Study
## 1 Introduction  
The purpose of this paper was to apply stochastic simulation for a better understanding of the possibilities of outlier component detection in a Gaussian mixture using one- and two-layer Self Organizing Maps (SOMs). SOMs were developed by [PERSON] [1] as a tool to represent structures such as cortical layers in the brain as two- or three-dimensional maps. In more abstract terms, a SOM is a clustering technique that implies a reduction of the dimensionality to two or three dimensions, thus providing a visual description of the clustering. A priori, SOMs need not be related to a stochastic reality: it can be used within a deterministic framework. The first reference to SOMs was the seminal paper by [PERSON] [1], based on the work by [PERSON] [2] and [PERSON] [3] on competitive learning. The theoretical background was in the monograph by [PERSON] [4]. Two interesting and thorough reviews of SOMs can be found in [PERSON] [5] and [PERSON] [6]. The stochastic approaches started with [PERSON] [7] and [PERSON] and [PERSON] [8]; a more recent reference was [PERSON] et al. [9]. Deep SOMs were approached from a practical of view by [PERSON] et al. [10]. The relationship between SOMs and the EM algorithm was explored by [PERSON] [11], [PERSON] et al. [12], and [PERSON] [13]. Mixtures within the Bayesian framework were dealt with by [PERSON] and [PERSON], [PERSON] [14], [PERSON] and [PERSON] [15], and [PERSON] and [PERSON], [PERSON] [16]. Here, we formulated a stochastic data generating process by means of a mixture of Gaussian distributions, where one of the mixture components is a low-weight outlier. Given that in many real problems, it is interesting to keep a representation of the outlier in the map while respecting the essence of the standard SOM, we studied how the SOM is able to do so in some situations as simulated in our experiment and checked if our sense that two-layer SOMs would do better in such outlier representations and detection than one-layer ones, as well as an adequate \"between outlier component and remaining component distance\" representation, was correct. This would be achieved without penalizing an adequate representation of the nonoutlier components. To this end, we generated a stratified sample, in such way that we mixed in one stratum the outlying component and the one closest to it. Then, for the one-layer SOM, where the stratification is irrelevant, the outlying component would be diluted in the node corresponding to the stratum it shares with the neighboring (closest) component (due to the difference in frequencies, the statistic is more biased towards the closest component), or the nodes that could be seen as representative of the different components appear abruptly disconnected from each other, so distances are less well preserved. Due to the low frequency of the outlying component and its strong deviation with respect to the remaining components, there will be very few nodes associated with this component, and they will be updated very few times since there are few sample points belonging to that component. Its neighbors, on the contrary, will be updated much more often because they are far apart in the map and also because they will the winning nodes for other (no outlier) sample points. In the two-layer SOM, in the first intermediate layer, we built a map for each stratum and then used the nodes of these first-layer SOMs as the data for the second (and last layer) map. Then, since the stratum including the outlier will have several nodes associated with it in its first layer map, one of these nodes may adequately represent the outlying component. If so, it may receive a node of its own in the second (final) map. This way, it would have a higher chance of being represented than in a single-layer SOM. Thus, the two-layer model made the difference when we work with low-frequency components of very extreme values, because it provided more representative nodes in the intermediate layers.