Two-Point Local Optimality in -Means via Boundary-Point Screening
Organizations: School of Computer Science and Engineering Southeast University Nanjing, Jiangsu 211189, China
Abstract
Lloyd's algorithm and the discrete local (D-local) optimization method (Li et al., 2025) for -means provide only weak local-optimality guarantees, and their solution quality remains sensitive to initialization. In this paper, we introduce -point local optimality, under which no reassignment of at most samples decreases the objective function, and focus on . The main computational obstacle is the cost of exhaustive two-point certification for samples in dimensions and clusters. To address this challenge, we prove that (i) every improving two-point move of a D-local optimum must involve a cluster shared by both reassignments, and (ii) only certificate-defined boundary points can participate in an improving pair. Exploiting this structure, we propose Boundary-Point-Screened Two-Point Local Search (BPS-2PLS), which terminates at a two-point local optimum. For fixed and nonvanishing cluster occupancy, the number of retained candidates satisfies under i.i.d. sampling from a bounded-support distribution with bounded density or from a Gaussian mixture. Across twelve benchmarks, BPS-2PLS attains the lowest available mean WCSS on ten. In a subsampling study, screening retains 0.10% to 2.81% of samples on average at the largest tested sizes. The code is available at https://github.com/lwl-learning/BPS-2PLS.
Figures & tables
| Configuration | Partner constraint | Destination and feasibility | Exact gain |
| Same source, same destination | , | ||
| Same source, different destinations | , | ||
| Forward chain | , | ||
| Swap | |||
| Different sources, same destination | , , | ||
| Backward chain | , |
| Configuration | Pivot | Key | Partner superset |
| Same source (both configurations) | |||
| Forward chain / swap | |||
| Different sources, same destination | |||
| Backward chain |
| Dataset | Metric | Lloyd | lite-KM | Hartigan | D-LO | Min-D-LO | BPS-2PLS |
| Yale | WCSS | 3328.242 | 3328.242 | 3197.414 | 3214.216 | 3214.216 | 3185.016 |
| Time | 0.011 | 0.009 | 0.356 | 0.219 | 0.246 | 0.327 | |
| ORL | WCSS | 2902.673 | 2902.673 | 2723.878 | 2735.73 | 2735.73 | 2691.304 |
| Time | 0.025 | 0.018 | 1.481 | 0.935 | 1.055 | 2.403 | |
| USPS-1000 | WCSS | 22400.15 | 22400.15 | 22234.94 | 22254.42 | 22254.42 | 22229.35 |
| Time | 0.057 | 0.020 | 4.910 | 1.035 | 1.193 | 1.280 |
| Method | Variant | Yale | ORL | USPS-1000 | COIL20 | MNIST-2000 | |||||
| WCSS | Time | WCSS | Time | WCSS | Time | WCSS | Time | WCSS | Time | ||
| Min-D-LO | Baseline | 3214.216 | 0.246 | 2735.73 | 1.055 | 22254.42 | 1.193 | 32783.05 | 1.385 | 76501.68 | 2.345 |
| Inner | 3185.016 | 0.327 | 2691.304 | 2.403 | 22229.35 | 1.280 | 32772.27 | 1.253 | 76499.59 | 2.521 | |
| LocalSearch | Baseline | 5204.958 | 0.074 | 4594.401 | 0.196 | 35930.89 | 0.106 | 51511.93 | 0.439 | 123605.5 | 0.352 |
| Post | 3180.593 | 0.422 | 2670.928 | 2.439 | 22235.22 | 1.003 | 31799.29 | 2.329 | 76382.11 | 3.156 | |
| MultiSwap | Baseline | 3347.979 | 0.045 | 2839.742 | 0.178 | 22363.17 | 0.090 | 33014.32 | 0.356 | 76669.54 | 0.488 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Full sample-pair cache | Lazy candidate-pair blocks | |
| Pair-distance preprocessing | None | |
| Screening and search per round | ||
| Peak memory |
| Configuration | |||
| Same source same destination | |||
| Same source, different destinations | |||
| Forward chain | |||
| Swap | |||
| Different sources, same destination | |||
| Backward chain |
| Configuration | Interaction | Excess upper bound |
| Same source, same destination | ||
| Same source, different destinations | ||
| Forward chain | ||
| Swap | ||
| Different sources, same destination | ||
| Backward chain |
| Dataset | Representation | |||
| Yale † | 165 | 1,024 | 15 | Pixels |
| ORL † | 400 | 1,024 | 40 | Pixels |
| USPS-1000 † | 1,000 | 256 | 10 | Pixels |
| COIL20 † | 1,440 | 1,024 | 20 | Pixels |
| MNIST-2000 † | 2,000 | 784 | 10 | Pixels |
| COIL100 | 7,200 | 1,024 | 100 | Pixels |
| Dataset | Lloyd | lite-KM | Hartigan | D-LO | Min-D-LO | BPS-2PLS |
| Yale | ||||||
| ORL | ||||||
| USPS-1000 | ||||||
| COIL20 | ||||||
| MNIST-2000 | ||||||
| COIL100 | — |
| Dataset | Lloyd | lite-KM | Hartigan | D-LO | Min-D-LO | BPS-2PLS |
| Yale | ||||||
| ORL | ||||||
| USPS-1000 | ||||||
| COIL20 | ||||||
| MNIST-2000 | ||||||
| COIL100 | — |
| Method | Variant | Yale | ORL | USPS-1000 | COIL20 | MNIST-2000 |
| Min-D-LO | Baseline | |||||
| Inner | ||||||
| LocalSearch | Baseline | |||||
| Post | ||||||
| MultiSwap | Baseline | |||||
| Post |
| Method | Variant | Yale | ORL | USPS-1000 | COIL20 | MNIST-2000 |
| Min-D-LO | Baseline | |||||
| Inner | ||||||
| LocalSearch | Baseline | |||||
| Post | ||||||
| MultiSwap | Baseline | |||||
| Post |
| Dataset | Total | Descent | Screen | Search | Other |
| Yale | |||||
| ORL | |||||
| USPS-1000 | |||||
| COIL20 | |||||
| MNIST-2000 | |||||
| COIL100 |