BERTopic: Neural topic modeling with a class-based TF-IDF procedure

Maarten Grootendorst
3/11/2022
cs.CL

Official code: MaartenGr/BERTopic (7,902 stars, MIT, last commit 2026-10-20). 1 more implementation below.

Abstract

Topic models can be useful tools to discover latent topics in collections of documents. Recent studies have shown the feasibility of approach topic modeling as a clustering task. We present BERTopic, a topic model that extends this process by extracting coherent topic representation through the development of a class-based variation of TF-IDF. More specifically, BERTopic generates document embedding with pre-trained transformer-based language models, clusters these embeddings, and finally, generates topic representations with the class-based TF-IDF procedure. BERTopic generates coherent topics and remains competitive across a variety of benchmarks involving classical models and those that follow the more recent clustering approach of topic modeling.

View on arXivView PDF

Code Implementations(2)

MaartenGr/BERTopicOfficial100%
MIT

Leveraging BERT and c-TF-IDF to create easily interpretable topics.

7,902930Python, MakefileSep 22, 2020yesterdayMIT
bertldavismachine-learningnlpsentence-embeddings+5 more
MIT

Code and experiments for *BERTopic: Neural topic modeling with a class-based TF-IDF procedure*

8538PythonMar 14, 20222 years agoMIT

Similar Papers

Cite this paper

@article{grootendorst2022bertopic,
  title  = {BERTopic: Neural topic modeling with a class-based TF-IDF procedure},
  author = {Maarten Grootendorst},
  year   = {2022},
  eprint = {2203.05794},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.05794}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2203.05794.svg)](https://codeofpaper.com/paper/2203.05794)

Discussion