Topeax - An Improved Clustering Topic Model with Density Peak Detection and Lexical-Semantic Term Importance

Márton KardosarXiv 2026 · arXiv · OpenReview

TL;DR

This paper introduces Topeax, a novel topic modeling approach that improves upon existing methods like Top2Vec and BERTopic by more reliably discovering natural clusters in text data and generating higher-quality topic keywords. Topeax achieves this through density peak detection for cluster identification and a combined lexical-semantic approach for term importance, demonstrating superior performance and stability across various datasets and conditions.

What Problem Does This Paper Address?

Topic modeling, particularly through text clustering, is a widely used technique in academia and industry for understanding large collections of text. However, current popular methods like Top2Vec and BERTopic suffer from significant drawbacks. They are highly sensitive to sample size and hyperparameters, often leading to suboptimal results and unreliable cluster discovery. Furthermore, their methods for estimating the importance of terms within topics are flawed: BERTopic ignores the semantic relationships between keywords and topic vectors, while Top2Vec overlooks word frequencies. This results in topics that can be incoherent, containing stop words or irrelevant terms, and a lack of confidence in the generated keywords. The paper aims to address these issues by proposing a more robust and accurate topic modeling approach.

Methods

The core of the proposed method, Topeax, lies in its novel approach to cluster discovery and term importance estimation.

  • Dimensionality Reduction: Unlike other models that use UMAP, Topeax employs t-Distributed Stochastic Neighbor Embeddings (t-SNE) with cosine distance for dimensionality reduction, fixing the dimensions to 2 for easier visualization.
  • Clustering (Peax Model): Topeax introduces the "Peax" clustering model. It first estimates a Kernel Density Estimate (KDE) over the reduced embeddings and then detects density peaks using a local-maximum filter. These peaks serve as cluster centers. A Gaussian Mixture Model (GMM) is then fitted with its means fixed to these peaks, and documents are assigned to the cluster component with the highest responsibility. This density-based approach aims to find natural cluster structures without pre-specifying the number of clusters.
  • Term Importance Estimation: Topeax combines two types of importance scores:
  • Semantic Importance: This is calculated based on the responsibility-weighted average of document embeddings, accounting for the probabilistic nature of the GMM.
  • Lexical Importance: This uses an information-theoretical approach, specifically Normalized Pointwise Mutual Information (NPMI), to measure the term's presence in relation to the cluster label, providing a more robust measure than simple TF-IDF.
  • Combined Term Importance: The final term importance is a geometric mean of the min-max normalized lexical and semantic importance scores, aiming to balance both aspects for high-quality keywords.

Datasets

The paper evaluates Topeax on several datasets to ensure broad applicability:

  • Massive Text Embedding Benchmark (MTEB): The new version (v2) of this benchmark was used, specifically the P2P variants of tasks to avoid redundancy. This benchmark includes various clustering tasks.
  • Annotated Twitter Topic-Classification Dataset: A dataset for topic classification on Twitter data.
  • BBC News Dataset: A collection of news articles.

The paper also mentions using the 20 Newsgroups corpus for specific analyses on perplexity and qualitative considerations.

Key Insights and Ideas

  • Density Peaks for Cluster Discovery: Identifying clusters based on peaks in density estimates is a more robust way to find natural groupings in data compared to relying solely on centroid-based methods or density-based methods that might be sensitive to noise.
  • Bridging Lexical and Semantic Gaps: Combining lexical (word frequency) and semantic (word embedding proximity) information for term importance provides a more comprehensive and accurate representation of a term's relevance to a topic. This addresses the shortcomings of previous models that favored one over the other.
  • Stability is Key: Unlike Top2Vec and BERTopic, Topeax exhibits significantly less erratic behavior when faced with changes in sample size or hyperparameters, making it more reliable for practical applications.
  • Underestimation of Clusters: While Topeax generally performs better, it tends to underestimate the number of clusters compared to human annotations. This suggests a potential for further refinement in how it defines cluster boundaries, possibly by grouping related clusters.

Key Results

  • Superior Cluster Recovery: Topeax significantly outperformed Top2Vec and BERTopic in recovering gold cluster labels, as measured by the Fowlkes-Mallows Index (FMI).
  • Accurate Topic Count: Topeax had the lowest absolute percentage error in recovering the number of topics, often underestimating them, while Top2Vec and BERTopic drastically overestimated.
  • High-Quality Topics: Topeax achieved the best scores across internal coherence ($C_{in}$), external coherence ($C_{ex}$), diversity ($d$), and overall interpretability ($I$), indicating more coherent and descriptive topics.
  • Robustness to Hyperparameters: Topeax's performance (FMI, interpretability, and topic count) remained stable across a range of perplexity values, unlike BERTopic and Top2Vec, which showed more variability and suboptimal performance at default settings.
  • Subsampling Invariance: Topeax's performance and topic count were more stable across different subsample sizes, converging to a reasonable number of topics and maintaining high quality, whereas BERTopic and Top2Vec showed more fluctuating results.

Limitations and Future Work

  • Underestimation of Clusters: Topeax systematically underestimates the number of clusters compared to human annotations. The authors suggest this is due to the model grouping together related clusters, which might be desirable in some contexts but deviates from human perception. Future work could explore dimensionality reduction techniques that better align multiple datasets or project out-of-distribution points.
  • Online Setting: The current Topeax model cannot be used in an online setting to incorporate new topics as new information arrives.
  • Evaluation Metrics: The authors acknowledge that quantitative metrics for topic quality, while correlated with human preference, do not perfectly capture interpretability. They suggest that future research should ideally involve human subject evaluations.
  • Limited Subsampling/Perplexity Testing: Subsampling and perplexity analyses were primarily conducted on the 20 Newsgroups corpus due to computational constraints. Evaluating these aspects on multiple corpora would provide a more comprehensive understanding.

Summary updated

Abstract

Text clustering is today the most popular paradigm for topic modelling, both in academia and industry. Despite clustering topic models' apparent success, we identify a number of issues in Top2Vec and BERTopic, which remain largely unsolved. Firstly, these approaches are unreliable at discovering natural clusters in corpora, due to extreme sensitivity to sample size and hyperparameters, the default values of which result in suboptimal behaviour. Secondly, when estimating term importance, BERTopic ignores the semantic distance of keywords to topic vectors, while Top2Vec ignores word counts in the corpus. This results in, on the one hand, less coherent topics due to the presence of stop words and junk words, and lack of variety and trust on the other. In this paper, I introduce a new approach, \textbf{Topeax}, which discovers the number of clusters from peaks in density estimates, and combines lexical and semantic indices of term importance to gain high-quality topic keywords. Topeax is demonstrated to be better at both cluster recovery and cluster description than Top2Vec and BERTopic, while also exhibiting less erratic behaviour in response to changing sample size and hyperparameters.
BibTeX
@misc{kardos2026topeax,
  author = {Márton Kardos},
  title = {{Topeax - An Improved Clustering Topic Model with Density Peak Detection and Lexical-Semantic Term Importance}},
  year = {2026},
  eprint = {2601.21465},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.21465},
}

Loading related content...

Figure