Introduction
Categorical data, comprising features such as "Occupation" or "Education," is fundamental to many real-world datasets but presents significant challenges for machine learning algorithms. Unlike numerical data, categorical values lack an inherent mathematical structure, making operations like subtraction or distance calculation non-trivial. Traditional approaches often rely on simple encodings like One-Hot or Inverse Document Frequency (IDF), which treat values as independent and fail to capture semantic relationships (e.g., the link between "Professor" and "PhD"). Alternatively, similarity measures can capture these links but often struggle with hierarchical couplings—where values form clusters that interact across different levels of detail—and suffer from high computational costs on large datasets.
This paper introduces CURE (Coupled Unsupervised categorical data REpresentation), a framework designed to transform categorical data into dense numerical vectors by learning hierarchical value couplings.
The CURE Framework
The core of the CURE framework is the CDE (Coupled Data Embedding) method, which systematically models the complex relationships between feature values. The process is divided into three hierarchical stages.
1. Learning Value Couplings
CDE begins by constructing two complementary influence matrices for each feature:
- Occurrence-based Matrix ($M_o$): Captures relationships based on global value distributions and feature importance.
- Co-occurrence-based Matrix ($M_c$): Models how frequently values appear together within the same records.
The authors theoretically demonstrate that these two perspectives are complementary; values that appear similar from a co-occurrence standpoint can often be distinguished by their global occurrence patterns.
2. Multi-Granularity Clustering
Rather than identifying a single optimal grouping, CDE employs $k$-means clustering across a wide range of $k$ values. This multi-granularity approach captures a hierarchy of relationships, ranging from broad categories to fine-grained distinctions, effectively mapping the "semantic neighborhood" of each value.
3. Linear Coupling and Embedding
The memberships of values across all generated clusters are aggregated into a high-dimensional indicator matrix. Principal Component Analysis (PCA) is then applied to this matrix to extract the most significant independent concepts and reduce the data into a compact, low-dimensional numerical vector. This embedding allows for the use of standard Euclidean metrics in downstream tasks.
Experimental Evaluation
The researchers evaluated CDE using 10 real-world datasets from the UCI repository, including medical (e.g., Wisconsin Breast Cancer, Dermatology) and general (e.g., Adult) domains. These datasets were characterized using two new metrics: the Feature Correlation Index (FCI) and the Value Cluster Index (VCI), which measure the complexity of underlying couplings.
Results and Discussion
Experimental results demonstrate that CDE significantly outperforms traditional encoding methods. In unsupervised $k$-means clustering tasks, CDE achieved average F-score improvements of 9% over One-Hot encoding, 5% over One-Hot with PCA, and 19% over IDF encoding.
Furthermore, when compared to state-of-the-art similarity measures like COS and DILCA, CDE consistently showed superior performance. A key advantage of CDE is its scalability; while many similarity-based methods failed due to memory constraints on the large "Adult" dataset, CDE processed it efficiently by avoiding the need for an $N \times N$ similarity matrix.
Sensitivity analysis indicates that CDE is remarkably robust to its hyperparameters, $\alpha$ (weighting occurrence vs. co-occurrence) and $\beta$ (regularization). As shown in the performance plots, the F-score remains stable across a wide range of $\alpha$ values, making the framework highly adaptable to diverse datasets without extensive tuning.
Conclusion
CURE and its implementation, CDE, provide a robust and scalable solution for representing categorical data. By leveraging hierarchical value couplings and multi-granularity clustering, the framework captures deep semantic relationships that traditional encodings miss. Future work will explore non-linear coupling models and selective coupling techniques to further refine the embedding process for highly complex datasets.
Summary updated