Correlation clustering

Method of partitioning data points into groups based on their similarity

Clustering is the problem of partitioning data points into groups based on their similarity. Correlation clustering provides a method for clustering a set of objects into the optimum number of clusters without specifying that number in advance.[1]

## Description of the problem

[edit]

Main article: Cluster analysis

In machine learning, correlation clustering or cluster editing operates in a scenario where the relationships between the objects are known instead of the actual representations of the objects. For example, given a weighted graph G = ( V , E ) {\displaystyle G=(V,E)} where the edge weight indicates whether two nodes are similar (positive edge weight) or different (negative edge weight), the task is to find a clustering that either maximizes agreements (sum of positive edge weights within a cluster plus the absolute value of the sum of negative edge weights between clusters) or minimizes disagreements (absolute value of the sum of negative edge weights within a cluster plus the sum of positive edge weights across clusters). Unlike other clustering algorithms this does not require choosing the number of clusters k {\displaystyle k} in advance because the objective, to minimize the sum of weights of the cut edges, is independent of the number of clusters.

It may not be possible to find a perfect clustering, where all similar items are in a cluster while all dissimilar ones are in different clusters. If the graph indeed admits a perfect clustering, then simply deleting all the negative edges and finding the connected components in the remaining graph will return the required clusters. Davis found a necessary and sufficient condition for this to occur: no cycle may contain exactly one negative edge.[2]

But, in general a graph may not have a perfect clustering. For example, given nodes a,b,c such that a,b and a,c are similar while b,c are dissimilar, a perfect clustering is not possible. In such cases, the task is to find a clustering that maximizes the number of agreements (number of + edges inside clusters plus the number of − edges between clusters) or minimizes the number of disagreements (the number of − edges inside clusters plus the number of + edges between clusters). This problem of maximizing the agreements is NP-complete (multiway cut problem reduces to maximizing weighted agreements and the problem of partitioning into triangles[3] can be reduced to the unweighted version).

## Formal Definitions

[edit]

Let  G = ( V , E ) {\displaystyle G=(V,E)} be a graph with nodes  V {\displaystyle V} and edges  E {\displaystyle E} . A clustering of  G {\displaystyle G} is a partition of its node set  Π = { π 1 , … , π k } {\displaystyle \Pi =\\{\pi _{1},\dots ,\pi _{k}\\}} with  V = π 1 ∪ ⋯ ∪ π k {\displaystyle V=\pi _{1}\cup \dots \cup \pi _{k}} and  π i ∩ π j = ∅ {\displaystyle \pi _{i}\cap \pi _{j}=\emptyset } for  i ≠ j {\displaystyle i\neq j} . For a given clustering  Π {\displaystyle \Pi } , let  δ ( Π ) = { { u , v } ∈ E ∣ { u , v } ⊈ π ∀ π ∈ Π } {\displaystyle \delta (\Pi )=\\{\\{u,v\\}\in E\mid \\{u,v\\}\not \subseteq \pi \;\forall \pi \in \Pi \\}} denote the subset of edges of  G {\displaystyle G} whose endpoints are in different subsets of the clustering  Π {\displaystyle \Pi } . Now, let  w : E -> R ≥ 0 {\displaystyle w\colon E\to \mathbb {R} _{\geq 0}} be a function that assigns a non-negative weight to each edge of the graph and let  E = E + ∪ E − {\displaystyle E=E^{+}\cup E^{-}} be a partition of the edges into attractive ( E + {\displaystyle E^{+}} ) and repulsive ( E − {\displaystyle E^{-}} ) edges.

The minimum disagreement correlation clustering problem is the following optimization problem:  minimize Π ∑ e ∈ E + ∩ δ ( Π ) w e + ∑ e ∈ E − ∖ δ ( Π ) w e . {\displaystyle {\begin{aligned}&{\underset {\Pi }{\operatorname {minimize} }}&&\sum _{e\in E^{+}\cap \delta (\Pi )}w_{e}+\sum _{e\in E^{-}\setminus \delta (\Pi )}w_{e}\;.\end{aligned}}} Here, the set  E + ∩ δ ( Π ) {\displaystyle E^{+}\cap \delta (\Pi )} contains the attractive edges whose endpoints are in different components with respect to the clustering  Π {\displaystyle \Pi } and the set  E − ∖ δ ( Π ) {\displaystyle E^{-}\setminus \delta (\Pi )} contains the repulsive edges whose endpoints are in the same component with respect to the clustering  Π {\displaystyle \Pi } . Together these two sets contain all edges that disagree with the clustering  Π {\displaystyle \Pi } .

Similarly to the minimum disagreement correlation clustering problem, the maximum agreement correlation clustering problem is defined as  maximize Π ∑ e ∈ E + ∖ δ ( Π ) w e + ∑ e ∈ E − ∩ δ ( Π ) w e . {\displaystyle {\begin{aligned}&{\underset {\Pi }{\operatorname {maximize} }}&&\sum _{e\in E^{+}\setminus \delta (\Pi )}w_{e}+\sum _{e\in E^{-}\cap \delta (\Pi )}w_{e}\;.\end{aligned}}} Here, the set  E + ∖ δ ( Π ) {\displaystyle E^{+}\setminus \delta (\Pi )} contains the attractive edges whose endpoints are in the same component with respect to the clustering  Π {\displaystyle \Pi } and the set  E − ∩ δ ( Π ) {\displaystyle E^{-}\cap \delta (\Pi )} contains the repulsive edges whose endpoints are in different components with respect to the clustering  Π {\displaystyle \Pi } . Together these two sets contain all edges that agree with the clustering  Π {\displaystyle \Pi } .

Instead of formulating the correlation clustering problem in terms of non-negative edge weights and a partition of the edges into attractive and repulsive edges the problem is also formulated in terms of positive and negative edge costs without partitioning the set of edges explicitly. For given weights  w : E -> R ≥ 0 {\displaystyle w\colon E\to \mathbb {R} _{\geq 0}} and a given partition  E = E + ∪ E − {\displaystyle E=E^{+}\cup E^{-}} of the edges into attractive and repulsive edges, the edge costs can be defined by  c e = { w e if e ∈ E + − w e if e ∈ E − {\displaystyle {\begin{aligned}c_{e}={\begin{cases}\;\;w_{e}&{\text{if }}e\in E^{+}\\\\-w_{e}&{\text{if }}e\in E^{-}\end{cases}}\end{aligned}}} for all  e ∈ E {\displaystyle e\in E} .

An edge whose endpoints are in different clusters is said to be cut. The set  δ ( Π ) {\displaystyle \delta (\Pi )} of all edges that are cut is often called a multicut[4] of  G {\displaystyle G} .

The minimum cost multicut problem is the problem of finding a clustering  Π {\displaystyle \Pi } of  G {\displaystyle G} such that the sum of the costs of the edges whose endpoints are in different clusters is minimal:  minimize Π ∑ e ∈ δ ( Π ) c e . {\displaystyle {\begin{aligned}&{\underset {\Pi }{\operatorname {minimize} }}&&\sum _{e\in \delta (\Pi )}c_{e}\;.\end{aligned}}}

Similar to the minimum cost multicut problem, coalition structure generation in weighted graph games[5] is the problem of finding a clustering such that the sum of the costs of the edges that are not cut is maximal:  maximize Π ∑ e ∈ E ∖ δ ( Π ) c e . {\displaystyle {\begin{aligned}&{\underset {\Pi }{\operatorname {maximize} }}&&\sum _{e\in E\setminus \delta (\Pi )}c_{e}\;.\end{aligned}}} This formulation is also known as the clique partitioning problem.[6]

It can be shown that all four problems that are formulated above are equivalent. This means that a clustering that is optimal with respect to any of the four objectives is optimal for all of the four objectives.

## Algorithms

[edit]

Bansal et al.[7] discuss the NP-completeness proof and also present both a constant factor approximation algorithm and polynomial-time approximation scheme to find the clusters in this setting. Ailon et al.[8] propose a randomized 3-approximation algorithm for the same problem.

CC-Pivot(G=(V,E+,E−))
Pick random pivot i ∈ V
Set

{\displaystyle C=\{i\}}

, V'=Ø
For all j ∈ V, j ≠ i;
If (i,j) ∈ E+ then
Add j to C
Else (If (i,j) ∈ E−)
Add j to V'
Let G' be the subgraph induced by V'
Return clustering C,CC-Pivot(G')

The authors show that the above algorithm is a 3-approximation algorithm for correlation clustering. The best polynomial-time approximation algorithm known at the moment for this problem achieves a ~2.06 approximation by rounding a linear program, as shown by Chawla, Makarychev, Schramm, and Yaroslavtsev.[9]

Karpinski and Schudy[10] proved existence of a polynomial time approximation scheme (PTAS) for that problem on complete graphs and fixed number of clusters.

## Optimal number of clusters

[edit]

In 2011, it was shown by Bagon and Galun[11] that the optimization of the correlation clustering functional is closely related to well known discrete optimization methods. In their work they proposed a probabilistic analysis of the underlying implicit model that allows the correlation clustering functional to estimate the underlying number of clusters. This analysis suggests the functional assumes a uniform prior over all possible partitions regardless of their number of clusters. Thus, a non-uniform prior over the number of clusters emerges.

Several discrete optimization algorithms are proposed in this work that scales gracefully with the number of elements (experiments show results with more than 100,000 variables). The work of Bagon and Galun also evaluated the effectiveness of the recovery of the underlying number of clusters in several applications.

## Correlation clustering (data mining)

[edit]

Correlation clustering also relates to a different task, where correlations among attributes of feature vectors in a high-dimensional space are assumed to exist guiding the clustering process. These correlations may be different in different clusters, thus a global decorrelation cannot reduce this to traditional (uncorrelated) clustering.

Correlations among subsets of attributes result in different spatial shapes of clusters. Hence, the similarity between cluster objects is defined by taking into account the local correlation patterns. With this notion, the term has been introduced in [12] simultaneously with the notion discussed above. Different methods for correlation clustering of this type are discussed in [13] and the relationship to different types of clustering is discussed in.[14] See also Clustering high-dimensional data.

Correlation clustering (according to this definition) can be shown to be closely related to biclustering. As in biclustering, the goal is to identify groups of objects that share a correlation in some of their attributes; where the correlation is usually typical for the individual clusters.

## References

[edit]

1. ^ Becker, Hila, "A Survey of Correlation Clustering", 5 May 2005
2. ^ James A. Davis (1963). "Structural balance, mechanical solidarity, and interpersonal relations", Amer. J. Sociology 68, pp. 444–463.
3. ^ Garey, M.; Johnson, D. (2000). Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman and Company.
4. ^ Deza, M.; Grötschel, M.; Laurent, M. (1992). "Clique-Web Facets for Multicut Polytopes". Mathematics of Operations Research. 17 (4): 981–1000\. doi:10.1287/moor.17.4.981.
5. ^ Bachrach, Yoram; Kohli, Pushmeet; Kolmogorov, Vladimir; Zadimoghaddam, Morteza (2013). "Optimal coalition structure generation in cooperative graph games". Proceedings of the AAAI Conference on Artificial Intelligence. Vol. 27\. pp. 81–87.`{{cite conference}}`: CS1 maint: multiple names: authors list (link)
6. ^ Grötschel, G.; Wakabayashi, Y. (1989). "A cutting plane algorithm for a clustering problem". Mathematical Programming. 45 (1–3): 59–96\. doi:10.1007/BF01589097.1–3&rft.pages=59-96&rft.date=1989&rft_id=info:doi/10.1007/BF01589097&rft.aulast=Grötschel&rft.aufirst=G.&rft.au=Wakabayashi,+Y.&rfr_id=info:sid/en.wikipedia.org:Correlation+clustering" class="Z3988">
7. ^ Bansal, N.; Blum, A.; Chawla, S. (2004). "Correlation Clustering". Machine Learning. 56 (1–3): 89–113\. doi:10.1023/B:MACH.0000033116.57574.95.1–3&rft.pages=89-113&rft.date=2004&rft_id=info:doi/10.1023/B:MACH.0000033116.57574.95&rft.aulast=Bansal&rft.aufirst=N.&rft.au=Blum,+A.&rft.au=Chawla,+S.&rft_id=https://doi.org/10.1023%2FB%3AMACH.0000033116.57574.95&rfr_id=info:sid/en.wikipedia.org:Correlation+clustering" class="Z3988">
8. ^ Ailon, N.; Charikar, M.; Newman, A. (2005). "Aggregating inconsistent information". Proceedings of the thirty-seventh annual ACM symposium on Theory of computing – STOC '05. p. 684\. doi:10.1145/1060590.1060692. ISBN 1581139608.
9. ^ Chawla, Shuchi; Makarychev, Konstantin; Schramm, Tselil; Yaroslavtsev, Grigory. "Near Optimal LP Rounding Algorithm for CorrelationClustering on Complete and Complete k-partite Graphs". Proceedings of the 46th Annual ACM on Symposium on Theory of Computing.
10. ^ Karpinski, M.; Schudy, W. (2009). "Linear time approximation schemes for the Gale-Berlekamp game and related minimization problems". Proceedings of the 41st annual ACM symposium on Symposium on theory of computing – STOC '09. p. 313\. arXiv:0811.3244. doi:10.1145/1536414.1536458. ISBN 9781605585062.
11. ^ Bagon, S.; Galun, M. (2011) "Large Scale Correlation Clustering Optimization" arXiv:1112.2903v1
12. ^ Böhm, C.; Kailing, K.; Kröger, P.; Zimek, A. (2004). "Computing Clusters of Correlation Connected objects". Proceedings of the 2004 ACM SIGMOD international conference on Management of data – SIGMOD '04. p. 455\. CiteSeerX 10.1.1.5.1279. doi:10.1145/1007568.1007620. ISBN 978-1581138597. S2CID 6411037.
13. ^ Zimek, A. (2008). Correlation Clustering (Text.PhDThesis). Ludwig-Maximilians-Universität München.
14. ^ Kriegel, H. P.; Kröger, P.; Zimek, A. (2009). "Clustering high-dimensional data". ACM Transactions on Knowledge Discovery from Data. 3: 1–58\. doi:10.1145/1497577.1497578. S2CID 17363900.