Clustering numerical data is straightforward—we have the Euclidean distance to tell us that 1 is closer to 2 than it is to 10. But how do you cluster categorical data? Is a "Lawyer" closer to a "Doctor" or a "Driver"?
A new paper, "Break the Tie: Learning Cluster-Customized Category Relationships for Categorical Data Clustering," introduces a novel framework called DISC that moves away from fixed, global definitions of category relationships, instead learning them dynamically for each specific cluster.
TL;DR
The DISC framework abandons the assumption that relationships between categorical values (like "Occupation") are global and fixed. Instead, it learns cluster-specific distance metrics by modeling category relationships as "relation trees," significantly improving clustering accuracy and enabling seamless integration with numerical data.
What Problem Does This Paper Address?
Categorical attributes are everywhere, but they lack a natural "distance." Most existing clustering algorithms (like k-modes) use the Hamming distance, which simply checks if two values are identical (distance 0) or different (distance 1). This "tie" between all different values ignores the nuanced relationships that exist in real-world data.
More advanced methods try to learn these relationships, but they usually assume the relationship is global. However, the authors argue that context matters. For example, in a dataset of patients, the distance between "Programmer" and "Construction Worker" might be very small in a cluster defined by "COVID-19 risk" (both are susceptible), but very large in a cluster defined by "Occupational Lung Disease" (where the construction worker's risk is much higher). By forcing a single global relationship, current models fail to capture these local cluster structures.
Methods
The authors propose DISC (Learning Cluster-Customized Category Relationships from Cluster), which treats clustering and relationship learning as a joint optimization problem.
- Graph-Based Modeling: For every attribute in every cluster, DISC models the possible values as nodes in a fully connected graph.
- Probability-Based Weighting: The "distance" between two values in a cluster is determined by the difference in their Conditional Probability Distributions (CPDs) within that cluster. If two categories appear in similar patterns within a cluster, they are considered "closer."
- Relation Trees (MST): To simplify the graph and ensure a clear distance metric, the algorithm extracts a Minimum Spanning Tree (MST), called a "relation tree."
- Euclidean Compatibility: A key theoretical contribution is proving that these relation trees are "Euclidean-compatible." This means the categorical distances can be mapped onto a one-dimensional line, allowing them to be combined with standard numerical distances (like in k-prototypes clustering) without complex transformations.
- Joint Optimization: The algorithm iterates between assigning points to clusters and updating the cluster-specific relation trees until convergence.
Datasets
The researchers evaluated DISC on 12 real-world benchmark datasets from the UCI Machine Learning Repository, covering various domains:
- Small/Medium: Car Evaluation (CA), Soybean (SB), Amphibians (AP), Zoo (ZO).
- Large: Nursery School (NU), Bank Marketing (BM - over 45,000 samples).
- Mixed: Several datasets were tested in their "mixed" form (categorical + numerical), including Dermatology (DT) and Obesity Levels (OB).
Key Insights and Ideas
- Context is King: The "aha moment" is the realization that category relationships are a function of the cluster they belong to. This "customization" allows the model to fit complex data distributions that global models miss.
- Implicit Weighting: By learning the tree structure, the model effectively performs a type of feature weighting. If a cluster has a very concentrated distribution for an attribute, the distances in that attribute's tree become larger, signaling that the attribute is more "significant" for defining that cluster.
- Mathematical Rigor: The authors don't just show it works; they provide proofs for convergence and demonstrate that their metric satisfies the triangle inequality, making it a mathematically "valid" distance.
Key Results
- Superior Accuracy: Across 12 datasets, DISC achieved an average ranking of 1.25 in clustering accuracy. For comparison, the next best-performing state-of-the-art method had an average ranking of 5.21.
- Mixed Data Performance: When numerical attributes were added back into the datasets, the "DISC (mixed)" variant consistently outperformed specialized mixed-data algorithms like k-prototypes and HARR.
- Efficiency: Despite the added complexity of learning trees, the algorithm's time complexity is linear with respect to the number of samples ($n$) and attributes ($l$), making it viable for large-scale datasets.
- Visualization: t-SNE visualizations show that DISC creates much tighter, more distinct cluster separations compared to traditional methods.
Limitations and Future Work
- Number of Clusters ($k$): Like many centroid-based methods, DISC requires the user to specify the number of clusters ($k$) in advance. The authors note that automatic determination of the optimal $k$ is a direction for future research.
- Internal Validation Metrics: The authors used a modified entropy-based "Compactness" (CMP) index for internal validation but acknowledged that measuring "compactness" in categorical space remains a non-trivial challenge with room for better metric development.
- Noisy Data: While the model handles high-dimensional data well, further exploration into its robustness against extremely noisy or adversarial categorical data could be beneficial.
Summary updated