Journal of Theoretical and Applied Information Technology 15th June 2025. Vol.103. No.11 © Little Lion Scientific ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195 4873 AN INVESTIGATION OF DYNAMIC TOPIC MODELING FOR REAL-TIME AND EVOLVING TEXTUAL DATA USING DTM, BERTOPIC, RECURRENT NEURAL NETWORKS AND PROPOSED HYBRID DTM WITH RNN ALGORITHMS 1C.B.PAVITHRA, 2DR.J.SAVITHA 1Research Scholar, Department of Information Technology, Dr.N.G.P. Arts & Science College, Coimbatore, Tamilnadu, India. 2Professor, Department of Information Technology, Dr.N.G.P. Arts & Science College, Coimbatore, Tamilnadu, India. E-mail:
[email protected],
[email protected] ABSTRACT Given the dynamic nature of textual data, Dynamic Topic Modeling has become an effective real-time analysis tool for streams of textual data. The objective of this study is to present a thorough review of different dynamic topic modeling strategies, such as advanced neural network-based methods like Recurrent Neural Networks (RNN), recent methodology like BERTopic, and traditional approaches like DTM. It also looks at the possible advantages and difficulties of combining RNN and DTM in a hybrid framework. We explore the effectiveness of these techniques in capturing temporal dynamics, identifying changing subjects, and offering insights into the underlying structures of the data through empirical evaluations on real-world textual datasets. Using the "Advanced Topic Modeling for Research Articles 2.0" dataset, this study assesses the methods according to a number of criteria, including accuracy, recall, precision, coherence, perplexity, and F-score. This research also assesses the subject modeling performance, scalability, and flexibility of our hybrid DTM and RNN strategy in relation to real-time and dynamic textual data, in comparison with other methods. The outcomes of our trials highlight the benefits of this hybrid strategy and offer insightful information to practitioners and researchers who want to use dynamic topic modeling for textual data analysis that is dynamic and real-time. Keywords: Dynamic Topic Modeling, Real-Time Data Analysis, Textual Data Streams, DTM, BERTopic, Recurrent Neural Networks, RNN, Hybrid Models, Natural Language Processing and Text Mining. 1. INTRODUCTION Effective analytic approaches are now critical in an era marked by an extraordinary inflow of textual data from a variety of sources, including social media, news articles, and online forums. Due to the dynamic and evolving nature of these data streams, traditional static topic modeling techniques like Latent Dirichlet Allocation (LDA) are insufficient [1]. To tackle this problem, dynamic topic modeling (DTM) has emerged as a promising approach that enables real-time meaningful topic extraction from continuously evolving textual data. The temporal dynamics present in textual data streams can be captured by DTM algorithms, making it possible to identify subjects that change over time. Nonetheless, with the introduction of fresh approaches and the incorporation of cutting-edge technology like deep learning, the field of dynamic topic modeling has seen tremendous developments in the last few years [2][3]. The purpose of this study is to present a thorough review of several dynamic topic modeling strategies, from conventional DTM approaches to cutting-edge approaches like BERTopic and Recurrent Neural Networks (RNN). This study examines the possible advantages and difficulties of integrating DTM and RNN in a hybrid framework that combines the best features of both approaches. Hybrid approaches in dynamic topic modeling, particularly the integration of Dynamic Topic Modeling (DTM) with Recurrent Neural Networks (RNN), are motivated by several key factors: Complementary Strengths: DTM is useful for extracting changing topics and capturing the temporal dynamics of textual data streams. RNNs, on the other hand, are excellent at capturing long-term dependencies and modeling sequential data. Our goal in merging these two approaches is to take advantage of their complimentary
Journal of Theoretical and Applied Information Technology 15th June 2025. Vol.103. No.11 © Little Lion Scientific ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195 4874 qualities in order to improve the precision and effectiveness of topic modeling for dynamic, real-time text data. Improved Flexibility: More modeling freedom is available for complex data structures when using hybrid methodologies. RNNs can capture fine-grained temporal connections inside individual texts, but DTM is better suited to capture general subject change across time. The integration of these approaches facilitates a more sophisticated comprehension of the dynamics of textual material. Enhanced Adaptability: Textual data from the real world frequently demonstrates a variety of traits, such as differing lengths, subtle linguistic expressions, and changing subjects. By fusing the adaptability of RNNs with the flexibility of DTM, hybrid techniques offer a more flexible framework for managing such complexity, enhancing the resilience of topic modeling algorithms. Better Performance: We hope to get around some of the drawbacks of conventional dynamic topic modeling methods, namely DTM's dependence on predetermined discrete time intervals, by combining DTM with RNNs. RNNs' dynamic properties enable ongoing learning and adaptation to shifting data distributions, which may enhance their ability to capture developing subjects. Scalability and Efficiency: Scalability and efficiency benefits are possible using hybrid techniques, especially when dealing with large-scale textual data streams. Hybrid models may handle enormous volumes of data more effectively by utilizing the distributed computing methods included into DTM frameworks and the parallel processing powers of RNNs. This allows for real-time topic modeling at scale. The need for this paper arises from the growing volume and velocity of textual data in real-time platforms such as news feeds and social media, where topic dynamics evolve rapidly. Traditional models like LDA or static topic models fail to adapt to these temporal and contextual changes. While DTM captures temporal transitions and RNN captures sequential dependencies, there exists a research gap in a hybrid approach that combines both strengths for robust, scalable, and adaptive topic modeling. The addressed problem is: How can we improve the quality, coherence, and temporal relevance of topic models in realtime data streams? The rest of this essay is structured as follows: A summary of conventional Dynamic Topic Modeling methods is given in Section 2, with an emphasis on the related works. In Section 3, discussed Proposed Methodology are Hybrid Dynamic Topic Modeling (DTM) And Recurrent Neural Networks (RNN) For Topic Modeling. A comparative study of the methods outlined in Section 5 is provided, along with a scalability and performance metrics evaluation. The work is finally brought to a close in Section 6, which summarizes the main conclusions and explores possible directions for further study in the area of dynamic topic modeling for real-time and developing textual data analysis. 2. RELATED WORKS Topic modeling is a statistical method widely used in text mining and natural language processing to uncover recurring themes or subjects within a collection of documents. Its primary aim is to automatically identify patterns in how words co-occur across texts, revealing underlying semantic structures. Typically, this involves creating a document-term matrix where terms (words or phrases) form columns and documents form rows. Latent Dirichlet Allocation (LDA) is a prominent algorithm in topic modeling, assuming documents consist of mixtures of topics, each represented as a probability distribution over terms. LDA effectively identifies consistent themes by estimating word distributions and topic proportions for each document. Evaluating the semantic coherence and similarity of top words within each topic are common practices in assessing topic model quality. Beyond traditional static methods, newer approaches such as BERTopic and dynamic techniques like Dynamic Topic Modeling (DTM) have emerged to handle large-scale textual data and capture temporal shifts in topics over time [4][5]. Topic modeling finds applications in diverse fields including document clustering, information retrieval, trend analysis, and recommendation systems, making it a valuable tool for analyzing and understanding textual content. Dynamic Topic Modeling (DTM) has emerged as a powerful technique for analyzing text data that evolves over time. DTM extends traditional topic modeling methods like Latent Dirichlet
Journal of Theoretical and Applied Information Technology 15th June 2025. Vol.103. No.11 © Little Lion Scientific ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195 4875 Allocation (LDA) to capture temporal dynamics in document collections. Introduced by Blei and Lafferty (2006) [6], DTM models how topics evolve over time by incorporating timedependent parameters into the generative process of topic modeling. DTM has been applied in various domains including analyzing news archives (A. Ahmed et al., 2010) [7] and tracking topics in short text and original document (Li X et al., 2017) [8], demonstrating its utility in capturing temporal changes in topics. Bertopic represents a recent advancement in topic modeling that leverages contextual embeddings from pre-trained language models like BERT. Proposed by Gens et al. (2020) [9], Bertopic uses BERT embeddings to represent documents and performs clustering based on semantic similarity, thereby improving the quality of topic representations. Bertopic has been applied to tasks such as document clustering (Gens et al., 2020) and semantic search (Reimers and Gurevych, 2019) [10], showcasing its effectiveness in capturing nuanced semantic relationships among documents. Recurrent Neural Networks (RNNs) are a class of neural networks designed to handle sequential data, making them suitable for tasks involving natural language processing (NLP). Introduced by Hochreiter and Schmidhuber (1997) [11], RNNs maintain a state that evolves as they process sequences, enabling them to capture dependencies over time. Several notable advancements in recurrent neural networks (RNNs) have been proposed in recent literature. Bacciu et al. (2020) [12] explored methods to enhance the resilience of RNNs through dropout techniques, aiming to improve their robustness in handling complex data sequences. Dieng et al. (2017) [13] introduced TopicRnn, a novel RNN architecture designed to capture long-range semantic dependencies, thereby enhancing its effectiveness in tasks requiring nuanced understanding of textual contexts. Qin et al. (2017) [14] proposed a dual-stage attentionbased RNN specifically tailored for time series prediction, leveraging attention mechanisms to focus on relevant temporal features. Mikolov et al. (2010) [15] contributed significantly to the field with their work on RNN-based language models, which have since been pivotal in natural language processing tasks such as speech recognition and machine translation. Additionally, Kudinov et al. (2016) [16] combined RNNs with probabilistic topic modeling to develop a hybrid language model, aiming to integrate semantic understanding with sequential data processing, showcasing a promising direction for improving text generation and understanding algorithms. These studies collectively highlight the diverse applications and ongoing innovations in RNNs, shaping their evolution and expanding their utility across various domains of artificial intelligence and machine learning. Recent research has explored hybrid approaches that combine DTM with deep learning techniques such as RNNs to enhance the modeling of temporal dynamics and sequential dependencies in evolving text data. Existing topic modeling methods are limited in their ability to capture both temporal topic evolution and sequential dependencies within dynamic textual data. This creates a need for hybrid approaches that can adapt to real-time data streams with enhanced interpretability and accuracy. Previous studies have explored either traditional DTM for temporal modeling (e.g., Blei & Lafferty, 2006) or used neural methods like BERTopic and RNNs for semantic representation. While each shows strength in specific aspects, limitations remain—DTM struggles with fine-grained sequence modeling and RNNs lack explicit temporal topic tracking. Our study differs by proposing a hybrid DTMRNN architecture that captures both temporal evolution and sequential word-level patterns. Our findings demonstrate superior performance in coherence, perplexity, and classification accuracy compared to standalone models, offering a holistic improvement in topic modeling for evolving text streams. 3. PROPOSED METHODOLOGY (HYBRID DYNAMIC TOPIC MODELING (DTM) AND RECURRENT NEURAL NETWORKS (RNN) FOR TOPIC MODELING) In natural language processing, topic modeling is an essential tool that helps reveal hidden topics in a corpus of textual data. The suggested Hybrid Dynamic Topic Model (DTM) and Recurrent Neural Network (RNN) methodology combines the advantages of two different approaches into a more complete topic modeling solution. The Dynamic Topic Model (DTM) provides a useful way to model how topics change over time by capturing the temporal evolution of topics within
Journal of Theoretical and Applied Information Technology 15th June 2025. Vol.103. No.11 © Little Lion Scientific ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195 4876 a corpus. DTM offers insights into the dynamic nature of topics within the text data by modeling the transition probabilities between topics across time slices and estimates topic proportions for each document. Meanwhile, Recurrent Neural Networks (RNNs) are excellent at recognizing sequential dependencies in data streams. Deeper comprehension of the semantic structure of documents is made possible by RNNs' ability to train representations that capture the contextual relationships between words in the context of text data. The complementing nature of DTM and RNN techniques is utilized when integrating them into a hybrid architecture. Through the integration of DTM's temporal dynamics and RNNs' sequential dependencies, the hybrid technique provides a more comprehensive comprehension of the latent subjects included in text data. Through improved topic modeling made possible by this integration, applications in text mining, social media analysis, document classification, and content analysis as well as information retrieval are made possible. Recurrent Neural Networks (RNN) and Dynamic Topic Modeling (DTM) provide unique benefits for encoding temporal dynamics and sequential dependencies, respectively, in textual data. By combining these approaches into a hybrid framework, topic modeling is approached comprehensively while utilizing the advantages of each method. Here, we outline an algorithm for topic modeling using Hybrid DTM-RNN, along with step-by-step formulations and technical details. Algorithm for Proposed Hybrid DTM and RNN for Topic Modeling: Step 1: Preprocessing Input: Given a corpus of text documents D={d1,d2,...,dN}: Tokenization: Tokenization splits each document into individual tokens (words, subwords, or characters). For each document di, tokenize it into a sequence of tokens: Tokenize(di)=[wi1,wi2 ,...,wiLi] Where Liis the number of tokens in document di. Normalization: Normalize the tokens by converting them to lowercase to ensure consistency: Normalize (wij )=lowercase(wij) Stopword Removal: Remove common stopwords that do not carry much semantic meaning: Remove Stop words w + w if w is not a stopword null ,otherwise Punctuation Removal: Remove punctuation marks from the tokens: Remove Punctuation words w + w if w is not a punctuation mark null ,otherwise Stemming or Lemmatization: Reduce inflected words to their base or root form to normalize variations: Stem(wij ) or Lemmatize(wij) Handling Numerical Data: Convert numerical tokens into a standard representation: Numerical Handling w + number if w is a number w ,otherwise Join Tokens: Reconstruct the preprocessed tokens into a single string: Joined Tokens (di)= Join(Preprocessed(di)) Step 2: Train the Recurrent Neural Network (RNN) Input: Given a corpus of documents D={d1,d2,...,dN} and the number of time slices T: 1. Define the term-document matrix: For each document di, create a count vector ni representing the frequency of each term in di. Construct a termdocument matrix W, where each row represents a document and each column represents a term. The element Wij represents the count of term j in document i. 2. Learn topic proportions over time: For each time slice t, estimate the topic proportions P(zt | di) for each document di: P(zt | di)= P(zt)⋅P(di∣zt) / ∑KK=1P(zt) | P(di.zt) Where, P(zt) is the prior distribution of topics at time P(di | zt) is the likelihood of document di given topic zt. 3. Estimate topic evolution over time: Model the transition probabilities between topics at adjacent time slices: P(zt+1| zt). This can be estimated using various methods such as Markov chain
Journal of Theoretical and Applied Information Technology 15th June 2025. Vol.103. No.11 © Little Lion Scientific ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195 4877 Monte Carlo (MCMC) sampling, variation inference, or Gibbs sampling. 4. Optimization: Use an optimization algorithm (e.g., gradient descent) to maximize the likelihood of the observed data given the model parameters. The objective function to maximize is the log-likelihood of the observed data: L(Θ)=∑N i=1∑ T t=1logP(di|zt)P(zt) 5. Model parameters: Θ represents the parameters of the DTM, including topic distributions, topic proportions, and transition probabilities. 6. Training: Train the DTM using an iterative optimization process until convergence is reached. This involves updating the parameters Θ iteratively to maximize the likelihood of the observed data. Estimating topic proportions and topic evolution can be done using a variety of inference techniques, including Gibbs sampling and variational inference. Regularization approaches, like transition probabilities or priors on topic distributions, can be used to avoid overfitting. The ideal number of subjects and time slices can be ascertained by applying model selection approaches. This algorithm describes the procedures for training the Dynamic Topic Model (DTM), which includes modeling the evolution of topics and predicting topic proportions across time. Depending on the optimization algorithm and inference method selected, different implementation details may apply. Step 3: Train the Recurrent Neural Network (RNN) Training the Recurrent Neural Network (RNN) involves processing sequential data to learn representations capturing temporal dependencies. Here's the formula for training the RNN: Input: Given a corpus of text documents D={d1,d2,...,dN} represented as sequences of tokens: 1.Tokenization: Tokenize each document di into a sequence of tokens Xi={xi1,xi2,...,xiLi}, where Li is the length of document di. 2. Embedding: Map each token xij to its distributed representation using an embedding matrix Embed (xij)=eij=E.1xij Where 1xij is a one-hot vector representation of token xij and eij is its embedding. 3. Forward pass: Propagate the embedded tokens through the recurrent layers: hij=RNN(hi(j−1),eij) Where, hij is the hidden state at time step j of document di. hi0 is typically initialized as a vector of zeros. RNN represents the recurrent function (e.g., LSTM or GRU) applied at each time step. 4. Output layer: Optionally, if the RNN is trained for a specific downstream task (e.g., classification or generation), apply an output layer: yij=softmax(Wouthij+bout) Where, Wout and bout are the weight matrix and bias vector of the output layer, respectively. 5. Loss computation: Compute the loss between the predicted output yij and the ground truth (if available) using an appropriate loss function (e.g., crossentropy for classification tasks). 6. Backpropagation: Use backpropagation through time (BPTT) to compute gradients of the loss function with respect to the parameters of the RNN. Update the parameters of the RNN (including weights and biases) using an optimization algorithm such as stochastic gradient descent (SGD) or Adam. Repeat: Repeat steps 3-6 for multiple epochs until convergence is reached or until a stopping criterion is met. This algorithm outlines the steps involved in training the Recurrent Neural Network (RNN) for processing sequential data, which can be adapted for various tasks including language modeling, text classification, and sequence generation. Step 4: Topic Representation Integration Combining the outputs of the Dynamic Topic Model (DTM) with the Recurrent Neural Network (RNN) results in a unified representation that captures both temporal dynamics and sequential dependencies in the hybrid DTM and RNN method to topic representation integration. Input: Given the outputs from the DTM and RNN for a document di Topic distribution from DTM: Let θi =[θi1,θi2,...,θiK] be the topic distribution for document di, where K is the number of topics.
Journal of Theoretical and Applied Information Technology 15th June 2025. Vol.103. No.11 © Little Lion Scientific ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195 4878 Hidden state from RNN: Let hi represent the final hidden state of the RNN for document di. Integration: Combine the topic distribution from the DTM with the hidden state from the RNN to obtain the integrated representation: Integrated Representation i=[hi,θi] This comprehensive portrayal The sequential dependencies acquired by the RNN and the temporal dynamics learned by the DTM are both captured by the Integrated Representation. It offers a thorough representation of the document data that can be applied to further processes like retrieval, grouping, or classification. In order to make sure that each element contributes proportionately to the integrated representation, you may choose to normalize the topic distribution and the hidden state before merging them. Consider using dimensionality reduction methods like PCA or t-SNE to lower the dimensionality of the integrated representation while keeping crucial information if it is too high-dimensional. Step 5: Fine-tuning and Evaluation Fine-tuning in the context of the hybrid DTM and RNN approach involve optimizing the model's parameters further on a specific taskrelated dataset and assessing its performance using relevant metrics. Here's a breakdown of the steps involved: Input: Given the integrated representations Integrated Representationi obtained from the hybrid model and task-specific labeled data (if available): Define a task-specific objective function L(θ) where θ where θ represents the parameters of the hybrid model. Use an optimization algorithm (e.g., gradient descent) to minimize the objective function with respect to the model parameters. Update the model parameters iteratively using backpropagation, similar to the training phase of the RNN. Evaluation: Assess the performance of the finetuned hybrid model using appropriate evaluation metrics related to the specific task. Some common metrics include: Classification tasks: Accuracy, precision, recall, F1-score, ROC-AUC. Clustering tasks: Silhouette score, Davies–Bouldin index. Topic coherence: Measures such as topic coherence or perplexity can evaluate the quality of topics generated by the model. Downstream task performance: Evaluate the performance of the model on the actual downstream task it was fine-tuned for (e.g., sentiment analysis, text classification). Step 6: Inference In the inference step of the hybrid DTM and RNN approach for topic modeling, we combine the outputs of both models to obtain the final topic distribution for a new document. Input: Given a new document represented as Dnew: 1. Preprocess the new document: Preprocess(Dnew)={wnewj} Where wnewj represents the jth token in the new document. 2. Pass through DTM: Obtain the topic distribution for the new document from the trained DTM: P(znew∣Dnew)=DTM(Dnew) Where, znewrepresents the topic distribution for the new document. 3. Pass through RNN: o Tokenize the preprocessed document: Xnew=[xnew1,xnew2 ,...,xnewNnew] o Feed the tokenized sequence through the RNN to obtain the hidden state: hnew=fRNN(Xnew) o Optionally, if the RNN was trained with a final softmax layer for classification tasks, you may also calculate the output prediction: ynew=gRNN(hnew) Combine Outputs: Concatenate or combine the topic distribution from the DTM with the hidden state from the RNN to obtain the final integrated representation for the new document: Integrated Representation new =[hnew,P(znew∣Dnew)] Figure 1 investigate the suggested hybrid DTM and RNN strategy for topic modeling. To prepare text documents for analysis, preparation procedures such tokenization, punctuation and stop word removal, and stemming or lemmatization are carried out. By modeling the transition probabilities between topics at adjacent time slices and calculating topic proportions for each document, the Dynamic Topic Model (DTM) is trained to represent the evolution of topics across time. As this is going on, the preprocessed text sequences are processed by the Recurrent Neural Network (RNN), which learns
Journal of Theoretical and Applied Information Technology 15th June 2025. Vol.103. No.11 © Little Lion Scientific ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195 4879 representations that represent word sequential relationships. To create comprehensive document representations, these representations are combined by fusing the hidden states from the RNN with the topic distributions from the DTM Figure 1: Hybrid DTM And RNN For Topic Modeling . Using a task-specific dataset, the hybrid model is further refined. Metrics like accuracy or coherence scores are used to assess the model's performance. Parameters are optimized using techniques like gradient descent. New documents go through the same preprocessing procedures and are run through both the DTM and RNN during inference. The outputs of these two networks are then combined to produce the final topic distribution, which is displayed in Figure 2. This method makes use of the advantages of both DTM and RNN to offer a strong topic modeling framework appropriate for a range of text analysis applications. Figure 2: Inference 4. EXPERIMENTAL RESULTS 4.1. Datasets There are 14,000 papers in the dataset, Advanced Topic Modeling for Research Articles 2.0 [17], with an average length of 60 words. This dataset's main goal is to forecast tags linked to research papers based on their abstracts in an effort to alleviate the difficulty of finding relevant information amidst the large body of scientific literature. In the past, an Independence Day hackathon was arranged to anticipate themes; now days, the emphasis is on anticipating tags. The dataset, which comes from Kaggle, can be used to experiment with different Topic Modeling (TM) techniques. It makes use of popular public text datasets for the 29 research topic job and brief discussions from Research Articles 2.0. The collection includes information on several subjects, such as statistics, physics, computer science, and mathematics. Anticipating tags linked to research papers is the goal; it must be understood that a single article can have more than one tag associated with it. This dataset facilitates study in a variety of topics and allows important insights to be extracted from scientific literature. It also serves as the basis for experiments involving different Topic Modeling approaches. 4.2. Data preprocessing Several processes are used to preprocess the dataset in preparation for the Hybrid Dynamic Topic Model (DTM) and Recurrent Neural Network (RNN) approach. These steps include tokenization, punctuation and stopword removal, and sequence conversion. Here are the steps and their accompanying formulas, with snippets of Python code for each step: Tokenization : Split the text into individual words or tokens. Removal of Stopwords and Punctuation: Remove common stopwords and punctuation marks. New Document Pre processing Pass through DTM Pass through RNN Combine Output
Journal of Theoretical and Applied Information Technology 15th June 2025. Vol.103. No.11 © Little Lion Scientific ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195 4880 Stemming or Lemmatization : Reduce words to their base or root forms. Conversion to Sequences: Convert preprocessed text into sequences suitable for input to the RNN. By applying these preprocessing steps, the raw textual data is transformed into sequences suitable for input to both the DTM and RNN components of the hybrid model. This prepares the data for subsequent analysis and modeling, facilitating the extraction of meaningful insights from the research articles. 4.3. Performance Evaluation In our experiment setup utilizing the Research Articles 2.0 dataset, we configure the input word vector length (L) to 25 and set the batch size to 64, along with a hidden size (H) of 100 and a learning rate (lr) of 0.01. For the training of topic models, we establish hyperparameters such as α=50/K and β=0.05 uniformly across all models. In the case of RNN, we determine the strength of prior knowledge (ϵ) as 50 and 100 for different versions of the Research Articles dataset, ensuring its adequacy in influencing the learning process without being excessively weak or strong. We set the threshold (δ) for the relationship between words to 0.1 and T to 10 for candidate word numbers. Across all models, the default number of topics (K) remains fixed at 29. However, for optimization purposes, we tailor parameter settings individually for each model. Specifically, we opt for a weak prior with α=0.1 and β=0.01 to enhance the performance of Topic Modeling on short texts. Furthermore, we maintain default hyper-parameter configurations, including α=0.1, λ=0.1, and β=0.01 for DTM, along with τ=0.1 for BERTopic. To ensure reproducibility and independence from random initializations, we fix the seed for the random number generator to 5 for HDP and CT-DTM. Coherence calculations are conducted for K=15 and K=25, with M set as 5 and 10 to ensure result consistency. Perplexity: The performance of language models, including topic models like BERTopic, Dynamic Topic Model (DTM), Recurrent Neural Networks (RNN), and hybrid models, is frequently assessed using the metric of perplexity. It gauges how accurately a model forecasts a corpus or sample of textual data. The perplexity PP is computed as follows, given a linguistic model M, a dataset D made up of N documents, and the probability, P(wi|dj), of finding a word wi in document dj based on the model M: PP(D)=exp{−1/N ∑Nj=1 1/∣dj∣ ∑ ∣dj∣ i=1logP(wi∣dj )} Where, the length of document dj is denoted by |dj|. The average log likelihood of observing each word in the document is determined by the inner sum. The average log probability for every document in the collection is determined by the outer sum. To translate the average log likelihood back into the perplexity scale, use the exponential function, exp. Interpretation Better performance is shown by lower perplexity scores since the model is more adept at forecasting the observed data. To what extent the model fits the data is gauged by plexity. A lower perplexity implies greater assurance in the model's predictions, while a higher perplexity denotes greater uncertainty. Example: Let's say we have trained a language model, and we want to calculate its perplexity on a test dataset consisting of N documents. We compute the probability of observing each word in each document according to the model, average the log probabilities across all words and documents, and then take the exponential of the average to obtain the perplexity value. A key performance indicator for topic modeling and natural language processing methods such as DTM, BERTopic, RNN, and Hybrid Dynamic Topic Model and Recurrent Neural Network (Hybrid DTM-RNN) are the perplexity metric. Lower perplexity values for DTM show that the model fits the observed data better, indicating that it can more reliably predict the held-out test data. In a similar vein, BERTopic uses perplexity to evaluate the caliber of topics produced using BERT embeddings. Perplexity, a measure of how effectively a model predicts the following word in a sequence, is computed in the case of RNNs to assess language modeling performance. The Hybrid DTM-RNN model uses perplexity to measure the overall effectiveness of the combined RNN and DTM components, providing information on the model's capacity to represent sequential dependencies and temporal topic evolution in text input. Researchers can determine how well each technique captures the underlying structure and patterns in textual datasets by analyzing perplexity measures in detail across multiple approaches. This information can then be used to influence future optimization and refinement efforts.
Journal of Theoretical and Applied Information Technology 15th June 2025. Vol.103. No.11 © Little Lion Scientific ISSN: 1992-8645 www.jatit.org E-ISSN: 1817-3195 4881 With fixed counts of k = 15 and k = 25, Figure 3 show the test perplexity calculated on the Research Articles dataset, comparing the performance of several Topic Modeling algorithms against the number of subjects. Interestingly, there is a noticeable congruence between the various methods when examining the perplexity trends across various word and document counts. The Hybrid DTM-RNN stands out in particular when it shows lower perplexity scores than other methods like DTM, BERTopic, and RNN. This finding implies that Hybrid DTM-RNN is more effective and accurate at predicting the underlying structures present in the dataset. Because the Dynamic Topic Model (DTM) and Recurrent Neural Network (RNN) components are integrated, the Hybrid DTMRNN can take advantage of the complementing advantages of both approaches, which is why it performs better. The Hybrid DTM-RNN delivers better predictive accuracy and shows promise as a reliable method for topic modeling tasks by efficiently modeling the temporal evolution of subjects with DTM while capturing sequential relationships within text data using RNN. Figure 3: Test perplexity versus Topics k-15 and k=25. Coherence: Coherence is a statistic that is frequently used to assess the caliber of topics produced by topic models, including hybrid models, BERTopic, and the Dynamic Topic Model (DTM). It gauges how interpretable or coherent the subjects the model generates are on a semantic level. Coherence is determined using the pairwise co-occurrence of words within a set of K themes, each of which is represented by a set of T top words. The PMI score, or point-wise mutual information score, is one often used coherence metric. A pair of words, w1 and w2, have a PMI score of: PMI(w1,w2)= log( P(w1,w2) / P(w1)⋅P(w2) ) Where, P(w1, w2) is the probability of observing both words w1 and w2 in the same context (e.g., within the same document or topic). P(w1) and P(w2) are the probabilities of observing words w1 and w2 independently. The coherence score for a topic is then computed as the average of the PMI scores for all pairs of words in the topic. Finally, the coherence score for the entire set of topics is calculated as the average coherence score across all topics. Interpretation: Higher coherence values indicate better quality topics, as the words within each topic are more semantically related or coherent. Coherence measures how well the words within each topic support each other, reflecting the semantic consistency of the topics. When evaluating the quality and interpretability of topics produced by topic modeling techniques such as the DTM, BERTopic, RNN, and the Hybrid Dynamic Topic Model and Recurrent Neural Network (Hybrid DTM-RNN), the coherence measure is a crucial determinant. By looking at the pairwise co-occurrence of words inside each topic, coherence evaluates the semantic consistency and interpretability of the topics. A topic with more semantically connected and coherent words has a higher coherence score. Coherence metrics in a technical analysis are calculated by taking the average of the PMI scores between word pairs in each topic after each pair's score is determined. Coherence scores for DTM, BERTopic, and RNN provide information about the caliber and readability of the topics produced by each technique. Surprisingly, the suggested hybrid DTM-RNN shows promise for higher coherence scores than previous techniques. By combining the advantages of RNN to model sequential dependencies and DTM to capture temporal topic evolution, the hybrid technique may provide topics with greater semantic coherence, improving the interpretability and usefulness of the topic modeling outcomes. By conducting a thorough and precise evaluation of coherence metrics, researchers can acquire more profound understanding of how well each approach produces issues that are comprehensible and comprehensible. This can help them make wellinformed judgments about which models to use and how to enhance them. The test coherence calculated on the Research Articles dataset is shown in Figure 4, which