Data Clustering: Methods of Semantic Text Analysis and Their Role in Problem Formulation

Eduard Yanakov27 May 2023

Problem

A neighboring business department at a bank has a million customer messages from social networks and wants to know what customers write about. Nobody can read them, and there are no labels. Without a grouping, the team cannot tell whether customers give structured feedback at all or mostly emotional negativity with nothing objective in it.

A topic shown as a list of top words is hard to interpret, and its top-10 documents usually describe the same thing.

Example from the article: a topic about cashback. The top words only show that cashback is not credited. After the extra summarization step, the specific complaints behind it become visible.

Solution in brief

Group the texts without labels, either with a topic model (BigARTM) or by embedding them and clustering the vectors (directly, or through BERTopic). Then describe each topic by a "spectrum": split its documents into sentences, cluster the sentences once more, and show the cluster centers. The Alfa-Bank lab wrapped this pipeline into a web service for business analysts.

Questions this case answers
  • How to find what users write about in a very large set of unlabeled short messages without reading them
  • How to make automatically found topics readable by describing each one with its most typical specific statements
  • How to find out what customers write about in a million unlabeled messages without reading them
  • How to choose between BigARTM, BERTopic and embedding clustering for a text collection

Tools and methods

  • BigARTM — topic model with regularizers (background topics, seeded words); good for flexible tuning on structured collections
  • BERTopic — sentence-BERT embeddings, dimensionality reduction, clustering, tf-idf topic description; fastest to start
  • Embeddings + dimensionality reduction + clustering — fallback when BERT is too heavy to run
  • Affinity Propagation on Jaccard similarity — clusters the sentences of one topic to show its spectrum
Continue reading — it's free

Google or a one-time email code. No password.