arXiv:2608.25303cs.GTAug 2026

Manuscript Offprint

arXiv:2608.25303

Sample Complexity of the Second-Best Bilateral Trade

Qiaoyun Shi, Shengxin Liu, Zongqi Wan

Abstract

We study the sample complexity of learning near-optimal bilateral trade mechanisms. Unlike previous work on learning simple or fixed-price bilateral-trade mechanisms [Babaioff et al., 2024, Castiglioni et al., 2026], we focus on mechanisms satisfying Bayesian incentive compatible (BIC), interim individually rational (IIR), and ex-ante weakly budget balanced (WBB). In other words, our target is to design a sample-based mechanism that achieves the second-best gains-from-trade benchmark.

We give matching or nearly matching upper and lower bounds in three regimes. For regular product distributions on [0,h]2[0, h]^2, additive ε\varepsilon-approximation has sample complexity Θ~(h2/ε2)\widetilde{\Theta}(h^2/\varepsilon^2). For multiplicative (1−α)(1-\alpha)-approximation on distributions under the same assumptions, we find that the sample complexity is Θ~(hSB(D)⋅α2)\widetilde{\Theta}(\frac{h}{\mathrm{SB}(D)\cdot\alpha^2}), which is benchmark-sensitive with unavoidable dependence on the second-best gains-from-trade SB(D)\mathrm{SB}(D). We also investigate the setting of unbounded distributions with monotone-hazard-rate assumption. The sample complexity depends on the ratio χμ(D)=μ(D)/SB(D)\chi_\mu(D) = \mu(D)/\mathrm{SB}(D), where μ(D)\mu(D) is the sum of the buyer's expected value and seller's expected cost.

*Harbin Institute of Technology, Shenzhen; Great Bay University, qyunyun26.s@gmail.com

†^{\dagger}Harbin Institute of Technology, Shenzhen, sxliu@hit.edu.cn

‡^{\ddagger}Great Bay University, zqwan@gbu.edu.cn

1 Introduction

Bilateral trade is perhaps the smallest market in which the basic tension of two-sided market design already appears. In this model, a seller owns one indivisible item and has a private cost ss drawn from a distribution DSD_S, while a buyer has a private value bb drawn independently from DBD_B. If the item is transferred from the seller to the buyer, the realized gains-from-trade (GFT) is b−sb - s: this is the increase in total surplus created by moving the item to the agent who values it more. If no trade occurs, the GFT is zero. Thus the efficient, full-information rule trades exactly when b>sb > s, and under the product distribution D=DB×DSD = D_B \times D_S its expected GFT is FB(D)=E(b,s)∼D[(b−s)+]\mathrm{FB}(D) = \mathbb{E}_{(b,s) \sim D} \left[(b - s)^+\right], which is also called the first-best GFT.

However, private information prevents the designer from directly implementing the efficient rule. The mechanism must incentivize the buyer and seller to report their value and cost truthfully, guarantee nonnegative interim utility, and avoid running an expected deficit when buying the good from the seller and selling it to the buyer. The seminal result of Myerson and Satterthwaite [1983] shows that any mechanism satisfying the above constraints, namely Bayesian incentive compatible (BIC), interim individually rational (IIR), and ex-ante weakly budget balanced (ex-ante WBB), can never achieve the first-best GFT. Instead, they proposed the second-best GFT, denoted by SB(D), which is the largest expected GFT achievable by a BIC, IIR, and ex-ante WBB mechanism. This benchmark is central to the theory of bilateral trade and two-sided markets, and has motivated a large literature on simple mechanisms and approximation guarantees [Brustle et al., 2017, Deng et al., 2022, Fei, 2022, Cai and Wu, 2023, Liu et al., 2023].

Most of the classical bilateral trade literature assumes that the designer knows the buyer and seller distributions. In many applications, such as online platforms, the prior is not given explicitly. The designer may instead observe past buyer values and seller costs, or have access to samples from the two sides of the market. This leads to a learning question: how many samples are needed before the designer can choose a mechanism whose GFT is close to the relevant benchmark?

Recent work has begun to answer this question for simple mechanisms in small markets. In particular, Babaioff et al. [2024] study learning simple mechanisms that maximize GFT from samples, and Castiglioni et al. [2026] study sample complexity for fixed-price mechanisms. These works show that GFT learning already has its own structure even for simple trading rules. This broader question is explicitly raised by Babaioff et al. [2024], who ask about learning BIC/IIR/WBB mechanisms beyond fixed prices and simple strongly budget-balanced mechanisms.

We take up this question for bilateral trade. Given independent samples from DBD_{B} and DSD_{S}, the learner must output a BIC, IIR, and ex-ante WBB mechanism whose GFT is close to the second-best GFT under the unknown true distribution. The central question is:

How many samples are needed to learn a nearly second-best bilateral-trade mechanism?

To answer this question, we give matching or nearly matching upper and lower bounds in three regimes: additive approximation on bounded-support distributions, multiplicative approximation on bounded-support distributions, and multiplicative approximation for unbounded monotone hazard rate (MHR) distributions. In particular, the multiplicative approximation is benchmark-sensitive: when the second-best GFT is small, no sample bound independent of SB(D) is possible.

References (100)

Couldn't load all references. Reload the page to try again.