An Algebraic Approach to Constrained K-means Clustering
Organizations: Graduate School of Human Sciences, The University of Osaka, Osaka, Japan · Graduate School of Education, The University of Tokyo, Tokyo, Japan · Center for Advanced Intelligence Project, RIKEN, Tokyo, Japan · Data Science and AI Innovation Research Promotion Center, Shiga University, Shiga, Japan
Abstract
Clustering is typically performed using only object features, although additional information about relationships between objects may be available and can be incorporated through constraints. Among these, pairwise constraints require two objects to belong to the same cluster or to different clusters. Several extensions of the k-means algorithm accommodate such constraints, but they sometimes fail to find a feasible assignment or incur high computational cost. Motivated by these limitations, we propose an algebraic approach to k-means clustering with pairwise constraints. The algorithm simplifies the constraints using Gröbner bases before optimization, improving the efficiency of cluster assignment. It can also detect whether the constraint set has a feasible assignment before optimization. Comparative experiments with existing algorithms showed that the proposed algorithm achieved comparable or better clustering quality at a lower computational cost, particularly when the numbers of constraints and clusters were small.
Figures & tables
| ID | age | operation year | positive nodes | survival status |
| 1 | 57 | 61 | 30 | 2 |
| 2 | 59 | 62 | 35 | 2 |
| 3 | 60 | 65 | 23 | 2 |
| 4 | 30 | 65 | 0 | 1 |
| 5 | 33 | 60 | 0 | 1 |
| 6 | 34 | 60 | 0 | 1 |
| Dataset ID | Features | Cluster size | |
|---|---|---|---|
| BLOBS-2 | 2 | 2 | 5000/5000 |
| BLOBS-3 | 3 | 2 | 3334/3333/3333 |
| BLOBS-imbalance | 2 | 2 | 1000/9000 |
| moon-balance | 2 | 2 | 5000/5000 |
| moon-imbalance | 2 | 2 | 1000/9000 |
| XY-balance | 2 | 2 | 5000/5000 |
| BLOBS | moon | XY | ||||||
|---|---|---|---|---|---|---|---|---|
| Number of constraints | 2 | 3 | imb | bal | imb | bal | imb | mushroom |
| 100 | 50 | 50 | 50 | 50 | 50 | 49 | 50 | 50 |
| 200 | 50 | 50 | 50 | 45 | 49 | 45 | 50 | 50 |
| 500 | 50 | 50 | 50 | 18 | 29 | 13 | 44 | 45 |
| 1000 | 50 | 50 | 50 | 0 | 7 | 2 | 25 | 23 |
| 2000 | 50 | 50 | 50 | 0 | 0 | 0 | 3 | 0 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| BLOBS-2 | BLOBS-3 | |||
|---|---|---|---|---|
| Number of constraints | Gröbner basis | Optimization | Gröbner basis | Optimization |
| 100 | 4.08 | 7.46 | 4.10 | 77.57 |
| 200 | 4.10 | 12.41 | 4.70 | 151.72 |
| 500 | 4.16 | 25.78 | 7.44 | 351.86 |
| 1000 | 4.27 | 49.05 | 9.19 | 808.76 |
| 2000 | 6.91 | 96.25 | 16.55 | 7673.87 |
Clustering
Clustering groups data points by shared structure, developing methods to discover, validate, and interpret groups across diverse data and constraints.
See all 342 papers