- Introduced by
- Teuvo Kohonen
- Year
- 1982
- Type
- Unsupervised neural network for topology-preserving mapping
- Family
- Dimensionality reduction
What does it do?
A self-organizing map is an unsupervised neural network, introduced by Teuvo Kohonen in 1982, that projects high-dimensional data onto a low-dimensional (usually two-dimensional) grid of prototype vectors in a way that aims to preserve the data's neighbourhood structure.
The map tends to place nearby inputs in nearby grid cells, but a fixed lattice can fold or stretch the data, so this is approximate rather than guaranteed. It is used for visualization, clustering, and exploratory analysis, turning complex data into an ordered, interpretable map.
The intuition behind the method
Imagine laying a flexible grid over a high-dimensional cloud of data and letting it drape itself to fit. Each grid node holds a prototype vector. For each input, the closest node (the 'winner') and its grid neighbours are nudged toward that input. Neighbours therefore tend to learn representations of similar inputs, and the grid tends to self-organize into a smooth map in which adjacent cells hold similar patterns. As training proceeds the learning rate and the neighbourhood radius shrink, first arranging the map globally, then refining it locally. The result is a 2D layout in which much of the data's structure can be read directly.
History
Teuvo Kohonen introduced the self-organizing map in 1982 (kohonen1982), a paper whose title describes it as the self-organized formation of topologically correct feature maps. His 1990 review in Proceedings of the IEEE (kohonen1990) describes the algorithm, the ordering process, hierarchical clustering of data, learning vector quantization for fine-tuning, and practical uses including speech recognition. That review also covers brain maps and early work on competitive learning as background to the method.
When to use it
Choose a self-organizing map when you want an ordered two-dimensional layout of numeric, multivariate data in which nearby grid nodes hold similar prototypes, for exploration, visual summaries, or clustering that keeps neighbourhood structure. It needs input vectors in a space where the Euclidean distance used by the best-matching-unit rule is meaningful, so features must be encoded and scaled first. Do not choose it when you need a probabilistic model, a likelihood, or a formal criterion for selecting the number of clusters, since it is a heuristic quantizer. Do not choose it when you need a single reproducible result without fixing the random seed and schedule, or when grid distances must reflect input distances, because the map preserves topology rather than metric. If the goal is only a partition into groups, k-means is simpler; if the goal is only a 2D picture of point-level neighbourhoods, t-SNE and UMAP are alternatives, though they do not produce a fixed grid of prototypes.
Limitations and considerations
- Results depend on grid size and shape, on the initial weights, and on the learning-rate and neighbourhood schedule; runs with different starting conditions can produce differently arranged maps.
- Finding the best-matching unit requires computing the distance from each input to every node, so the cost per input grows with the number of nodes and the input dimension.
- It is a heuristic quantizer rather than a probabilistic model: it gives no likelihood and no formal rule for choosing grid size.
- The fixed lattice imposes a topology on the map; data whose structure does not fit a two-dimensional grid is folded or stretched onto it, which distorts distances.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Produces an ordered two-dimensional grid in which neighbouring nodes tend to end up with similar prototypes, so the layout can be read directly.
- A single trained model gives both prototype vectors for clustering and a low-dimensional arrangement of those prototypes.
- The update rule is applied to one input at a time, so the same procedure can be run incrementally on a stream of inputs.
- Per-node summaries such as the U-matrix and per-feature component planes show structure that cluster labels alone do not.
Applications
- Exploratory visualization of high-dimensional data on a two-dimensional grid.
- Visual mapping of document collections, where documents of the same topic tend to fall in the same local region and documents of related topics in adjacent regions.
- Hierarchical clustering of data, as demonstrated in the 1990 review.
- Practical speech recognition, as discussed in the 1990 review.
- Assigning new observations to their best-matching node after training, so that the trained map can be used to group them.
How it works
How it works
Fix a lattice (rectangular or hexagonal) of nodes, each carrying a weight vector in the input space, initialized randomly or from the data. The lattice topology is what the map will preserve: neighbouring nodes are meant to end up representing neighbouring regions of the data.
Formula
\text{lattice of nodes } j \text{ with weight vectors } w_j \in \mathbb{R}^dFor each input vector, find the best-matching unit (BMU): the node whose weight vector is closest (usually Euclidean) to the input. The BMU is the winner that will be pulled most strongly toward the input.
Formula
b(x) = \arg\min_j \lVert x - w_j \rVert
Move the BMU and its lattice neighbours toward the input by a fraction set by the learning rate α(t) and a neighbourhood function h_{b,j}(t). This function depends on the grid distance between the BMU b and node j and on a width that shrinks during training. A Gaussian form in grid distance is a common choice, not a requirement. Because neighbours are updated together, the map tends to stay smooth and topology-preserving, and adjacent nodes tend to specialize on similar inputs.
Formula
w_j \leftarrow w_j + \alpha(t)\, h_{b,j}(t)\,(x - w_j)Over training, both the learning rate and the neighbourhood width decay. Early on, large neighbourhoods order the map globally; later, small neighbourhoods fine-tune individual nodes. The form of the decay schedule is a design choice rather than a fixed rule. After convergence the trained grid is used to visualize, cluster (group similar nodes), or assign new inputs to their BMU.
Formula
\alpha(t),\ \sigma(t) \downarrow \text{ over time (neighbourhood } h \text{ shrinks)}Common pitfalls
- Reading distances between grid nodes as distances between the data points they represent; the map preserves neighbourhood topology, not metric distances.
- Using a grid that is too small (over-quantized, merging distinct patterns) or too large (sparse nodes that fit noise) for the number of observations.
- Feeding unscaled features into the Euclidean best-matching-unit rule, so that variables with large numeric ranges decide which node wins.
- Comparing maps from different random seeds without accounting for run-to-run variation.
- Treating SOM clusters as definitive without inspecting the U-matrix or applying a separate clustering step to the trained nodes.
Frequently asked questions
How does a SOM differ from k-means?
Both learn prototype vectors, but a SOM arranges its prototypes on a fixed grid and updates each winner together with its grid neighbours, producing an ordered, topology-preserving map. k-means prototypes are not linked by any inter-cluster geometry. A SOM is therefore k-means-like quantization plus a neighbourhood structure that yields an interpretable two-dimensional layout.
Is a SOM the same as t-SNE or UMAP for visualization?
All three reduce dimensionality for visualization, but they produce different outputs. A SOM maps data onto a fixed grid of prototypes, which suits ordered, quantized maps and the U-matrix. t-SNE and UMAP place individual points in a continuous plane and can separate clusters more sharply in some datasets. They serve different exploratory purposes.
What is the U-matrix?
The U-matrix (unified distance matrix) shows the distances between each SOM node and its neighbours on the grid. Large values form boundaries between dissimilar regions, so inspecting it is a common way to read cluster boundaries from a trained map.
Related methods
Sources
Kohonen, T. (1982). Self-organized formation of topologically correct feature maps. Biological Cybernetics, 43(1), 59–69.
Open DOI referenceKohonen, T. (1990). The self-organizing map. Proceedings of the IEEE, 78(9), 1464–1480.
Open DOI reference