1 Introduction
In many realworld applications, data cannot be described by a fixed set of numerical attributes. This is the case, for instance, when data are described by categorical variables or by relations between objects (i.e., persons involved in a social network). A common solution to address this kind of issue is to use a measure of resemblance (i.e., a similarity or a dissimilarity) that can handle categorical variables, graphs or focus on specific aspects of the data, designed by expertise knowledge. Many standard methods for data mining have been generalized to non vectorial data, recently including prototypebased clustering. The recent paper
[6]provides an overview of several methods that have been proposed to tackle complex data with neural networks.
In particular, several extensions of the SelfOrganizing Maps (SOM) algorithm have been proposed. One approach consists in extending SOM to categorical data by using a method similar to Multiple Correspondence Analysis, [5]. Another approach uses the median principle which consists in replacing the standard computation of the prototypes by an approximation in the original dataset. This principle was used to extend SOM to dissimilarity data in [15]. One of the main drawbacks of this approach is that forcing the prototypes to be chosen among the dataset is very restrictive; in order to increase the flexibility of the representation, [3] propose to represent a class by several prototypes, all chosen among the original dataset. However this method increases the computational time and prototypes still stay restricted to the original dataset, hence reflecting possible sampling or sparsity issues.
An alternative to medianbased algorithms relies on a method that is close to the classical algorithm used in the Euclidean case and is based on the idea that prototypes may be expressed as linear combinations of the original dataset. In the kernel SOM framework, this setting is made natural by the use of the kernel that maps the original data into a (large dimensional) Euclidean space (see [16, 1] for online versions and [2] for the batch version). Many kernels have been designed to handle complex data such as strings, nodes in a graphs or graphs themselves [10].
More generally, when the data are already described by a dissimilarity that is not associated to a kernel, [12, 18, 11] use a similar idea. They introduce an implicit “convex combination” of the original data to extend the classical batch versions of SOM to dissimilarity data. This approach is known under the name “relational SOM”. The purpose of the present paper is to show that the same idea can be used to define online relational SOM. Such an approach reduces the computational cost of the algorithm and leads to a better organization of the map. In the remaining of this article, Section 2 describes the methodology and Section 3 illustrates its use on simulated and realworld data.
2 Methodology
In the following, let us suppose that input data, , …, , from an arbitrary input space are given. These data are described by a dissimilarity matrix such that is non negative (), symmetric () and null on the diagonal (). The purpose of the algorithm is to map these data into a low dimensional grid composed of units which are linked together by a neighborhood relationship . A prototype is associated with each unit in the grid. The prototypes are initialized either randomly among the input data or as random convex combinations of the input data.
In the Euclidean framework, where the input space is equipped with a distance, the matrix is the distance matrix with entries . In this case, the online SOM algorithm iterates

an assignment step: a randomly chosen input is assigned to the closest prototype denoted by according to shortest distance rule

a representation step: all prototypes are updated
where is the training parameter.
In the more general framework, where the data are known through pairwise distances only, the assignment step cannot be carried out straightforwardly since the distances between the input data and the prototypes may not be directly computable. The solution introduced in [18] consists in supposing that prototypes are convex combinations of the original data, with and . If denotes the vector , the distances in the assignment step can be written in terms of and only:
According to [18], the equation above still holds if the matrix is no longer a distance matrix, but a general dissimilarity matrix, as long as it is symmetric and null on the diagonal. A generalization of the batch SOM algorithm, called batch relational SOM, which holds for dissimilarity matrices is introduced in [18].
The representation step may also be carried out in this general framework as long as the prototypes are supposed to be convex combinations of the input data. Hence, using the same ideas as [18], we introduce the online relational SOM, which generalizes the online SOM to dissimilarity data. The proposed algorithm is the following:
In the applications of Section 3, the parameters of the algorithm are chosen according to [4]: the neighborhood
decreases in a piecewise linear way, starting from a neighborhood which corresponds to the whole grid up to a neighborhood restricted to the neuron itself;
vanishes at the rate of . Let us remark that if the dissimilarity matrix is a Euclidean distance matrix, relational online SOM is equivalent to the classical online SOM algorithm, as long as the input data contain a basis of the input space .As explained in [8], although batch SOM possesses the nice properties of being deterministic and of usually converging in a few iterations, it has several drawbacks such as bad organization, bad visualization, unbalanced classes and strong dependence on the initialization. Moreover, the computational complexity of the online algorithm may be significantly reduced with respect to the batch algorithm. For one iteration, the complexity of the batch algorithm is , while for the online algorithm it is . However, since the online algorithm has to scan all input data, the number of iterations is significantly larger than in the batch case. To summarize, if is the number of iterations for batch relational SOM and is the number of iterations for online relational SOM, the ratio between the two computation times will be .
For illustration, let us consider 500 points sampled randomly from the uniform distribution in
. The batch version of relational SOM and the online version of relational SOM were performed with identical 10x10 grid structures and identical initializations. Results are available in Figure 1. Batch relational SOM converged quickly, in 20 iterations (the grid organization is represented at iterations 0 (random initialization), 5, 9, 13, 17 and 20), but the map is not well organized. Online relational SOM converged in less than 2500 iterations (the grid organization is represented at iterations 0 (initialization), 500, 1000, 1500, 2000 and 2500), but the map is now almost perfectly organized. This results was achieved in 40 minutes for the batch version and in 10 minutes for the online version on a netpc (with GHz AMD processors and 4Go RAM).Batch relational SOM (20 iterations) 
Online relational SOM (2500 iterations) 
3 Applications
This section presents several applications of the online relational SOM on various datasets. Section 3.1 deals with simulated data described by numerical variables, but organized on a non linear surface. Section 3.2 is an application on a real dataset where the individuals are described by categorical variables. Finally, Section 3.3 is an application to the clustering of nodes of a graph.
3.1 Swiss roll
Let us first use a toy example to illustrate the stochastic version of relational SOM. The simulated data is the popular Swiss roll, a twodimensional manifold embedded in a threedimensional space. This example has already been used for illustrating the performances of Isomap [20]. The data has the shape illustrated by Figure 2. 5 000 points were simulated. However, since all methods presented here work with matrices of pairwise distances, the computation times would have been rather heavy for 5 000 points. Hence, we run the different algorithms on 1 000 points uniformly distributed on the manifold. First, the distance matrix was computed using the geodesic distance based on the rule with . Then, two types of algorithms were performed: multidimensional scaling and selforganizing maps. The results obtained with Isomap [20] are available in Figure 2. As expected, both methods succeed in unfolding the Swiss roll and the results are very similar. Next, batch median SOM and online relational SOM were applied to the dissimilarity matrix computed with the geodesic distance. As shown in Figure 3, the size of the map plays an important role in unfolding the data. For squared grids, the problem is not completely solved by either of the two algorithms. Nevertheless, online relational SOM manages to project the different scrolls of the roll into separate regions on the map. Moreover, some empty cells highlight the roll structure, which is not completely unfolded but rather projected without overlapping. Since squared grids appeared too heavily constrained, we also tested rectangular grids. The results are better for both algorithms which both manage to unfold the data. However, the online version clearly outperforms the batch version.
a) 15x15grid batch median SOM  b) 15x15grid online relational SOM 
c) 30x10grid batch median SOM  b) 30x10grid online relational SOM 
3.2 Amazonian butterflies
This data set contains 465 input data and was previously used by [13] to demonstrate the synergy between DNA barcoding and morphologicaldiversity studies. The notion of DNA barcoding comprises a wide family of molecular and bioinformatics methods aimed at identifying biological specimens and assigning them to a species. According to the vast literature published during the past years on the topic, two separate tasks emerge for DNA barcoding: on the one hand, assign unknown samples to known species and, on the other hand, discover undescribed species, [7]. The second task is usually approached with the Neighbor Joining algorithm [19]
which constructs a tree similar to a dendrogram. When the sample size is large, the trees become rapidly unreadable. Moreover, they are quite sensitive to the order in which the input data are presented. Let us also mention that unsupervised learning and visualization methods are used to a very limited extent by the DNA barcoding community, although the information they bring may be quite useful. The use of selforganizing maps may be quite helpful in visualizing the data and bringing out clusters or groups of clusters that may correspond to undescribed species.
DNA barcoding data are composed of sequences of nucleotides, i.e. sequences of “a”, “c”, “g”, “t” letters in high dimension (hundreds or thousands of sites). Specific distances and dissimilarities such as the Kimura2P ([14]) are usually computed. Hence, since the data is not Euclidean, dissimilaritybased methods appear to be more appropriate. Recently, batch median SOM was tested in [17] on several data sets, amongst which the Amazonian butterflies. Although median SOM provided encouraging results, two main drawbacks emerged. First, since the algorithm was run in batch, the organization of the map was generally poor and highly depending on the initialization. Second, since the algorithm calculates a prototype for each cluster among the dataset, it does not allow for empty clusters. Thus, the existence of species or groups of species was difficult to acknowledge. The use of online relational SOM overcomes these two issues. As shown in Figure 4, clusters are generally not mixing species, while the empty cells allow detecting the main groups of species. The only mixing class corresponds to a labeling error. Unsupervised clustering may thus be useful in addressing misidentification issues. In Figure 4b, distances with respect to the nearest neighbors were computed for each node. The distance between two nodes/cells is computed as the mean dissimilarity between the observations within each class. A polygon is drawn within each cell with vertices proportional to the distances to its neighbors. If two neighbor prototypes are very close, then the corresponding vertices are very close to the edges of the two cells. If the distance between neighbor prototypes is very large, then the corresponding vertices are far apart, close to the center of the cells.
a) Species diversity (radius proportional to the size of the cluster)  b) Distances between prototypes 
3.3 Political books
This application uses a dataset modeled by a graph having 105 nodes. The nodes are books about US politics published around the time of the 2004 presidential election and sold by the online bookseller Amazon.com. Edges between two nodes represent frequent copurchasing of the two books by the same buyers. The graph contains 441 edges and all nodes are labeled according to their political orientation (conservative, liberal or neutral). The graph has been extracted by Valdis Krebs and can be downloaded at http://wwwpersonal.umich.edu/~mejn/netdata/polbooks.zip.
Online relational SOM was used to cluster the nodes of the graph, according to the length of the shortest path between two nodes, which is a standard dissimilarity measure between nodes in a graph. Figures 5 and 6 (left) provide two representations of the “political books” network: the first one is the original graph displayed with a force directed placement algorithm, which is the one described in [9]
and colored according to the clusters in which the nodes are classified. The second one is a simplified representation of the graph on the grid, where each node represents a cluster. The colors in the first figure and the density of edges in the second one shows that the clustering has a good organization on the grid, according to the graph structure: groups of nodes that are densely connected are classified in the same or in close clusters whereas groups of nodes that are not connected are classified apart.
Additionally, Figure 6
provides the distribution of the node labels inside each cluster for the obtained clustering (on the right hand part of the figure). Almost all clusters contain books having the same political orientation. Clusters that contain books with multiple political orientations are in the middle of the grid and include neutral books. Hence, this clustering can give a clue on a more subtle political orientation than the original labeling: for instance, liberal books from cluster 12 probably have a weaker commitment that those from clusters 1 or 2.
4 Conclusion
An online version of relational SOM is introduced in this paper. It combines the standard advantages of the stochastic version of the SOM (better organization and faster computation) with the relational SOM that is able to handle data described by a dissimilarity. The algorithm shows good performances in projecting data described either by numerical variables or by categorical variable, as well as in clustering the nodes of a graph.
References
 [1] Andras, P.: KernelKohonen networks. International Journal of Neural Systems 12, 117–135 (2002)
 [2] Boulet, R., Jouve, B., Rossi, F., Villa, N.: Batch kernel SOM and related laplacian methods for social network analysis. Neurocomputing 71(79), 1257–1273 (2008)
 [3] ConanGuez, B., Rossi, F., El Golli, A.: Fast algorithm and implementation of dissimilarity selforganizing maps. Neural Networks 19(67), 855–863 (2006)
 [4] Cottrell, M., Fort, J.C., Pagès, G.: Theoretical aspects of the SOM algorithm. Neurocomputing 21, 119–138 (1998)
 [5] Cottrell, M., Letrémy, P.: How to use the Kohonen algorithm to simultaneously analyse individuals in a survey. Neurocomputing 63, 193–207 (2005)
 [6] Cottrell, M., Olteanu, M., Rossi, F., Rynkiewicz, J., VillaVialaneix, N.: Neural networks for complex data. Künstliche Intelligenz 26(2), 1–8 (2012)
 [7] DeSalle, R., Egan, M., Siddal, M.: The unholy trinity: taxonomy, species delimitation and dna barcoding. Philosophical Transactions of the Royal Society BBiological Sciences 360, 1905–1916 (2005)
 [8] Fort, J.C., Letremy, P., Cottrell, M.: Advantages and drawbacks of the batch kohonen algorithm. In: ESANN’02. pp. 223–230 (2002)
 [9] Fruchterman, T., Reingold, B.: Graph drawing by forcedirected placement. SoftwarePractice and Experience 21, 1129–1164 (1991)
 [10] Gärtner, T.: Kernel for Structured Data. World Scientific (2008)
 [11] Hammer, B., Gisbrecht, A., Hasenfuss, A., Mokbel, B., Schleif, F., Zhu, X.: Topographic mapping of dissimilarity data. In: Proceedings of WSOM 2011. pp. 1–15 (2011)
 [12] Hammer, B., Hasenfuss, A., annd Strickert M. Rossi, F.: Topographic processing of relational data. In: Proceedings of the 6th Workshop on SelfOrganizing Maps (WSOM 07). Bielefeld, Germany (September 2007), to be published
 [13] Hebert, P.D.N., Penton, E.H., Burns, J.M., Janzen, D.H., Hallwachs, W.: Ten species in one: DNA barcoding reveals cryptic species in the neotropical skipper butterfly astraptes fulgerator. Genetic Analysis (2004)

[14]
Kimura, M.: A simple method for estimating evolutionary rates of base substitutions through comparative studies of nucleotide sequences. Journal of Molecular Evolution 16, 111–120 (1980)
 [15] Kohohen, T., Somervuo, P.: SelfOrganizing maps of symbol strings. Neurocomputing 21, 19–30 (1998)
 [16] Mac Donald, D., Fyfe, C.: The kernel self organising map. In: Proceedings of 4th International Conference on knowledgebased intelligence engineering systems and applied technologies. pp. 317–320 (2000)
 [17] Olteanu, M., Nicolas, V., Schaeffer, B., Denys, C., Kennis, J., Colyn, M., Missoup, A.D., Laredo, C.: On the use of selforganizing maps for visualizing and studying barcode data. application to two data sets (2012), preprint submitted for publication
 [18] Rossi, F., Hasenfuss, A., Hammer, B.: Accelerating relational clustering algorithms with sparse prototype representation. In: 6th International Workshop on SelfOrganizing Maps (WSOM). Neuroinformatics Group, Bielefield University, Bielefield, Germany (2007)
 [19] Saitou, N., Nei, M.: The neighborjoining method: a new method for reconstructing phylogenetic trees. Molecular Biology and Evolution 4(4), 406–425 (1987), http://mbe.oxfordjournals.org/content/4/4/406.abstract
 [20] Tenenbaum, J.B., Silva, V., Langford, J.C.: A Global Geometric Framework for Nonlinear Dimensionality Reduction. Science 290(5500), 2319–2323 (2000)
Comments
There are no comments yet.