LLMs Enable Bag-of-Texts Representations for Short-Text Clustering

I-Fan Lin, Faegheh Hasibi, Suzan Verberne

TL;DR

Instead of trying to "fix" existing text embeddings with Large Language Models (LLMs), this paper proposes LeBoT: a method that uses LLM feedback to build an entirely new "Bag-of-Texts" vector space from scratch. By starting with a clean slate where all texts are equidistant, the method avoids the inherent biases of pre-trained embedders and achieves state-of-the-art unsupervised clustering results without any training or prior knowledge of cluster counts.

What Problem Does This Paper Address?

Short-text clustering—grouping things like chatbot queries or social media posts—is notoriously difficult because the texts are brief and lack context. Traditionally, researchers use pre-trained models (like BERT) to turn text into dense vectors (embeddings) and then group them.

However, these pre-trained models come with "baggage": their internal geometry might not align with the specific intent of a new dataset. Recent "training-free" methods try to use LLMs to refine these existing embeddings, but they are often still "trapped" by the original model's distance relationships. If the initial model thinks two unrelated sentences are similar, it’s hard for an LLM-based refinement to push them far enough apart. Furthermore, most methods require knowing the number of clusters ($K$) in advance, which is rarely the case in real-world "cold start" scenarios.

Methods

The authors introduce LeBoT (LLM-enabled Bag-of-Texts), which moves away from refining dense embeddings toward a sparse, interpretable representation.

  1. Representative Selection: The system uses a standard embedder to perform a rough initial clustering and picks "medoids" (the most central text in a group) to serve as representatives.
  2. Equidistant Initialization: These representatives are converted into one-hot vectors. In this new space, every representative is exactly the same distance from every other representative—a "clean slate."
  3. LLM Guidance: For every other text in the dataset, the LLM is asked: "Which of these representatives is similar to this text?"
  4. BoT Construction: Each text is then represented as a vector where the dimensions correspond to the representatives. If an LLM says a text is similar to representatives A and C, its vector is the average of the vectors for A and C.
  5. Iterative Refinement: The process repeats. In subsequent rounds, the "pool" of candidates for similarity expands, and the vectors are updated until they converge.
  6. Scalability via Distillation: To handle massive datasets where calling an LLM for every row is too expensive, the authors train a tiny MLP (10M parameters) to "mimic" the BoT vectors generated for a small subset of the data.

Datasets

The authors evaluated LeBoT on several diverse short-text benchmarks across two scenarios: Emerging Data (completely unlabeled) and Generalized Category Discovery (GCD).

  • Intent Detection: Bank77, Clinc150, Mtop, Massive.
  • Emotion Recognition: GoEmo.
  • Community QA: StackOverflow.
  • Hyperparameter Tuning: ArxivS2S and Reddit (used to pick the vector dimension $d=1024$).

Key Insights and Ideas

  • The Power of the "Clean Slate": By initializing texts as equidistant, LeBoT removes the "prior" bias of the embedder. The results show that LeBoT can even work with TF-IDF (a very basic keyword-based method) as the backbone, outperforming sophisticated BERT models because the LLM provides the actual semantic logic.
  • Model Agnosticism: Because the LLM is the "judge" and the BoT is the "space," you can swap out the initial embedder or the LLM easily. The method proved robust even when using smaller, open-source models like Gemma-2-9b-it.
  • Iterative Convergence: The authors found that most texts reach a stable position in the BoT space within 3 to 5 iterations. This suggests that "consensus" in the vector space emerges quickly through LLM feedback.
  • Distillation Works: You don't need to run an LLM on 100,000 rows. Running it on a 20% sample and using a simple neural network to learn the mapping allows the method to scale to production-sized datasets with minimal loss in accuracy.

Key Results

  • Superior Performance: In the "Emerging Data" scenario, LeBoT consistently outperformed SOTA baselines like IDAS and SPILL. For example, on the Bank77 dataset using a MiniLM backbone, LeBoT achieved a Clustering Accuracy of 73.12%, compared to the "Plain" embedding accuracy of 61.27%.
  • Robustness: While other methods saw their performance tank when using weaker embedders, LeBoT remained stable. With a BERT backbone, LeBoT's accuracy was 60.95%, while the baseline was only 29.07%.
  • Unknown K: When tested with HDBSCAN (which doesn't require knowing the number of clusters), LeBoT's refined embeddings led to much more accurate cluster count estimates than raw embeddings.
  • Efficiency: Through distillation, the inference time dropped from ~0.7 seconds per text (LLM call) to 0.0002 seconds per text (MLP pass).

Limitations and Future Work

  • Language: The study focused exclusively on English datasets. The authors acknowledge that performance in other languages remains to be tested.
  • Candidate Selection: While the BoT representation is independent, the selection of which texts the LLM compares still relies on the initial embedder. If the embedder is so poor that it can't even put similar items in the "top-m" candidates, the LLM will never see them.
  • Human-in-the-loop: The authors suggest that future versions could incorporate human feedback into the iterative refinement stage to further ground the clusters in specific business logic.

Summary updated

Abstract

In this paper, we propose a training-free method for unsupervised short text clustering that relies less on careful selection of embedders than other methods. In customer-facing chatbots, companies are dealing with large amounts of user utterances that need to be clustered according to their intent. In these settings, no labeled data is typically available, and the number of clusters is not known. Recent approaches to short-text clustering in label-free settings incorporate LLM output to refine existing embeddings. While LLMs can identify similar texts effectively, the resulting similarities may not be directly represented by distances in the dense vector space, as they depend on the original embedding. We therefore propose a method for transforming LLM judgments directly into a bag-of-texts representation in which texts are initialized to be equidistant, without assuming any prior distance relationships. Our method achieves comparable or superior results to state-of-the-art methods, but without embeddings optimization or assuming prior knowledge of clusters or labels. Experiments on diverse datasets and smaller LLMs show that our method is model agnostic and can be applied to any embedder, with relatively small LLMs, and different clustering methods. We also show how our method scales to large datasets, reducing the computational cost of the LLM use. The flexibility and scalability of our method make it more aligned with real-world training-free scenarios than existing clustering methods.
BibTeX
@inproceedings{lin2026llms,
  author = {I-Fan Lin and Faegheh Hasibi and Suzan Verberne},
  title = {{LLMs Enable Bag-of-Texts Representations for Short-Text Clustering}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-long.291},
}

Loading related content...

Figure