Abstract
Motivated by the recent popularity of machine learning training services, we introduce a contract design problem in which a provider sells a service that results in an outcome of uncertain quality for the buyer. The seller has a set of actions that lead to different distributions over outcomes. We focus on a setting in which the seller has the ability to commit to an action and the buyer is free to accept or reject the outcome after seeing its realized quality. We propose a two-stage payment scheme where the seller designs a menu of contracts, each of which specifies an action, an upfront price and a vector of outcome-dependent usage prices. Upon selecting a contract, the buyer pays the upfront price, and after observing the realized outcome, the buyer either accepts and pays the corresponding usage price, or rejects and is exempt from further payment. We show that this two-stage payment structure is necessary to maximize profit: only upfront prices or only usage prices is insufficient. We then study the computational complexity of computing a profit-maximizing menu in our model. While computing the exact maximum seller profit is NP-hard even for two buyer types, we derive a fully-polynomial time approximation scheme (FPTAS) for the maximum profit for a constant number of buyer types. Finally, we prove that in the single-parameter setting in which buyers' valuations are parametrized by a single real number that seller revenue can be maximized using a menu consisting of a single contract.
Introduction
As "Machine Learning as a Service" (MLaaS) becomes a cornerstone of the tech industry, providers face a unique pricing challenge. When a company pays for services like AutoML or LLM fine-tuning, the provider exerts significant costly effort in terms of compute and engineering. However, the final model quality is inherently stochastic. Current industry leaders typically charge uniform prices based on compute usage, which fails to account for two critical factors: adverse selection (different buyers value the same model quality differently) and outcome uncertainty (the seller cannot guarantee a specific performance metric before training is complete).
This paper addresses the "Service Provider Problem": How should a seller design a menu of contracts to maximize profit when they can commit to an action, but the outcome of that action is a random variable?
The Contract Framework
The authors model the interaction as a multi-stage game using the lens of Algorithmic Contract Theory. The interaction follows a specific sequence:
- The Menu: The seller offers a menu of contracts. Each contract specifies an action (effort level), an upfront price, and a vector of usage prices for every possible outcome.
- The Choice: The buyer, who possesses a private "type" or valuation, selects a contract and pays the upfront fee.
- The Realization: The seller performs the action, and a stochastic outcome is realized.
- Voluntary Usage: After observing the result, the buyer chooses to either pay the usage price to use the product or reject it and pay nothing more.
Key Insights: The Power of "No"
A counter-intuitive finding of this research is that voluntary usage—allowing the buyer to reject the outcome—is actually better for the seller than mandatory usage. By providing the buyer with an "out," the seller effectively reduces the buyer's risk. This risk reduction allows the seller to charge a significantly higher upfront fee, ultimately increasing the seller's bottom line.
Furthermore, the research demonstrates that two-part tariffs are mandatory. The authors prove that using only upfront prices or only usage prices is insufficient; a two-part structure is strictly necessary to maximize profit. The profit from a two-part tariff can be up to $H_T$ (the $T$-th harmonic number) times larger than a menu using only upfront payments.
Computational Complexity and Algorithms
From a computational standpoint, the problem presents significant challenges. The authors prove a "structural simplification": for any outcome, the optimal usage price is effectively binary—either $0$ (free) or $\infty$ (blocked). This reduces the search space for optimal contracts from continuous values to a discrete selection of outcomes to include or exclude.
Despite this simplification, computing the exact profit-maximizing menu is NP-hard, even with just two buyer types and a single seller action. To address this, the authors adapt a Dynamic Programming framework to derive a Fully Polynomial-Time Approximation Scheme (FPTAS). If the number of buyer types is constant, a solution within $(1-\epsilon)$ of the maximum profit can be found in polynomial time.
Single-Parameter Settings
In a simplified setting where buyers' valuations are scaled versions of a baseline (single-parameter), the authors find that the seller can maximize revenue using a menu consisting of just a single contract. However, they provide a counter-example showing this does not necessarily hold for profit when actions have different costs. Finding the optimal profit-maximizing menu in this specific case remains an open question.
Conclusion and Future Work
This work provides a robust theoretical foundation for pricing services with uncertain outcomes. While the FPTAS offers a path forward for a small number of buyer types, future research is needed to address the scalability of types and settings where the seller's action is hidden (moral hazard) rather than committed. The distinction between revenue and profit maximization in single-parameter settings also remains a fertile ground for future study.
Summary updated