T-TAMER: Provably Taming Trade-offs in ML Serving

Yuanyuan Yang, Ruimin Zhang, Jamie Morgenstern, Haifeng Xu · OpenReview

Abstract

As machine learning models continue to grow in size and complexity, efficient serving faces increasingly broad trade-offs spanning accuracy, latency, resource usage, and other objectives. Multi-model serving further complicates these trade-offs; for example, in cascaded models, each early-exit decision balances latency reduction against potential accuracy loss. Despite the pervasiveness and importance of such trade-offs, current strategies remain largely heuristic and case-specific, limiting both their theoretical guarantees and general applicability. We present a general framework, T-Tamer, which formalizes this setting as a multi-stage decision process, where the objective is to determine both when to exit and which model to consult. Our main result shows that recall (i.e., the ability to revisit earlier models) is both necessary and sufficient for achieving provable performance guarantees. In particular, we prove that strategies without recall cannot obtain any constant-factor approximation to the optimal trade-off, whereas recall-based strategies provably attain the optimal trade-off in polynomial time. We validate our analysis through experiments on synthetic datasets and early-exit workloads for vision and NLP benchmarks. The results show that recall-based strategies consistently yield efficient accuracy-latency trade-offs. We hope this work provides a principled foundation for bridging heuristic practice with theoretical guarantees in the design of early-exit and cascaded models.

Introduction

In the current landscape of Large Language Models (LLMs) and high-resolution computer vision, the "bigger is better" paradigm for accuracy often clashes with the practical constraints of latency and cost. To navigate this, engineers frequently employ cascaded inference: a strategy that starts with a computationally inexpensive model and escalates to larger, more expensive models only when necessary.

However, most existing systems rely on simple heuristics—such as fixed confidence thresholds—to decide when to stop. The T-TAMER framework demonstrates that these common heuristics are fundamentally limited and introduces a mathematically optimal approach to managing trade-offs in ML serving.

The Problem: The "No-Recall" Bottleneck

Cascaded serving (or early-exit architectures) attempts to balance accuracy and cost by creating a pipeline of models with increasing complexity. The central challenge lies in the stopping policy: determining the optimal moment to return a result.

Most current practitioners utilize a "no-recall" strategy. In this setup, once the system moves from a smaller Model A to a larger Model B, it is forced to use Model B’s output (or continue the chain). This approach suffers from two major flaws:

  1. Suboptimality: Heuristic thresholds lack theoretical performance guarantees.
  2. Over-thinking: Systems often discard superior results from earlier, smaller models even when they are more accurate for a specific query than their larger counterparts.

The T-TAMER Framework

T-TAMER formalizes ML serving as a multi-stage costly exploration process over various graph structures. Nodes represent models, and edges represent the computational or financial cost of moving between them.

Structural representations of ML serving cascades: (a) Directed Line, (b) Transitive Closure (skip-cascades), and (c) Directed Tree.

The Necessity of Recall

The framework's primary theoretical contribution is the proof that recall—the ability to revisit and select an earlier model’s output—is essential. The authors prove that no-recall strategies cannot achieve even a constant-factor approximation of the optimal trade-off. Without the ability to "look back," a system is mathematically incapable of guaranteeing high performance across diverse data distributions.

Dynamic Indexing Strategy

To achieve optimality, T-TAMER introduces a with-recall strategy based on a Dynamic Index (σ).

  • Computation: Indices are pre-computed using Dynamic Programming (DP) based on the observed error distributions of the models on a validation set.
  • Decision Rule: For any given state, the algorithm calculates a "break-even" point. If the current best error rate is below this index, the system stops; otherwise, it proceeds to the next model.

This strategy is provably optimal for various structures, including linear pipelines, skip-cascades (transitive closures), and hierarchical classification trees.

Experimental Validation

The authors evaluated T-TAMER against heuristic methods using synthetic data and standard benchmarks:

  • Computer Vision: Video streaming tasks using VGG backbones (VGG-11, 13, 16) showed a 55% reduction in latency with less than a 7% drop in accuracy.
  • Natural Language Processing: Sentiment analysis on IMDB and Amazon reviews using BERT and GPT-2 achieved latency reductions of up to 90% while maintaining competitive accuracy.
  • Synthetic Analysis: Experiments with various probability distributions (Truncated Normal, LogNormal) confirmed that threshold-based strategies fail in scenarios where T-TAMER thrives.

Conclusion

T-TAMER provides a principled foundation for ML serving by bridging the gap between heuristic practice and theoretical guarantees. By demonstrating that recall is the "secret ingredient" for optimality, the framework allows for the design of cascades that are both faster and more accurate. While future work remains to address distribution shifts and multi-objective complexities, T-TAMER represents a significant step toward mathematically grounded ML infrastructure.

Summary updated

BibTeX
@inproceedings{yang2026t,
  author = {Yuanyuan Yang and Ruimin Zhang and Jamie Morgenstern and Haifeng Xu},
  title = {{T-TAMER: Provably Taming Trade-offs in ML Serving}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=JFY9MZtWTu},
}
Figure