Bridging the Semantic Gap for Categorical Data Clustering via Large Language Models
Zihua Yang, Xin Liao, Yiqun Zhang, Yiu-ming Cheung
TL;DR
The paper tackles the semantic gap in categorical clustering caused by treating symbolic attribute values as equally distant and by weak co-occurrence signals in small datasets. It introduces ARISE, a framework that integrates external semantic knowledge from Large Language Models (LLMs) into the clustering pipeline via value-level queries, an attention-weighted encoding of LLM outputs, and an adaptive fusion with identity-based features to form discriminative representations for $k$-Means clustering. The method demonstrates consistent 19–27% gains over seven strong baselines across eight benchmark datasets using four LLM backends, while offline LLM description generation reduces online costs. The work highlights the practical potential of external semantic knowledge to enhance unsupervised categorical clustering and suggests avenues for extension to mixed-type data and domain-specific prompt tuning.
Abstract
Categorical data are prevalent in domains such as healthcare, marketing, and bioinformatics, where clustering serves as a fundamental tool for pattern discovery. A core challenge in categorical data clustering lies in measuring similarity among attribute values that lack inherent ordering or distance. Without appropriate similarity measures, values are often treated as equidistant, creating a semantic gap that obscures latent structures and degrades clustering quality. Although existing methods infer value relationships from within-dataset co-occurrence patterns, such inference becomes unreliable when samples are limited, leaving the semantic context of the data underexplored. To bridge this gap, we present ARISE (Attention-weighted Representation with Integrated Semantic Embeddings), which draws on external semantic knowledge from Large Language Models (LLMs) to construct semantic-aware representations that complement the metric space of categorical data for accurate clustering. That is, LLM is adopted to describe attribute values for representation enhancement, and the LLM-enhanced embeddings are combined with the original data to explore semantically prominent clusters. Experiments on eight benchmark datasets demonstrate consistent improvements over seven representative counterparts, with gains of 19-27%. Code is available at https://github.com/develop-yang/ARISE
