Robustification of the k-means clustering problem and tailored decomposition methods: when more conservative means more accurate
Abstract
EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.
Full text
Burgard, Jan Pablo; Moreira Costa, Carina; Schmidt, Martin Article — Published Version Robustification of the k-means clustering problem and tailored decomposition methods: when more conservative means more accurate Annals of Operations Research Provided in Cooperation with: Springer Nature Suggested Citation: Burgard, Jan Pablo; Moreira Costa, Carina; Schmidt, Martin (2022) : Robustification of the k-means clustering problem and tailored decomposition methods: when more conservative means more accurate, Annals of Operations Research, ISSN 1572-9338, Springer US, New York, NY, Vol. 339, Iss. 3, pp. 1525-1568, https://doi.org/10.1007/s10479-022-04818-w This Version is available at: https://hdl.handle.net/10419/307501 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. https://creativecommons.org/licenses/by/4.0/
Annals of Operations Research (2024) 339:1525–1568 https://doi.org/10.1007/s10479-022-04818-w ORIGINAL RESEARCH Robustification of the k-means clustering problem and tailored decomposition methods: when more conservative means more accurate Jan Pablo Burgard1·Carina Moreira Costa2·Martin Schmidt2 Accepted: 6 June 2022 / Published online: 25 July 2022 © The Author(s) 2022 Abstract k-means clustering is a classic method of unsupervised learning with the aim of partitioning a given number of measurements into kclusters. In many modern applications, however, this approach suffers from unstructured measurement errors because the k-means clustering result then represents a clustering of the erroneous measurements instead of retrieving the true underlying clustering structure. We resolve this issue by applying techniques from robust optimization to hedge the clustering result against unstructured errors in the observed data. To this end, we derive the strictly and -robust counterparts of the k-means clustering problem. Since the nominal problem is already NP-hard, global approaches are often not feasible in practice. As a remedy, we develop tailored alternating direction methods by decomposing the search space of the nominal as well as of the robustified problems to quickly obtain feasible points of good quality. Our numerical results reveal an interesting feature: the less conservative -approach is clearly outperformed by the strictly robust clustering method. In particular, the strictly robustified clustering method is able to recover clusterings of the original data even if only erroneous measurements are observed. Keywords k-means clustering ·Alternating direction methods ·Robust optimization ·Strict robustness ·-robustness Mathematics Subject Classification 90-XX ·90Cxx ·90C11 ·90C90 BMartin Schmidt [email protected] Jan Pablo Burgard [email protected] Carina Moreira Costa [email protected] 1Department of Economic and Social Statistics, Trier University, Universitätsring 15, 54296 Trier, Germany 2Department of Mathematics, Trier University, Universitätsring 15, 54296 Trier, Germany 123
1526 Annals of Operations Research (2024) 339:1525–1568 1 Introduction In statistical analyses, a typical assumption is that the used data is measured without error. However, this assumption is often violated. One possible way to approach this problem is to assume measurement errors in the observed variables. However, these measurement errors often are not specifiable with distributional assumptions as nothing is known about them. Measurement errors with unknown structure appear in many different application areas and will be referred to as unstructured errors hereafter. For example, Rocke et al. (2009) state four sources of such errors in the case of micro-array analysis. When using register data, a typical source of errors are over- and undercounts, which are typically not detectable from the register itself; see Burgard and Münnich (2012). Another example is the analysis of the potential use of big data in public health research in Khoury and Ioannidis (2014), where the authors strikingly state “‘Big Error’ can plague Big Data”. The field of robust optimization treats this problem of unstructured, uncertain data by robustifying optimization problems with uncertain parameters. In this setting, no additional information about these parameters is required besides that they belong to a prescribed uncertainty set. See Soyster (1973) for the first paper on robust optimization and the textbook by Ben-Tal et al. (2009) or the survey article by Bertsimas et al. (2011) for a general overview. For a recent application of these ideas to linear mixed models; see Burgard et al. (2020). However, the most basic variant of robust optimization—usually called strict robustness— was often criticized since it may lead to overly conservative solutions as they are explicitly hedged against the worst-case. As a remedy, less conservative concepts of robustness have been proposed in the last decades; see, e.g., recoverable robustness (Liebchen et al. 2009), light robustness (Fischetti and Monaci 2009), adjustable robustness (Ben-Tal et al. 2004), or -robustness (Bertsimas and Sim 2004). As motivated above, in statistics, there are several optimization problems, which should be re-engineered to account for the unstructured error setting as it arises in big data sources. By developing new robust optimization methodology for optimization problems from statistics and/or classification, it is widely accepted that a major advancement in the analysis and usability of large data sources can be achieved. For example, a very important and widely used method is k-means clustering (MacQueen 1967;Lloyd1982). It is used to find clusters in an unsupervised learning setting and is widely applied in the context of big data analysis; see, e.g., Grira et al. (2004) and Celebi and Aydin (2016). However, it does not compensate for possible errors in the data set. Therefore, the clusters that are found are perturbed by the unstructured errors and do not necessarily correspond to the true underlying structure of interest. The marriage of problems from classification or statistics with modern techniques from mathematical optimization has been a field of very active research during the last years and a comprehensive overview over this literature is out of the scope of this article. Thus, we mainly focus on reviewing the literature at the interface of robust optimization, k-means clustering, and classification problems. One of the most prominent methods for classification are support vector machines (SVMs), which also have been considered from the point of view of robust optimization; see, e.g., Bhattacharyya et al. (2005), Trafalis and Gilbert (2007), Pant et al. (2011) and Bertsimas et al. (2019). The results obtained in these papers often illustrate that robustified solutions can give higher accuracy than nominal ones, leading to improvements in the SVM method. The most recent paper by Bertsimas et al. (2019) from the above list also contains the application of robust optimization to two other major and widely used classification methods (besides SVMs): logistic regression and CART. The presented extensive 123
Annals of Operations Research (2024) 339:1525–1568 1527 computational results show that the robust formulations outperform nominal and regularized models for most of the instances—especially in the case of high-dimensional instances and instances that are hard to separate. Moreover, to the best of our knowledge, Bertsimas et al. (2019) is the only paper that also uses the concept of -robustness for classification. Interestingly, the authors report that -robustness is beneficial for robustifying SVMs. In contrast to that, our results for -robustified k-means clustering are clearly outperformed by the strictly robustified models. Our contribution is the following. We follow the way paved by Bertsimas et al. (2019) but consider strictly and -robust optimization for the k-means clustering problem. The robustification of the underlying optimization problem allows us to consider erroneous input data. As a consequence, it becomes possible to compute clusterings that are closer to the clusterings of the original, i.e., error-free, data although only erroneous input data can be considered. To the best of our knowledge, this issue has not been studied before in the literature. Moreover, we develop tailored alternating direction methods (ADMs) to quickly obtain solutions of good quality. Here, one of the main insights is that an ADM for the nominal case can be generalized so that it becomes applicable to the robust counterparts while keeping its convergence properties. Classic ADMs are extensions of augmented Lagrangian methods and have been originally proposed in Gabay and Mercier (1976) and Glowinski and Marroco (1975). A general analysis of the convergence theory of ADMs is presented in Bertsekas and Tsitsiklis (1989). The particular case of ADMs applied to convex objective functions f(u,v)over disjoint constraint sets u∈U,v∈V, is discussed in Wendell and Hurter (1976). An extension to the case of a biconvex fisgiveninGorskietal.(2007). More recently, in Boyd et al. (2011), the authors discuss applications of the alternating direction methods of multipliers (ADMMs), which are closely related to ADMs, in the broad area of machine learning and highlight its possibility of parallelization and distributed computing. ADMs are very broadly applied; for an application of ADMs to solve nonconvex MINLPs in the context of gas transport, we refer to Geißler et al. (2015) and Geißler et al. (2018). For an application in supply chain management, we refer to Schewe et al. (2020). Furthermore, in Geißler et al. (2017) it is shown that idealized feasibility pumps can be seen as an ADM and a penalty-based ADM for MIPs and MINLPs is proposed. A similar method based on block coordinate descent and coordinate descent has been applied recently in the context of optimal imputation in Bertsimas et al. (2017). However, the authors do not consider clustering problems. In general, these methods rely on a problem-specific decomposition of the variable space of the robust counterparts. Using these decompositions, solutions of good quality can be obtained by alternatingly solving two sub-problems that are significantly easier to solve than the robust counterpart. For the nominal case, the applied ADM exactly mimics the classic k-means clustering algorithm. However, our more abstract view on the decomposition of the problem later allows to carry the idea of alternatingly solving easier subproblems over to the robustified settings. Strictly robust counterparts for the k-means clustering problem are also considered in Li et al. (2016) and Vo et al. (2016). However, there is no investigation of structural properties of data sets that indicate whether a robustification of k-means might be beneficial or not. Additionally, by explicitly framing our method as an ADM, we are also able to provide a convergence result (both for the nominal and the two robustified clustering methods), which is not done in Li et al. (2016) and Vo et al. (2016). We also extend our ADM setting so that partial minima (delivered by the ADM) of bad quality can be detected and improved so that the alternating algorithm can be restarted with a significantly improved starting point. We show in our numerical results that this restart heuristic leads to significantly better clustering results. In Li et al. (2016), the authors focus on clustering of incomplete 123
1528 Annals of Operations Research (2024) 339:1525–1568 data sets. Thus, in their computational study, the robust clustering results are evaluated by comparing them to other existing k-means algorithms for incomplete data sets. In contrast to this, the goal of this paper is to evaluate the quality of robustified solutions obtained and to develop an understanding of structural properties of data sets for which robust clustering is beneficial. It turns out that a robustification of the clustering approach is not required if the underlying data points are already well separated. However, if this is not the case, the robustified method is able to recover the true clustering although only erroneous data is observed. Our analysis especially leads to an interesting result regarding the comparison of strictly and -robust clustering. The -robust approach was developed to overcome the criticism of strictly robust solutions that are often too conservative in practice. For k-means clustering we observe the contrary: The conservatism of strict robustness leads to significantly better clustering results when compared to the -robust solutions. The remainder of the paper is structured as follows. In Sect. 2we formally introduce the k-means clustering problem and state it as a mixed-integer nonlinear optimization problem (MINLP). Afterward, Sect. 3contains the strictly robust counterpart, followed by the -robust counterpart in Sect. 4. We state a generic ADM in Sect. 5and discuss its basic convergence properties that can also be applied if a tailored version is applied to nominal or robustified clustering problems. By doing so, we can explicitly characterize the obtained clustering solutions as so-called partial minima of the underlying MINLP. Moreover, we state the specific sub-problems that need to be solved in every iteration of the ADM (if applied to the nominal or one of the two robust clustering methods) and show that they can always be solved efficiently. In Sect. 6, we describe the already mentioned restart heuristic and present our numerical results in Sect. 7. The paper closes with some concluding remarks and notes on future research topics in Sect. 8. 2Thek-means clustering problem and an MINLP formulation Let X∈Rp×nbe the matrix containing the data set for clustering, which consists of ndata points in Rp. Here, the data point xi∈Rp,i=1,...,n, corresponds to the ith column of X. For given k, the goal of k-means clustering is to find mean vectors μj∈Rp,j=1,...,k, of kclusters that satisfy μ∗=arg min μ h(X,μ), μ=(μj)j=1,...,k,(1) where the loss function his a sum of distances such as the squared Euclidean distance h(X,μ)= k j=1 xi∈Sj xi−μj2 2,(2) with Sj⊂Rpbeing the set of data points that are assigned to cluster j. By introducing binary variables bi,j∈{0,1}for i=1,...,nand j=1,...,k, we can reformulate the function has h(X,μ,b)= k j=1 n i=1 bi,jxi−μj2 2,b=(bi,j)j=1,...,k i=1,...,n, 123
Annals of Operations Research (2024) 339:1525–1568 1529 where the binary variables have the meaning bi,j=1,if point xiis assigned to cluster Sj, 0,otherwise. As xi∈Rpshould belong to exactly only one cluster, we include the constraint k j=1 bi,j=1foralli=1,...,n. To simplify the presentation in what follows, we introduce the notations N:={1,...,n},P:={1,...,p},K:={1,...,k}. Thus, a reformulation of the k-means clustering problem as a mathematical optimization problem is given by min μ,b j∈K i∈N bi,jxi−μj2 2(3a) s.t. j∈K bi,j=1foralli∈N,(3b) bi,j∈{0,1}for all i∈N,j∈K,(3c) b∈Rn×k,(3d) μ∈Rp×k.(3e) This is a mixed-integer nonlinear programming problem (MINLP); all constraints are linear but the objective function is cubic. 3 The strict robust counterpart of the k-means clustering MINLP Up to now, we assumed that the data points in Xare known exactly. However, in practice, often only erroneous measurements ˜ X=X+Ecan be observed instead, where E∈Rp×ndescribes the respective perturbation of the original data. We assume that there is neither information on the expected value nor on any higher order moment of the additive perturbation E. The error could even be a deterministic error as opposed to a stochastic one. In statistics, measurement error correction methods typically assume that the errors are random variables that follow a known distribution; see Carroll et al. (2006). For a recent proposal on dealing with clustering in these classic measurement error settings; see Su et al. (2018). By accounting for the error distribution in the estimation process, the influence of the errors is reduced. However, this assumption is often very restrictive. Especially when using big data sources as in Davalos (2017) and Yamada et al. (2018), no meaningful error distribution can be assumed. As it is shown in White (2011) for biomarker measures, errors can be due to specimen collection and storage. Last but not least, in social science and econometric analysis, the indicators used are typically estimates resulting form a long statistical production process that is prone to different kind of errors; see, e.g., Alfons et al. (2013). All these different types of errors can even extend to be systematic and thus are far from being described as a zero-mean distributed error. 123
1530 Annals of Operations Research (2024) 339:1525–1568 In this paper we tackle the following situation: Although we can only observe erroneous measures ˜ Xin practice, we want to compute a clustering that is as close as possible to the clustering of the original data X∈Rp×n. Obviously, especially if Ehas a mean vector different from 0 ∈Rpover all observations in every cluster for every variable, the optimal solution ˜μ∗=arg min μ h(˜ X,μ), μ=(μj)j∈K, will differ from the optimal solution of Problem (1). Therefore, the optimization problem has to be reformulated to account for the unobservable and unstructured error E. This can be done by using the min-max problem min μmax D∈Uh(˜ X−D,μ), with U⊆Rp×nbeing the uncertainty set, which will be specified right below. In particular, we assume that Ucan be chosen so that E∈Uholds. Thus, given an uncertainty set U,we minimize the function hconsidering the worst-case scenario w.r.t. all possible D∈U. As noted above, we assume that the error Eis unstructured. Thus, we particularly refrain from using distributional information. Instead, we consider the box-uncertainty set U⊆Rp×nto be given as Ubox :={D∈Rp×n:−di l≤di l≤di l,di l≥0,(l,i)∈P×N}.(4) With this at hand, we can now state the strictly robust counterpart of Problem (3): min μ,bmax D∈Ubox j∈K i∈N bi,j˜xi−di−μj2 2(5a) s.t. j∈K bi,j=1,i∈N,(5b) bi,j∈{0,1},i∈N,j∈K,(5c) μ∈Rp×k.(5d) This robust counterpart is an optimization problem that is not directly tractable as it is stated in (5). The main reason for its hardness is the min-max structure of the objective function. Fortunately, we can reformulate this problem without the inner maximization problem, as shown in the following theorem. Theorem 3.1 The robust counterpart (5)is equivalent to min μ,b,α j∈K i∈N bi,j˜xi−μj2 2+di2 2+ l∈P 2di lαi,j,l(6a) s.t.−αi,j,l≤˜xi l−μj l≤αi,j,l,i∈N,j∈K,l∈P,(6b) j∈K bi,j=1,i∈N,(6c) bi,j∈{0,1},i∈N,j∈K,(6d) μ∈Rp×k.(6e) 123
Annals of Operations Research (2024) 339:1525–1568 1531 Proof First, we move the uncertainty from the objective function to the constraints by introducing an extra variable t∈Rand by rewriting the robust counterpart (5) equivalently as min μ,b,tt(7a) s.t.max D∈Ubox ⎧ ⎨ ⎩ j∈K i∈N bi,j˜xi−di−μj2 2⎫ ⎬ ⎭ ≤t,(7b) j∈K bi,j=1,i∈N,(7c) bi,j∈{0,1},i∈N,j∈K,(7d) μ∈Rp×k.(7e) Now, the uncertainties only appear in Constraint (7b), which in turn is equivalent to max D∈Ubox ⎧ ⎨ ⎩ j∈K i∈N bi,j˜xi−μj2 2+di2 2−2(˜xi−μj)di⎫ ⎬ ⎭ ≤t ⇐⇒ j∈K i∈N bi,j˜xi−μj2 2+max D∈Ubox ⎧ ⎨ ⎩ j∈K i∈N bi,jdi2 2−2(˜xi−μj)di⎫ ⎬ ⎭ ≤t. Using the specific box-structure of the uncertainty set (4), we obtain max D∈Ubox j∈K i∈N bi,jdi2 2−2(˜xi−μj)di =max −di l≤di l≤di l j∈K i∈N l∈P bi,j(di l)2−2(˜xi l−μj l)di l = j∈K i∈N l∈P bi,j(di l)2+2|˜xi l−μj l|di l. Thus, we get the constraint j∈K i∈N bi,j˜xi−μj2 2+ l∈P (di l)2+2di l|˜xi l−μj l|≤t, instead of (7b), which, in turn, can be re-written as j∈K i∈N bi,j˜xi−μj2 2+di2 2+ l∈P 2di lαi,j,l≤t, −αi,j,l≤˜xi l−μj l≤αi,j,l,i∈N,j∈K,l∈P, αi,j,l≥0,i∈N,j∈K,l∈P. Thus, Problem (5) is equivalent to 123
1532 Annals of Operations Research (2024) 339:1525–1568 min μ,b,t,α t s.t. j∈K i∈N bi,j˜xi−μj2 2+di2 2+ l∈P 2di lαi,j,l≤t, −αi,j,l≤˜xi l−μj l≤αi,j,l,i∈N,j∈K,l∈P, αi,j,l≥0,i∈N,j∈K,l∈P, j∈K bi,j=1,i∈N, bi,j∈{0,1},i∈N,j∈K, μ∈Rp×k, and the result follows by eliminating tagain. A standard criticism regarding strictly robust solutions (like those of Problem (6)) is that they tend to be too conservative as they are hedged against the worst-case error that can appear for all entries of the matrix ˜ X. To obtain robust solutions that are practically meaningful but less conservative, in Bertsimas and Sim (2004) the authors propose the so-called -robust approach, which allows to control the degree of conservatism. Thus, in the next section, we apply this approach to the k-means clustering problem as well. 4The0-robust counterpart of the k-means clustering MINLP The -approach proposed in Bertsimas and Sim (2004) does not assume that all parameters will realize in a worst-case way but restricts the number of such parameters by ∈N,which gives the approach its name. We now apply the technique proposed in Bertsimas and Sim (2004)tothek-means clustering problem. This means that some observations ˜xi lare not perturbed and, in this case, ˜xi l=xi land di l=0 holds. Thus, the matrices ˜ Xand Xonly differ in a subset of many elements. To state the -robust counterpart of Problem (3), we consider the uncertainty set U:=D∈Ubox :di l:di l= 0,(l,i)∈P×N≤. Using this uncertainty set, we determine the maximum number of observations that may realize in worst-case way. However, we do not state in advance which will do so. Hence, the -robust counterpart of Problem (3)isgivenby min μ,b,α j∈K i∈N bi,j˜xi−μj2 2 +max {I⊆P×N:|I|≤}⎧ ⎨ ⎩ j∈K (l,i)∈I bi,j(di l)2+2di lαi,j,l⎫ ⎬ ⎭ (8a) s.t.−αi,j,l≤˜xi l−μj l≤αi,j,l,i∈N,j∈K,l∈P,(8b) αi,j,l≥0,i∈N,j∈K,l∈P,(8c) j∈K bi,j=1,i∈N,(8d) 123
Annals of Operations Research (2024) 339:1525–1568 1539 This is a convex quadratic optimization problem and can thus be efficiently solved by standard state-of-the-art solvers; see, e.g., Ben-Tal and Nemirovski (2001) and Boyd and Vandenberghe (2004) for an overview of algorithms and complexity results for convex problems. The overall method to compute a partial minimum of Problem (6) is formally given in Algorithm 3. As in the last section, Theorem 5.1 can be applied again, yielding that Algorithm 3 leads to partial minima of the strictly robust counterpart. Algorithm 3 ADM applied to the strictly robust counterpart (6). 1: Choose (μ0,α0)∈V. 2: for t=0,1,...do 3: Compute bt+1as in Steps 3–6 of Algorithm 2w.r.t. ˜xi. 4: Update μt+1and αt+1by solving problem (24). 5: Set t←t+1. 6: end for 5.4 An ADM for the 0-robust k-means clustering problem As in Sect. 5.3 we now first discuss how to obtain the set Vfor applying Algorithm 1to Problem (9). Note that in Problem (9), the continuous variables λand βare always bounded in the direction of optimization since they are non-negative and minimized. Thus, there exist constants Mλand Mβwith 0≤λ≤Mλ,0≤βi l≤Mβ,i∈N,l∈P. Now, we consider the following non-empty and compact sets Vλ:={λ∈R:0≤λ≤Mλ},Vβ:=β∈Rp×n:0≤βi l≤Mβ,i∈N,l∈P. With these sets and the sets in (22)and(23) at hand, we can define the non-empty and compact set Vas V:=Vμ×Vα×Vλ×Vβ.(25) Thus, the variable splitting is represented by the sets (16)and(25). In this case now, we have coupling constraints (9b). In the notation of (15), we define these constraints formally as c:Rnu+nv→Rp×nwith c(l,i)(b,α,λ,β)=λ+βi l− j∈K bi,j(di l)2+2di lαi,j,l,(l,i)∈P×N. In the following, we describe how we solve the ADM subproblems. To solve Problem (9) into the direction of U, we first need to choose μ0,α0,λ0,andβ0. Suppose that μ0is given, and we obtain b0as in Steps 3–6 of Algorithm 2w.r.t. ˜xi. Then, we can compute α0,λ0,and β0by solving the linear optimization problem min (α,λ,β)∈Vλ+ (l,i)∈P×N βi l(26a) s.t.c(l,i)(b0,α,λ,β)≥0,(l,i)∈P×N,(26b) −αi,j,l≤˜xi l−(μj l)0≤αi,j,l,i∈N,j∈K,l∈P.(26c) 123
1540 Annals of Operations Research (2024) 339:1525–1568 With the initial values for μ0,α0,λ0,andβ0at hand, the problem in the direction of Uin iteration treads min b∈U j∈K i∈N bi,j˜xi−(μj)t2 2(27a) s.t.c(l,i)(b,αt,λt,βt)≥0,(l,i)∈P×N,(27b) where we already skipped all constant terms in the objective function. Note that for t=0, we obtain b1=b0by solving Problem (27). This is because b0is feasible for (27)andb0leads to the optimal objective value since it has been obtained as in Algorithm 2w.r.t. ˜xi. Thus, there is no need to compute α0,λ0,aswellasβ0and we can directly proceed with the problem into the direction of Vusing b0, as described below. Suppose that μ0is given and b0is obtained as in Algorithm 2. Thus, in each iteration t, we compute μt+1,αt+1,λt+1,andβt+1by solving min (μ,α,λ,β)∈V j∈K i∈N bt i,j˜xi−μj2 2+λ+ (l,i)∈P×N βi l(28a) s.t.c(l,i)(bt,α,λ,β)≥0,(l,i)∈P×N,(28b) −αi,j,l≤˜xi l−μj l≤αi,j,l,i∈N,j∈K,l∈P,(28c) which is a convex quadratic optimization problem. Having this problem solved, we obtain the next b-iterate by solving Problem (27). Algorithm 4summarizes the main steps to compute a partial minimum of Problem (9). Again, Theorem 5.1 ensures that Algorithm 4computes partial minima of the -robust counterpart. Algorithm 4 ADM applied to the -robust counterpart (9) 1: Choose μ0∈V. 2: for t=0,1,...do 3: if t=0then 4: Compute b0by following Steps 3–6 of Algorithm 2w.r.t. ˜xi. 5: else 6: Compute btby solving Problem (27). 7: end if 8: Solve Problem (28) to obtain μt+1,αt+1,λt+1,andβt+1. 9: Set t←t+1. 10: end for 6 Restart heuristic There are specific clustering instances for which the ADMs described so far obtain visibly bad results; see, e.g., the clustering obtained for the instance Unbalance in Fig. 1. For the details about the benchmark data sets we refer to Sect. 7.2. Observe that Algorithm 2identified two clusters, S1and S2, where there should be only one, and identified one cluster, S3,wherethere should be two. This leads to the situation that the loss within cluster S1and within cluster S2 is much smaller than the one within cluster S3. Here and in what follows, we compute the weighted value of the loss function hin (2) restricted to cluster Sjby 123
Annals of Operations Research (2024) 339:1525–1568 1541 Fig. 1 Comparison between the ground truth clustering (left) and the clustering result of the ADM (right) for the instance Unbalance. Obviously, the partial minimum is of low quality hj=1 Sj xi∈Sj xi−μj2 2.(29) Suppose now that we join clusters S1and S2to form a new cluster S12. If the total loss within cluster S12 is still smaller than the one within cluster S3, then our algorithm is actually not minimizing the sum of total losses, because there exists a better point when we split cluster S3into two clusters and join clusters S1and S2. Based on these observations, we propose a heuristic to avoid that the ADMs in Algorithms 2–4get stuck in a partial minimum of bad quality as shown in Fig. 1; see Fraiman et al. (2013) for a similar heuristic. Suppose that we have a partial minimum and the hjvalues at hand. For each pair of clusters (Sj1,Sj2), we also compute their joint center and the corresponding total loss via μj1j2=1 Sj1+Sj2 xi∈Sj1∪Sj2 xi(30) and hj1j2=1 Sj1+Sj2 xi∈Sj1∪Sj2 xi−μj1j22 2.(31) Now, consider the set :=(Sj1,Sj2,Sj3):hj1j2<hj3,(32) which is the set of all possible combinations of three clusters such that the total loss within two joined clusters is smaller than the total loss within a third cluster. Note that the set can be empty. If so, this means that we cannot obtain a better partial minimum by joining two clusters and splitting another one. On the other hand, i.e., if there exists (Sj1,Sj2,Sj3)∈, then the total loss of the joined clusters Sj1and Sj2is smaller than the total loss within cluster Sj3. Thus, we obtain a better partial minimum by joining Sj1and Sj2and by splitting cluster Sj3into two smaller clusters. To this end, we update the centers in such a way that the clusters Sj1and Sj2are now one cluster with center μj1j2,clusterSj3receives two centers which are the two furthest points in Sj3, and the other centers remain the same, i.e., ˆμj1←μj1j2,ˆμj2←¯xi,ˆμj3←¯xi,(33) 123
1542 Annals of Operations Research (2024) 339:1525–1568 ˆμj←μjfor all j/∈{j1,j2,j3},(34) with (¯xi,¯xi)∈arg min xi,xi∈Sj3xi−xi2 2.(35) Finally, if the set has more than one element, then we repeat the process starting with the element (Sj1,Sj2,Sj3)that gives the minimum ratio hj1j2/hj3. Each time an element (Sj1,Sj2,Sj3)is used, we exclude all the elements that contain Sj1,Sj2,orSj3, because these clusters were already modified. With ˆμat hand, we compute a new partial minimum using ˆμas the initial centers. Given the new partial minimum, we repeat the process until a termination criterion is satisfied. In Algorithm 5, we formally state the proposed heuristic as an additional part of Algorithms 2–4. The termination criterion in our implementation is to stop if the restart heuristic does not provide modified centers anymore and, as a consequence, if two consecutive partial minima are the same (up to numerical tolerances). Algorithm 5 Improved algorithms 2,3,and4. 1: Given initial centers μ0, compute a partial minimum with Algorithm 2,3,or4. 2: if termination criterion is not satisfied then 3: Compute hjas in (29) for all clusters j=1,...,k. 4: Compute μj1j2as in (30)andhj1j2as in (31) for all j1= j2∈{1,...,k}. 5: Compute the set as in (32). 6: if =∅then 7: return the current partial minimum. 8: else 9: while =∅do 10: Compute (j1,j2,j3)∈arg min{hj1j2/hj3:(j1,j2,j3)∈}. 11: Compute ˆμas in (33)–(35). 12: Update by deleting all triples that contain either j1,j2,or j3. 13: end while 14: Set μ0:=ˆμand go to Step 1. 15: end if 16: end if 7 Numerical results In this section, we present our numerical studies, which have been carried out using the setup described in Sect. 7.1. The goal here is to evaluate the performance of the proposed methods in Algorithms 2–5. To this end, we first describe in Sect. 7.2 the clustering problem instances and the evaluation metrics that we use. For analyzing the performance of the different methods, a ground truth labeling has to be defined. These labels are provided with the test data sets used in the numerical evaluation. For the optimization, these ground truth labels are not used as k-means clustering is an unsupervised learning method, i.e., the input data is not labeled. Since all algorithms assume that initial centers are given, we briefly describe how they are obtained in Sect. 7.3. In Sect. 7.4, we show that the proposed ADM performs very well for typical nominal clustering problems. Moreover, we also evaluate the effectiveness of the heuristic described in Sect. 6. In Sects. 7.5 and 7.6, we discuss the results that we obtain by 123
Annals of Operations Research (2024) 339:1525–1568 1543 robustifying these k-means clustering problems. Finally, in Sects. 7.7 and 7.8,wegofurther and evaluate the performance of the proposed algorithms on real-world clustering instances. As we will see, the strictly robust method clearly outperforms the nominal and -robust methods. In the appendix, we also present a comparison of the strictly robust method with the spectral clustering method by Von Luxburg (2007), which is another state-of-the-art method for clustering. By these results, the competitiveness of the strictly robust method is further highlighted. 7.1 Software and hardware setup We implemented the algorithms in Python 3.8.5 and solved the binary linear as well as the convex quadratic optimization problems with Gurobi 9.1.0. We use the special Python modules sklearn.preprocessing.MinMaxScaler,sklearn.metrics.adjusted_rand_score,sklearn. metrics.silhouette_score,andscipy.stats.wilcoxon to scale the data to the range [0,1],to compute the ARI (see below), to compute the Silhouette score (see below), and to calculate the pvalues for the Wilcoxon signed-rank test (see below as well), respectively. All the computations were performed on a computer with a 3.60GHz Intel(R) Core(TM) i3-8100 processor and 16GB RAM. For Algorithms 2–4, the termination criterion is μt+1−μt∞<10−4. 7.2 Data sets and validation metrics To comprehensively compare the proposed algorithms on a variety of clustering problems, we use (i) synthetically generated data for which we include some uncertainty by perturbing the data points as well as (ii) real-world data sets, which naturally contain measurement errors. Since one of the goals of this work is to identify structural properties of clustering problems for which a robustification is beneficial, we use six synthetic clustering benchmark data sets (a,s,Unbalance,dim,g2,birch) proposed by Fränti and Sieranoja (2018). These data sets provide a perfect benchmark since they cover a wide range of typical k-means clustering problems with different degrees of overlap, density, and sparsity. Besides that, most of the data sets are two-dimensional, so we can also visualize and compare the recovered nominal and robust clustering results. For reasons of comparability, we use these data sets as a reference but exclude the data set birch with 100 clusters that leads to extremely large and challenging problems. It is also standard in the literature to test clustering algorithms on data sets from the UCI Machine Learning Repository (Dua and Graff 2017); see, e.g., Li et al. (2016), Vo et al. (2016) and Aloise et al. (2012). Thus, to also evaluate the quality of robust solutions on highdimensional and real-world data sets, we select 52 instances from this repository, forming a sample of clustering problems with diverse sizes and difficulties. For the synthetic data, the ground truth partition of all data sets is publicly available in Fränti and Sieranoja (2018) and for the real-world instances, the true assignments (labels) of each data point are given as well. Thus, we choose as external validity metrics the adjusted Rand index (ARI) and the loss function value. The ARI (Hubert and Arabie 1985; Steinley 2004) measures the similarity between two assignments, ignoring permutations, within the range [−1,1]. Here, 1 means perfect agreement between the two assignments. However, in some cases, the ground truth partition corresponds to lower quality solutions, which may lead to a subjective validation if only external metrics are used as reference. Therefore, we also use the Silhouette score as an internal validation metric (Rousseeuw 123
1544 Annals of Operations Research (2024) 339:1525–1568 1987). This score is shown to have a good performance for general clustering problems in an extensive study over a variety of validation metrics done in Arbelaitz et al. (2013). The Silhouette score measures the quality of the clustering in terms of cohesion and separation, taking values within the interval [−1,1], where a value close to 1 means that the data set is well clustered, whereas a result close to −1 means that most of the data points have been misclassified or that there is no natural clustering structure in the data set. Further, to assess the significance of the obtained results, we apply the Wilcoxon signedrank test to calculate pvalues (Wilcoxon 1945). With this, we are able to quantify the observed improvements in cluster quality when comparing the Silhouette score as well as the ARI of nominal and robust models. If the resulting pvalue is smaller than the α-error of 10%, we reject the null-hypothesis that the robust model is less or equally good as the nominal one in terms of the Silhouette score or the ARI, respectively. Hence, a rejection supports the hypothesis that we obtain improved clustering results for erroneous data when using robustified models. 7.3 Starting point heuristic It is well known that a poor initialization of the centers can cause a bad clustering result. In Fränti and Sieranoja (2019), the authors study some popular initialization heuristics and test them on a benchmark library, which is the same synthetic data that we use to test our algorithms. On average, they conclude that the “furthest point heuristic”, also known as “Maxmin”, reduces the clustering error of k-means. Based on their results, we decide to compute the initial mean points μ0with the “Maxmin” heuristic. The idea is to select the first center randomly within the respective bounding box, and then obtain new centers one by one. In each iteration, the next center is the point that is the furthest (max) from its nearest (min) existing center. 7.4 Evaluation of the ADM applied to the synthetic nominal clustering problems In this section, we discuss the performance of Algorithm 2and its extension in Algorithm 5 applied to the synthetic data sets. To simplify the presentation here, we refer to Algorithm 2 as (“ADM2”) and to Algorithm 5as (“ADM5”). As already mentioned at the end of Sect. 5.2, the ADM in Algorithm 2exactly mimics the classic k-means clustering algorithm. Nevertheless, we present the numerical results for the nominal cases here as well to assess the effects of the restart heuristic and to have a proper baseline for a computational comparison of the robustified versions later on. First, we evaluate the quality of the partial minima computed by ADM2 and ADM5 for 12 instances from the synthetic data sets. The results are shown in Table 1. The objective function value is denoted by h(X,μ). We both state the value of h corresponding to the ground truth (“GT”) and the value of hin a partial minimum computed with ADM2 and ADM5. The Silhouette score is computed for the ground truth assignment as well as for the ADM2 and ADM5 assignment results. The two last columns show the ARI, respectively. In Table 2, we state the size of the clustering problem, i.e., the number of clusters k, the number of points n, and the number of attributes p. There we also present the runtime (“Time”; in seconds) and the number of iterations (denoted by “It”) that the ADM2 and ADM5 require to compute a partial minimum. Since the initialization heuristic for the centers is a random procedure, we apply the algorithm five times with different initializations and report the average over all five runs. 123
Annals of Operations Research (2024) 339:1525–1568 1545 Table 1 Results of Algorithm 2and its extended Algorithm 5on the synthetic clustering data sets Instance h(X,μ) Silhouette ARI GT ADM2 ADM5 GT ADM2 ADM5 ADM2 ADM5 a1 6.945 7.685 6.747 0.566 0.544 0.572 0.890 0.954 a2 7.617 9.853 7.544 0.582 0.530 0.584 0.857 0.977 a3 6.995 8.434 6.992 0.601 0.566 0.601 0.927 0.997 s1 10.552 15.315 10.287 0.708 0.655 0.712 0.915 0.986 s2 16.098 20.725 14.929 0.609 0.559 0.626 0.826 0.938 s3 30.580 22.138 21.656 0.385 0.478 0.485 0.701 0.713 s4 34.544 20.437 20.125 0.321 0.466 0.468 0.602 0.608 Unbalance 4.247 22.913 4.247 0.833 0.667 0.833 0.612 1.000 dim 7.337 7.158 7.158 0.945 0.945 0.945 1.000 1.000 g2-2-30 42.065 41.479 41.479 0.625 0.629 0.629 0.961 0.961 g2-2-50 53.421 46.556 46.556 0.413 0.482 0.482 0.695 0.695 g2-2-70 60.112 49.540 49.540 0.278 0.397 0.397 0.487 0.487 Table 2 Information about the synthetic data sets and the performance of Algorithm 2and its extended Algorithm 5on these instances Instance Model size ADM2 ADM5 kn pTime It Time It a1 20 3000 2 2.215.85.431.6 a2 35 5250 2 7.718.814.428.2 a3 50 7500 2 14.818.231.832.2 s1 15 5000 2 1.68.63.312.0 s2 15 5000 2 3.217.86.026.4 s3 15 5000 2 4.525.47.536.6 s4 15 5000 2 7.944.89.934.2 Unbalance 8 6500 2 1.510.229.29.8 dim 16 1024 32 0.12.00.22.0 g2-2-30 2 2048 2 0.14.40.15.2 g2-2-50 2 2048 2 0.28.60.29.0 g2-2-70 2 2048 2 0.313.60.313.8 Looking at the results of ADM2 first, we note that for the instances a1,a2,a3,s1,s2,dim, and g2-2-30, on average, the value of hand the Silhouette score in the partial minimum are close to the ground truth and the ARI is also close to 1. This shows that the clusterings of the partial minima are similar to the ground truth clusterings for these instances. One can also see that the quality of the partial minima measured in terms of the objective function hand in terms of the Silhouette score can both be worse (e.g., instances s1 or s2) or better (e.g., instance g2-2-30) compared to the ground truth. On the other hand, for the instances s3,s4,Unbalance,g2-2-50,andg2-2-70,onaverage, the ARI reveals that the corresponding clusterings have low similarity and also the value of h in the partial minima is rather different to the ground truth. However, the Silhouette score is better and the value of his smaller for all these cases except for the instance Unbalance for 123
1546 Annals of Operations Research (2024) 339:1525–1568 Fig. 2 The ground truth clustering (left) and the ADM5 result (right) for the instance s4 which we obtain a partial minimum of very bad quality; see also Fig. 1. Due to this, in Sect. 6, we proposed a heuristic to improve the quality of the partial minima that are computed by the ADM2; see Algorithm 5. Regarding the runtime and number of iterations, the ADM2 is very fast in computing partial minima. The median average runtime is 1.9 s (with a maximum of less than 15 s) and the ADM2 never requires more than 45 iterations on average. Now, looking at the results of ADM5, we note that the extended algorithm is able to find the ground truth clustering of the instance Unbalance. Furthermore, all the results improved in terms of the objective function hand in terms of the Silhouette score. We also observe that the results for all g2 instances (all having k=2) remain the same because the heuristic proposed in Sect. 6is only applicable for k>2. Let us briefly discuss the instance s4 for which we get the lowest ARI (0.608). In this case, the objective function value is significantly smaller in the ADM5 result (compared to the ground truth; 20.125 vs. 34.544), and also the Silhouette score is better (compared to the ground truth; 0.468 vs. 0.321). Both results are shown in Fig. 2, where it is easy to see that the clusterings also qualitatively differ from each other. Nevertheless, the low values of the Silhouette score reveal that this is a difficult instance for clustering. Regarding the runtime and number of iterations that the ADM5, on average, requires to find a partial minimum, both increase due to the restart heuristic. This is expected, because in each “outer” iteration we may have new initial centers and, if this is the case, we apply the ADM2 again leading to additional inner ADM iterations. Thus, the computational costs of getting better partial minima is the increase of median average runtime from 1.9 to 5.7 s (with a maximum of 32 s for the instance a3). We conclude that the proposed Algorithm 2combined with the restart heuristic proposed in Algorithm 5, i.e., the combination that we denote here by ADM5, performs very well on the synthetic data sets. The algorithm is able to find partial minima of very good quality with objective function values close to or even better than the ground truth and Silhouette scores always better than or equal to the ground truth. 7.5 Strictly robust clustering results for the synthetic data Let us start the discussion of the strictly robust clustering results with an informal note. To this end, consider the clustering instance Unbalance in Fig. 1again. For this instance, it is obvious that the eight clusters are very well separated and not too close to each other. Only for a few 123
Annals of Operations Research (2024) 339:1525–1568 1547 points between the two clusters below and the middle cluster in the right part of the figure it may be not clear to which cluster they belong. However, the specific assignment decision for these data points will not qualitatively change the overall clustering result. In such a setting, it cannot be expected that a slight perturbation of a certain percentage of data points by a certain amount will lead to a qualitatively different result. Even if all data points are perturbed by, e.g., 1%,1the clustering will stay the same although the clusters may be blurred a bit. This general observation is also supported by our preliminary numerical experiments: Clustering of well separated sets of data points does not benefit from robustification. Moreover, in such a situation there is also no need for robustified clustering if compared with the nominal results. Due to this and to the fact that most of the instances from the twelve synthetic data sets provided in Fränti and Sieranoja (2018) are practically well separated, we induce some uncertainty in the data points by perturbing them. More precisely, we consider an amount of perturbation of 10% and different quantities of perturbed data points: 5 %, 30 %, and 50%. Assuming now that the perturbed data set is the “new nominal” or given one, we apply the nominal and the two robust models. Each data set is perturbed 10 times and every time the three approaches are applied to an instance, they start with the same given centers. The average results for all data sets over the 10 runs each are presented in Table 3,wherewe show the Silhouette score as well as the ARI regarding the clustering results on the perturbed data compared to the nominal ADM solution on the unperturbed set (notice that we do not compare to the ground truth assignment here). For each instance and each validation metric, the best average result is printed in bold. Moreover, since in some cases the differences in terms of Silhouette and ARI among methods seem to be modest, we underline the best robust average results for which the corresponding pvalues (calculated for each metric and each two methods) are smaller than the α-error of 10% w.r.t. the nominal results. Therefore, the underlined average results are statistically significantly better on a 10% level. All the calculated pvalues are shown in the appendix in Table 10. It can be directly seen that the advantage of the strictly robust model over the nominal and -robust models increases with the amount of perturbed data points. This is the case, e.g., for the instance Unbalance. As we induce a stronger perturbation, the clusters significantly mix with each other and the performance of the strictly robust model becomes the best in both evaluation metrics. Let us now discuss the quality of the robustified clusterings for the instances s3,s4,a2, and a3 for which the data points are not well separated or for which the clusters are close to each other; see Fig. 3(all other data sets are given in Fig. 8in the appendix). To this end, we consider Fig. 4in which we display box-plots to analyze the quality of the robustified clustering results. On the y-axes we plot the ARI regarding the strictly robustified clustering results on the perturbed data compared to the nominal ADM solution on the unperturbed set divided by the ARI regarding the nominal ADM clustering results on the perturbed data compared to the nominal ADM solution on the unperturbed set. All ADMs always have been applied using the restart heuristic described in Sect. 6. For all four instances we see that the quality of the strictly robustified clustering is improved if the errors (in terms of the amount of perturbed points) get larger. The detailed behavior also depends on the specific instance. Thus, we discuss two exemplary ones. For a3 we see that the robustified clustering is advantageous only for the case of 50% perturbed data points. Taking a look at Fig. 3again we see that the data points in instance a3 are rather well separated but the clusters are close to each other. Since all points are perturbed by 10 % if they are perturbed 1Note that before the computations the data is scaled to [0,1]pand the amount of perturbation will be stated in percent for better readability. 123
1548 Annals of Operations Research (2024) 339:1525–1568 Table 3 Nominal and robust results on the perturbed synthetic data sets Instance Silhouette ARI Nominal Strictly Nominal Strictly a1 0.5592 0.5567 0.5511 0.9609 0.9520 0.9256 a2 0.5684 0.5683 0.5665 0.9583 0.9597 0.9491 a3 0.5776 0.5726 0.5791 0.9364 0.9261 0.9375 s1 0.6934 0.6934 0.6918 0.9905 0.9899 0.9866 s2 0.6119 0.6120 0.6096 0.9785 0.9779 0.9612 s3 0.4662 0.4645 0.4432 0.8956 0.8813 0.8059 s4 0.4556 0.4612 0.4326 0.7898 0.7734 0.6875 Unbalance 0.8026 0.8026 0.8002 0.9741 0.9744 0.9723 dim 0.9332 0.9332 0.9332 1.000 1.000 1.000 g2-2-30 0.6266 0.6266 0.6147 0.9926 0.9926 0.9116 g2-2-50 0.4810 0.4810 0.4710 0.9794 0.9746 0.8699 g2-2-70 0.3968 0.3971 0.3892 0.9627 0.9398 0.7993 a1 0.4964 0.4977 0.4584 0.7937 0.7999 0.7141 a2 0.4846 0.4874 0.4741 0.7379 0.7538 0.7180 a3 0.4894 0.4882 0.4867 0.6928 0.6914 0.6910 s1 0.6075 0.6075 0.5734 0.9407 0.9425 0.8783 s2 0.5371 0.5403 0.5163 0.8583 0.8684 0.8105 s3 0.4267 0.4264 0.3830 0.7514 0.7541 0.6204 s4 0.4218 0.4225 0.3477 0.6362 0.6465 0.5070 Unbalance 0.5815 0.5822 0.5455 0.6063 0.6123 0.4885 dim 0.8831 0.8831 0.8831 1.000 1.000 1.000 g2-2-30 0.6117 0.6117 0.5566 0.9617 0.9613 0.7324 g2-2-50 0.4732 0.4732 0.3625 0.8777 0.8758 0.3362 g2-2-70 0.4002 0.4002 0.3506 0.8199 0.8128 0.4087 a1 0.4435 0.4461 0.4091 0.6621 0.6709 0.5993 a2 0.4367 0.4360 0.4106 0.6147 0.6150 0.5665 a3 0.4386 0.4386 0.4237 0.5492 0.5526 0.5362 s1 0.5469 0.5469 0.5110 0.9020 0.9059 0.8311 s2 0.4795 0.4868 0.4429 0.7504 0.7745 0.6832 s3 0.3977 0.4009 0.3575 0.6337 0.6546 0.5333 s4 0.3958 0.3984 0.3676 0.5650 0.5798 0.5111 Unbalance 0.5082 0.5352 0.4599 0.5056 0.6041 0.4870 dim 0.8479 0.8479 0.8479 1.000 1.000 1.000 g2-2-30 0.6013 0.6013 0.5519 0.9353 0.9351 0.7221 g2-2-50 0.4695 0.4695 0.3596 0.8095 0.8084 0.2724 g2-2-70 0.4035 0.4036 0.2797 0.7179 0.7138 0.1496 The perturbation amount is 10%, and the quantity of perturbed data points is different in each block of the table: the top block corresponds to 5%, the middle block to 30%, and the bottom block to 50%. The values are exactly the number of perturbed data points for each instance. For each instance and each validation metric, the best average result is printed in bold. The best average result that is significantly better than the nominal one, according to the calculated pvalue, is underlined 123
Annals of Operations Research (2024) 339:1525–1568 1555 Table 5 continued Data set information Time (s) Iterations Instance npk spect-heart 80 22 2 0.04.4 spectf-heart 80 44 2 0.02.4 statlog-german-credit 1000 24 2 0.16.8 statlog-landsat-satellite 4435 36 6 6.448.6 teaching-assistant-evaluation 151 5 3 0.05.4 thyroid-disease-ann 3772 21 3 0.67.0 thyroid-disease-new 215 5 3 0.05.8 wall-following-robot-2 5456 2 4 2.916.2 wall-following-robot-4 5456 4 4 0.810.0 wine 178 13 3 0.06.6 yeast 1484 8 10 1.227.6 zoo 101 16 7 0.03.6 not have an underlying clustering structure and, consequently, does not fit well the k-means clustering idea. In contrast to this, when the Silhouette score in the true labels is larger than, e.g., 0.2, then the ARI is also closer to 1 in general. Thus, the ADM assignment result is more similar to the true labeling. In other words, if the real-world data set possesses an underlying clustering structure, then the proposed ADM combined with the restart heuristic performs very well and is able to find partial minima of good quality. 7.8 Strictly robust clustering results on real-world data sets As seen in the last section, several of the real-world data sets among the 52 instances turned out to be instances that are not suitable for the k-means clustering method because they do not possess an underlying clustering structure. Moreover, our experiments reveal that applying the strictly robustified k-means model to these instances does not significantly improve an already bad nominal clustering result. Therefore, from now on, we only focus on those instances for which the Silhouette score for the true labels is larger than 0.2andwealso focus on the strictly robustified model here due to our previous results on synthetic data sets. In order to compare the nominal method against its strictly robust counterpart, we apply each method five times with different seeds for the initialization procedure and both methods start with the same given initial centers. The average results over the five runs are presented in Table 7, where the best ARI result for the data set is highlighted in bold. As for the synthetic data sets, we calculated pvalues to assess the significance of the obtained results. Therefore, we underline the average results for which the difference in the ARI of the nominal vs. the strictly robust method is reasonable (pvalue smaller than an α-error of 10%). All calculated pvalues are shown in Table 11 in the appendix. Note that for the Silhouette score there is no big difference between the results. On the other hand, the ARI is more telling here since we compare how similar the two assignment results are to the true labeling. We can see that only for the instance mammographic-mass the nominal method outperforms the strictly robust method. For 10 out of the 15 instances, the 123
1556 Annals of Operations Research (2024) 339:1525–1568 Table 6 Results of Algorithm 2using the restart heuristic on the real world clustering data sets Instance Silhouette ARI True labels ADM balance-scale 0.0888 0.1656 0.1584 banknote-authentication 0.2103 0.3308 0.0219 blood-transfusion 0.0445 0.4935 −0.0062 breast-cancer 0.5715 0.5968 0.8465 breast-cancer-diagnostic 0.3389 0.3845 0.7302 breast-cancer-prognostic 0.0041 0.1960 0.0318 climate-model-crashes 0.0264 0.0388 0.0158 connectionist-bench −0.0024 0.1816 0.1709 connectionist-bench-sonar 0.0341 0.1986 0.0001 contraceptive-method-choice −0.0218 0.2840 0.0144 dermatology 0.2373 0.2438 0.5024 ecoli 0.2403 0.3040 0.5389 fertility 0.0121 0.1731 0.0128 glass-identification −0.0553 0.5078 0.2505 haberman 0.0324 0.3869 −0.0040 heart-disease-cleveland 0.0231 0.2066 0.1492 hepatitis 0.0697 0.1860 0.2302 hill-valley 0.0033 0.8847 0.0006 hill-valley-noise −0.0021 0.8505 −0.0006 image-segmentation 0.2068 0.3685 0.4746 ionosphere 0.1614 0.3301 0.1073 iris 0.4570 0.5043 0.7163 libras-movement 0.0215 0.2493 0.2986 magic-gamma-telescope 0.1388 0.3185 0.0318 mammographic-mass 0.2775 0.5803 0.3421 monks-1 0.0388 0.1981 −0.0018 monks-2 0.0013 0.2060 0.0129 monks-3 0.0594 0.1978 −0.0043 optical-recognition 0.1728 0.1876 0.6181 ozone-level-eight −0.0458 0.3209 −0.0222 ozone-level-one −0.0534 0.3210 −0.0124 parkinsons 0.1041 0.3030 −0.0588 pen-based-recognition 0.1928 0.3192 0.5196 planning-relax −0.0101 0.1588 −0.0029 qsar-biodegradation 0.0167 0.3640 −0.0519 seeds 0.3823 0.4221 0.6980 seismic-bumps 0.3153 0.7691 0.0022 soybean-large 0.1415 0.2533 0.3475 soybean-small 0.3498 0.3498 1.0000 spambase 0.0441 0.6858 −0.0045 spect-heart 0.0975 0.2973 0.1117 123
Annals of Operations Research (2024) 339:1525–1568 1557 Table 6 continued Instance Silhouette ARI True labels ADM spectf-heart 0.0651 0.5671 0.0015 statlog-german-credit 0.0237 0.1456 0.0401 statlog-landsat-satellite 0.1977 0.3571 0.5309 teaching-assistant-evaluation −0.0273 0.4817 0.0477 thyroid-disease-ann −0.0459 0.4170 −0.0276 thyroid-disease-new 0.4577 0.5624 0.6283 wall-following-robot-2 0.2334 0.6285 0.1275 wall-following-robot-4 −0.0067 0.3948 0.0839 wine 0.2923 0.2998 0.8431 yeast 0.0040 0.2182 0.1905 zoo 0.3689 0.3727 0.8037 Table 7 Performance of the strictly robust versus the nominal k-means clustering method on real-world clustering data sets Instance Silhouette ARI Nominal Strictly Nominal Strictly banknote-authentication 0.3307 0.3314 0.0223 0.0264 breast-cancer 0.5968 0.5961 0.8465 0.8630 breast-cancer-diagnostic 0.3845 0.3787 0.7302 0.7354 dermatology 0.2481 0.2480 0.6211 0.7113 ecoli 0.2963 0.2984 0.5401 0.5458 image-segmentation 0.3467 0.3570 0.4276 0.4377 iris 0.4999 0.4995 0.7132 0.7188 mammographic-mass 0.5803 0.5795 0.3421 0.3336 seeds 0.4221 0.4221 0.6980 0.6980 seismic-bumps 0.7691 0.7691 0.0022 0.0022 soybean-small 0.3498 0.3498 1 1 thyroid-disease-new 0.5504 0.5451 0.5799 0.5932 wall-following-robot-2 0.6117 0.5447 0.1681 0.3567 wine 0.2995 0.3007 0.8409 0.8600 zoo 0.3735 0.3735 0.8167 0.8167 For each instance, the best average ARI result is printed in bold. The average result that is significantly better than the nominal one according to the calculated pvalue is underlined strictly robust model performs the best, yielding clustering results that have more similarity to the true classes than the nominal clustering results do. Moreover, the underlined average results reveal that the improvement in clustering quality attained with the strictly robust method is significant. Thus, in the presence of potential measurement errors, the strictly robustified k-means clustering method is able to give more accurate results than its nominal counterpart. 123
1558 Annals of Operations Research (2024) 339:1525–1568 Table 8 Computational performance of the nominal and strictly robust models on real-world clustering data sets Instance Time (s) Iterations Nominal Strictly Nominal Strictly banknote-authentication 0.25 14.99 19.828.0 breast-cancer 0.04 3.78 5.45.0 breast-cancer-diagnostic 0.05 15.28 9.87.4 dermatology 0.19 38.15 15.016.6 ecoli 0.16 5.34 16.811.2 image-segmentation 0.04 7.11 6.27.0 iris 0.02 0.46 7.65.0 mammographic-mass 0.04 2.70 4.85.2 seeds 0.02 1.19 6.25.6 seismic-bumps 0.08 16.82 3.03.0 soybean-small 0.00 1.27 5.24.6 thyroid-disease-new 0.03 1.10 5.65.2 wall-following-robot-2 2.39 38.16 15.815.4 wine 0.01 1.95 5.86.0 zoo 0.01 1.91 3.83.4 The running times and iterations counts are listed in Table 8. Clearly, on average the strictly robust method needs more time to find a partial minimum. However, it is still rather fast, never requiring more than 39 s on average. In contrast to runtimes, the number of iterations does not change significantly. We conclude that the strictly robustified k-means clustering model is also beneficial for real-world clustering instances, which likely contain uncertainties due to measurement errors. Specifically, for almost all of the instances, the strictly robust model leads to improvements regarding the recovery of the true assignment over the nominal model. 8 Conclusion In this paper, we derived the strictly and -robust counterpart of the k-means clustering problem to hedge clustering results against errors without known structure in the observed data. The robustification makes it possible to obtain clusterings that are closer to clusterings of the original, i.e., error-free, data although only erroneous input data can be considered. Since already the nominal problem is NP-hard, we develop tailored alternating direction methods to quickly compute (robust) feasible solutions of good quality. Since these methods only converge to so-called partial minima that may correspond to clusterings of bad quality, we develop a restart heuristic for which we experimentally show that it significantly improves the quality of the computed clusterings. Our comparison of the strictly and -robust clustering method reveals the interesting aspect that the less conservative -approach is outperformed by the classic concept of strict robustness. Most importantly, the strictly robustified clustering method is able to recover clusterings of the original data even if only erroneous measurements are observed. Thus, we see that the studied robustifications can lead to more reliable models. 123
Annals of Operations Research (2024) 339:1525–1568 1559 Fig. 8 Some of the synthetic clustering instances used for the experiments; originally proposed in Fränti and Sieranoja (2018) Let us finally sketch some open problems that we do not resolve in this paper. One issue with the -approach is that partial minima are obtained that do not correspond to globally optimal clusterings. Consequently, the development of methods to compute global optima of robustified clustering problems may be a worthwhile topic of future work. Moreover, we do not answer the question on how to derive practically meaningful uncertainty sets for the robustification, which may be done for practical applications by means of cross-validation. Further, other uncertainty sets such as polyhedral and ellipsoidal sets should be considered in future works as well. Finally, one could study whether other clustering approaches such as spectral or hierarchical clustering can also be robustified so that they can cope with uncertain data. However, 123
1560 Annals of Operations Research (2024) 339:1525–1568 these approaches are not based on a clear-cut optimization model so that new robust concepts need to be developed that are maybe not directly based on robust optimization. Acknowledgements The authors thank the DFG for their support within RTG 2126 “Algorithmic Optimization”. Funding Open Access funding enabled and organized by Projekt DEAL. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. Appendix In this section, we present additional information that complement those given in Sect. 7.5 and Sect. 7.8. Specifically, in Fig. 8we present the plots of the remaining instances, in Table 9 we present the computational performance for the instances not discussed in Sect. 7.5,and Table 9 Average runtime and iteration counts for the corresponding ADMs with restart heuristic for the nominal, the strictly, and the -robust models on the perturbed (10%) synthetic data sets Instance Time (s) Iterations Nominal Strictly Nominal Strictly a1 4.537.561.129.433.724.4 s1 4.039.570.816.919.318.5 s2 6.143.493.228.122.926.0 dim 0.158.970.02.02.02.0 g2-2-30 0.12.74.35.55.04.7 g2-2-50 0.24.18.29.98.69.3 g2-2-70 0.36.611.213.415.313.1 a1 6.742.868.042.239.028.9 s1 4.741.877.720.421.021.9 s2 6.448.093.629.026.027.6 dim 0.160.068.82.02.02.0 g2-2-30 0.13.15.75.75.76.9 g2-2-50 0.24.66.610.19.48.1 g2-2-70 0.35.36.712.011.08.2 a1 6.342.655.240.940.023.0 s1 5.941.689.327.121.526.7 s2 5.447.175.127.525.621.5 dim 0.158.867.62.02.02.0 g2-2-30 0.13.15.96.45.97.6 g2-2-50 0.24.47.010.19.59.2 g2-2-70 0.35.87.113.112.69.3 The blocks are separated according to different amounts (5, 30, 50%) of randomly perturbed data points, respectively 123
Annals of Operations Research (2024) 339:1525–1568 1561 Table 10 Calculated pvalues using the Wilcoxon signed-rank test for the synthetic data sets w.r.t. each validation metric and each pair of methods Instance pvalues Silhouette pvalues ARI Nom. versus Str. Nom. versus Str. versus Nom. versus Str. Nom. versus Str. versus a1 0.105 0.002 0.064 0.010 0.002 0.014 a2 0.004 0.002 0.002 0.064 0.002 0.002 a3 0.002 0.432 1.000 0.322 0.432 1.000 s1 – 0.004 0.004 0.002 0.010 0.027 s2 0.002 0.002 0.002 0.275 0.002 0.002 s3 0.375 0.027 0.037 0.375 0.020 0.037 s4 0.049 0.002 0.002 0.322 0.004 0.002 unbalance – 0.002 0.002 0.046 0.193 0.131 dim –––––– g2-2-30 – 0.002 0.002 – 0.002 0.002 g2-2-50 – 0.002 0.002 0.002 0.002 0.002 g2-2-70 0.064 0.002 0.002 0.002 0.002 0.001 a1 0.695 0.002 0.004 0.064 0.002 0.004 a2 1.000 0.131 0.014 0.064 0.131 0.004 a3 0.846 0.492 0.625 0.922 0.770 0.922 s1 0.846 0.002 0.002 0.004 0.002 0.002 s2 0.557 0.131 0.027 0.002 0.131 0.027 s3 0.625 0.002 0.002 0.625 0.002 0.002 s4 1.000 0.002 0.002 0.625 0.020 0.002 unbalance 0.002 0.002 0.002 0.002 0.002 0.002 dim –––––– g2-2-30 – 0.002 0.002 0.180 0.002 0.002 g2-2-50 0.176 0.002 0.002 0.237 0.002 0.002 g2-2-70 0.922 0.002 0.002 0.010 0.002 0.002 a1 0.375 0.002 0.002 0.064 0.002 0.002 a2 1.000 0.004 0.002 1.000 0.002 0.002 a3 0.770 0.010 0.006 0.625 0.049 0.020 s1 0.432 0.002 0.002 0.004 0.002 0.002 s2 0.105 0.010 0.004 0.064 0.010 0.004 s3 0.322 0.002 0.002 0.002 0.002 0.002 s4 0.625 0.002 0.002 0.020 0.002 0.002 unbalance 0.002 0.232 0.131 0.002 1.000 0.232 dim –––––– g2-2-30 – 0.002 0.002 0.893 0.002 0.002 g2-2-50 0.735 0.002 0.002 0.463 0.002 0.002 g2-2-70 0.492 0.002 0.002 0.086 0.002 0.002 The (“–”) means that the average results are the same for both methods and so the pvalue is not calculated 123
1562 Annals of Operations Research (2024) 339:1525–1568 Table 11 Calculated pvalues using the Wilcoxon signed-rank test for the real-world data sets w.r.t. each validation metric and each pair of methods Instance Nominal versus strictly pvalue Silhouette pvalue ARI banknote-authentication 0.063 0.063 breast-cancer 0.063 0.063 breast-cancer-diagnostic 0.063 0.063 dermatology 0.625 0.813 ecoli 0.813 1.000 image-segmentation 0.285 0.285 iris 0.317 0.317 mammographic-mass 0.063 0.063 seeds –– seismic-bumps –– soybean-small –– thyroid-disease-new 0.046 0.046 wall-following-robot-2 0.063 0.063 wine 0.083 0.083 zoo –– The (“–”) means that the average results are the same and so the pvalue is not calculated in Tables 10 and 11 we present the calculated pvalues for each validation metric and each pair of methods. Additionally, we also present a comparison of our nominal as well as strictly robust clustering method with a spectral clustering method. To this end, we further apply spectral clustering to the test sets that we consider in this paper. The setup for the experiment is the following. We apply each method to the same instance and assess the quality of the clustering by computing the Silhouette index and the ARI. Here, we always compare the clustering result to the ground truth labels instead of comparing to the ADM results. To assess the significance of the obtained results, we apply the Wilcoxon signed-rank test to calculate pvalues. If the resulting pvalue is smaller than the α-error of 10%, we reject the null-hypothesis that the strictly robust result is less or equally good as the spectral one in terms of the Silhouette score or the ARI, respectively. To compute the spectral clustering, we use the Python module sklearn.cluster.SpectralClustering. The results w.r.t. the synthetic instances are presented in Table 12 and the results w.r.t. the real-world instances are shown in Table 13; the respective computed pvalues are presented in Tables 14 and 15. 123
Annals of Operations Research (2024) 339:1525–1568 1563 Table 12 Performance of the nominal, strictly robust, and spectral clustering methods on the perturbed synthetic data sets Instance Silhouette ARI Time (s) Nom. Str. Spec. Nom. Str. Spec. Nom. Str. Spec. a1 0.50 0.55 0.33 0.81 0.91 0.50 5.292.466.9 a2 0.51 0.57 0.22 0.83 0.94 0.31 16.1 194.0 120.2 a3 0.53 0.57 0.25 0.83 0.91 0.30 49.4 334.8 152.8 s1 0.66 0.69 0.45 0.94 0.98 0.72 5.353.124.8 s2 0.58 0.61 0.34 0.86 0.92 0.59 9.590.0 151.9 s3 0.46 0.48 0.23 0.66 0.70 0.45 14.2 137.588.2 s4 0.46 0.46 0.22 0.58 0.60 0.41 17.3 196.5 240.5 Unbalance 0.66 0.77 0.80 0.64 0.90 0.98 2.5 101.712.7 dim 0.93 0.93 0.93 1.00 1.00 1.00 0.2 140.31.7 g2-2-30 0.63 0.63 0.63 0.96 0.96 0.96 0.24.02.4 g2-2-50 0.48 0.48 0.48 0.69 0.69 0.69 0.69.54.4 g2-2-70 0.40 0.40 0.40 0.48 0.48 0.48 0.59.32.3 a1 0.47 0.49 0.29 0.72 0.76 0.41 6.084.360.1 a2 0.46 0.49 0.20 0.68 0.74 0.29 20.3 233.4 134.4 a3 0.47 0.49 0.22 0.66 0.70 0.27 45.7 438.0 168.2 s1 0.54 0.61 0.39 0.82 0.93 0.67 8.9 103.664.9 s2 0.52 0.54 0.30 0.78 0.83 0.54 5.095.6 116.0 s3 0.42 0.43 0.21 0.59 0.60 0.40 10.9 109.9 111.3 s4 0.42 0.42 0.18 0.51 0.52 0.35 19.3 171.7 195.5 Unbalance 0.56 0.62 0.66 0.55 0.70 0.87 1.873.710.8 dim 0.88 0.88 0.88 1.00 1.00 1.00 0.195.91.7 g2-2-30 0.61 0.61 0.61 0.93 0.93 0.93 0.25.22.2 g2-2-50 0.47 0.47 0.47 0.64 0.64 0.64 0.37.52.4 g2-2-70 0.40 0.40 0.40 0.44 0.45 0.44 0.48.22.1 a1 0.44 0.45 0.25 0.63 0.66 0.37 5.662.154.5 a2 0.43 0.44 0.19 0.61 0.63 0.28 22.9 222.6 106.2 a3 0.43 0.44 0.20 0.54 0.55 0.24 37.0 447.9 153.9 s1 0.53 0.55 0.31 0.85 0.89 0.60 4.481.9 126.1 s2 0.47 0.49 0.31 0.72 0.76 0.56 11.2 143.8 134.0 s3 0.40 0.40 0.21 0.53 0.54 0.39 15.7 125.8 177.0 s4 0.39 0.40 0.18 0.46 0.46 0.33 10.1 191.3 211.4 Unbalance 0.50 0.51 0.54 0.48 0.53 0.77 2.146.09.3 dim 0.85 0.85 0.85 1.00 1.00 1.00 0.178.71.1 g2-2-30 0.60 0.60 0.60 0.92 0.92 0.92 0.24.52.0 g2-2-50 0.47 0.47 0.47 0.62 0.62 0.61 0.36.42.1 g2-2-70 0.40 0.40 0.40 0.41 0.41 0.41 0.37.02.1 The perturbation amount is 10%, and the quantity of perturbed data points is different in each block of the table: the top block corresponds to 5%, the middle block to 30%, and the bottom block to 50%. For each instance and each validation metric, the best average result is printed in bold. According to the calculated p value (presented in Table 14), the average result of the strictly robust method that is significantly better than the spectral one is underlined. The average results are based on 10 runs 123
1564 Annals of Operations Research (2024) 339:1525–1568 Table 13 Performance of the nominal, strictly robust, and spectral clustering methods on the real-world clustering data sets Instance Silhouette ARI Time (s) Nom. Str. Spec. Nom. Str. Spec. Nom. Str. Spec. banknote-authentication 0.33 0.33 0.32 0.02 0.03 0.06 0.315.11.6 breast-cancer 0.60 0.60 0.58 0.85 0.86 0.72 0.16.10.6 breast-cancer-diagnostic 0.38 0.38 0.40 0.73 0.74 0.50 0.131.20.7 dermatology 0.23 0.24 0.24 0.61 0.61 0.56 0.186.50.4 ecoli 0.33 0.33 0.25 0.61 0.60 0.43 0.212.10.4 image-segmentation 0.33 0.35 0.28 0.38 0.41 0.39 0.123.30.3 iris 0.49 0.50 0.49 0.60 0.73 0.62 0.12.90.4 mammographic-mass 0.58 0.58 0.58 0.34 0.33 0.34 0.17.72.1 seeds 0.42 0.42 0.35 0.70 0.70 0.67 0.12.80.3 seismic-bumps 0.77 0.77 0.59 0.00 0.00 0.19 0.240.33.5 soybean-small 0.35 0.35 0.35 1.00 1.00 1.00 0.04.30.1 thyroid-disease-new 0.56 0.56 0.59 0.63 0.64 0.39 0.17.10.3 wall-following-robot-2 0.63 0.54 0.51 0.12 0.36 0.37 2.585.88.4 wine 0.30 0.30 0.30 0.86 0.86 0.93 0.19.00.5 zoo 0.37 0.36 0.40 0.80 0.75 0.92 0.010.40.3 For each instance and each validation metric, the best average result is printed in bold. According to the calculated pvalue shown in Table 15, the best average result of the strictly robust method that is significantly better than the spectral one is underlined. The average results are based on five runs 123