Adaptive Approximation Schemes for Matching Queues

Alireza AmaniHamedani, Ali Aouad, Amin Saberi · OpenReview

Abstract

We study a continuous-time, infinite-horizon dynamic matching problem where suppliers arrive according to a Poisson process and may abandon the queue at a uniform rate, while customers must be matched upon arrival. The objective is to minimize the expected long-term average cost subject to a throughput constraint on the total match rate. Previous literature focuses on "static" policies that ignore queue states, achieving only constant-factor approximations. We design "adaptive" policies leveraging real-time queue length information and obtain near-optimal polynomial-time algorithms. Specifically, we develop a bi-criteria Fully Polynomial-time Approximation Scheme (FPTAS) for networks with a constant number of queues and for Euclidean networks of fixed dimension. Our approach utilizes a novel hybrid LP relaxation that combines static and state-dependent approximations, providing a robust framework for applications like organ donation and ride-hailing platforms.

Introduction

In modern dynamic marketplaces—ranging from organ donation registries to ride-hailing apps—efficient matching is critical. These systems are characterized by suppliers (e.g., drivers or donors) who arrive over time and may leave the system if not matched promptly, and customers (e.g., riders or patients) who arrive and require immediate matching. The central challenge is balancing the cost of a match (such as distance or biological compatibility) against the risk of losing supply to abandonment.

Traditional approaches have relied on static policies, which make matching decisions based solely on the types of agents involved. While computationally simpler, static policies are inherently sub-optimal because they ignore the current state of the market. This paper introduces the first near-optimal adaptive policies, which use real-time queue length information to make more informed decisions, significantly reducing long-term average costs.

Methodology: The Hybrid LP Relaxation

Optimizing adaptive policies is notoriously difficult due to infinite-dimensional state spaces. To overcome this, we introduce several key innovations:

  • Dynamic LP (DLP): We formulate an exact but infinite-dimensional Linear Program representing the "state-action occupancy measure" of the system, linearizing the complex stationary distributions of the underlying birth-death processes.
  • Queue Categorization: We distinguish between "short" queues (likely to be empty and requiring adaptive decisions) and "long" queues (thick enough to be rarely depleted).
  • Hybrid LP Relaxation: By combining state-dependent variables for short queues with static variables for long queues, we maintain a polynomial-sized optimization problem while capturing essential system dynamics.
  • Priority Rounding with Virtual Buffers: Our policy prioritizes matching from short queues. To maintain throughput from long queues, we use "virtual buffers" to schedule matches that are fulfilled during periods of customer surplus, ensuring long-term stability via Lyapunov drift analysis.

Empirical Analysis and the Adaptivity Gap

To evaluate the performance of our adaptive policies against traditional static ones, we conducted extensive simulations on 1,000 random problem instances. The "adaptivity gap"—the ratio of the cost of the best static policy to the cost of the optimal adaptive policy—serves as our primary metric.

The adaptivity gap across different target match rates.

As shown in Figure (a), while the median adaptivity gap is often small (around 3.2%), the worst-case performance of static policies can be significantly worse, with gaps exceeding 40% in many scenarios. The gap is particularly sensitive to the abandonment rate ($\mu$).

The impact of abandonment rate $\mu$ on the adaptivity gap.

Figure (b) illustrates a dramatic spike in the adaptivity gap at specific abandonment rates. In these "hard" instances, static policies can incur costs over 100% higher than adaptive ones. This occurs because adaptive policies can dynamically "lower their standards" (accepting higher-cost matches) when queues grow long and abandonment risk is high, a flexibility static policies lack.

Key Results

  1. Theorem 1 (FPTAS): For networks with a constant number of supplier types, our algorithm finds a $(1 - \epsilon)$-approximate policy in time polynomial in the input size and $1/\epsilon$.
  2. Euclidean FPTAS: This result extends to $d$-dimensional Euclidean networks, providing near-optimal solutions for spatial service platforms like ride-hailing.
  3. Timescale Separation: We demonstrate that "thick" and "thin" markets operate on different timescales, allowing for simplified matching logic in high-volume queues without sacrificing optimality.

Conclusion

By bridging the gap between queueing theory and approximation algorithms, this work provides a rigorous foundation for adaptive matching in dynamic markets. While our current framework assumes uniform abandonment rates, future work will explore heterogeneous abandonment and non-bipartite matching scenarios, such as kidney exchange cycles.

Summary updated

BibTeX
@inproceedings{amanihamedani2025adaptive,
  author = {Alireza AmaniHamedani and Ali Aouad and Amin Saberi},
  title = {{Adaptive Approximation Schemes for Matching Queues}},
  booktitle = {STOC},
  year = {2025},
  doi = {10.1145/3717823.3718317},
}
Figure