TS-GEAR: Taobao Shangou GEnerative Ad Retrieval

Guofeng Tong, Xu Zhang, Guangliang Yu, Haiqiang Wang, Guannan Cong, Xing Guo, Yang Zhou, Jingjing Duan, Shuang Li, Feng Shi, Hualei LiuarXiv 2026 · arXiv

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:

  1. 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.
  2. 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.
  3. 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.
Figure 1: A motivating request in on-demand delivery search. The same query “beef” maps to hot ready-to-eat dishes near the office on weekdays, but to fresh ingredients at home on weekends, illustrating the three challenges.

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.
Figure 2: Overall architecture of TS-GEAR. (a) Geo-Semantic ID tokenization, which builds hierarchical merchant identifiers. (b) The geo-aware search-interest encoder–decoder: a Query-Geo Target Attention encoder paired with a geo-constrained decoder that applies the User-Geo Gate. (c) GMPO alignment of the decoder policy.

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.
Geographic validity comparison showing TS-GEAR's superior ability to stay within delivery bounds.

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

Abstract

On-demand delivery platforms such as DoorDash and Uber Eats impose a constraint absent in traditional e-commerce: merchants beyond the user's delivery range are invalid candidates rather than merely low-ranked. Generative retrieval has recently shown strong potential in large-scale retrieval systems. Adapting it to this setting, however, poses three challenges. First, existing semantic IDs encode geography only as a soft signal, so reachability can only rely on a non-differentiable post-generation hard truncation. Second, user preferences vary substantially across both regions and queries, so aggregating historical behaviors without conditioning on geography and the current query yields biased interest estimates. Third, the retrieved candidate set is evaluated by its collective value, yet autoregressive training scores each sequence independently, with no set-level signal to discourage redundant near-duplicates. To address the challenges, we propose TS-GEAR, a unified generative retrieval framework for on-demand delivery: (1) Geo-Semantic ID splits merchant identifiers into geographic prefixes and semantic suffixes, making reachability a prediction target rather than a post-hoc filter; (2) Query-Geo Target Attention aggregates historical behaviors using the real-time query and location as dual targets, while encoding each behavior's own location into its attention key; (3) GMPO (Group Marginal Policy Optimization) rewrites advantages using a deduplicated group reward and marginal advantage within GRPO, avoiding auxiliary diversity objectives. Deployed online with a lightweight 0.1B backbone, TS-GEAR serves over 150 million queries per day in the search advertising pipeline of Taobao Shangou, consistently outperforming state-of-the-art generative retrieval methods on both HitRate and geographic validity, and achieving 3.8% gains in ad impressions and 4.2% in ad revenue.
BibTeX
@misc{tong2026ts,
  author = {Guofeng Tong and Xu Zhang and Guangliang Yu and Haiqiang Wang and Guannan Cong and Xing Guo and Yang Zhou and Jingjing Duan and Shuang Li and Feng Shi and Hualei Liu},
  title = {{TS-GEAR: Taobao Shangou GEnerative Ad Retrieval}},
  year = {2026},
  eprint = {2611.12180},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.12180},
}
Figure