English

Contextual Online Bilateral Trade

Computer Science and Game Theory 2026-02-16 v1 Machine Learning

Abstract

We study repeated bilateral trade when the valuations of the sellers and the buyers are contextual. More precisely, the agents' valuations are given by the inner product of a context vector with two unknown dd-dimensional vectors -- one for the buyers and one for the sellers. At each time step tt, the learner receives a context and posts two prices, one for the seller and one for the buyer, and the trade happens if both agents accept their price. We study two objectives for this problem, gain from trade and profit, proving no-regret with respect to a surprisingly strong benchmark: the best omniscient dynamic strategy. In the natural scenario where the learner observes \emph{separately} whether the agents accept their price -- the so-called \emph{two-bit} feedback -- we design algorithms that achieve O(dlogd)O(d\log d) regret for gain from trade, and O(dloglogT+dlogd)O(d \log\log T + d\log d) regret for profit maximization. Both results are tight, up to the log(d)\log(d) factor, and implement per-step budget balance, meaning that the learner never incurs negative profit. In the less informative \emph{one-bit} feedback model, the learner only observes whether a trade happens or not. For this scenario, we show that the tight two-bit regret regimes are still attainable, at the cost of allowing the learner to possibly incur a small negative profit of order O(dlogd)O(d\log d), which is notably independent of the time horizon. As a final set of results, we investigate the combination of one-bit feedback and per-step budget balance. There, we design an algorithm for gain from trade that suffers regret independent of the time horizon, but \emph{exponential} in the dimension dd. For profit maximization, we maintain this exponential dependence on the dimension, which gets multiplied by a logT\log T factor.

Keywords

Cite

@article{arxiv.2602.12903,
  title  = {Contextual Online Bilateral Trade},
  author = {Romain Cosson and Federico Fusco and Anupam Gupta and Stefano Leonardi and Renato Paes Leme and Matteo Russo},
  journal= {arXiv preprint arXiv:2602.12903},
  year   = {2026}
}
R2 v1 2026-07-01T10:35:17.463Z