[Paper Review] Text Clustering with Large Language Model Embeddings
The paper evaluates how various embeddings from traditional methods and large language models (LLMs) affect text clustering across multiple datasets and clustering algorithms, including an analysis of dimensionality reduction via summarisation and embedding size.
Text clustering is an important method for organising the increasing volume of digital content, aiding in the structuring and discovery of hidden patterns in uncategorised data. The effectiveness of text clustering largely depends on the selection of textual embeddings and clustering algorithms. This study argues that recent advancements in large language models (LLMs) have the potential to enhance this task. The research investigates how different textual embeddings, particularly those utilised in LLMs, and various clustering algorithms influence the clustering of text datasets. A series of experiments were conducted to evaluate the impact of embeddings on clustering results, the role of dimensionality reduction through summarisation, and the adjustment of model size. The findings indicate that LLM embeddings are superior at capturing subtleties in structured language. OpenAI's GPT-3.5 Turbo model yields better results in three out of five clustering metrics across most tested datasets. Most LLM embeddings show improvements in cluster purity and provide a more informative silhouette score, reflecting a refined structural understanding of text data compared to traditional methods. Among the more lightweight models, BERT demonstrates leading performance. Additionally, it was observed that increasing model dimensionality and employing summarisation techniques do not consistently enhance clustering efficiency, suggesting that these strategies require careful consideration for practical application. These results highlight a complex balance between the need for refined text representation and computational feasibility in text clustering applications. This study extends traditional text clustering frameworks by integrating embeddings from LLMs, offering improved methodologies and suggesting new avenues for future research in various types of textual analysis.
Motivation & Objective
- Assess the impact of different textual embeddings on clustering quality.
- Evaluate the role of dimensionality reduction via summarisation in clustering performance.
- Investigate how embedding size influences clustering results and computational trade-offs.
- Compare open-source versus OpenAI embeddings in structured text clustering.
- Provide guidance on embedding-choice for practical clustering applications.
Proposed method
- Compare multiple datasets (CSTR, SyskillWebert, 20Newsgroups, MN-DS) across clustering algorithms (K-means, K-means++, AHC, Fuzzy C-means, Spectral).
- Use TF-IDF as baseline and include BERT, OpenAI, Falcon, and LLaMA-2 embeddings from Hugging Face.
- Preprocess data (remove metadata, HTML, non-Latin chars).
- Evaluate with external (F1S, ARI, HS) and internal (SS, CHI) metrics.
- Conduct summarisation experiments with various models; analyse larger embedding models; use PCA and t-SNE for visualization.
- Explore embedding-size effects (Falcon/LLaMA-2 families) on clustering performance.

Experimental results
Research questions
- RQ1Which embeddings yield the highest external clustering quality (F1S, ARI, HS) across datasets?
- RQ2Does dimensionality reduction via summarisation consistently improve clustering results?
- RQ3How does embedding size influence clustering performance and which models benefit most?
- RQ4How do open-source embeddings compare to OpenAI embeddings in structured text clustering?
- RQ5What are the practical trade-offs between clustering quality and computational cost when using larger LLM embeddings?
Key findings
- OpenAI embeddings generally yield superior clustering performance on structured, formal text across multiple metrics.
- K-means with OpenAI embeddings often achieves high ARI, F1S, and HS, though Silhouette and CHI may be lower, indicating potential space/shape effects.
- Open-source embeddings (Falcon, LLaMA-2) show mixed results; BERT often performs well among open-source options, with Falcon-7b outperforming LLaMA-2-7b in several cases.
- Summarisation did not consistently improve clustering; some models degraded performance due to loss of information, especially with smaller models.
- Increasing embedding size can improve clustering for some models (e.g., Falcon-7b to Falcon-40b) but not uniformly, and larger embeddings come with higher computational cost.
- Dimensionality visualization (PCA/t-SNE) suggests better class separation with certain larger models (e.g., LLaMA-13b, Falcon-7b) compared to smaller counterparts.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.