One Size Does Not Fit All: Quantifying and Exposing the Accuracy-Latency Trade-off in Machine Learning Cloud Service APIs via Tolerance Tiers

Matthew Halpern, Behzad Boroujerdian, Todd W. Mummert, Evelyn Duesterwald, Vijay Janapa Reddi · DOI

Introduction

Machine Learning as a Service (MLaaS) providers currently employ a "one size fits all" paradigm, routing all user requests to a single, static model. This approach ignores the diverse requirements of different applications, where some prioritize extreme accuracy (e.g., medical diagnostics) and others prioritize low latency (e.g., real-time social media filters). This paper introduces Tolerance Tiers, a system that enables users to programmatically trade a controlled amount of accuracy for significant improvements in latency and cost.

The Accuracy-Latency Trade-off

Machine learning models inherently face a trade-off: more complex architectures and deeper searches generally improve accuracy but at the cost of increased computation time and resource consumption.

Accuracy-latency trade-offs for ASR and IC services across different model versions.

As shown in the figure above, for both Automatic Speech Recognition (ASR) and Image Classification (IC), reducing the error rate requires a non-linear increase in normalized response time. By exposing these tiers, providers can cater to speed-sensitive users without compromising the needs of accuracy-critical ones.

Methodology: Tolerance Tiers

The proposed architecture replaces monolithic models with an ensemble of versions (e.g., "fast/light" and "slow/heavy"). Users specify a Tolerance (maximum relative accuracy loss) and an Objective (e.g., minimize time).

The system employs two primary routing policies:

  1. Sequential (Seq): A fast model is executed first. If its confidence score exceeds a threshold, the result is returned immediately (Early Termination).
  2. Concurrent (Conc): Both models run simultaneously; if the fast model provides a high-confidence result first, the slow model is terminated to save resources.

To maintain accuracy guarantees, a Routing Rule Generator uses bootstrapping on validation data to automatically determine optimal confidence thresholds for routing.

Key Insights: Input Sensitivity

A critical finding of this research is that not all inputs are equally difficult. A significant portion of requests are "easy" and do not benefit from larger, more expensive models.

Distribution of result changes across model versions for ASR and IC requests.

Analysis reveals that 74.1% of ASR requests and 65.8% of IC requests remain unchanged regardless of the model version used. Tolerance Tiers exploit this sensitivity by using confidence as a proxy to stop processing once a "good enough" result is achieved, isolating the high costs of complex models to only those queries that truly require them.

Evaluation and Results

The system was evaluated using the VoxForge dataset for ASR and ImageNet (ILSVRC2012) for IC. The results demonstrate that Tolerance Tiers effectively navigate the trade-off space:

  • Latency Reductions: Dropped by 19% at a 1% tolerance and by 60% at a 10% tolerance.
  • Cost Savings: Infrastructure costs (machine time) were reduced by 21% at a 1% tolerance and up to 70% at a 10% tolerance.
  • Reliability: The automated routing successfully upheld statistical accuracy guarantees with 99.9% confidence across all tests.

Conclusion

Tolerance Tiers transform MLaaS from a rigid utility into a flexible resource. By exposing the accuracy-latency trade-off and leveraging input sensitivity, the system provides substantial performance and cost benefits while ensuring that users' specific accuracy requirements are strictly met.

Summary updated

BibTeX
@inproceedings{halpern2019one,
  author = {Matthew Halpern and Behzad Boroujerdian and Todd W. Mummert and Evelyn Duesterwald and Vijay Janapa Reddi},
  title = {{One Size Does Not Fit All: Quantifying and Exposing the Accuracy-Latency Trade-off in Machine Learning Cloud Service APIs via Tolerance Tiers}},
  booktitle = {ISPASS},
  year = {2019},
  doi = {10.1109/ispass.2019.00012},
}
Figure