Research
RAST-MoE-RL: A Regime-Aware Spatio-Temporal MoE Framework for Deep Reinforcement Learning in Ride-Hailing
Overview Research area: Deep reinforcement learning for urban mobility control, specifically adaptive delayed matching in ride-hailing platforms, with a focus on mixture-of-experts (MoE) representatio
- arXiv
- 2512.13727
- Published
- 2025-12-13
- Authors
- Yuhan Tang, Kangxin Cui, Jung Ho Park, Yibo Zhao, Xuan Jiang, Haoze He, Jiangbo Yu, Haris Koutsopoulos, Jinhua Zhao
AI summary
Overview
Research area: Deep reinforcement learning for urban mobility control, specifically adaptive delayed matching in ride-hailing platforms, with a focus on mixture-of-experts (MoE) representation learning.
Technical level: Advanced. The paper assumes familiarity with Markov Decision Processes (MDPs), policy gradient methods (PPO, GRPO, A2C, ACER), attention mechanisms, and mixture-of-experts architectures. The transportation background (macroscopic fundamental diagrams, supply–demand equilibrium) is explained well enough for a machine learning reader, but the reverse is not true.
One-sentence scope: The paper proposes a regime-aware spatio-temporal MoE encoder paired with PPO to decide, zone by zone, when to hold versus match batched ride requests in a congestion-aware simulated environment built from real San Francisco Uber and Lyft trip data.
What This Paper Is About
Ride-hailing platforms must decide whether to match passengers to drivers immediately or wait briefly to accumulate a larger batch of supply and demand, which can produce better matches but delays everyone in the batch. This creates a fundamental trade-off between how long a passenger waits before being assigned a driver (matching delay) and how long they wait after assignment for the driver to arrive (pickup delay). The authors argue that existing RL approaches handle this poorly because they use shallow encoders and assume fixed traffic conditions, so they build a new environment and a new network architecture that can adapt to recurring but distinct operating regimes like rush hour, midday free flow, and late-night scarcity.
Key Contributions
-
A congestion-aware RL environment (RAST-MDP). The authors formalize adaptive delayed matching as a Regime-Aware Spatio-Temporal Markov Decision Process with zone-level binary actions and a physics-informed travel-time surrogate. The surrogate compresses a microscopic traffic simulator into zone-hour speed tables following the macroscopic fundamental diagram relationship q = kv, so travel times retain realistic density–speed feedback at O(1) query cost during rollouts.
-
An anti-reward-hacking reward function. Rather than fixing the ratio between matching-delay and pickup-delay penalties (prior work used 4:1), the authors use a Lagrangian-style scheme with an online multiplier that automatically raises penalties when the fraction of late matches or pickups exceeds a 5% tolerance, and relaxes them otherwise.
-
The RAST-MoE encoder. A compact 12M-parameter feature extractor that embeds per-zone supply, demand, and arrival-rate channels into tokens, contextualizes them with lightweight self-attention, pools to a global state, and routes that pooled representation through top-K sparse mixture-of-experts layers shared by the actor and critic heads.
-
Empirical validation on real data with expert-level analysis. The framework is trained and tested on 2019 California Public Utilities Commission trip records for San Francisco County, with explicit analysis of expert utilization, generalization to unseen demand windows, and ablations over encoder type, parameter count, and routing configuration.
Main Findings
-
Consistent performance gains over baselines. Under PPO, the best configuration (16 experts, top-4 routing) improves total reward by 13%, reduces average matching delay by 10%, and reduces pickup delay by 15% relative to strong baselines including vanilla PPO, A2C, ACER, and DQN.
-
Moderate capacity beats larger models. Scaling beyond 16 experts or increasing top-K activation yields diminishing or negative returns, and a 12M-parameter RAST-MoE outperforms parameter-matched dense Transformers and MLP encoders, indicating that expert specialization, not raw parameter count, drives the gain.
-
Reward hacking is real and the adaptive scheme suppresses it. Fixed reward ratios fail on the test set. An 8:1 ratio (matching heavily weighted over pickup) drives the policy to always match immediately and inflates pickup waits above 25 minutes on average, while 1:4 and 1:8 ratios cause excessive holding with matching waits exceeding 20–30 minutes. The adaptive multiplier avoids both collapses while generalizing to unseen demand windows.
-
Expert specialization is genuine and necessary. Expert activation frequencies are naturally skewed, but masking either the most frequently or least frequently activated experts sharply degrades reward, matching wait, and pickup wait. This indicates rare experts encode critical but infrequent regimes rather than wasted capacity.
-
The encoder is algorithm-agnostic. Replacing the shared feature extractor with RAST-MoE improves outcomes under PPO, GRPO-style normalization, A2C, and ACER, so the gain comes from representation quality rather than a specific optimizer choice.
-
Robustness to unseen regimes. Training and test sets are drawn from disjoint, non-contiguous time windows, so the reported improvements reflect generalization rather than memorization of specific demand patterns.
Methodology in Plain English
The researchers first built a simulated ride-hailing environment. They took trip records from San Francisco in 2019 (roughly 170,000 completed trips per day) and divided the city into a grid of zones. At each decision step, the agent observes how many passengers are waiting, how many drivers are idle, and the arrival rates of both, plus the time of day and remaining horizon. For each zone, the agent makes a binary decision: match now or hold. Holding keeps passengers waiting in the hope that a better match becomes available shortly.
To make travel times realistic without paying the cost of a full traffic microsimulator, they ran a GPU-accelerated simulator offline and aggregated its outputs into zone-hour speed values. These speeds obey the standard traffic relationship between flow, density, and speed, so peak-hour congestion causes genuinely slower pickups rather than being treated as a static constant. Lookup at training time is a simple table read.
The reward function penalizes the marginal growth in matching delay and pickup delay at each step, with the pickup penalty scaled by current congestion. On top of this, a separate penalty term activates when more than 5% of requests exceed a delay threshold; the strength of that penalty is adjusted automatically during training, increasing when service quality degrades and decreasing when it improves. This prevents the agent from learning degenerate strategies like never holding requests or holding them indefinitely.
The neural network replaces the standard MLP encoder in PPO. Each zone's features become a token. A small Transformer layer lets zones exchange information. The resulting per-zone tokens are averaged into a single global state vector, which a router uses to select the top four of sixteen expert subnetworks. Only those experts run for each decision, so computation stays cheap. The actor and critic heads then read from this expert-aggregated representation. The authors deliberately route on the global pooled state rather than per-token, arguing that ride-hailing control requires city-wide reasoning rather than fine-grained per-zone decisions.
Why This Matters
Impact on research. The paper makes a case that environment formulation and representation architecture must both be regime-aware for RL to succeed on non-stationary spatiotemporal control problems. It also demonstrates that a small MoE can outperform a larger dense network, reinforcing the argument that sparsity and specialization, not scale alone, drive effective capacity. The anti-reward-hacking mechanism is a transferable design pattern for any RL problem with a multi-objective service-level constraint.
Real-world applications:
- Ride-hailing and autonomous fleet dispatch, where batching decisions must balance throughput against per-rider experience under time-varying congestion.
- On-demand delivery and courier logistics, including food and grocery platforms facing the same batching-versus-latency trade-off with spatially clustered demand.
- Emergency and non-emergency medical transport dispatch, where matching delay and pickup delay both have operational consequences.
- Freight and last-mile logistics fleet allocation, where zone-level supply imbalances and time-of-day congestion dominate performance.
Industry relevance. The compact 12M-parameter encoder is small enough to run on edge infrastructure, which matters for platforms that need low-latency decisions per zone per decision epoch. The adaptive reward scheme removes the need for hand-tuned penalty ratios, which are notoriously brittle across cities and seasons. The physics-informed surrogate addresses a real deployment concern: policies trained on unrealistic simulators can exploit modeling errors and produce gridlock when transferred to real networks.
Future Directions
-
Multi-agent and decentralized deployment. The current formulation uses a single centralized agent with full state observability. Extending to decentralized or hierarchical control where zones or regions act semi-independently would test whether expert specialization still holds under partial information.
-
Cross-city and cross-platform transfer. The evaluation is confined to 2019 San Francisco. Testing whether expert routing patterns transfer to cities with different topology, density, and demand rhythms, and whether experts must be retrained or can be fine-tuned, is an open question.
-
Integration with dynamic pricing and driver incentives. The paper controls only matching timing. Real platforms also adjust prices and driver side incentives, and jointly optimizing these levers with matching is an unexplored extension.
-
Broader service-quality and equity objectives. The current constraint covers late matches and late pickups. Incorporating wait-time equity across neighborhoods, or driver utilization and earnings metrics, would move the framework closer to deployment-relevant multi-objective control.
Target Audience
This paper is most valuable to reinforcement learning researchers working on applied control problems with non-stationary dynamics, to transportation and urban mobility researchers interested in RL-based dispatch, and to machine learning engineers at ride-hailing, delivery, or logistics companies who need to translate MoE and constrained-RL ideas into production dispatch systems. Readers primarily interested in MoE architecture design will also find the expert-utilization and masking analysis useful, though they should expect the framing to be transportation-first. A background in RL fundamentals is assumed; the environment and traffic modeling sections are the most accessible to non-specialists.
Authors’ abstract
Ride-hailing platforms face the challenge of balancing passenger waiting times with overall system efficiency under highly uncertain supply-demand conditions. Adaptive delayed matching, which controls the holding intervals for batched sets of requests and vehicles, reveals an inherent trade-off between matching and pickup delays. The resulting environment with temporally varying request arrival patterns and dynamic congestion calls for more expressive networks with sufficient capacity to capture their non-stationarity. To address the limitations of existing methods that rely on shallow encoders that cannot capture dynamic supply-demand patterns and congestion effects, we introduce the Regime-Aware Spatio-Temporal Mixture-of-Experts (RAST-MoE) framework, which formalizes adaptive delayed matching as a regime-aware Markov Decision Process and equips RL agents with a self-attention MoE encoder. Instead of relying on a single monolithic network, our design allows different experts to specialize automatically in varying operational conditions, improving representation capacity while maintaining per-sample computation efficiency. Despite its modest size of only 12M parameters, our framework consistently outperforms strong baselines. On real-world Uber trajectory data from San Francisco, it reduces average matching delay by 10%, and pickup delay by 15%. In addition, it demonstrates robustness to unseen demand regimes, stable training behavior without reward hacking, and expert specialization to different regimes. This study shows the strength of MoE-enhanced RL for large-scale decision-making tasks with complex spatiotemporal dynamics.