Coded Elastic Computing

Yaoqing Yang, Matteo Interlandi, Pulkit Grover, Soummya Kar, Saeed Amizadeh, Markus Weimer

TL;DR

Cloud providers offer massive discounts on "preemptible" virtual machines, but using them is risky because they can disappear at any moment. This paper introduces Coded Elastic Computing, a framework that uses error-correcting code principles and a clever cyclic data access pattern to allow distributed computations to seamlessly adapt as machines join or leave, achieving up to a 46% speedup over traditional methods without losing numerical accuracy.

What Problem Does This Paper Address?

Distributed computing in the cloud is moving toward "elasticity." Providers like AWS and Azure offer spare capacity (Spot Instances or Low-Priority VMs) at up to 90% off. However, these machines are "low-priority," meaning the provider can take them back (preemption) whenever a full-price customer needs them.

Current distributed frameworks handle these "failures" poorly. They either:

  1. Stop-the-world: Pause everything and wait for a replacement, which kills progress if preemptions are frequent.
  2. Ignore: Simply skip the missing data, which leads to lower model accuracy and "algorithmic-level performance loss."
  3. Reshuffle: Move data to new machines, which creates massive network bottlenecks.

The authors tackle the challenge of building a system that is "positively elastic"—one that doesn't just survive failures but actually speeds up when new machines join, all without moving a single byte of data between existing nodes.

Methods

The core of the paper is a combination of Coded Redundancy and Cyclic Data Partitioning.

  • Coded Redundancy: Instead of just splitting a matrix $\mathbf{X}$ into chunks, the system stores linear combinations of those chunks across different machines (similar to how a RAID drive works). This ensures that as long as a minimum number of machines (the "recovery threshold" $L$) remain, the full result can be reconstructed.
  • Cyclic Data Access: This is the novel "elastic" part. Each machine stores a "coded" block of data, but it further partitions that block into smaller sub-blocks.
  • When many machines are available, each machine only computes a small fraction of its sub-blocks.
  • If a machine is preempted, the remaining machines "activate" more of their local sub-blocks to cover the gap.
  • Transition Compatibility: The authors formally define this property, which ensures that the system can switch from $n$ machines to $n-1$ (or $n+1$) machines instantly. Because the data is already stored locally in a redundant way, the "transition" only requires changing which indices the machines compute, rather than moving data over the network.

The paper provides specific algorithms for Matrix-Vector Multiplication, Matrix-Matrix Multiplication, and Linear Regression.

Datasets

The researchers evaluated their approach using:

  • Synthetic Benchmarks: Large-scale matrix-vector multiplications ($100,000 \times 10,000$ matrices) to measure raw timing and speedup.
  • Real-world Linear Regression: A dataset with 3,352 features and 10,000 samples, tested on a Microsoft internal multi-tenancy cluster to evaluate convergence and generalization error.

Key Insights and Ideas

  • Elasticity as a Feature, Not a Bug: Most systems treat a new machine joining as a chore (data must be copied to it). In this framework, a new machine is an immediate win; the existing machines simply "dial back" their local workload, leading to a linear speedup.
  • Static Data, Dynamic Workload: The "aha moment" is that you don't need to move data to be elastic. By over-provisioning storage (which is cheap) and using coded combinations, you can make the computation (which is expensive) perfectly fluid.
  • Exactness: Unlike "lossy" approaches that ignore preempted nodes, this method is numerically exact. It produces the same result as if you had a stable, non-preemptible cluster.

Key Results

  • 46% Speedup: In matrix-vector benchmarks, the adaptive coded scheme reduced computation time by 46% compared to non-adaptive coding schemes when the number of machines fluctuated.
  • Linear Scaling: The per-machine computational cost scales inversely ($1/n$) with the number of available machines, which is the theoretical ideal for distributed systems.
  • Superior Accuracy: In linear regression tests, Coded Elastic Computing achieved the same convergence as a "noiseless" (fixed) environment. In contrast, the "Ignore" baseline (skipping failed nodes) resulted in significantly higher generalization errors.
  • Resilience: The system successfully tolerated up to 50% of the machines being preempted while still producing exact results.

Limitations and Future Work

  • Decoding Overhead: The "Master" node must solve a linear system to decode the final result. While the authors show this is computationally lighter than the workers' tasks, it could become a bottleneck for extremely high-dimensional outputs or massive clusters.
  • Storage Costs: To achieve this elasticity, each machine must store more data than it would in a simple uncoded partition. There is a clear trade-off between storage redundancy and the number of preemptions the system can tolerate.
  • Linearity Constraints: The current proofs and methods are primarily optimized for linear operations. While they suggest applications for Deep Learning (via the PolyDot technique), extending the "exactness" of coded computing to highly non-linear layers remains a complex frontier.

Summary updated

BibTeX
@inproceedings{yang2019coded,
  author = {Yaoqing Yang and Matteo Interlandi and Pulkit Grover and Soummya Kar and Saeed Amizadeh and Markus Weimer},
  title = {{Coded Elastic Computing}},
  booktitle = {ISIT},
  year = {2019},
  url = {https://openreview.net/forum?id=JPmkXfEZudc},
}
Figure