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

Yuanyuan Chloe Yang, Ruimin Zhang, Jamie Heather Morgenstern, Haifeng Xu

Introduction

As machine learning models—particularly Large Language Models (LLMs) and massive vision models—continue to grow in size and complexity, serving them efficiently presents a formidable challenge. A common strategy to manage this is cascaded inference (or "up-cascading"). In this setup, a system starts with a small, inexpensive model. If the model is "unsure" of its prediction, the system routes the query to a medium model, eventually falling back on a massive, expensive "backbone" model if necessary.

The critical question in this process is determining exactly when to stop and accept a model's output. Currently, most systems rely on heuristics, such as exiting if a model's softmax confidence exceeds a predefined threshold. However, this status quo suffers from two major flaws:

  1. Suboptimality: Heuristic approaches lack theoretical guarantees and frequently miss the optimal trade-off between accuracy and computational cost.
  2. The "No-Recall" Trap: Most existing systems operate without "recall," meaning once the system moves to a larger model, it is forced to use that model's output. This ignores the reality that larger models can sometimes "over-think" and produce worse results than their smaller predecessors on specific queries.

The T-TAMER Framework

To address these limitations, the authors introduce T-TAMER, a framework that formalizes model serving as a costly exploration problem over a Directed Acyclic Graph (DAG). In this representation, nodes correspond to sub-models, and edges represent the sequence of consultation.

The Power of Recall

A central innovation of T-TAMER is its formalization of recall. The framework distinguishes between "no-recall" strategies (where the system must use the last model visited) and "with-recall" strategies (where the system can select the best result from any model evaluated so far).

The paper presents a striking theoretical proof: no-recall strategies cannot achieve a constant-factor approximation of the optimal accuracy-latency trade-off. If a system discards earlier results, it is mathematically destined for inefficiency. By contrast, recall-based strategies can provably attain the optimal trade-off in polynomial time.

Dynamic Indexing and DAG Generalization

Inspired by classical "Pandora’s Box" problems in economics, T-TAMER employs an algorithm that assigns a dynamic index (a reservation value) to each model. At any stage in the cascade, if the current best error is lower than the next model's index, the system halts exploration. This indexing policy runs in $O(1)$ time per node during inference, making it highly practical for high-throughput production environments.

Furthermore, while most traditional cascades operate as simple linear sequences, T-TAMER generalizes to complex topologies.

Various DAG topologies supported by T-TAMER, including directed lines, transitive closures, and directed trees.

As illustrated above, the framework supports trees (for decision-tree routing) and transitive closures (allowing the system to skip intermediate models entirely). To make the underlying mathematics computationally feasible for large state spaces, T-TAMER utilizes Soft State Aggregation (SSA) to compress transition matrices, significantly speeding up the policy's learning phase.

Empirical Results

The authors validated T-TAMER on real-world workloads across different domains, demonstrating its superiority over standard "Score-based" (confidence threshold) and "Rule-based" (patience/consistency) baselines. Because T-TAMER is model-agnostic, it acts as a plug-in component that learns performance correlations from a small calibration set, regardless of how the underlying models were trained.

  • Computer Vision: Using VGG-11, 13, and 16 models for object classification on urban video footage (Auburn and Oxford datasets), T-TAMER achieved approximately 95% accuracy while saving 50% on latency compared to running the full backbone model.
  • Natural Language Processing: For sentiment analysis tasks using BERT-base and GPT2-medium on Amazon and IMDB reviews, the framework reached 75% accuracy with a massive 90% reduction in latency. Notably, in BERT workloads, T-TAMER successfully navigated regions where traditional thresholding failed due to non-monotonicity in model performance.

Limitations and Future Directions

While T-TAMER provides a principled foundation for cascaded inference, it has a few limitations. The current framework requires quantizing loss values into discrete bins; although Soft State Aggregation mitigates this, very fine-grained discretization still increases preprocessing time. Additionally, the strategy assumes that test queries come from the same distribution as the calibration queries. Handling real-time distributional shifts (e.g., day-to-night changes in video feeds) remains an open challenge.

Finally, while this work focuses on the bi-objective accuracy-latency trade-off, real-world serving often involves a "tri-lemma" of accuracy, latency, and monetary cost—especially when routing to API-based LLMs. Expanding the DAG framework to handle multi-objective optimization is a logical and promising next step.

Summary updated

BibTeX
@inproceedings{yang2026t,
  author = {Yuanyuan Chloe Yang and Ruimin Zhang and Jamie Heather 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