TL;DR
TS-GEAR is a novel generative retrieval framework designed specifically for on-demand delivery platforms like Taobao Shangou. By structurally encoding geographic reachability into merchant identifiers and optimizing for set-level diversity via reinforcement learning, it significantly improves ad relevance and revenue while ensuring that retrieved merchants are actually within delivery range.
What Problem Does This Paper Address?
In traditional e-commerce, a "relevant" item is one the user wants to buy. In on-demand delivery (e.g., DoorDash, Uber Eats), relevance is secondary to reachability. If a merchant is outside a user's delivery radius, they are an invalid candidate, not just a low-ranked one.
The authors identify three core challenges in adapting modern generative retrieval (which generates item IDs directly) to this setting:
- Structural Reachability: Existing models treat geography as a "soft" signal. This leads to "hallucinated" candidates that are semantically relevant but geographically unreachable, requiring inefficient post-generation filtering.
- Interest Bias: User intent is highly context-dependent. A search for "beef" at the office on a Tuesday likely means a hot lunch; the same search at home on a Saturday suggests groceries for cooking. Standard models often fail to decouple these location-based preferences.
- Set-Level Redundancy: Autoregressive models are trained to predict the next token, not the next set. This often results in a "collapsed" retrieval set filled with near-duplicates (e.g., three different branches of the same grocery chain) instead of a diverse array of options.
Methods
TS-GEAR introduces a unified encoder-decoder architecture with three key innovations:
- Geo-Semantic ID (GSID): Instead of arbitrary semantic IDs, merchants are represented by a 6-token sequence. The first three tokens are a hierarchical geohash prefix, and the last three are semantic suffixes. This allows the system to perform constrained decoding: the model is physically restricted to only generating tokens corresponding to the user's reachable 9-cell grid.
- Query-Geo Target Attention: The encoder uses both the real-time query and the user's current location as dual targets. It aggregates historical behaviors by weighting them based on how well they match the current geographic and semantic context.
- Group Marginal Policy Optimization (GMPO): To move beyond token-level likelihood, the authors use Reinforcement Learning (RL). GMPO is a variant of GRPO that uses a "Marginal Advantage." It rewards an item based on its marginal contribution to the overall set's value. If an item is a duplicate of one already in the set, its marginal advantage is zero, naturally encouraging diversity without needing explicit penalty terms.
Datasets
The model was evaluated on:
- TS-Delivery: A massive industrial dataset from Taobao Shangou containing 100 million users, 4.8 million items, and 500 million interactions.
- Foursquare (NYC & TKY): Standard public check-in datasets used to test the model's generalizability in non-search, location-based recommendation settings.
Key Insights and Ideas
- Geography as a Prefix, Not a Feature: By making geography the prefix of the ID, reachability becomes a structural constraint of the search space rather than a filter applied after the fact. This saves "beam budget" during decoding, allowing the model to focus on ranking valid candidates.
- The "Division of Labor" in Decoding: The authors found that the geohash prefix handles where the merchant is, while a "User-Geo Gate" in the decoder decides which specific reachable cells to prioritize. This separation of concerns is vital for performance.
- Solving Policy Collapse: Standard RL often causes models to "collapse" onto a few high-reward items. By using a leave-one-out marginal reward, GMPO forces the model to explore different regions of the item space to maximize the total set reward.
Key Results
TS-GEAR demonstrated significant improvements across both offline and online metrics:
- Geographic Validity: In a 20km radius, TS-GEAR maintained a 95.8% validity rate for its top-50 candidates, compared to just 35.4% for the strongest baseline (OneLoc).
- HitRate: At the production-standard 20km radius, TS-GEAR outperformed OneLoc by 36.3% on HitRate@50.
- Online Impact: In a 7-day A/B test serving 20% of live traffic, the framework achieved a 3.8% gain in ad impressions and a 4.2% increase in ad revenue. It currently serves over 150 million queries per day.
Limitations and Future Work
- Location Privacy: While the model uses coarse geohash cells (approx. 1.2km x 0.6km) rather than exact coordinates, the authors acknowledge that repeated observations could still pose privacy risks, necessitating strict access controls and opt-out options.
- Merchant Fairness: The model's focus on high-converting, nearby merchants might disadvantage new merchants or those in sparsely populated areas. The authors suggest that "exposure floors" and "ad load caps" are necessary complementary strategies.
- Future Directions: The team plans to incorporate "incrementality" rewards into the RL process and explore scaling the backbone beyond the current 0.1B parameter lightweight model.
Summary updated