Topeax Model: Robust Topic Discovery
- Topeax is a topic modeling framework that integrates density-peak clustering with a hybrid lexical-semantic scoring algorithm to extract stable and interpretable topics.
- The method projects dense document embeddings to 2D with t-SNE and applies kernel density estimation followed by Gaussian mixture modeling to reliably recover natural cluster structures.
- By fusing semantic similarity with NPMI-based lexical importance, Topeax produces contextually relevant keywords, addressing limitations seen in models like Top2Vec and BERTopic.
Topeax is a topic modeling and text clustering framework that advances over prevalent embedding-based clustering models—such as Top2Vec and BERTopic—by introducing both robust, hyperparameter-stable cluster discovery via density-peak analysis in 2D embedding space and a hybrid lexical-semantic keyword scoring algorithm. The approach is positioned to resolve core limitations in the reliability and interpretability of unsupervised topic structures in large corpora, facilitating more faithful recovery of natural clusters and extractive cluster description (Kardos, 29 Jan 2026).
1. Motivations and Problem Setting
Contemporary topic modeling pipelines, such as Top2Vec and BERTopic, deploy dense document embeddings (typically from Sentence-Transformers) and discover clusters/topics by projecting these embeddings to low-dimensional spaces (using UMAP or t-SNE) followed by density-based clustering (e.g., HDBSCAN). These methods then describe clusters using keywords selected by distinct, often one-sided criteria: centroid proximity for Top2Vec, and class-based TF–IDF (c-TF–IDF) for BERTopic.
These models, however, exhibit two principal deficiencies:
- Erratic topic count discovery: The number of clusters found by conventional methods is highly sensitive to embedding manifold hyperparameters, HDBSCAN settings (e.g., min_cluster_size), and sample size. This frequently yields dramatic overestimation or, less commonly, underestimation of the true number of clusters.
- Unidimensional term importance: Top2Vec’s use of centroid proximity fails to capture corpus-level word frequency, often introducing “junk” or stop words. BERTopic’s c-TF–IDF approach, conversely, ignores the semantic relatedness of words to the cluster centroid, yielding less coherent, sometimes semantically irrelevant keywords.
Topeax is designed to rectify these issues by (i) replacing HDBSCAN with a density-peak discovery and mixture modeling strategy that is robust to sample size and parameter choice, and (ii) fusing lexical and semantic scoring of terms to achieve balanced, contextually relevant cluster descriptors (Kardos, 29 Jan 2026).
2. Density Peak-Based Cluster Detection
The core clustering engine in Topeax is the Peax algorithm, which proceeds via the following stages:
Dense document embeddings (e.g., all-MiniLM-L6-v2) are projected to 2D using t-SNE configured with cosine distance and a perplexity parameter typically set near 50.
2.2 Kernel Density Estimation (KDE)
A Gaussian kernel is placed over each point in this 2D space. The density at location is estimated by
with (Gaussian), chosen via Scott’s rule.
2.3 Density Peak Detection
The estimated density field is evaluated on a grid. A local-maximum filter identifies grid cells where density values are maximal within a 5-unit neighborhood (radius, connectivity 25). Peaks below a threshold may be pruned.
2.4 Gaussian Mixture Approximation and Assignment
Each density peak anchors a component in a -component Gaussian mixture model (GMM, with fixed means and shared diagonal covariance). Documents 0 are assigned to the topic with maximum posterior responsibility, but the soft-responsibility structure enables modeling of non-spherical cluster shapes and better reflects underlying corpus structure than HDBSCAN thresholding or centroid-based assignments.
Comparative Table: Clustering Approaches
| Model | Topic Count Discovery | Cluster Assignment |
|---|---|---|
| Top2Vec | HDBSCAN (low-dim, UMAP) | K-means/centroid |
| BERTopic | HDBSCAN (low-dim, UMAP) | Majority assignment |
| Topeax | KDE density peaks (t-SNE) | GMM (fixed means) |
3. Lexical-Semantic Term Importance
After clusters are discovered, Topeax computes topic-descriptive keywords for each cluster by integrating both semantic proximity and lexical distinctiveness.
3.1 Semantic Importance
For each topic 1, a prototype vector 2 is computed as the responsibility-weighted average of document embeddings: 3 where 4 denotes the posterior responsibility of component 5 for document 6. For term 7 (with embedding 8), semantic importance is
9
3.2 Lexical Importance via NPMI
Let 0 be the total occurrences of term 1, 2 its count in topic 3. With a symmetric Dirichlet4 prior (5 = 2), unigram marginals are estimated: 6 where 7 are corpus, vocabulary, and topic-level counts, respectively. Pointwise mutual information is
8
normalized to [–1,1]: 9
3.3 Geometric Fusion
Both 0 and 1 are min–max normalized to 2. The overall importance score is
3
with 4, 5 the normalized scores. Ranking terms by 6 selects cluster keywords that are simultaneously semantically proximal to the topic centroid and lexically distinctive.
4. End-to-End Pipeline
The Topeax workflow comprises the following steps:
- Input raw corpus.
- Compute document embeddings using a Sentence-Transformer.
- Project embeddings to 2D via t-SNE (cosine distance, perplexity ≈ 50).
- Estimate KDE over the 2D space (Gaussian kernel, bandwidth by Scott’s rule).
- Detect density peaks via local-max filtering.
- Fit Gaussian mixture with peaks as fixed means; compute responsibilities.
- Assign each document to its top-responsibility topic.
- Compute topic prototype vectors.
- For all vocabulary terms, compute semantic similarity scores. 10. Compute empirical term frequencies and NPMI scores.
- Min–max normalize and geometrically fuse scores to compute 7.
- Extract top-N terms per topic based on 8 (Kardos, 29 Jan 2026).
5. Quantitative Evaluation
5.1 Cluster Recovery
Performance on seven gold-labeled corpora from the MTEB v2 suite indicates Topeax achieves a mean Fowlkes–Mallows index (FMI) of ≈0.45, markedly higher than Top2Vec (≈0.30) and BERTopic (≈0.32).
5.2 Topic Count Estimation
Topeax exhibits lower mean absolute percentage error (MAPE) in the number of class predictions (≈60.5%, SD 26.2), in contrast to much higher error from Top2Vec (≈1797%, SD 2622) and BERTopic (≈2439%, SD 3012), signaling reduced “topic inflation” and improved correspondence to true class structure.
5.3 Topic Quality Metrics
Assessments of internal coherence 9 (GloVe on-corpus), external coherence 0 (word2vec-GoogleNews), diversity 1, and interpretability 2 (3) yield:
| Model | 4 | 5 | 6 | 7 |
|---|---|---|---|---|
| Topeax | 8 | 9 | 0 | 1 |
| Top2Vec | 2 | 3 | 4 | 5 |
| BERTopic | 6 | 7 | 8 | 9 |
6. Sensitivity, Strengths, and Limitations
Hyperparameter Sensitivity
Topeax’s density-peak and fusion pipeline stabilizes topic count and interpretability at small sample sizes (0) and modest t-SNE perplexity settings (convergence by perplexity 1 for topic count), outperforming contemporary alternatives which experience proliferating topic inflation as corpus size or manifold parameters grow.
Strengths
- Principled cluster count discovery via density peaks, reducing reliance on unstable HDBSCAN heuristics.
- Topic keywords reflect joint lexical and semantic discriminability.
- Robustness to hyperparameter and sample size variation, advantageous for non-manual and automated workflows.
Limitations
- Systematic underestimation of the number of topics versus gold-label counts, though unions often reflect meaningful merges of related categories.
- Not directly applicable to online or streaming data; proper operation requires batch computation of t-SNE and KDE.
Potential Extensions
A plausible implication is that adoption of incremental or parametric t-SNE/UMAP, adaptive density thresholds, and user/semi-supervised intervention in peak merging/splitting could address present limitations and widen use cases (Kardos, 29 Jan 2026).
7. Summary and Context
Topeax supersedes the dominant UMAP + HDBSCAN-based topic modeling frameworks by integrating a density-peak-based cluster discovery apparatus with a geometric fusion of NPMI-based lexical and embedding-based semantic term importance. The resulting model demonstrates state-of-the-art performance on unsupervised cluster fidelity, topic description, and interpretability metrics across a range of benchmark datasets while retaining practical robustness against key sensitivity factors that undermine existing approaches (Kardos, 29 Jan 2026).