Skip to Content
ComputersComputers
  • Editor’s Choice
  • Article
  • Open Access

19 September 2025

40 Pages

SemaTopic: A Framework for Semantic-Adaptive Probabilistic Topic Modeling

,
,
,
and
1
SERCOM Laboratory, Faculty of Sciences of Tunis (FST), University of Tunis El Manar, Tunis 2092, Tunisia
2
Computer Science Research Laboratory of the University of Pau & Adour Countries (LIUPPA), Université de Pau et des Pays de l’Adour, Avenue de l’Université, BP 576, 64012 Pau, France
3
Department of Computer Engineering, Central School of Electronics, 6 rue Bonnefoi, 69003 Lyon, France
4
Valorization of Natural and Cultural Heritage (VPNC) Laboratory, Faculty of Legal, Economic and Management Sciences of Jendouba (FSJEGJ), University of Jendouba, Av. de l’UMA, Jendouba 8189, Tunisia

Abstract

Topic modeling is a crucial technique for Natural Language Processing (NLP) which helps to automatically uncover coherent topics from large-scale text corpora. Yet, classic methods tend to suffer from poor semantic depth and topic coherence. In this regard, we present here a new approach “ S e m a T o p i c ” to improve the quality and interpretability of discovered topics. By exploiting semantic understanding and stronger clustering dynamics, our approach results in a more continuous, finer and more stable representation of the topics. Experimental results demonstrate that S e m a T o p i c achieves a relative gain of +6.2% in semantic coherence compared to BERTopic on the 20 Newsgroups dataset ( C v = 0.5315 vs. 0.5004), while maintaining stable performance across heterogeneous and multilingual corpora. These findings highlight “ S e m a T o p i c ” as a scalable and reliable solution for practical text mining and knowledge discovery.

1. Introduction

In the modern age of digital communication, there is an increasing amount of textual data being generated across platforms, creating a pressing need for advanced Natural Language Processing (NLP) techniques to process and extract valuable information from unstructured content efficiently. Among these, topic modeling is one of the fundamental techniques for discovering latent thematic patterns from a large-scale text corpus. One of its benefits is automatically discovering and labeling latent (hidden) topics which in turn support different applications such as document classification, intelligent information retrieval, automatic summarization, and sentiment analysis. However, the usefulness of these applications is strongly related to whether the generated topics are interpretable, which could be evaluated based on the semantic coherence of the extracted topics and their understanding by humans.
Conventional topic modeling methods, particularly Latent Dirichlet Allocation (LDA) [1], have been widely adopted due to their probabilistic nature, which models documents as mixtures of hidden topics. Their intuitive formulation and computational efficiency have made LDA a standard tool for unsupervised text analysis. However, despite its popularity, LDA suffers from significant limitations in real-world applications. At its core, it relies on word co-occurrence counts under the ’bag-of-words’ assumption, which ignores the relationships between words, their semantic meanings, and syntactic context [2,3,4]. Consequently, words are treated as independent units, disconnected from the grammatical or discourse-level context in which they occur. As a result, top-ranked terms within a topic are often only loosely related and lack semantic coherence, which makes human interpretation difficult. This restriction significantly reduces the model’s effectiveness in downstream tasks, such as document classification, summarization, and semantic indexing, which require clear and meaningful topic representations. In practice, users frequently encounter topics filled with statistically co-occurring but semantically fragmented terms, which obscure the underlying topics and decrease the actionability of the model’s output. In addition, interpretability of topic models is not just a desirable property, but also an essential necessity, especially in applications like healthcare, finance, law, etc., where decisions are based on these interpretable outcomes. Lack of interpretability not only damages user trust, it also restricts the practical application of topic modeling systems. While LDA [1] is still computationally attractive, its underlying assumption does not allow it to model the complex and context-sensitive nature of language [4]. This highlights the need for advanced models that can incorporate more complex semantic structures to produce topics, which are not only statistically meaningful but also meaningful and comprehensible to human users.
In order to address the limitations associated with the structure and semantics of traditional topic modeling methods, current Natural Language Processing (NLP) has evolved towards embedding-based approaches that leverage pre-trained deep learning models to generate context-aware text representations. This evolution has significantly improved topic models making them more interpretable and of higher quality, through integrating richer semantic structures into the modeling process. Models like BERT (Bidirectional Encoder Representations from Transformers) [5], RoBERTa [6], and SBERT (Sentence-BERT) [7] offer contextualized embeddings that capture complex syntactic and semantic relationships. Unlike static embeddings [8], these models dynamically adjust word representations based on their context, enabling a more nuanced interpretation. As a result, embedding-based topic models improve both the semantic coherence of discovered topics and the performance of downstream tasks such as classification, clustering, and content recommendation marking a major advancement in human-centered text analysis. Additionally, contextual embeddings dynamically modulate representations depending on how they are employed within a particular textual setting. This dynamic approach allows the disambiguation of the polysemous words and a more accurate encoding of the discursive meaning. The incorporation of these deeper semantic features has remarkably promoted topic modeling for extracting semantically coherent and enriched topics.
Although embedding-based and contextualized topic modeling approaches (such as BERTopic [3] and Top2Vec [9]) are more powerful than traditional probabilistic models, they also have their own limitations. Despite being powerful in terms of learning contextual semantics, these models are still missing a probabilistic framework that describes the relationships among documents, topics, and words explicitly. This restricts their capacity to generate interpretable outputs like document–topic and topic–word distributions, which are essential to clarify how topics are generated, and how they correlate with content. Thus, the theoretical foundation and analytical transparency of the obtained topics are still limited. Furthermore, these models are often very sensitive to the selection of related hyperparameters for clustering and dimensional transformations, which can lead to variability in topic coherence and instability between different runs. Although c-TF-IDF improves topic term extraction in BERTopic [3] by integrating cluster-level frequency distributions, it is still frequency-based and does not consider semantics relationships or dependencies between keywords. The above limitation results in the presence of statistically significant but semantically incoherent words in extracted topics, and may decrease the overall semantic coherence and interpretability of the extracted topics in a semantically challenging or ambiguous domain. In this paper, we introduce S e m a T o p i c , a novel hybrid framework that combines contextual embeddings, semantic clustering, and a coherent optimized probabilistic model, to address the limitations of traditional and embedding-based topics models. Our proposed approach improves the ability of topic models to integrate semantic structure with probabilistic interpretability, showing consistent improvements in coherence and stability over competitive baselines, while remaining robust across different domains. By combining semantic clustering with coherent-based topic modeling, our proposed framework is able to go beyond word co-occurrence patterns on the surface to create semantically meaningful, contextually-based, and structurally coherent representations of topics. This richer integration at the semantic level enables S e m a T o p i c to better capture the underlying discourse structure in the extracted topics, which are not only more distinctive and interpretable, but also resilient to domain change. S e m a T o p i c ’s layered architecture allows for accurate and reliable topic extraction, which makes it ideal for practical natural language understanding applications.
Unlike prior models, S e m a T o p i c incorporates an automated coherence-driven hyperparameter tuning mechanism that systematically searches over ( α , β , K ) to maximize semantic coherence. This avoids manual trial-and-error, ensures reproducibility, and guarantees optimal parameter settings for each cluster, thereby improving both topic quality and stability. In addition, we conduct a comprehensive evaluation across multiple datasets of varying domains and sizes, compare against several strong baselines (including BERTopic [3], LDA+ [10], Top2Vec [9], ETM [11] and LDA2Vec [12] ), and complement automatic metrics with human evaluation to validate interpretability. An analysis of execution time per pipeline stage is also provided to assess scalability and computational trade-offs.
To achieve our objectives, we address the following challenges:
  • How can context-sensitive semantic representation be integrated into topic models to generate more coherent, interpretable, and semantically meaningful topics?
  • How can topic stability be ensured when the model is applied to evolving or partially modified corpora?
The rest of the paper is organized as follows. Section 2 reviews existing topic modeling methods and highlights their limitations. Section 3 details our proposed S e m a T o p i c methodology, including document embedding generation, clustering, and topic extraction. Section 4 describes the experiments conducted to validate our approach. Finally, Section 5 concludes the paper and shows some future directions.

3. Methodology

In this section, we present our proposed framework, S e m a T o p i c , a unified architecture specifically designed to overcome key limitations of existing topic modeling approaches. While traditional models (like LDA) rely on shallow, symmetric word co-occurrence statistics, often resulting in low semantic expressiveness and poor topic coherence, S e m a T o p i c leverages the deep contextual understanding of Large Language Models (LLMs) to generate semantically enriched embeddings at both the document and word levels. These contextualized embeddings are then refined through density-based semantic clustering, enabling the model to detect latent structures and form semantically coherent groups of documents. This semantically clustered layout serves as a structural foundation that facilitates the optimization of the probabilistic topic extraction process, enhancing both topic coherence and interpretability. Beyond topic extraction, S e m a T o p i c incorporates a dedicated stability analysis module, designed to assess the robustness of the generated topics under corpus variations (e.g., additions or removals of documents). Reproducibility and dependability of the model’s output are guaranteed by this analysis, which is essential for real-world applications where data is constantly changing. By integrating contextual embeddings, unsupervised clustering, and probabilistic modeling into a cohesive multi-stage pipeline, S e m a T o p i c delivers a topic modeling solution that is not only scalable and domain-adaptive, but also interpretable and robust even in the presence of heterogeneous, noisy, or evolving textual data.
The S e m a T o p i c framework, illustrated in Figure 1, is structured into three structurally interdependent modules, each addressing a critical aspect of modern topic modeling and together form a cohesive pipeline that balances semantic expressiveness, interpretability, and robustness:
  • (A) Contextual Semantic Representation: Exploits the semantic richness provided by Large Language Models (LLMs) to generate deep, context-aware embeddings at both the document and word levels. This ensures that the model captures nuanced meanings and domain-specific variations that traditional models often overlook,
  • (B) Coherent Probabilistic Topic Extraction: Builds on this semantic foundation by first applying density-based clustering to reveal natural groupings within the corpus. These clusters guide an optimized probabilistic inference step that extracts topics that are not only statistically valid but also semantically coherent and interpretable, and
  • (C) Topics Stability and Robustness Analysis: Introduces a systematic evaluation mechanism to assess the robustness and reproducibility of the discovered topics in response to corpus modifications (e.g., updates, additions, or removals). This step is essential to ensure that the topics remain consistent and comprehensible over time.
Figure 1. S e m a T o p i c framework.
Thanks to this modular and flexible architecture, S e m a T o p i c effectively bridges the gap between semantic richness and interpretability, while also ensuring stability and scalability across diverse textual datasets and application domains. In what follows, we detail each of these components.

3.1. Contextual Semantic Representation

This module is the foundational layer of the framework and aims to preserve the underlying semantic content of raw text while encoding it into abstract representations. By preserving semantic and contextual cues, this module provides a coherent linguistic foundation for extracting meaningful topics, thereby enhancing the semantic coherence, accuracy, and interpretability of the resulting topics.
  • Text Preprocessing: This sub-module applies a sequence of normalization steps including tokenization, stop-word removal, lowercasing, and lemmatization that transform the texts into a more uniform representation. These steps lead to increased lexical consistency and reduced semantic ambiguity, which in turn creates a cleaner and more reliable foundation for generating contextually rich and coherent topic representations.
  • Named Entity Extraction: A Named Entity Recognition (NER) model is used to recognize and preserve semantically meaningful terms such as domain-specific entities and compound expressions. This also helps retain important multi-word expressions (e.g., artificial intelligence, machine learning) that might otherwise be fragmented or lost during preprocessing. By treating them as single units, the model enhances thematic consistency and contributes to more interpretable and relevant topics.
  • Document Representation via Mean-Pooled Contextual Embeddings: To represent documents at the semantic level, each text is first tokenized and encoded using a pre-trained BERT model, which generates contextualized embeddings for all tokens. These token-level representations are then aggregated into a single fixed-size vector by applying mean pooling, i.e., computing the average across all token embeddings in a document. The resulting document embedding constitutes a compact yet expressive semantic representation that captures both the dominant thematic content and the contextual nuances of the text, while attenuating the influence of noise and local variations. This representation not only provides robustness for long or heterogeneous documents but also serves as an effective prefiltering mechanism: when used as input to the clustering stage, it ensures that documents are grouped according to their semantic proximity. In turn, this facilitates the extraction of more coherent, interpretable, and stable topics in the subsequent modeling phase.

3.2. Coherent Probabilistic Topic Extraction

This module is responsible for extracting semantically meaningful and interpretable topics by extending the traditional probabilistic modeling approach (LDA). It combines the statistical strengths of LDA with the semantic richness of context-aware embeddings generated by BERT. This integration enables the model to capture both latent thematic distributions and nuanced linguistic patterns. By leveraging probabilistic topic distributions alongside contextual document representations, the framework ensures that the topics extracted are not only statistically sound but also thematically coherent and human-interpretable. This dual approach bridges the gap between classical topic modeling and modern semantic understanding, leading to more robust and informative topic structures.
  • Dimensionality Reduction of Embeddings: The contextual document embeddings generated by language models such as BERT reside in high-dimensional spaces, which can negatively impact clustering and semantic analysis. While these embeddings are semantically rich, their high dimensionality can hinder both clustering performance and semantic pattern detection due to the curse of dimensionality, where data points become increasingly sparse and equidistant. To address this issue, we apply Uniform Manifold Approximation and Projection (UMAP) [23], a non-linear dimensionality reduction algorithm specifically designed to preserve both local and global semantic relationships during the projection process. UMAP reduces the dimensionality of the embeddings to a more computationally efficient space (typically 5–15 dimensions), enabling better discrimination between semantically distinct regions and reducing noise or redundant variance. This step enhances computational efficiency and improves cluster separability, making subsequent clustering results more interpretable and semantically coherent. It serves as a crucial bridge between deep contextual representations and probabilistic topic inference.
  • Semantic Document Clustering: Although document embeddings provide rich semantic information, their continuous and high-dimensional nature makes them incompatible with traditional probabilistic topic models such as LDA, which require discrete input representations. To overcome this limitation, we apply semantic clustering to group similar documents into thematically coherent subsets, thereby pre-structuring the corpus prior to probabilistic inference. Specifically, we employ HDBSCAN (Hierarchical Density-Based Spatial Clustering of Applications with Noise) [19], a density-based clustering algorithm capable of automatically inferring the number of clusters, handling varying shapes and densities, and filtering out noisy data points. In contrast to centroid-based approaches such as k-means, HDBSCAN [19] is particularly well-suited for textual corpora, which are often heterogeneous and noisy. To improve cluster separability, we integrate UMAP [23] for dimensionality reduction, as it preserves both local and global semantic relationships more effectively than alternatives such as PCA [16] or t-SNE [31]. The combination of UMAP [23] and HDBSCAN [19] enables the identification of semantically coherent clusters without requiring prior knowledge of the number of clusters, ensuring robustness to noise and enhancing the interpretability, cohesion, and accuracy of the topics extracted in subsequent modeling stages.
  • Automatic Optimization of SemaTopic Parameters: To enhance the semantic coherence, semantic relevance, and reproducibility of the extracted topics, we integrate an automated hyperparameter tuning procedure into our extended LDA-based topic modeling module. This model, adapted to each document cluster, incorporates contextual cues from the embeddings and clustering stages, thus mitigating the limitations of classical co-occurrence-based models. Instead of relying on fixed or manually selected hyperparameters, our framework explores a predefined configuration space to identify the optimal set of values for each cluster, ensuring that topic extraction is tailored to the semantic granularity and distribution of each group. The optimization process includes the following parameters:
    • α : Controls the sparsity of topic distribution per document. Smaller values encourage each document to focus on fewer topics (i.e., more specific themes), while larger values allow for broader topic mixtures. We sample α in the range [ 0.01 , 1.0 ] with increments of 0.1 to explore varying levels of topical concentration.
    • β : Regulates the sparsity of the word distribution per topic. A smaller β results in topics composed of a few highly distinctive terms, enhancing interpretability; a larger β produces broader vocabularies. We similarly discretize β in [ 0.01 , 1.0 ] with steps of 0.1.
    • K ∈ [ 2 , 100 ] : Defines the number of latent topics to extract per document cluster. This allows the model to adapt to clusters of varying sizes and thematic diversity, supporting both fine-grained segmentation and broader thematic overviews.
    The proposed framework integrates an automated, data-driven configuration tuning mechanism to optimize key hyperparameters such as α , β , and the number of topics K. For each tested configuration, semantic coherence is quantitatively measured using the C v metric. The configuration that achieves the highest semantic coherence score is automatically selected, ensuring that the resulting topics are both interpretable and contextually meaningful. The semantic coherence score C v ( t ) for a given topic t is computed as follows:
    C v ( t ) = 1 | P t | ∑ ( w i , w j ) ∈ P t NPMI ( w i , w j ) × cos ( w → i , w → j )
    where:
    • t: A topic extracted by the model.
    • P t : The set of all unordered word pairs ( w i , w j ) within the top-N most probable words in topic t, i.e., P t ⊆ { ( w i , w j ) ∣ w i , w j ∈ W t , i < j } , where W t is the top-N word list of topic t.
    • NPMI ( w i , w j ) : Normalized Pointwise Mutual Information between w i and w j , estimated from a reference corpus using a fixed-size sliding context window.
    • w → i , w → j : contextual embeddings vectors of w i and w j , obtained from a transformer-based model (e.g., BERT).
    • cos ( w → i , w → j ) : Cosine similarity between the embeddings serving as a proxy for semantic closeness.
    Traditional probabilistic topic models such as LDA suffer from high sensitively to manually set hyperparameters. In practice, exhaustive tuning is often avoided due to its substantial computational cost, and most users rely on a small number of hand-selected configurations often insufficient to capture optimal semantic granularity. This limited coverage can significantly hinder topic coherence and interpretability. To overcome this limitation, the proposed framework embeds an end-to-end semantic coherence-based optimization pipeline that automatically searches the configuration space to maximize topic coherence, as measured by C v . This optimization process is structured into three distinct phases, each targeting a specific aspect of parameter tuning to enhance topic coherence:
    (i)
    Model initialization: The search begins with a range number of topic numbers K in [2–100]. For each value of K, all possible combinations of Dirichlet priors α and β within the interval [ 0.01 , 1.0 ] are tested. This dense sampling of the hyperparameter space ensures an exhaustive and fine-grained optimization. It allows the framework to identify, for each cluster, the configuration that yields the highest semantic coherence. This approach marks a significant improvement over traditional manual tuning, which is often limited to a small and heuristic subset of configurations.
    (ii)
    Semantic coherence evaluation: Each candidate configuration from the hyperparameter grid is evaluated using semantic coherence metric C v , as defined previously. This score provides a proxy for human interpretability by measuring the semantic consistency among top-ranked topic terms. Its systematic use ensures fair and reliable assessment of topic quality across different model instances.
    (iii)
    Parameter selection: For each semantically coherent document cluster, the configuration with the highest C v score is automatically selected. This ensures that the resulting topic distributions are not only statistically optimal but also thematically meaningful and contextually coherent.
    This built-in optimization procedure eliminates the need for manual parameter tuning, allowing the model to dynamically adapt to various corpus structures and domain-specific characteristics. As a result, the framework improves generalization and usability across a wide range of real-world applications. In particular, this automatic coherence-driven hyperparameter search avoids manual trial-and-error, ensures optimal settings per cluster, and improves both topic quality and reproducibility.
  • Topic Extraction: Once the best hyperparameter setting is found, S e m a T o p i c can extract topics from semantically coherent clusters with the best parameters, enhancing readability and discrimination. These locally refined topics are then combined to generate a coherent, semantically rich global topic set.
    Within each semantic cluster, once the optimal hyperparameters ( α , β , K ) are identified, extended LDA is applied to infer the internal thematic distributions. If the inference yields a single coherent distribution, the cluster is considered as a global topic. Conversely, if two or more semantically coherent distributions emerge, the cluster is modeled as a topic with sub-topics. Importantly, this decision is guided by the semantic coherence of the inferred distributions, rather than by the cluster size. In this way, sub-topics arise only when the probabilistic model reveals sufficient internal separability, ensuring that granularity reflects semantic reality rather than arbitrary thresholds.
    Figure 2 provides a schematic illustration of the sub-topic detection process in S e m a T o p i c . Semantic clusters, obtained through HDBSCAN, are refined using extended LDA with optimized hyperparameters ( α , β , K ) . A cluster may either remain as a single global topic when only one coherent distribution is inferred, or be decomposed into multiple sub-topics when several coherent and distinct distributions are detected. The figure exemplifies the latter case, where Cluster 2 is divided into three semantically coherent sub-topics, highlighting how S e m a T o p i c captures both macro- and micro-level thematic structures.
    Figure 2. Illustration of sub-topic detection in S e m a T o p i c .
    The full generative process of the S e m a T o p i c model is detailed in Algorithm 1. Its probabilistic formulation and component interactions are illustrated in Figure 3.
    Figure 3. Plate notation diagram of the S e m a T o p i c model.
    S e m a T o p i c extends classical topic modeling by introducing an automatic and context-aware framework that enhances both semantic coherence and topic distinctiveness. The method ensures interpretability and robustness by first segmenting the document space within each cluster, and then applying probabilistic topic modeling within each cluster. This modular architecture enables the generation of richer and more coherent topic structures, while addressing several key limitations of traditional probabilistic models particularly their limited adaptability to diverse corpora and their reliance on manual hyperparameter tuning.
    Algorithm 1 Generative Process of SemaTopic.
    Require: Corpus D, pre-trained BERT model, semantic coherence metric C
    1:
    Generate contextual embeddings e → d for each document d ∈ D using BERT
    2:
    Apply UMAP to reduce dimensionality of embeddings
    3:
    Cluster documents using HDBSCAN to obtain semantic clusters S = { C 1 , . . . , C M }
    4:
    for each cluster C j ∈ S  do
    5:
          for each combination of α ∈ [ 0.01 , 1 ] , β ∈ [ 0.01 , 1 ] (step 0.1), and K j ∈ [ 2 , 100 ]  do
    6:
              for each topic k = 1 to K j  do
    7:
                 Draw topic–word distribution ϕ k ∼ Dirichlet ( β )
    8:
              end for
    9:
              for each document d ∈ C j  do
    10:
               Draw topic proportions θ d ∼ Dirichlet ( α )
    11:
               for each word w d , i in d do
    12:
                    Sample topic assignment z d , i ∼ Multinomial ( θ d )
    13:
                    Sample word w d , i ∼ Multinomial ( ϕ z d , i )
    14:
               end for
    15:
            end for
    16:
            Evaluate semantic coherence score C for current configuration
    17:
        end for
    18:
        Select ( α * , β * , K j * ) maximizing C
    19:
        Retain topic distributions from optimal configuration
    20:
    end for
    21:
    Merge topics from all clusters to form the final global topic set
    Table 2 defines the main variables used in the S e m a T o p i c model. It includes document-level parameters such as topic proportions ( θ d ), word-level assignments ( z d , i ), and BERT embeddings (e), as well as cluster-level components ( C j ) and topic–word distributions ( ϕ k ). These variables describe the generative process and structure of the model.
    Table 2. Variable definitions in the plate notation diagram of the S e m a T o p i c model.
    Table 3 presents the core variables involved in the generative process of the standard Latent Dirichlet Allocation (LDA) model. The model assigns a topic distribution θ to each document, governed by the Dirichlet prior α . For each word position i, a latent topic z i is sampled from θ , and the actual word w i is drawn from the word distribution of the corresponding topic φ , which is itself drawn from another Dirichlet prior β . These probabilistic components collectively describe how documents in a corpus are generated based on latent topic structures.
    Table 3. Variable definitions in the plate notation diagram of the LDA model.
    The plate notation diagram of S e m a T o p i c mentioned in Figure 3 is a methodological refinement of the traditional probabilistic topic models, allowing for semantic understanding and structural granularity. Whereas traditional LDA (related plate notation presented in Figure 4) processes the corpus as a uniform container of documents, S e m a T o p i c combines the use of contextual embeddings to divide the corpus into coherent thematic clusters. In the second step, topic inference is performed in each cluster to further strengthen thematic distinctiveness and semantic coherence.
    Figure 4. Plate notation diagram of LDA model.
    Incorporating embeddings from Large Language Models into our framework allows us to extract more coherent and semantically meaningful topic representations by effectively capturing the context-dependent subtleties of word usage. At the same time, automatic hyperparameter tuning makes sure that each semantic group is modeled under the best settings, without requiring ad hoc tuning by the user, thus enhancing the overall quality of the extracted topics. This structured, context-aware model improves the interpretability and semantic coherence of topics, but does not lose the probabilistic ground of traditional models like LDA.

3.3. Topics Stability and Robustness Analysis

This section assesses the stability and robustness of the S e m a T o p i c framework under corpus perturbations. The topic stability is crucial to ensure that the thematic structure remains consistent even when the input data is partially modified, a common situation in real-world applications where corpora are often noisy, incomplete, or evolving over time.
  • Corpus Modification: To simulate realistic variations in input data, a perturbed version of the original corpus D is created, denoted D ′ . Two types of modifications are applied:
    • Addition: New documents are added to corpus D.
    • Removal: A random subset of documents are removed which is intended to simulate data loss, sampling bias, or incomplete data.
    These modifications aim to test whether the model can maintain consistent topic structure despite changes in data distribution.
  • Re-Extraction of Topics: The S e m a T o p i c model is then reapplied to the modified corpus D ′ , using the same semantic clustering structure and hyperparameter settings that were applied to the original corpus D. This ensures that changes in the resulting topic set T ′ are solely due to corpus perturbation, not to differences in model configuration. The new topics T ′ are then compared to the original topic set T.
  • Topic Similarity Measurement: To evaluate the degree of alignment between the original and perturbed topic sets, three complementary metrics are employed:
    • Jaccard Similarity: Computes the word overlap between the top-n terms of matched topics in T and T ′ , indicating lexical consistency.
    • Cosine Similarity: Measures the similarity between full topic–word probability distributions (treated as vectors), capturing global distributional alignment.
    • Topic Match Ratio: Represents the proportion of topics in the original set T that have at least one matching topic in T ′ with a similarity score above a predefined threshold τ .
  • Validation of Topic Consistency: We measure the topic stability under corpus perturbations using computed similarity scores. The high values of similarity among various evaluation metrics suggest that the model consistently captures the coherent topic structures and also show that it is robust and reliable model. Conversely, significant divergence among runs may indicate sensitivity to data variance, clearly visible in specific sections for additional calibration or system improvements.
This stability and robustness analysis reinforces the framework’s practical value by demonstrating its ability to provide trustworthy and generalizable topics in the face of incomplete or evolving datasets a key requirement for scalable, real-world applications of topic modeling. The topic stability evaluation procedure is detailed in Algorithm 2.
This algorithm quantifies the stability and robustness of the S e m a T o p i c framework by evaluating the consistency of topics under controlled corpus perturbations. In particular, the model is applied to both the original corpus D and a slightly modified version D ′ , where perturbations simulate real-world scenarios such as the addition or removal of documents. This yields two sets of topics: T (from D) and T ′ (from D ′ ). To assess how closely the two topic sets align, each topic t i ∈ T is compared to the most similar topic t j ′ ∈ T ′ , using two complementary similarity measures:
  • Jaccard similarity, based on the overlap of top-n topic words,
  • Cosine similarity, computed over the full topic–word distributions treated as high-dimensional vectors.
These pairwise comparisons are aggregated into two key metrics:
  • Average Similarity Score  S ¯ , for both Jaccard and Cosine, capturing the global alignment between topic structures;
  • Topic Match Ratio (TMR) R, measuring the proportion of original topics in T that have at least one closely matching counterpart in T ′ , based on a predefined similarity threshold τ .
High values of S ¯ and R indicate that the topics extracted by S e m a T o p i c are stable, reproducible, and resilient to data variations, validating the model’s robustness and reliability in dynamic or noisy environments.
Algorithm 2 Robustness Evaluation of SemaTopic.
Require: Original corpus D, modified corpus D ′ , trained model M , similarity threshold τ
1:
Run S e m a T o p i c on D to obtain original topic set T
2:
Run S e m a T o p i c on D ′ to obtain perturbed topic set T ′
3:
for each topic t i ∈ T  do
4:
   Identify most similar topic t j ′ ∈ T ′ using:
  • Jaccard similarity over top-n terms
  • Cosine similarity over full topic–word distributions
5:
   Compute similarity scores S i j Jaccard and S i j Cosine
6:
end for
7:
Compute average Jaccard similarity: S ¯ Jaccard = 1 | T | ∑ S i j Jaccard
8:
Compute average Cosine similarity: S ¯ Cosine = 1 | T | ∑ S i j Cosine
9:
Count number of topics where S i j Cosine ≥ τ or S i j Jaccard ≥ τ
10:
Compute Topic Match Ratio: R = # Matched Topics | T |
11:
return  S ¯ Jaccard , S ¯ Cosine , R

4. Experiments

In order to systematically evaluate the performance and reliability of the proposed S e m a T o p i c framework, we designed a comprehensive experimental protocol focusing on three key aspects: topic quality and semantic expressiveness, topic stability under corpus perturbation, and comparative benchmarking with state-of-the-art models. Each experimental objective is designed to highlight a distinct dimension of the model’s effectiveness, robustness, and competitiveness.

4.1. Environment

S e m a T o p i c is implemented in Python (version 3.9.13) and integrates standard libraries for semantic topic modeling. The experimental pipeline includes the following steps:
  • Text Preprocessing: Conducted using NLTK (https://www.nltk.org/) for tokenization, lemmatization, subword normalization, and domain-adapted stopword filtering.
  • Contextual Embeddings: Generated via the SentenceTransformers (https://www.sbert.net/) library, using pre-trained BERT-based models fine-tuned for sentence-level semantic similarity.
  • Named Entity Recognition (NER): Applied to preserve domain-specific entities and compound concepts, thereby enhancing thematic semantic coherence.
  • Dimensionality Reduction: Two techniques were employed:
    −
    UMAP [23] for semantic structure-preserving reduction prior to clustering.
    −
    t-SNE [31] for visualizing topic separability in low-dimensional space.
  • Semantic clustering: Performed using HDBSCAN [19] due to its capacity to detect arbitrary-shaped clusters and filter out noise without requiring the number of clusters in advance.
  • Topic modeling and semantic coherence scoring: Managed through the Gensim (https://pypi.org/project/gensim/) library (19 July 2024), which enables probabilistic modeling via LDA and supports semantic coherence evaluation using the C v metric.
All experiments were performed on a standard laptop with Intel Core i7-6500U CPU @ 2.59 GHz, 8 GB RAM, and 64 GB SSD (Santa Clara, CA, USA), demonstrating that the framework is computationally accessible and reproducible under limited hardware constraints.

4.2. Execution Time by Stage

We report average wall-clock times per stage on a standard laptop (Intel Core i7-6500U @ 2.59 GHz, 8 GB RAM, 64 GB SSD). Peak memory was not tracked in this release. Stages: (i) preprocessing and NER, (ii) embeddings, (iii) dimensionality reduction, (iv) clustering, and (v) topic inference with semantic coherence-driven hyperparameter search.
To ensure transparency and reproducibility, the complete S e m a T o p i c pipeline is summarized in Table 4.
Table 4. Pipeline stages of S e m a T o p i c with implementation details, fixed parameters, and execution time breakdown (Google Scholar corpus).
The framework consists of sequential stages, including preprocessing, embedding generation, dimensionality reduction, semantic clustering, probabilistic topic inference, and stability analysis. For each stage, the table reports implementation details, fixed hyperparameters, and execution time (measured on the Google Scholar corpus accessed on 11 July 2025, (https://drive.google.com/drive/folders/1F3vebIkREgKA2Bh9ScsCnRkIuR2t6lD-?usp=drive_link)). Explicitly documenting these design choices highlights the methodological rigor of S e m a T o p i c and facilitates replication in future studies.
This structured overview also provides a road map for the subsequent subsections, where each component of the pipeline is described and motivated in greater detail.

4.3. Experimental Protocol

4.3.1. Objective 1: Topic Quality and Semantic Expressiveness Evaluation

The primary goal of our experimentation is to evaluate the semantic effectiveness and semantic coherence of the extracted topics with the help of S e m a T o p i c . This requires assessing how effectively our model learns interpretable and contextually coherent topic structures across varied textual input data. More precisely, we aim in this phase to measure to which extent the generated topics are semantically expressive, how well they reflect coherent topics and distinct conceptual boundaries. All experimental results to verify this goal are reported in the subsection “Evaluation Results” with more details.
  • Dataset:
    A domain-specific corpus was collected from Google Scholar, composed of 965 scientific papers. The dataset comprises diverse academic disciplines and was divided as follows: 169 scientific articles related to Economics, 155 documents in Astronomy, 130 in Management, 170 in Nutrition, 130 in Music, and 211 papers in Computer Science. We tried to prepare a balanced thematic distribution corpus in order to provide a robust foundation for evaluating the semantic extracted topics using our model S e m a T o p i c across heterogeneous knowledge domains (the used dataset is available at: https://drive.google.com/drive/folders/1rVBhcPeYYSQ_bT9HMwkWRY2T1oNsTrzN?usp=drive_link, accessed on 11 July 2025).
  • Evaluation metrics:
    • Topic coherence: In order to get higher-precision domain semantics, the S e m a T o p i c system was based on cluster-wise topic modeling. After learning document embeddings and applying unsupervised clustering by integrating HDBSCAN, the corpus was partitioned into four clusters that correspond to semantically coherent sub-domains of scientific literature. This segmentation allows us to apply a local topic modeling approach where our model ( S e m a T o p i c ) is trained for each cluster to better accommodate the granularity of internal topics. The best-topic model for each cluster is determined by an exhaustive grid search over a three-dimensional hyperparameter space including:
      −
      Number of topics K ∈ [ 2 , 100 ]
      −
      Document–topic prior α ∈ [ 0.01 , 1 ]
      −
      Topic–word prior β ∈ [ 0.01 , 1 ]
    • Overfitting analysis: To examine the topic distribution result and search for overfitting, two dimension reduction methods were applied: UMAP (Figure 5) and t-SNE (Figure 6). This can be used to evaluate topic separability and internal cohesion.
    • Graph-based visualization: Graph-based visualization is an efficient method to qualitatively evaluate the semantic structure and separability of derived topics. It gives insights on how topic terms are structured and related within and across clusters.
    Figure 5. Evaluation of topic overlap using UMAP.
    Figure 6. Evaluation of topic overlap using t-SNE.

4.3.2. Objective 2: Robustness and Stability Assessment

The second goal of our experimental study is to test the robustness and stability of the proposed SemaTopic model by systematically adding various perturbations to the input corpus. We have also performed all the experiments for validating this objective presented in detail in the “Evaluation Results” subsection.
  • Dataset: In order to evaluate the robustness of our approach, we used a domain-specific corpus composed of 946 scientific articles. A controlled perturbation was performed randomly excluding 33 documents from the original corpus (This corpus is publicly available accessed on 11 July 2025 https://drive.google.com/drive/folders/1F3vebIkREgKA2Bh9ScsCnRkIuR2t6lD-?usp=drive_link).
  • Evaluation metrics:
    • Rank-Biased Overlap (RBO): This metric was used for measuring top-term lexical similarity between model runs.
    • Word-probability weight differences: This metric was used to quantify the difference of probability distribution over words in runs.
    • Jaccard similarity index: This is computed on the top-n words of original and perturbed topics.
    • Cosine similarity matrix: This is calculated between the topic vectors of perturbed and original corpora.
    • Topic Matching Rate (TMR): This measures how well topics in the original corpus aligned with those from the perturbed corpus.

4.3.3. Objective 3: Comparative Analysis with State-of-the-Art Methods

The goal of this step is to assess the effectiveness of our proposed method by comparing it to two state-of-the-art approaches, BERTopic [3] and LDA+ [10], on the same data at different criteria.
To achieve this objective, we adopted a bidirectional evaluation strategy of qualitative and quantitative features to rigorously evaluate the effectiveness of our proposed topic modeling approach. The two complementary evaluation approaches are described as follows:
  • Qualitative Evaluation: Graph-based analysis was used to qualitatively analyze the structural and semantic quality of the generated topic models. This method was performed through the visualization and interpretation of topic-term bipartite networks, allowing one to analyze key features like modularity, the density of graphs, term redundancy, and cluster distance.
  • Quantitative Evaluation: This module was based on the topic coherence as the main evaluation mechanism. Semantic coherence scores are numerical estimates of the resemblance between terms ranked highly in each topic. Higher scores imply better semantic alignment and, therefore, better topic quality.
In addition to assessing semantic effectiveness and comparative performance against state-of-the-art models, it is crucial to evaluate the scalability and multilingual adaptability of the proposed framework. This objective aims to determine whether S e m a T o p i c can efficiently process larger document collections while preserving topic coherence, and whether it remains robust when applied to corpora containing multilingual content.

4.3.4. Objective 4: Evaluation of Scalability and Multilingual Robustness

This experiment was designed to validate two central hypotheses: (i) that S e m a T o p i c can scale efficiently to larger corpora while maintaining computational stability, and (ii) that it can preserve topic coherence when applied to multilingual text collections. Unlike the earlier experiments, which relied on thematically heterogeneous but primarily monolingual datasets, this evaluation explicitly stresses the framework under both corpus growth and cross-lingual variation. The detailed results are reported in the subsection “Evaluation Results.”
  • Dataset: The evaluation was conducted on an extended corpus derived from the CEUR-WS (https://ceur-ws.org/) proceedings, comprising approximately 1700 documents from multiple workshops and academic domains. To ensure reliable semantic modeling, only documents with a textual coverage exceeding 50% of their content were retained. In addition to English texts, the dataset includes a substantial number of non-English terms (e.g., Russian), thereby providing a natural benchmark for testing multilingual adaptability. This setup enables a joint evaluation of scalability and multilingual robustness.
  • Evaluation metrics:
    • Scalability assessment: Execution time and memory usage were measured across the main pipeline stages (embedding generation, dimensionality reduction, clustering, and topic inference). This analysis allowed us to quantify computational efficiency and identify trade-offs associated with processing larger and more heterogeneous corpora.
    • Multilingual robustness: Topic coherence scores were computed and complemented with qualitative inspections of graph-based topic visualizations. This dual perspective was employed to assess whether semantically coherent topics could still be identified despite the presence of non-English terms. The persistence of meaningful clusters across languages was considered a key indicator of multilingual robustness.
    • Graph-based visualization: A global topic–word graph was generated to illustrate the semantic integration of multilingual terms within clusters. These visualizations provide additional qualitative evidence of the framework’s ability to capture cross-lingual relations while preserving internal topic coherence.

4.4. Evaluation Results

In this section, we report the experimental results structured according to the three main goals of our study. We present evaluation metrics for each of the objectives and describe the results on each of them in detail, thus providing a complete evaluation of the performance of the S e m a T o p i c model in terms of semantic coherence, robustness and interpretability.

4.4.1. Objective 1: Topic Quality and Semantic Expressiveness Evaluation

  • Topic coherence: In 100 configurations for each cluster, the topic model was varied in steps of 0.1 for possible values of α and β . The C v score was employed to measure the semantic coherence of each candidate, which is a metric to measure the semantic regularity of the top terms by word co-occurrence statistics and the contextual similarity. It is also an important index of semantic coherence, which can automatically search for the most interpretable topic structure for each cluster.
    As shown in Table 5, using the C v semantic coherence measure not only guarantees a high semantic consistency, but also improve the interpretability and the robustness of the model. In all four semantic clusters, a two-topic solution was clearly preferred indicating the existence of compact and thematically concentrated groups of documents. Furthermore, the difference between the optimal hyperparameters α and β for each cluster demonstrates the adaptive property of our proposed approach ( S e m a T o p i c ). The model does not adopt a uniform set of parameters for the entire corpus, but it adjusts the configuration so that it reflects local distributional properties in each cluster. This adaptive tuning leads to more precise and interpretable topic extraction and reinforcing the effectiveness of the cluster-wise decomposition strategy of the S e m a T o p i c framework.
    Table 5. Optimized hyperparameters for each semantic cluster.
    Table 6 summarizes the distribution of the semantic clusters utilized in the topic modeling process, which are represented in terms of the number of documents and total words assigned to each cluster. These clusters are the ones for which the best hyperparameters have been previously determined (as presented in Table 5). The table also shows different cluster sizes, Cluster 3 having the largest size (128 documents) and Cluster 1 being the smaller one (31). Nevertheless, the global word counts are still quite similar, so the lexical representation is balanced over the clusters.
    Table 6. Corpus statistics per semantic cluster.
    This adaptive modeling approach overcomes the drawback of uniform topic modeling by adjusting the topic granularity to the semantic alignment of the cluster. As a result, in addition to building more coherent local topics, S e m a T o p i c can boost the system-wide robustness of the topic modeling pipeline, demonstrating the scalability and adaptability of the framework over domain-specific semantics.
  • Overfitting Analysis: In the optimal case, on the reduced space, each cluster forms a clearly separated and compact group without overlapping, indicating meaningful topic boundaries.
    Figure 5 and Figure 6 represent 2D visualizations of the topic assignments using UMAP [23] and t-SNE, respectively, which provides complementary views of the structure and semantic coherence of the topics in our proposed approach. Each document is a point. Similar points are closer to each other in the space. As can be seen, both projections are characterized by well-separate and clear topic clusters, and little sign of overlap.
    This spatial segregation in topic word distributions is a strong indication that the topics are semantically coherent and non-redundant. In addition, the agreement of UMAP [23] and t-SNE [31] verifies the robustness of our approach and its ability to generalize, i.e., the model is able to learn useful patterns rather than overfitting to noise or superficial correlations.
  • Graph-based visualization:
    Figure 7 shows a topic-term bipartite graph that reflects the topic structure learned by the S e m a T o p i c model on a semantically clustered scientific dataset. In this visualization:
    −
    Large colored nodes represent topics, where each color corresponds to a different semantic cluster. The graph comprises four clusters (Cluster 0 to Cluster 3), each containing two topics, for a total of eight topic nodes.
    −
    Smaller blue nodes correspond to the most significant terms (i.e., top-ranked words) related to each topic, as determined from their inferred topic–word distributions.
    −
    Edges connect each topic node with its highest words to give a sense of the content and uniqueness of the topic.
    Figure 7. Bipartite graph representation of topics and terms across semantic clusters.
    The visualization provides several obvious patterns. First, term sets for various topics are clearly separated with little overlapping. This demonstrates a high topic exclusivity and a strong semantic coherence. Second, the intra-cluster topic pairs are more concentrated, while inter-cluster topics are distributed in a separate manner in the semantic space. This validates the rationality of the clustering-based decomposition before the means of topic modeling. The separation confirms that S e m a T o p i c not only focuses on fine-grained semantic topics inside a cluster but also maintains diversity between clusters. Therefore, the graph provides qualitative evidence of both topic visibility and semantic cluster in order to supplement the overall interpretability and semantic coherence of the resultant topic structure.
    Topic-term associations in the global view (Figure 7) may look compressed because the nodes are densely layered. In this respect, Figure 8 provides an enlarged view of the graph around Cluster 1—Topic 1 and Cluster 3—Topic 2. This local perspective makes word boundaries more clearly visible and improves the readability of terms, which is important for a text-approximation-based qualitative analysis of topic content.
    Figure 8. Zoomed bipartite visualization highlighting topic-term structures in Cluster 1—Topic 1 and Cluster 3—Topic 2.
    In Figure 8, words like dementia, symptoms, and agitation are highly associated with Cluster 1—Topic 1, indicating a cohesive topic theme concerning neurodegenerative disorders. On the contrary Cluster 3—Topic 2 is also characterized by words like grammar, nodes, document, which represent a semantic focus on structural or computational linguistics. This localized visualization provides a qualitative indication of how well the model is able to produce semantically coherent and topically distinct themes, and further demonstrates the interpretability and discriminative capability of the S e m a T o p i c framework across diverse semantic contexts.
    Importantly, the used dataset accessed on 11 July 2025, (https://drive.google.com/drive/folders/1rVBhcPeYYSQ_bT9HMwkWRY2T1oNsTrzN?usp=drive_link) does not explicitly contain documents related to neurodegenerative diseases or references to computation linguistics. Nonetheless, the discovery of thematically coherent topics—corroborated by their associated terms—showcases the power of the model to learn latent semantic structures. This capability demonstrates the strength of S e m a T o p i c to uncover sensible and interpretable topics that do not depend on predefined domain annotations and confirms its suitability for unsupervised exploration of complex and heterogeneous corpora.

4.4.2. Objective 2: Robustness and Stability Assessment

  • Stability evaluation:
    In Figure 9, we offer a detailed analysis on the stability of S e m a T o p i c against varying runs using two different measures: RBO (RankBiased Overlap) for top-term similarity, and the difference of word-probability weight. The derived RBO score values are indicative of the high level of the lexical consistency of Topic 0 for which they range between 0.77 and 0.87, while Topic 1 fluctuates at a moderate level. At the same time, the small differences in probability weights (between 0.00 and 0.0021) show strong distributional stability across runs. Taken together, these results supported the stability and reproducibility of S e m a T o p i c under stochastic perturbations, and supported the fact that our approach is reliable for generating similar topic structures for semantic analysis downstream, supporting it as a reliable method for deriving consistent topics for subsequent semantic analysis.
    Figure 9. Assessing topic stability in S e m a T o p i c across runs.
  • Robustness evaluation:
    For the robustness analysis, the modified corpus was used to re-run the S e m a T o p i c model so as to check if it is robust to input variability. Despite the data reduction, the model still recovered the same number of semantic clusters (four), supporting its structural stability.
    Figure 10 and Figure 11 show the cosine similarity and the Jaccard similarity matrices with high similarity between the original and the perturbed list of topics. Some pairs of topics across the runs have high cosine similarity (e.g., 0.8, 0.7, 0.6), and the Jaccard overlaps are larger than 0.5 for the key matched pairs, confirming that semantic consistency is maintained not only in terms but also in distribution.
    Furthermore, the TMR analysis in the bar chart (Figure 12) demonstrates that S e m a T o p i c preserved at least 50% topic match for all clusters, and some clusters even achieved a perfect match rate (TMR = 1.0). Together, these results confirm the robustness of S e m a T o p i c under realistic corpus perturbations. Our proposed model preserves the high-level topic structure of the real-world dataset, and keeps the semantic coherence in topic extraction, indicating its robustness in handling dynamic or partial real-world datasets.
Figure 10. Jaccard similarity matrix between top-n words of original and perturbed topics.
Figure 11. Cosine similarity matrix between topics of original and perturbed corpus.
Figure 12. Topic Matching Rate (TMR) per cluster after corpus perturbation.

4.4.3. Objective 3: Comparative Analysis with State-of-the-Art Methods

  • Qualitative evaluation: The comparative study between topic-term network visualizations obtained by different topic modeling techniques (BERTopic [3] (Figure 13), LDA+ [10] (Figure 14) and S e m a T o p i c (Figure 7)) reveals the semantic and structural improvement of S e m a T o p i c over others. As shown in Figure 13, BERTopic (based on strong transformer-based embeddings) suffers from high topic fragmentation, creating an overly dense and interconnected graph in which semantic boundaries are not clearly delineated and many keywords are redundantly found in multiple topics. This absence of separation reduces interpretability and limits the convenience of domain applications. On the other hand, LDA+ representation in Figure 14 is sparser and more readable, though it is a global topic model which does not capture the heterogeneous subdomains of the corpus. It can lead to too generic topics with no concrete detail and ignorance of local semantic variations.
    On the other hand, the S e m a T o p i c graph in Figure 7 shows strongly connected clusters, each consisting of two more coherent and significantly different topics designed for the semantic area. Low redundancy and strong topical-term cohesion cause the visual spacing and fewer edge overlaps between terms. This design guarantees that each cluster is modeled with the appropriate topic granularity, leading to semantically rich and non-overlapping topics. Furthermore, the decrease in graph density, as well as increased modularity, demonstrates how our approach can capture meaningful structure and increase interpretability and semantic coherence. In short, this comparative study highlights the robustness, scalability and domain adaptability of S e m a T o p i c . This is considered an effective substitute for obtaining high-quality and human-interpretable topics from complex textual data.
    Figure 13. Topic-term bipartite graph generated by BERTopic on a domain-specific scientific corpus of 946 scientific articles.
    Figure 14. The extracted topics by our previous approach (LDA+) on the domain-specific scientific corpus of 946 scientific articles.
    In order to empirically evaluate the performance of our proposed approach compared to current state-of-the-art topic modeling methods, we conducted an experiment on the 20 Newsgroups dataset (https://www.kaggle.com/datasets/crawford/20-newsgroups—formed from informal and noisy short text tweets, accessed on 1 July 2025) using three different models: S e m a T o p i c , BERTopic and LDA+. This experimental study was used not only for performance comparison, but also for studying how semantic reinforcement mechanisms can improve topic extraction. It also enabled us to see how a difference in quality and quantity of input data may affect the properties of topic modeling.
    As shown in Figure 15, although BERTopic integrates semantic clustering using class-based TF-IDF and applies transformer-based embeddings, the generated graph structure is very dense and does not make sense, presenting heavy overlapping topics, redundant key phrases, and little structure separation of topics. This is an indication that the semantic clustering alone, when unaware of the latent structure of the corpus or when combined with weak disambiguation strategies, can cause topic granularity to be inflated without adding distinction to the semantics.
    On the contrary, in Figure 16, LDA+ shows that it is able to improve traditional LDA with optimized priors but gives too sparse a topic graph. The associations between topics and terms are weak and even-decoupled, leading to imprecise and low-informative topics. This highlights the limitations of non-contextual models when confronted with short and informal texts, for which term frequency alone is not enough to capture latent topics.
    By comparison, the graph produced by our S e m a T o p i c model in Figure 17 presents discrete topic clusters, strong term-topic coherence and a clear structure at the global level. These gains result from three key design choices: (1) the use of contextual embeddings for expressing fine-grained semantics at the document level, (2) the use of semantic clustering, where documents that share latent semantic affinity are grouped together, and (3) the adaptive fine-tuning of our model parameters per semantic cluster to maximize topic coherence.
    Figure 15. Topic-term bipartite graph generated by BERTopic using the 20 Newsgroups dataset.
    Significantly, this advantage is maintained even for the noisy, low-quality nature of the dataset, stripped of any neatly-structured linguistic information. The reported enhancements demonstrate that the quality of the data is a decisive factor in the performance of topic model. Therefore, in the output of our approach, some extracted topic terms seem generic, vague or semantically weak and not due to poor modeling, but rather due to an immediate effect of the restricted degree of lexical richness and semantic density characterizing the available input. However, our approach remains capable of preserving topic separability and semantic coherence in a structural form, surpassing baseline methods (BERTopic [3], LDA+ [10]) in visual clarity and interpretability.
    These findings show not only that semantic refinement strategies can be used to contain data noise but also that it is still the quality and expressiveness of input documents that plays a determinant role in topic-term quality.
    To substantiate the above findings with concrete evidence, Table 7 presents a qualitative comparison of representative topics extracted by LDA+, BERTopic, and S e m a T o p i c on the Google Scholar dataset. This analysis complements the graph-based visualizations by illustrating the actual topic content and highlighting differences in semantic clarity and interpretability.
    As observed, S e m a T o p i c produces semantically dense and thematically coherent topics, in which terms are conceptually aligned and readily interpretable (e.g., semantic, coherence, representation, topic). In contrast, LDA+ tends to generate overly broad and generic groupings that lack fine-grained semantic detail, while BERTopic—despite its use of transformer-based embeddings—frequently combines loosely related or noisy terms (e.g., airbnb, ukraine, gps, xml, lyft) within a single topic. These findings highlight the superior ability of S e m a T o p i c to deliver topics that are both structurally well-organized and semantically faithful, thereby enhancing interpretability compared to existing baselines.
    Figure 16. Topic-term bipartite graph generated by LDA+ using the 20 Newsgroups dataset.
    Figure 17. Topic-term bipartite graph generated by S e m a T o p i c using the 20 Newsgroups dataset.
    Table 7. Qualitative comparison of representative topics generated by LDA+, BERTopic, and S e m a T o p i c on the Google Scholar corpus (965 documents).
  • Quantitative evaluation: In addition to the first qualitative investigation with topic-term bipartite graph representations, we also performed more quantitative semantic coherence-driven validation to add more evidence supporting the effectiveness comparison between the three models. This was done to finally establish the semantic coherence of the extracted topics, by making the C v semantic coherence metric the benchmark measure. Experiments were performed on the 20 Newsgroups dataset, a difficult benchmark because of its noisy, tweet-like nature and small lexical diversity. In order to handle the semantic sparsity of data, the maximum number of candidate topics per cluster was limited to five in the optimization process. It is shown in Figure 18 that Cluster 2 obtains the best topic coherence of 0.5315 under the configuration K = 2 , α = 0.01 , β = 0.71 . In addition, Cluster 3 reaches the maximum semantic coherence of 0.4906 with K = 2 , α = 0.81 , β = 0.01 , as shown in Figure 19. On the other hand, Cluster 1 with 38 documents (Figure 20) shows a semantic coherence score of 1.0 in every configuration. This saturation suggested that the data are not fine-grained enough to separate a wider variety of topics, so Cluster 1 was treated as a monolithic topic under which individual clusters are combined into a single topic model.
    S e m a T o p i c outperforms all the baselines in terms of semantic coherence. The BERTopic also utilizes clustering based on semantics and yielded a semantic coherence score of 0.5004, but the reasoning of the topic is just obscure due to the densely twisted graph. In the same way, LDA+ had an optimum semantic coherence value of 0.4729 with K = 3 , α = 0.81 , β = 0.81 , but it failed to take fine-grained semantic context integrated into clustering. By comparison, S e m a T o p i c integrates contextualized embeddings with adaptive Dirichlet parameter learning, which can generate more semantically coherent and discriminative topic structures.
    To summarize, this dual mode evaluation, visualization and semantic coherence scoring provides a validation for the robustness and semantic faithfulness of our proposed framework. Despite the noise and structural disadvantages of the 20 Newsgroups corpus, S e m a T o p i c effectively maintains topic separability and meaning, and demonstrates the essential importance of semantic-aware modeling using rich context embeddings in low-resource text analytics.
Figure 18. Semantic coherence optimization for Cluster 2 across topic numbers and Dirichlet priors (K, α , β ).
Figure 19. Semantic coherence optimization for Cluster 3 across topic numbers and Dirichlet priors (K, α , β ).
Figure 20. Semantic coherence optimization for Cluster 1 across topic numbers.
Beyond BERTopic and LDA+, a number of embedding-based and neural models have been introduced in recent years to advance topic modeling. Approaches such as LDA2Vec [12] and the Embedded Topic Model (ETM) [11] integrate static embeddings into probabilistic frameworks, thereby improving semantic cohesion. However, their reliance on context-independent representations reduces robustness, often leading to ambiguous topic assignments in heterogeneous corpora. Similarly, WE-LDA [18] extends LDA with word embeddings and shows promising results in domain-specific settings, yet it inherits the limitations of static embeddings and struggles with scalability. Top2Vec [9], by directly clustering dense document embeddings, generates coherent topics without requiring a predefined topic number; nevertheless, the absence of explicit topic–word distributions limits its interpretability. More sophisticated approaches, including graph-based and neural variational topic models, capture richer semantic dependencies, but they typically incur substantial computational costs and lack transparency, which restricts their applicability in large-scale, real-world contexts.
While coherence ( C v ) remains the most widely adopted metric for assessing topic quality, it does not fully capture other essential dimensions such as stability, interpretability, and scalability. Table 8 therefore summarizes a multidimensional comparison of representative models, highlighting trade-offs across these criteria.
Table 8. Multidimensional comparison of SemaTopic and representative state-of-the-art topic models on the Google Scholar dataset (965 documents), combining semantic coherence ( C v ) with stability, interpretability, and scalability.
Notably, S e m a T o p i c achieves a relative gain of +6.2% in semantic coherence compared to BERTopic ( C v = 0.53 vs. 0.50 ), while simultaneously ensuring higher stability and scalability. These results demonstrate its ability to consistently generate semantically coherent and human-interpretable topics, even when applied to heterogeneous scientific corpora.

4.5. Objective 4: Evaluation of Scalability and Multilingual Robustness

  • Scalability assessment: One of the essential requirements of a topic modeling framework is its ability to scale efficiently to larger corpora without compromising topic quality. To assess this property, we compared the performance of S e m a T o p i c on two datasets of different sizes and characteristics: the Google Scholar corpus (965 documents, primarily monolingual) and the CEUR-WS proceedings corpus (1700 documents, multilingual). Execution time was measured for the entire pipeline, which includes embedding generation, dimensionality reduction, clustering, and probabilistic topic inference.
    As shown in Table 9, execution time increased from approximately 40 min for 965 documents to 500 min for 1700 documents. This supra-linear growth is mainly explained by the higher computational cost of embedding generation and density-based clustering (HDBSCAN), which become more demanding on heterogeneous corpora. Despite this increase, the pipeline consistently produced stable and interpretable topics, confirming the scalability of S e m a T o p i c .
    Table 9. Execution time of SemaTopic across different corpora.
    These findings demonstrate that S e m a T o p i c is capable of handling corpora beyond one thousand documents while preserving semantic interpretability and coherence. This confirms the scalability of the framework, making it applicable to real-world, large-scale text- mining scenarios.
  • Multilingual robustness: The results obtained on the CEUR-WS dataset highlight the ability of S e m a T o p i c to maintain semantic consistency across multilingual and heterogeneous clusters. As shown in Table 10, Cluster 0 achieved the highest coherence score (0.60) despite containing a relatively smaller number of documents (166) and a vocabulary size of 4824. Cluster 1, which comprised the largest portion of the dataset (1310 documents, 5970 unique terms), maintained a moderate coherence score of 0.52. Even Cluster 2, with the smallest number of documents (224), preserved a coherence level of 0.47, reflecting a non-trivial degree of semantic stability. Even the lowest coherence (0.47) is comparable or higher than baselines on monolingual corpora, showing that S e m a T o p i c can mitigate cross-lingual noise.
    Table 10. Topic coherence and hyperparameter settings for the CEUR-WS corpus.
    Overall, these findings indicate that S e m a T o p i c effectively balances coherence and scalability across varying corpus sizes and linguistic diversity. The relatively stable hyperparameter settings ( α , β , and K) across clusters further reinforce the robustness of the probabilistic inference layer, demonstrating that the framework can reliably adapt to multilingual input without compromising topic interpretability.
    To complement these quantitative results, we further employ graph-based visualizations to qualitatively examine how multilingual terms (e.g., Russian and Ukrainian words) are integrated within clusters. This analysis provides additional evidence of the model’s ability to capture cross-lingual semantic relationships while preserving topic coherence.
  • Graph-based visualization: It was employed to qualitatively assess the semantic organization of topics and the integration of multilingual terms (Figure 21, Figure 22 and Figure 23).
    This integration of multilingual terminology confirms that S e m a T o p i c captures cross-lingual semantic relations without degrading topic coherence. Such qualitative evidence complements the quantitative results, reinforcing the framework’s scalability and robustness for large and multilingual corpora.
    These results (Figure 21, Figure 22 and Figure 23) demonstrate that, unlike many embedding-based baselines that are sensitive to corpus size or language variation, S e m a T o p i c maintains both scalability and cross-lingual robustness. This highlights its potential for real-world deployment in heterogeneous and multilingual text-mining scenarios.
Figure 21. Global topic–word graph for the CEUR-WS corpus.
Figure 22. Local topic–word graphs highlighting multilingual integration within Cluster 2.
Figure 23. Local topic-word graphs highlighting multilingual integration within Cluster 1.

5. Conclusions

This paper introduced S e m a T o p i c , a cluster-specific and semantically enriched topic modeling framework that combines contextual embeddings with adaptive LDA-based inference. Through a comprehensive set of quantitative and qualitative evaluations—including coherence metrics, stability analyses, and graph-based visualizations—we demonstrated that S e m a T o p i c consistently outperforms classical and neural baselines in terms of coherence, interpretability, and robustness.
Importantly, the framework proved resilient to corpus perturbations (e.g., addition or removal of documents) and scalable to heterogeneous multilingual datasets, confirming its applicability to real-world text-mining scenarios.
Future work will focus on extending S e m a T o p i c with domain adaptation capabilities, optimizing runtime efficiency, and exploring broader corpora. These directions aim to further enhance its robustness and practical deployment in diverse NLP applications.

Author Contributions

Conceptualization, A.D. and S.S.; methodology, A.D.; software, A.D.; validation, A.D., S.S. and R.C.; formal analysis, R.C.; investigation, A.D.; resources, A.D.; data curation, A.D.; writing—original draft preparation, A.D., S.S. and R.C.; writing—review and editing, A.D.; visualization, A.D.; supervision, R.C. and S.S.; project administration, A.T. and A.J.; funding acquisition, R.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding. The APC was funded by the authors.

Data Availability Statement

All datasets used in this study are publicly available and have been referenced in the manuscript.

Correction Statement

This article has been republished with a minor correction to the Data Availability Statement. This change does not affect the scientific content of the article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Blei, D.M.; Ng, A.Y.; Jordan, M.I. Latent dirichlet allocation. J. Mach. Learn. Res. 2003, 3, 993–1022. [Google Scholar]
  2. Mersha, M.A.; Yigezu, M.G.; Kalita, J. Semantic-Driven Topic Modeling Using Transformer-Based Embeddings and Clustering Algorithms. arXiv 2024, arXiv:2410.00134v1. [Google Scholar]
  3. Grootendorst, M. BERTopic: Neural topic modeling with a class-based TF-IDF procedure. arXiv 2022, arXiv:2203.05794v1. [Google Scholar]
  4. Abdelrazeka, A.; Eida, Y.; Gawisha, E.; Medhata, W.; Hassana, A. Topic Modeling Algorithms and Applications: A Survey. Inf. Syst. 2022, 112, 102131. Available online: https://www.researchgate.net/publication/364447028 (accessed on 1 October 2022). [CrossRef] [Scilit]
  5. Devlin, J.; Chang, M.W.; Lee, K.; Toutanova, K. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv 2019. [Google Scholar] [CrossRef] [Scilit]
  6. Liu, Y.; Ott, M.; Goyal, N.; Du, J.; Joshi, M.; Chen, D.; Levy, O.; Lewis, M.; Zettlemoyer, L.; Stoyanov, V. RoBERTa: A Robustly Optimized BERT Pretraining Approach. arXiv 2019. [Google Scholar] [CrossRef] [Scilit]
  7. Reimers, N.; Gurevych, I. Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks. arXiv 2019. [Google Scholar] [CrossRef] [Scilit]
  8. Mikolov, T.; Chen, K.; Corrado, G.; Dean, J. Efficient Estimation of Word Representations in Vector Space. arXiv 2013, arXiv:1301.3781. [Google Scholar] [CrossRef] [Scilit]
  9. Angelov, D. Top2Vec: Distributed representations of topics. arXiv 2020, arXiv:2008.09470. [Google Scholar] [CrossRef] [Scilit]
  10. Drissi, A.; Khemiri, A.; Sassi, S.; Tissaoui, A.; Chbeir, R.; Jemai, A. LDA+: An Extended LDA Model for Topic Hierarchy and Discovery. In Recent Challenges in Intelligent Information and Database Systems, Proceedings of the 14th Asian Conference, ACIIDS 2022, Ho Chi Minh City, Vietnam, 28–30 November 2022; Springer: Berlin/Heidelberg, Germany, 2022. [Google Scholar]
  11. Dieng, A.B.; Ruiz, F.J.; Blei, D.M. Topic Modeling in Embedding Spaces. 2020. Available online: https://aclanthology.org/2020.tacl-1.29/ (accessed on 1 July 2020).
  12. Moody, C.E. Mixing Dirichlet Topic Models and Word Embeddings to Make lda2vec. arXiv 2016. [Google Scholar] [CrossRef] [Scilit]
  13. Pennington, J.; Socher, R.; Manning, C.D. GloVe: Global Vectors for Word Representation. Researchgate. 2014. Available online: https://www.researchgate.net/publication/284576917 (accessed on 1 January 2014).
  14. Sia, S.; Dalmia, A.; Mielke, S.J. Tired of Topic Models? Clusters of Pretrained Word Embeddings Make for Fast and Good Topics too! Association for Computational Linguistics. 2020. Available online: https://aclanthology.org/2020.emnlp-main.135/ (accessed on 1 January 2020).
  15. Likas, A.; Vlassis, N.; Verbeek, J.J. The global k-means clustering algorithm. Pattern Recognit. 2003, 36, 451–461. [Google Scholar] [CrossRef] [Scilit]
  16. Van der Linde, A. PCA-Based Dimensionality Reduction. J. Nonparametric Stat. 2003, 15, 77–92. Available online: https://www.tandfonline.com/doi/abs/10.1080/10485250306037 (accessed on 1 October 2021). [CrossRef] [Scilit]
  17. Nguyen, D.Q.; Billingsley, R.; Du, L.; Johnson, M. Improving Topic Models with Latent Feature Word Representations. arXiv 2018, arXiv:1810.06306v1. [Google Scholar] [CrossRef] [Scilit]
  18. Shi, M.; Liu, J.; Zhou, D.; Tang, M.; Cao, B. WE-LDA: A Word Embeddings Augmented LDA Model for Web Services Clustering. In Proceedings of the 2017 IEEE 24th International Conference on Web Services, Honolulu, HI, USA, 25–30 June 2017. [Google Scholar]
  19. Campello, R.J.; Moulavi, D.; Sander, J. Density-Based Clustering Based on Hierarchical Density Estimates. In Advances in Knowledge Discovery and Data Mining, Proceedings of the Pacific-Asia Conference on Knowledge Discovery and Data Mining, Gold Coast, Australia, 14–17 April 2013; Springer: Berlin/Heidelberg, Germany, 2013; pp. 160–172. [Google Scholar]
  20. Federico, B.; Silvia, T.; Dirk, H. Pre-training is a Hot Topic: Contextualized Document Embeddings Improve Topic Coherence. arXiv 2021, arXiv:2004.03974. [Google Scholar] [CrossRef] [Scilit]
  21. Lan, Z.; Chen, M.; Goodman, S.; Gimpel, K.; Sharma, P.; Soricut, R. Albert: A lite bert for self-supervised learning of language representations. arXiv 2020, arXiv:1909.11942. [Google Scholar] [CrossRef] [Scilit]
  22. Diego, S.U. A Process for Topic Modelling Via Word Embeddings. arXiv 2023, arXiv:2312.03705. [Google Scholar] [CrossRef] [Scilit]
  23. McInnes, L.; Healy, J.; Melville, J. UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction. arXiv 2020. [Google Scholar] [CrossRef] [Scilit]
  24. Zhou, D.; Hu, X.; Wang, R. Neural Topic Modeling by Incorporating Document Relationship Graph. arXiv 2020. [Google Scholar] [CrossRef] [Scilit]
  25. Rajendran, B.; Vidya, C.G.; Sanil, J.; Asharaf, S. A Local Explainability Technique for Graph Neural Topic Models. Hum. Centric Intell. Syst. 2024, 4, 53–76. [Google Scholar] [CrossRef] [Scilit]
  26. Li, W.; McCallum, A. Pachinko allocation: DAG-structured mixture models of topic correlations. In Proceedings of the ACM, ICML ’06: 23rd International Conference on Machine Learning, Pittsburgh, PA, USA, 25–29 June 2006; pp. 577–584. [Google Scholar]
  27. Ekinci, E.; Omurca, S. NET-LDA: A Novel Topic Modeling Method Based on Semantic Document Similarity. Turk. J. Electr. Eng. Comput. Sci. 2020, 28, 2244–2260. Available online: https://www.researchgate.net/publication/340732115 (accessed on 1 July 2020). [CrossRef] [Scilit]
  28. Cao, Z.; Li, S.; Liu, Y.; Li, W.; Ji, H. A novel neural topic model and its supervised extension. In Proceedings of the ACM, AAAI’15: Twenty-Ninth AAAI Conference on Artificial Intelligence, Austin, TX, USA, 25–30 January 2015; pp. 2210–2216. [Google Scholar]
  29. Miao, Y.; Grefenstette, E.; Blunsom, P. Discovering Discrete Latent Topics with Neural Variational Inference. arXiv 2018, arXiv:1706.00359. [Google Scholar] [CrossRef] [Scilit]
  30. Wu, X.; Nguyen, T.; Luu, A.T. A Survey on Neural Topic Models: Methods, Applications, and Challenges. arXiv 2024, arXiv:2401.15351v2. [Google Scholar] [CrossRef] [Scilit]
  31. Cieslak, M.C.; Castelfranco, A.M.; Roncalli, V.; Lenz, P.H.; Hartline, D.K. t-Distributed Stochastic Neighbor Embedding (t-SNE): A tool for eco-physiological transcriptomic analysis. Mar. Genom. 2020, 51, 100723. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.