Topic modeling seeks to uncover latent semantic structure in text corpora with minimal supervision. Neural approaches achieve strong performance but require extensive tuning and struggle with lifelong learning due to catastrophic forgetting and fixed capacity, while classical probabilistic models lack flexibility and adaptability to streaming data. We introduce CobwebTM, a low-parameter lifelong hierarchical topic model based on incremental probabilistic concept formation. By adapting the Cobweb algorithm to continuous document embeddings, CobwebTM constructs semantic hierarchies online, enabling unsupervised topic discovery, dynamic topic creation, and hierarchical organization without predefining the number of topics. Across diverse datasets, CobwebTM achieves strong topic coherence, stable topics over time, and high-quality hierarchies, demonstrating that incremental symbolic concept formation combined with pretrained representations is an efficient approach to topic modeling.
Figures & tables
Figure 1: A visualization of three levels of the hierarchy induced by CobwebTM . For each node, we display the top five representative words extracting using the c-tf-idf procedure described in Section 3.2.1 . Words that appear in multiple nodes at the same level are underlined to highlight shared semantic content across sibling topics.
Method
Cvf
ΔCv %
ARI
TCD
ISIM f
CobwebTM (ours)
0.741
110.82
0.915
0.000
0.191
DBSTREAM
0.602
71.55
0.594
0.202
0.200
LifelongDocNADE
0.281
−11.61
0.479
0.369
0.194
MiniBatchKMeans
0.413
−0.89
0.952
0.236
0.215
OnlineLDA
0.317
7.06
0.948
0.033
0.216
Refit-HDBSCAN
0.673
7.35
0.944
0.053
0.196
Table 1: Lifelong topic modeling results on TweetNER . Best in bold, second-best underlined.
Method
Cvf
ΔCv %
ARI
TCD
ISIM f
CobwebTM (ours)
0.613
26.09
0.997
0.000
0.207
DBSTREAM
0.457
−3.67
0.012
0.155
0.188
LifelongDocNADE
0.184
−75.07
0.122
0.684
0.206
MiniBatchKMeans
0.423
−9.67
0.955
0.245
0.176
OnlineLDA
0.520
10.71
0.897
0.029
0.200
Refit-HDBSCAN
0.425
1.81
0.735
0.050
0.157
Table 2: Lifelong topic modeling results on Stack Overflow Dataset. Best in bold, second-best underlined.
Method
Cvf
ΔCv %
ARI
TCD
ISIM f
CobwebTM (ours)
0.796
57.51
0.984
0.000
0.208
DBSTREAM
0.418
−10.29
0.408
0.193
0.191
LifelongDocNADE
0.238
−49.49
0.127
0.462
0.196
MiniBatchKMeans
0.646
40.37
0.962
0.203
0.196
OnlineLDA
0.422
0.99
0.882
0.053
0.206
Refit-HDBSCAN
0.657
19.11
0.891
0.067
0.193
Table 3: Lifelong topic modeling results on Spatiotemporal News Dataset. Best in bold, second-best underlined.
Figure 2: Cv comparison on the StackOverflow, Spatiotemporal News, and TweetNER dataset.
Figure 3: ARI comparison on the StackOverflow, Spatiotemporal News, and TweetNER dataset.
Figure 4: TCD comparison on the StackOverflow, Spatiotemporal News, and TweetNER dataset.
Figure 5: Intruder Similarity (ISIM) comparison on the StackOverflow, Spatiotemporal News, and TweetNER dataset.
Dataset
20 News Groups
AG News
Stack Exchange
Method
NPMI
PCC
SD
NPMI
PCC
SD
NPMI
PCC
SD
BERTopic-HDBSCAN
0.161
0.045
0.600
0.101
0.031
0.913
0.130
0.036
0.891
BERTopic-KMeans
0.169
0.091
0.875
0.067
0.005
0.856
0.125
0.041
0.940
TraCo
0.155
-0.038
0.941
-0.107
-0.043
0.862
-0.040
-0.156
0.913
BoxTM
0.047
0.055
0.993
0.002
0.005
0.998
0.019
0.022
0.996
CobwebTM (ours)
0.206
0.141
0.958
0.108
0.027
0.942
0.131
0.073
0.959
Table 4: Comparison of hierarchical topic-modeling metrics across datasets.
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
Dataset
StackExchange
Model
None
16
128
512
COBWEBTM (ours)
0.6131
0.6331
0.6227
0.6383
BERTopic (MiniBatchKMeans)
0.4234
0.4377
0.4202
0.4393
BERTopic Refit (HDBSCAN)
0.4249
0.4829
0.4666
0.4713
BERTopic Refit (KMeans)
0.5507
0.5068
0.5110
0.5123
Lifelong NTM
0.1840
0.1621
0.1868
0.2057
Appendix
Table 5: Final C v by UMAP dimensionality on StackExchange.
Dataset
TweetNER
Model
None
16
128
512
COBWEBTM (ours)
0.7414
0.7249
0.7581
0.7048
BERTopic (MiniBatchKMeans)
0.4129
0.3531
0.3987
0.3807
BERTopic Refit (HDBSCAN)
0.6733
0.6501
0.6524
0.4558
BERTopic Refit (KMeans)
0.3694
0.4131
0.4094
0.4111
Lifelong NTM
0.2811
0.3042
0.3446
0.1684
Appendix
Table 6: Final C v by UMAP dimensionality on TweetNER.
Dataset
Spatiotemporal
Model
None
16
128
512
COBWEBTM (ours)
0.7960
0.6948
0.6837
0.6284
BERTopic (MiniBatchKMeans)
0.6460
0.6068
0.6403
0.6322
BERTopic Refit (HDBSCAN)
0.6572
0.5103
0.5190
0.5105
BERTopic Refit (KMeans)
0.6136
0.5568
0.5471
0.5516
Lifelong NTM
0.2381
0.1211
0.2331
0.1191
Appendix
Table 7: Final C v by UMAP dimensionality on Spatiotemporal dataset.
Figure 6: An ablation study to compare the lifelong results of using different embedding models for CobwebTM .
Dataset
20 News Groups
AG News
Stack Exchange
Model
NPMI
PCC
SD
NPMI
PCC
SD
NPMI
PCC
SD
MiniLM-L6
0.205
0.130
0.935
0.104
0.023
0.924
0.127
0.070
0.952
MiniLM-L12
0.196
0.119
0.952
0.109
0.031
0.959
0.130
0.055
0.862
RoBERTa (ours)
0.206
0.141
0.958
0.108
0.027
0.942
0.131
0.073
0.959
Appendix
Table 8: An ablation study to compare the hierarchical results of using different embedding models for CobwebTM .
Figure 7: An ablation study to compare the lifelong results of CobwebTM to other methods across all datasets with a reduced initial batch size of 500 documents.
Dataset
TweetNER (Holdout: person )
Model
Before Injection C v
After Injection C v
COBWEBTM (ours)
0.6425
1.0000
BERTopic (MiniBatchKMeans)
0.3812
0.0000
BERTopic Refit (HDBSCAN)
0.4845
1.0000
BERTopic Refit (KMeans)
0.3940
1.0000
Lifelong NTM
0.6120
0.0000
Appendix
Table 9: Holdout topic injection experiment on TweetNER dataset.
Figure 8: An ablation study to compare the amount of each Cobweb operation per-batch for all three datasets in CobwebTM .
Dataset
StackExchange (batch_size=10)
Model
Total Time (s)
Final Batch (s)
COBWEBTM (ours)
382.94
1.37
BERTopic (MiniBatchKMeans)
362.81
1.52
BERTopic Refit (HDBSCAN)
16525.93
87.79
BERTopic Refit (KMeans)
10749.74
50.93
Lifelong NTM
657.44
2.62
Appendix
Table 10: Runtime comparison on StackExchange dataset.
Dataset
20k StackExchange
50k StackExchange
Model
Start C v
Final C v
Start C v
Final C v
COBWEBTM (ours)
0.4932
0.6573
0.5010
0.6441
BERTopic (MiniBatchKMeans)
0.4810
0.4270
0.4958
0.4476
BERTopic Refit (HDBSCAN)
BERTopic Refit (KMeans)
Lifelong NTM
0.7133
0.5522
0.7752
0.0000
Appendix
Table 11: Coherence C v comparison on 20k and 50k StackExchange datasets.