arXiv:2611.12466stat.MLNov 2026

Manuscript Offprint

arXiv:2611.12466

Prediction with Foundation Models under Deployment Budgets

Zhaohui Xu, Xiaofei Xu, Doudou Zhou

Abstract

Foundation models can supply predictions for a downstream task that draw on knowledge from extensive pretraining, but they differ in task-specific accuracy and query cost. We develop a framework that improves prediction for the task under a budget on the average query cost per input, using training data to learn which models to query and how to combine their outputs with features available without querying. The first method queries the same models for every input; the second lets them vary across inputs and uses Q-learning to decide which model to query next and when to stop. For the first method, we show that several individually inaccurate outputs can jointly outperform the best single one. It attains the minimax rate when the regression function depends on the outputs only through models within the budget. Otherwise, any method within the budget can be forced to a slower rate, which the first method attains. For the second method, we show when varying the queried models across inputs strictly improves on querying the same models for every input, and bound its prediction risk and average cost in finite samples. In simulations and a multimodal laptop price application, both methods outperform existing methods.

Keywords: Black-box prediction; Cost-sensitive learning; Minimax rate; Model selection; Q-learning

*Corresponding author: Doudou Zhou, ddzhou@nus.edu.sg.

1 Introduction

Foundation models have changed the way prediction models are built. Instead of fitting a model to the task's own data from scratch, one can now query these models for predictions that reflect knowledge acquired during extensive pretraining (Guo et al., 2025; Hollmann et al., 2025). However, using these predictions alone is not enough, because the models were not trained for the task and the task's data contain information that the models never see. It is more sensible to use these data to adjust the output of a foundation model and combine it with the features of the task. Moreover, several models usually carry more information than one, since the inputs often contain several modalities, different models read different parts of them, and models trained on different data make different errors. Their outputs can therefore complement one another, but they can also overlap with one another or with the features. Whether a model is worth using thus depends not on how accurate it is on its own but on how much information it adds beyond the other models and the features. How to combine the outputs of several foundation models with the features is a new statistical problem.

Each additional model, however, comes at a cost. Commercial models charge for every query and locally run models consume computing time, so the cost grows with the number of inputs to be predicted. The laptop listings analyzed in Section 6, for example, each come with numerical specifications, a text description and a product image. A tabular foundation model can use the specifications, language models the description and vision-language models the image, but their prices per query differ by nearly three orders of magnitude. With a budget, the problem of combining outputs gains another layer, because one must first decide which of these models to query. Whether a model is worth its price depends in turn on which other models are queried and how their outputs are combined, so the two decisions have to be learned together from listings with known prices while keeping the average cost within the budget. Problems of this kind have emerged with foundation models and arise wherever such models are used to build predictors, from pricing products (Vedula et al., 2025; Wang et al., 2026) to predicting clinical outcomes (Guo et al., 2024). We formulate them as a statistical learning problem and develop methods and theory for it.

Several recent works use the task's own data to improve on the predictions of pretrained models. Li and Zhang (2026) and Zhou (2026) correct the predictions of a single model with these data, and Kwon and Ham (2026) correct several models separately and average them with a convex weight. These methods, however, address only a simplified version of our problem, and they differ from it in three respects. First, they treat the predictions as free and therefore never need to decide which models to query. Second, they either use a single model or treat several models separately before averaging, so they do not fit the outputs jointly with the features of the task and cannot fully exploit how the models complement one another. Finally, they query the same models for every input, although the most useful models may differ across inputs. A listing with complete specifications, for instance, may be priced accurately by a tabular model alone, whereas a listing with incomplete specifications may also need the language and vision-language models.

We propose a framework that takes all three into account. It treats a procedure as a pair consisting of a query rule, which decides which models to query and may choose different models for different inputs, and a prediction rule, which combines the acquired outputs with the features of the task. Among the procedures whose average query cost does not exceed a budget BB, we seek the one with the smallest prediction risk, so that the choice of models and the way their outputs are combined are learned together.

We develop two methods, ACES-T and ACES-I, named for Affordable Combination of External Signals at the Task level and at the Input level. Both learn from the task's own data how much weight to give each acquired output, jointly with the features, so that a scale bias in an output and the redundancy or complementarity among outputs are taken into account. They differ in the query rule. ACES-T queries the same collection of models for every input, which keeps the cost of every input within the budget. The number of affordable collections, that is, sets of models whose total cost is within the budget, grows rapidly with the number of models, so ACES-T minimizes the empirical risk over them by a branch-and-bound search that avoids fitting every collection. ACES-I instead lets the queried models vary across inputs, so that it can spend more on the inputs that need more models. The value of querying a model then depends on which models can still be queried afterwards, and ACES-I therefore learns when to stop and which model to query next by backward Q-learning.

Our theory explains why several outputs help, what the budget costs, and what is gained by letting the queried models vary across inputs. First, the risk of ACES-T depends on the approximation error of the affordable collection as a whole rather than on the accuracy of each output. Several outputs that are inaccurate on their own can therefore jointly outperform the best single model. Second, ACES-T attains the minimax rate when the regression function depends on the outputs only through an affordable collection. The budget then costs nothing in rate. Otherwise, the regret of any procedure relative to the best affordable collection can, in the worst case, decay no faster than at the square-root rate, and ACES-T attains this rate. A faster rate would require mixing the predictions of several collections, which the budget does not allow. Third, when different inputs prefer different collections, letting the queried models vary across inputs strictly improves on every affordable fixed collection, and the gain cannot be obtained by randomizing over fixed collections. ACES-I achieves this improvement once the sample is large enough.

In simulations and in a laptop price application with six foundation models, both methods outperform existing methods that combine the predictions of pretrained models with the task's own data. When one collection suits all inputs, ACES-T nearly matches the accuracy of querying every model at a much lower cost and ACES-I adds little, whereas when the most useful models vary across inputs, ACES-I improves on ACES-T.

References (34)