Exact Clustering via Integer Programming and Maximum Satisfiability

Atsushi Miyauchi, Tomohiro Sonobe, Noriyoshi Sukegawa

Introduction

Clustering is a fundamental task in data analysis, often modeled as the Clique Partitioning Problem (CPP). In CPP, a complete graph is given where edge weights represent the affinity between nodes: positive weights suggest nodes belong together, while negative weights suggest they should be separated. The objective is to partition nodes into clusters to maximize the sum of intra-cluster weights.

While heuristic methods like the Louvain algorithm are popular for their speed, they do not guarantee optimality. Finding exact solutions is NP-hard and traditionally relies on Integer Linear Programming (ILP). However, standard ILP formulations suffer from a "memory wall" due to the $O(n^3)$ triangle inequality constraints required to ensure transitivity. For a graph with 1,000 nodes, this translates to roughly 500 million constraints, exceeding the memory capacity of most standard systems.

Methodology

The authors propose a novel approach to bypass this memory explosion by exploiting the sparsity of positive-weighted edges through two primary innovations.

Sparsity-Aware Formulation ($RP(G)$)

The core innovation lies in the realization that many triangle inequalities are redundant. By slightly perturbing zero-weight edges with a small negative value ($-\epsilon$), the authors prove that constraints only need to be enforced for strictly positive edges ($m_{>0}$). This reduces constraint complexity from $O(n^3)$ to $O(nm_{>0})$, which is significantly more manageable for real-world sparse datasets.

The $RP^*(G) + pp$ Algorithm

To avoid numerical instability associated with tiny $\epsilon$ values, the authors introduce a two-step process:

  1. Relaxed ILP: Solve the problem using original weights but a reduced constraint set. This may result in "illegal" clusters linked by zero-weight edges.
  2. Post-Processing (pp): Use a linear-time Depth-First Search (DFS) to resolve any transitivity violations, ensuring a valid optimal partition.

Additionally, these improvements were adapted for Maximum Satisfiability (MaxSAT), resulting in leaner clausal formulations compared to previous state-of-the-art methods.

Datasets

The proposed methods were evaluated across diverse real-world problem domains, ranging from biological sequences to social networks.

Table 1: Characteristics of the datasets used in the evaluation, including node counts (n) and edge density metrics.
  • Correlation Clustering: Protein sequence datasets (Protein1–4) derived from BLAST.
  • Group Technology: Manufacturing cell formation instances (G9–G35) used to optimize factory layouts.
  • Community Detection: Social and co-authorship networks, including a "Network Science" graph with 2,549 nodes.

Key Results and Discussion

The experimental results demonstrate a massive reduction in memory footprint and significant speedups across all tested domains.

Constraint Reduction

On the "Network Science" dataset, the standard formulation requires over 8 billion constraints. The authors' $RP(G)$ formulation successfully handled this instance within 96 GB of RAM, a feat previously impossible for standard exact solvers. As shown in the performance data, the number of constraints is reduced by orders of magnitude in many cases.

Performance Gains

The $RP^*(G) + pp$ approach frequently outperformed the state-of-the-art MaxSAT-Binary solver. In several group technology instances, the proposed method reached optimality in seconds, while competing methods timed out (OT) or ran out of memory (OM) after four hours.

Table 2: Comparison of constraint counts and execution times across different ILP and MaxSAT formulations.

Conclusion

This work demonstrates that exact clustering for graphs with thousands of nodes is feasible by focusing on the "interesting" structure of the data—positive-weighted edges. While the method's efficiency decreases as edge density increases, it provides a powerful new tool for researchers needing mathematically perfect partitions in sparse networks. Future work may involve combining these formulations with cutting-plane methods to further scale exact clustering.

Summary updated

BibTeX
@inproceedings{miyauchi2018exact,
  author = {Atsushi Miyauchi and Tomohiro Sonobe and Noriyoshi Sukegawa},
  title = {{Exact Clustering via Integer Programming and Maximum Satisfiability}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.1609/aaai.v32i1.11519},
}
Figure