A Single-Swap Local Search Algorithm for k-Means of Lines
Ting Liang, Xiaoliang Wu, Junyu Huang, Jianxin Wang, Qilong Feng
Abstract
Clustering is a fundamental problem that has been extensively studied over past few decades, with most research focusing on point-based clustering such as kmeans, k-median, and k-center. However, numerous real-world applications, such as motion analysis, computer vision, and missing data analysis, require clustering over structured data, including lines, time series and affine subspaces (flats), where traditional point-based clustering algorithms often fall short. In this paper, we study the k-means of lines problem, where the input is a set L of lines in R d , and the goal is to find k centers C in R d such that the sum of squared distances from each line in L to its nearest center in C is minimized. The local search algorithm is a well-established strategy for point-based k-means clustering, known for its efficiency and provable approximation guarantees. However, extending local search algorithm to the k-means of lines problem is nontrivial, as the capture relation used in point-based clustering does not generalize to the line setting. This is because that the point-to-line distance function lack the triangle inequality property that supports geometric analysis in point-based clustering. Moreover, since lines extend infinitely in space, it is difficult to identify effective swap points that can significantly reduce the clustering cost. To overcome above obstacles, we introduce a proportional capture relation that links optimal and current centers based the assignment proportions of lines, enabling a refined analysis that bypasses the triangle inequality barrier. We also introduce a CrossLine structure, which provides a principled discretization of the geometric space around line pairs, and ensures coverage of high-quality swap points essential for local search, thereby enabling effective execution of the local search process. Consequently, based on the proposed components, we develop the first single-swap local search algorithm for the k-means of lines problem, achieving a (500 + ε)-approximation in polynomial time for low-dimensional Euclidean space.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f033ee81-4749-4438-8e05-2ebe5f6e907fBuilds on4
- Improved Guarantees for k-means++ and k-means++ ParallelKonstantin Makarychev, Aravind Reddy, Liren ShanNeurIPS 2020 · 34 citations
- Improved approximations for Euclidean k-means and k-median, via nested quasi-independent setsVincent Cohen-Addad, Hossein Esfandiari, Vahab S. Mirrokni, Shyam NarayananSTOC 2022 · 15 citations
- Linear Time Algorithms for k-means with Multi-Swap Local SearchJunyu Huang, Qilong Feng, Ziyun Huang, Jinhui Xu et al.NeurIPS 2023 · 4 citations
- Coreset for Line-Sets ClusteringSagi Lotan, Ernesto Evgeniy Sanches Shayda, Dan FeldmanNeurIPS 2022 · 4 citations
Related papers
- Linear Time Algorithms for Individually Fair k-means via Multi-Swap Local SearchBeirong Cui, Qilong Feng, Junyu HuangAAAI 2026
- Local Search for Clustering in Almost-linear TimeShaofeng H.-C. Jiang, Yaonan Jin, Jianing Lou, Pinyan LuSODA 2026
- EPTAS for k-means Clustering of Affine SubspacesEduard Eiben, Fedor V. Fomin, Petr A. Golovach, William Lochet et al.SODA 2021 · 1 citation
- Consistent k-Clustering for General MetricsHendrik Fichtenberger, Silvio Lattanzi, Ashkan Norouzi-Fard, Ola SvenssonSODA 2021 · 7 citations
- Modified K-means Algorithm with Local Optimality GuaranteesMingyi Li, Michael R. Metel, Akiko TakedaICML 2025
