TL;DR
This paper introduces ParM, a novel framework that uses "parity models" to make machine learning inference services resilient to slowdowns and failures. By encoding multiple queries into a single "parity query" and processing it with a learned parity model, ParM can reconstruct lost predictions with significantly reduced tail latency and resource overhead compared to traditional replication methods.
What Problem Does This Paper Address?
Modern applications heavily rely on machine learning models served through prediction systems. These systems, often distributed across many machines, are susceptible to slowdowns and failures that can drastically increase "tail latency" (the latency experienced by the slowest requests). Meeting strict latency Service Level Objectives (SLOs) is crucial, and existing solutions for mitigating tail latency either fall short for the demanding requirements of prediction serving, incur substantial resource costs, or are not applicable to the complex, non-linear computations of modern ML models like neural networks. The core challenge is to provide resilience without sacrificing performance or efficiency.
Methods
ParM introduces a new paradigm called "parity models" for coded-computation in ML inference. Instead of relying on complex, hand-designed encoders and decoders (which can be slow and difficult to generalize), ParM uses simple, fast encoders and decoders (like addition/subtraction) and introduces a learned "parity model" ($F_p$).
Here's how it works:
- Encoding: Multiple incoming queries (say, $k$ queries) are encoded into a single "parity query."
- Parity Model Inference: This parity query is then processed by a learned parity model ($F_p$).
- Decoding: If one of the original $k$ predictions is unavailable (due to slowdown or failure), a decoder uses the output of the parity model and the available predictions to reconstruct an approximation of the missing prediction.
The key innovation is the parity model, which is itself a neural network trained to transform the parity query into a form that facilitates reconstruction. This approach allows ParM to handle complex, non-linear computations of ML models while keeping the encoder and decoder simple and fast. ParM can also be extended to tolerate multiple failures ($r > 1$) by training multiple parity models.
Datasets
The paper evaluates ParM on a variety of standard datasets across different ML tasks:
- Image Classification: CIFAR-10, CIFAR-100, Fashion-MNIST, MNIST, Cat/Dog.
- Speech Recognition: Google Commands.
- Object Localization: CUB-200.
The authors use these datasets to train both the deployed ML models and the parity models, and to evaluate the accuracy of ParM's reconstructions.
Key Insights and Ideas
- Parity Models as a General Building Block: The introduction of learned parity models is a significant departure from prior work. It allows for a flexible framework that can be applied to diverse ML inference tasks and model architectures without needing to redesign the core coding mechanism for each.
- Simple Encoders/Decoders are Sufficient: By offloading the complexity to the parity model, ParM demonstrates that very simple encoding (like summation) and decoding (like subtraction) can be highly effective when paired with a well-trained parity model. This drastically reduces the computational overhead of the resilience mechanism itself.
- Approximation is Acceptable for ML Inference: The paper leverages the inherent approximate nature of ML predictions. Reconstructing a slightly less accurate prediction when the original is unavailable is often preferable to returning a default, potentially random, prediction or experiencing a complete failure.
- Trade-off Between Redundancy and Accuracy: Increasing the number of encoded queries ($k$) improves resilience but can slightly decrease reconstruction accuracy. This highlights a tunable parameter for balancing resource efficiency and prediction quality.
- ParM is Agnostic to Failure Causes: Like erasure codes, ParM's resilience mechanism is independent of why a prediction is slow or fails, making it robust in complex, dynamic production environments.
Key Results
- Reduced Tail Latency: ParM significantly reduces the gap between 99.9th percentile and median latency. On a GPU cluster, it achieved up to a 48% reduction in 99.9th percentile latency, bringing it up to 3.5x closer to the median.
- Improved Accuracy Under Unavailability: ParM's reconstructed predictions are substantially more accurate than default predictions. For image classification and speech recognition, ParM achieved degraded mode accuracy improvements of 41-89% over default predictions. Reconstructions were within 6.5% of the original prediction's accuracy.
- Resource Efficiency: ParM uses 2-4x fewer additional resources compared to replication-based approaches for achieving similar levels of resilience.
- Task Versatility: ParM demonstrated effectiveness across various tasks (image classification, speech recognition, object localization) and model architectures (MLP, LeNet-5, VGG-11, ResNet-18, ResNet-152).
- Fast Components: ParM's encoder and decoder latencies are negligible (under 200 µs), with the parity model inference being the dominant factor in reconstruction time.
Limitations and Future Work
- Accuracy Trade-off with Redundancy: As parameter $k$ (redundancy level) increases, reconstruction accuracy slightly decreases. The paper suggests this is a fundamental trade-off, similar to traditional erasure codes.
- Training Overhead: Parity models need to be trained, which requires data and computation. However, this is a one-time cost per model/task, and the benefits during inference are substantial.
- Task-Specific Encoders: While the generic encoder/decoder works well, the paper shows that task-specific encoders (e.g., for image classification) can further improve reconstruction accuracy, suggesting future work in designing specialized components.
- Hardware Agnosticism: While ParM is generally hardware-agnostic, the performance of approximate backup models (a baseline) was shown to vary significantly across hardware, highlighting a potential advantage of ParM's approach.
The authors suggest that ParM's framework opens new avenues for resource-efficient resilience in prediction serving systems, and future work could explore more advanced parity model architectures and task-specific encoder/decoder designs.
Summary updated