Elastic CoCoA: Scaling In to Improve Convergence

Michael Kaufmann, Thomas P. Parnell, Kornilios KourtisarXiv 2018 · OpenReview

TL;DR

This paper introduces Chicle, an elastic machine learning framework that dynamically adjusts the number of workers during distributed training to optimize convergence speed. By observing that the ideal number of workers changes over time, Chicle achieves significant speedups (up to 5.96x) compared to static configurations, while also automatically finding near-optimal settings.

What Problem Does This Paper Address?

Training large machine learning models, especially generalized linear models (GLMs) using distributed systems like CoCoA, faces a challenge: simply adding more workers doesn't always lead to faster training. The CoCoA algorithm, while efficient in communication, exhibits a counter-intuitive behavior where its convergence rate actually degrades as the number of workers (K) increases. This is because each worker sees a smaller piece of the data, limiting its ability to identify correlations. Furthermore, the "sweet spot" for K – the number of workers that yields the fastest convergence – isn't fixed; it shifts as the training progresses. This makes choosing the optimal static number of workers difficult and can lead to wasted time and resources.

Methods

The core innovation is Chicle, an elastic framework built upon the CoCoA algorithm. Chicle's key idea is to dynamically adjust the number of workers (K) during training based on real-time feedback.

Here's how it works:

  • Observation: The authors observed that the convergence rate of CoCoA, when plotted against time, shows a "knee" – a point after which convergence slows down significantly. Crucially, this knee occurs at a lower duality gap for fewer workers.
  • Scale-in Policy: Chicle employs a "scale-in" policy, meaning it primarily reduces the number of workers. It monitors the convergence rate by calculating both a long-term slope (St) and a short-term slope (Ss) of the duality gap. When the short-term slope becomes significantly steeper than the long-term slope (specifically, Ss * d < St, with d=1.25), it signals that the current number of workers is no longer optimal, and the system initiates a scale-in.
  • RDMA-based Data Copy: To minimize the overhead of changing the number of workers, Chicle uses a simple, RDMA-based foreground data-copy mechanism. This allows for parallel data transfer between workers, enabling them to exceed the maximal single-link bandwidth and achieve high transfer rates.
  • In-Memory Representation: Data is stored in an optimized in-memory layout to facilitate efficient local access and rapid data transfer, avoiding costly serialization.

Datasets

The paper evaluates Chicle on six diverse datasets:

  • RCV1
  • KDDA
  • Higgs
  • KDD12
  • Webspam
  • Criteo

These datasets vary in size, number of features, and sparsity, providing a good testbed for the framework's robustness. No new benchmarks were introduced; the focus was on evaluating an existing algorithm (CoCoA) with a novel elasticity approach.

Key Insights and Ideas

  • The "Drifting Knee": The most significant insight is that the optimal number of workers for CoCoA is not static but changes dynamically throughout the training process. This "drifting knee" in the convergence curve is the fundamental observation driving Chicle's design.
  • Scale-in as a Strategy: Instead of trying to find the perfect number of workers upfront, Chicle focuses on intelligently reducing the number of workers when convergence starts to slow down. This "scale-in" approach leverages the observation that fewer workers can maintain a faster convergence rate for longer.
  • Overhead vs. Benefit: The paper highlights the critical trade-off between the overhead of adjusting worker counts (data transfer, re-partitioning) and the potential gains in convergence speed. Chicle's RDMA-based mechanism and in-memory data structures are designed to keep this overhead minimal.
  • Robustness of Elasticity: Chicle's ability to automatically find near-optimal settings without requiring manual tuning is a key advantage, especially in dynamic cloud environments where optimal configurations might not be known in advance.

Key Results

  • Significant Speedups: Chicle achieved an average speedup of 2x when scaling down to a single worker and 2.2x when scaling down to two workers, compared to the best static settings across various datasets and target accuracies.
  • Maximum Speedup: The maximum observed speedup was 5.96x.
  • Robustness: Chicle demonstrated robustness by automatically finding optimal or near-optimal settings, reducing the need for extensive manual tuning and test runs.
  • Tolerable Slowdowns: While Chicle didn't improve upon all static settings for all target accuracies, any slowdowns compared to the best static setting were generally tolerable, and speedups were still achieved over non-optimal static configurations.
  • Low Overhead: Data-copy rates reached up to 5.8 GiB/s, and total average scale-in overheads were measured to be low (e.g., 0.06s to 0.73s for 1-16 workers), not necessitating background data transfer for the tested configurations.

Limitations and Future Work

  • Scale-in Only: The current implementation of Chicle primarily focuses on "scaling-in" (reducing workers). The paper acknowledges that a more comprehensive elastic system might also incorporate "scaling-out" (increasing workers).
  • Assumption of Trajectory: The scale-in policy relies on the assumption that the convergence trajectory after switching from K to K' workers will resemble the trajectory if training had started with K' workers. While empirically validated, this is an assumption.
  • Future Work: The authors suggest exploring additional dynamic optimization strategies for CoCoA, investigating related use-cases like neural networks, and developing a theoretical foundation for their observations.

Summary updated

Abstract

In this paper we experimentally analyze the convergence behavior of CoCoA and show, that the number of workers required to achieve the highest convergence rate at any point in time, changes over the course of the training. Based on this observation, we build Chicle, an elastic framework that dynamically adjusts the number of workers based on feedback from the training algorithm, in order to select the number of workers that results in the highest convergence rate. In our evaluation of 6 datasets, we show that Chicle is able to accelerate the time-to-accuracy by a factor of up to 5.96x compared to the best static setting, while being robust enough to find an optimal or near-optimal setting automatically in most cases.
BibTeX
@misc{kaufmann2018elastic,
  author = {Michael Kaufmann and Thomas P. Parnell and Kornilios Kourtis},
  title = {{Elastic CoCoA: Scaling In to Improve Convergence}},
  year = {2018},
  eprint = {1811.02322},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.02322},
}
Figure