NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Fast semi-automatic segmentation algorithm for Self-Organizing Maps

David Opolon, Fabien Moutarde

Introduction

Self-Organizing Maps (SOMs) are widely utilized for visualizing high-dimensional data by projecting it onto a low-dimensional (typically 2D) grid. While SOMs effectively reveal the underlying structure of data, partitioning the resulting map into distinct, labeled clusters often remains a manual task. Traditional automated clustering techniques, such as hierarchical or k-means clustering applied to SOM prototypes, suffer from high computational complexity—frequently $O(n^2 \log n)$. This creates a significant bottleneck in large-scale applications like text mining. This paper proposes a highly efficient $O(n)$ algorithm that treats the SOM's distance matrix as an image to automate cluster identification.

Methodology

The proposed approach leverages a region-growing technique adapted from computer graphics "area-filling" or "flood-fill" algorithms. The methodology consists of three primary stages:

  1. U-Matrix Computation: Distances between adjacent units on the SOM grid are calculated to represent local dissimilarity.
  2. Mean Distance Calculation: For each grid unit, a meanDist value is computed, representing the average distance to its immediate neighbors.
  3. Recursive Flood Fill: A user provides a "seed" point within a perceived cluster and sets a distance threshold ($dmin_k$). The algorithm recursively expands from the seed to adjacent units as long as their meanDist remains below the threshold. Units exceeding the threshold represent the "ridges" or frontiers between clusters.
U-matrix representation, resulting segmentation, and original 2D data clusters.

By utilizing the existing topology of the SOM grid, the algorithm avoids the exhaustive distance calculations required by global clustering methods, achieving linear time complexity relative to the number of map units.

Experimental Evaluation

The algorithm's performance was evaluated using three distinct benchmarks:

  • 2D Simulated Data: Convex clusters used to test basic segmentation accuracy.
  • 3D "Chain Link" Dataset: A challenging benchmark featuring two intertwined rings, testing the ability to handle non-convex and topologically complex shapes.
  • Fisher’s Iris Dataset: A real-world dataset of 150 iris samples across four dimensions, used to assess performance on overlapping classes.
The 3D 'Chain Link' dataset, a benchmark for non-convex cluster separation.

Results and Discussion

The algorithm demonstrated exceptional accuracy and efficiency. Notably, it achieved 100% classification accuracy on the topologically complex "chain link" dataset. In 2D simulations, misclassifications were nearly non-existent, with only 1-2% of points remaining unclassified due to their proximity to cluster frontiers.

On the Iris dataset, the method successfully isolated the linearly separable Setosa species. While Versicolor and Virginica exhibited expected overlap, the resulting segments were found to be statistically meaningful and comparable to results from more computationally intensive methods. Crucially, the computational overhead of the segmentation process was found to be negligible compared to the initial SOM training phase.

Conclusion

This research presents a fast, semi-automatic method for SOM segmentation that treats the U-matrix as a landscape of "valleys" (clusters) and "mountains" (boundaries). While the current implementation requires manual seed and threshold selection, the $O(n)$ complexity makes it ideal for large-scale data analysis. Future work aims to fully automate the seed selection process and refine the flood-fill logic by incorporating directional distance vectors to produce even sharper cluster boundaries.

Summary updated

BibTeX
@inproceedings{opolon2004fast,
  author = {David Opolon and Fabien Moutarde},
  title = {{Fast semi-automatic segmentation algorithm for Self-Organizing Maps}},
  booktitle = {ESANN},
  year = {2004},
  url = {https://openreview.net/forum?id=9OYBffq1yp},
}
Figure