Learning-Based Pricing and Matching for Two-Sided Queues

Zixian Yang, Lei YingarXiv 2024 · DOI

Introduction

Two-sided marketplaces, such as ride-sharing platforms (Uber, Lyft) or freelance job boards, face the complex task of matching demand (customers) with supply (servers). To maximize operational efficiency and profit, platforms must set optimal prices for both sides. However, real-world platforms often operate with incomplete information, lacking precise knowledge of demand and supply functions—how arrival rates change in response to price. Furthermore, there is an inherent tension between maximizing profit and maintaining short queue lengths to ensure low wait times. This paper addresses these challenges by proposing a novel algorithm that simultaneously learns unknown market dynamics while optimizing pricing and matching.

Problem Formulation

The platform manages a system with multiple types of customers and servers. Customers arrive at rates $\lambda_i(t)$ and servers at rates $\mu_j(t)$, both of which are unknown functions of the prices set by the platform. The goal is to maximize long-term profit while keeping the queues stable.

The two-sided queueing model with per-customer-type and per-server-type queues.

As shown in Figure 1, the system maintains separate queues for different customer and server types. A match can only occur between compatible types, defined by a bipartite graph $\mathcal{E}$. The platform must decide on prices to influence arrival rates and a matching policy to clear the queues efficiently.

Methodology: Learning-Based Pricing and Matching

The proposed approach integrates a discrete-time matching policy with a sophisticated learning-based pricing strategy.

Matching and Queue Control

The platform employs a "Longest-Queue-First" matching strategy. When a new customer or server arrives, they are matched with the longest compatible queue on the opposite side. To ensure system stability, the platform also implements a rejection policy: if a queue exceeds a predefined threshold, new arrivals of that type are temporarily rejected until the backlog clears.

Pricing and Learning Core

The core innovation lies in the pricing algorithm, which operates without prior knowledge of demand or supply gradients. It uses a nested two-loop structure:

  1. Outer Loop (Gradient-Free Optimization): The algorithm utilizes a two-point zero-order stochastic projected gradient ascent. By sampling profit at two nearby price points, it estimates the gradient direction to iteratively move toward the profit-maximizing price.
  2. Inner Loop (Bisection Search): Because the gradient step requires specific target arrival rates, the platform uses a bisection search to "invert" the unknown demand and supply functions. This finds the exact prices needed to achieve the desired traffic levels for the gradient estimation.
Visualization of the gradient-free optimization and bisection search for unknown demand/supply functions.

Figure 6 illustrates this process. In scenario (a), where functions are known, standard gradient ascent is used. In scenario (b), the two-point method estimates gradients. Finally, in scenario (c), bisection search handles the case where even the functions themselves are unknown, allowing the platform to converge on optimal prices through exploration.

Key Results and Theoretical Guarantees

The authors provide rigorous proofs for the algorithm's performance over a time horizon $T$:

  • Sublinear Regret: The algorithm achieves a regret bound of $\tilde{O}(T^{5/6})$, indicating that the profit gap compared to an omniscient oracle diminishes over time.
  • Bounded Queue Lengths: With a "balanced" start (initial prices near equilibrium), the queue lengths are bounded by $\tilde{O}(T^{1/6})$, ensuring manageable wait times. Without a balanced start, the bound is $\tilde{O}(T^{2/3})$.
  • Profit-Queue Tradeoff: The research establishes a fundamental frontier. For any $\gamma \in (0, 1/6]$, the platform can tune the algorithm to achieve a regret of $\tilde{O}(T^{1-\gamma})$ at the cost of a queue-length bound of $\tilde{O}(T^\gamma)$.

Conclusion

This work provides a robust framework for managing two-sided queues under uncertainty. By combining zero-order optimization with bisection search, the platform can effectively learn market dynamics on the fly. While the current model assumes stationary demand and supply, it lays the groundwork for future research into non-stationary environments and strategic user behavior in complex marketplaces.

Summary updated

BibTeX
@misc{yang2024learning,
  author = {Zixian Yang and Lei Ying},
  title = {{Learning-Based Pricing and Matching for Two-Sided Queues}},
  year = {2024},
  eprint = {2403.11093},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.11093},
}
Figure