arXiv:2608.24067cs.LGAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.24067

A Feature-Major Codebook for Memory-Efficient Sparse-Binary Self-Organizing Maps: Scaling a MEDLINE Atlas to 1.05 Million Neurons on a Single Consumer GPU

Andrew James Amos

Abstract

A self-organising map turns a large corpus into a browsable two-dimensional atlas, but building one at MEDLINE scale has been impractical: the best-matching-unit (BMU) search that dominates training is bound by the bandwidth needed to read the codebook every epoch. I show that this bottleneck is largely an artefact of codebook layout. Storing it feature-major with each feature's weights contiguous, W[v·M+i], recasts the search as a tiled sparse-dense product in which every loaded weight column is reused across a tile of samples. Varying only the layout, with implementation, precision and update rule held fixed, accelerates the BMU search by 4.5-8.5×. Because an exact-argmin BMU is invariant to how the codebook is stored, this gain costs nothing: held-out quantisation error agrees with a cuSPARSE baseline to within 0.5% at every map size. Against that baseline the advantage is a crossover rather than a constant: cuSPARSE.SOM is faster at small maps, SparseBin.SOM is 1.5× faster at 128×128 and 2.6× at 256×256, and at 512×512 it is the only one that runs on 24 GB without re-engineering its memory path. Paired with a radius-independent box-blur update and a convergence-based stopping rule, it trains a converged map over 29.9 million MEDLINE articles in about 72 s at 64×64 on one 24 GB GPU, and accommodates 262,144 neurons (512×512 edges) where every alternative algorithm

Email address: andrew.amos@my.jcu.edu.au (Andrew J. Amos)

URL: https://orcid.org/0000-0002-9145-0212 (Andrew J. Amos)

I tested exceeds memory constraints. On a 141 GB H200 it reaches 1,048,576 neurons (1024×1024 edges) - to my knowledge the largest self-organising map yet reported. Held-out error follows a smooth power law with no elbow across three decades of map size, so the limit on resolution is compute rather than any breakpoint in the data. A post-submission addendum, in which both implementations were tuned symmetrically and retrained, reports the search accelerated a further 5.6-10.1×, bringing that 64×64 run to about 13 s. It also removes the crossover, SparseBin.SOM being faster at every map size against a tuned baseline, raises the margins at 128×128 to roughly 385× MedSOM and 3,000× somoclu, and narrows two mechanism claims made here. At matched work, in the configuration benchmarked here, the design is ~82× faster than MedSOM, the CUDA implementation behind our earlier MEDLINE atlases and, at 128×128, 621× faster than the best available multicore-CPU library.

Keywords: self-organizing maps, GPU computing, sparse matrix kernels, memory-bandwidth optimisation, CUDA, MEDLINE/MeSH

1. Introduction

The organisation of medical knowledge has practical consequences. Decisions about what to teach, what to research, and what to prioritise still rest largely on expert judgement which, however well-informed, carries the systematic biases of its authors - with documented costs to the diversity of the medical workforce and the completeness of medical curricula [1]. The peer-reviewed literature indexed in MEDLINE is the most comprehensive and least biased record of medical knowledge available, and techniques that summarise it can offer objective, structural evidence to complement expert judgement in curriculum development, for example by surfacing emerging topics for curriculum renewal [2]. Among such techniques the self-organising map (SOM) is distinctive in producing a discrete, addressable, two-dimensional atlas in which topical neighbourhoods are spatially contiguous and which can be read much as one reads a geographic map [3, 4]. Realising that promise across the whole corpus is, however, first of all a computational problem - and it is that problem this paper addresses.

A self-organizing map projects high-dimensional data onto a low-dimensional lattice of prototype vectors (called neurons in this manuscript) such that nearby neurons respond to similar inputs. The result is a dis-crete, addressable, and browsable atlas: every input is assigned to a grid cell, and the grid itself is laid out so that topical neighbourhoods are spatially contiguous. For a corpus on the scale of MEDLINE - tens of millions of articles indexed against a controlled vocabulary of tens of thousands of Medical Subject Headings (MeSH) [13] - such an atlas is an attractive organising structure, but producing it is computationally demanding.

The cost of SOM training is dominated by the best-matching-unit (BMU) search: for each input, the algorithm must find the nearest of M prototype vectors (representing neurons). At corpus scale this search reads the codebook - the M×V table of prototype weights - repeatedly across many epochs. When the codebook is laid out node-major (each neuron's V weights stored contiguously), the per-warp access pattern is a strided gather across non-contiguous memory; at a codebook size far exceeding the L2 cache, every gather becomes an HBM round-trip and the kernel is bound by uncoalesced memory traffic. The BMU search is, in short, memory-bandwidth-bound, and the lever for accelerating it is the codebook layout.

In this paper I demonstrate that storing the codebook feature-major - the M weights for a given feature stored contiguously, W[v·M+i] - is the more efficient layout for sparse inputs. It makes each feature's weight column a coalesced read, and it enables a tiled BMU kernel in which a loaded weight column is reused across all samples in a tile that share that feature. The material difference is the access pattern rather than the values stored, so it does not depend on the inputs being binary; the same layout drives a sparse-float variant of the design (Table 8). Binary inputs are a specialisation on top of it, worth a further 2.1-2.8× speedup in per-epoch training time (5.5). I pair this layout with a factorised box-blur neighbourhood update whose cost is independent of the neighbourhood radius, and a convergence-based stopping rule, to obtain an end-to-end system that trains over a MEDLINE-scale corpus on a single commodity GPU.

A central observation organises the evaluation. An exact-argmin BMU returns the same assignment regardless of how the codebook is stored or which kernel computes it, provided the sample tiling is held fixed; the layout therefore affects only speed, never quality. This lets me make the efficiency claim rigorously: I demonstrate matched clustering quality (quantisation error, topographic error, dead-unit fraction) between SparseBin.SOM and a strong same-GPU library baseline, and attribute the entire speed-up to the BMU/layout axis. I deliberately restrict ‘quality’ here to intrinsic SOM quality; the scientific validity of the resulting MEDLINE atlas - whether it recovers the MeSH and citation-derived knowledge structure - is the subject of a companion paper [5]. The present method also scales our prior MEDLINE-SOM programme - a 350×350350 \times 350 cartographic atlas of medical knowledge [3], externally validated against an expert-derived textbook knowledge structure [4] - by more than an order of magnitude in neuron count.

Contributions. This paper makes the following contributions:

  • A feature-major codebook layout for sparse SOMs, with the memory-access argument for why it coalesces reads and enables tile-level weight reuse (3.2).

  • An SpMM-tile BMU kernel that reads only the distinct feature columns a tile touches, reuses each across the tile’s samples, and fuses the argmin into the node sweep (3.3).

• Empirical confirmation that the BMU/layout axis affects only speed, isolating quality to the update rule, which makes the speed-up a verifiable free lunch (3.4, 5.3).

  • An end-to-end system that trains a converged map over all 29.9 million MEDLINE articles in the 2026 baseline carrying at least five MeSH descriptors on one 24 GB GPU, remains the only implementation of those tested that runs at 262,144 neurons on that card (5.5), and on a 141 GB H200 reaches 1,048,576 neurons - the largest SOM I am aware of, exceeding the WEBSOM patent map on both corpus and map size (5.6).

  • A scaling study showing that held-out quantisation error follows a smooth power law with no elbow across three decades of map size (5.6), and a matched-work efficiency comparison placing SparseBin.SOM ∼82×\sim82\times ahead of MedSOM and, at 128×128128\times128, 621×621\times ahead of the best multicore-CPU library, a ratio that climbs steeply with map size - end-to-end figures that bundle layout, update rule and precision, the isolated layout effect being the 4.5−8.5×4.5-8.5\times of 5.1 (5.5).

The remainder of the paper reviews background and related work (2), develops the method (3), describes the experimental setup (4), presents results (5), and discusses implications, limitations, and reproducibility (6-9).