A Parallel Projection Method for Metric Constrained Optimization

Cameron Ruggles, Nate Veldt, David F. Gleich

TL;DR

This paper introduces a novel parallel execution schedule for Dykstra’s projection method to solve metric-constrained optimization problems at an unprecedented scale. By exploiting the specific structure of triangle inequality constraints, the authors achieved a speedup of over 11x on problems involving up to 2.9 trillion constraints, effectively tackling the massive computational bottleneck inherent in large-scale clustering and metric learning.

What Problem Does This Paper Address?

Many machine learning tasks—like correlation clustering, metric learning, and image segmentation—rely on enforcing the triangle inequality: for any three points $i, j, k$, the distance between $i$ and $j$ must be less than or equal to the sum of the distances between $i, k$ and $j, k$ ($x_{ij} \le x_{ik} + x_{jk}$).

While conceptually simple, this leads to a "cubic explosion." For a dataset of $n$ objects, there are $O(n^3)$ constraints. Even for a modest $n=10,000$, you are looking at a trillion constraints. Standard optimization software (like commercial LP solvers) crashes due to memory limits long before reaching this scale.

Previous work used iterative projection methods (like Dykstra’s) because they are memory-efficient, but they are notoriously slow because they traditionally visit constraints one by one. Existing parallel versions of Dykstra’s method rely on "averaging" results from multiple projections, which fails here because the updates become so infinitesimally small that the algorithm makes no meaningful progress.

Methods

The authors propose a conflict-free parallel projection schedule. Their approach is built on a key observation: two projection steps can be performed simultaneously without any locking or variable conflicts if their associated triplets $(i, j, k)$ share at most one index in common.

Key Innovations:

  1. Diagonal Execution Schedule: They developed a mathematical way to group triplets into independent sets. By iterating through the "diagonals" of a grid representing the indices, they can identify large blocks of constraints that can be processed in parallel.
  2. Tiling for Cache Efficiency: Inspired by high-performance matrix multiplication, they implemented a "tiled" approach. Instead of just picking individual triplets, they process $b \times b \times b$ cubes of indices. This significantly improves cache locality, which is vital when the distance matrix $X$ is too large to fit in fast memory.
  3. Parallel Dual Variables: Dykstra’s method requires tracking "dual variables" to ensure convergence. The authors showed how to partition these variables across processors so that each thread maintains its own deterministic update order, keeping the memory complexity $O(1)$ per projection.

Datasets

The researchers evaluated their method by solving the Linear Programming (LP) relaxation of correlation clustering on five large-scale graphs:

  • Collaboration Networks (from SNAP): ca-GrQc, ca-HepTh, ca-HepPh, and ca-AstroPh.
  • Power Grid Graph: From the Newman group/SuiteSparse collection.
  • Scale: The largest instance (ca-AstroPh) involved over 160 million variables and 2.9 trillion constraints, representing a massive benchmark for parallel optimization.

Key Insights and Ideas

  • Structure is the Solution: The "aha moment" is realizing that the very thing that makes the problem hard (the $O(n^3)$ constraints) also provides a highly structured sparsity that can be exploited for massive parallelism.
  • Sequential-Parallel Hybrid: Unlike standard parallel Dykstra which averages updates, this method is "block-sequential." It maintains the strong convergence properties of the serial algorithm while allowing multiple processors to work on different parts of the distance matrix simultaneously.
  • Load Balancing: Because different "diagonals" of the index grid have different numbers of triplets, the authors used a round-robin (modulo $p$) assignment to ensure no single processor becomes a bottleneck.

Key Results

  • Consistent Speedup: On all tested graphs, using just 8 cores resulted in a 4-5x speedup over the state-of-the-art serial implementation.
  • Scaling to Trillions: For the largest problem (2.9 trillion constraints), the method achieved an 11.46x speedup using 64 cores.
  • Tile Size Matters: The team found that performance peaks at specific tile sizes (e.g., $b=25$ or $b=40$). If the tile is too small, overhead dominates; if it's too large, cache efficiency drops.

Limitations and Future Work

  • Linear Convergence: While the parallelization makes each iteration faster, the underlying Dykstra’s method still only converges at a linear rate. The "slow start" of projection methods remains a challenge for reaching high-precision solutions quickly.
  • Hardware Scaling: The speedup is significant but not perfectly linear (e.g., 64 cores gave ~11x speedup, not 64x). This suggests that memory bandwidth or the specific Julia threading model may eventually hit a ceiling.
  • Future Directions: The authors suggest exploring even more complex graph coloring techniques to find larger independent sets of constraints and applying these techniques to non-linear metric optimization problems.

Summary updated

BibTeX
@inproceedings{ruggles2020parallel,
  author = {Cameron Ruggles and Nate Veldt and David F. Gleich},
  title = {{A Parallel Projection Method for Metric Constrained Optimization}},
  booktitle = {CSC},
  year = {2020},
  doi = {10.1137/1.9781611976229.5},
}
Figure