SPADE: Spatiotemporal Preference Alignment and Diversity Enhancement for Local Search

Chenxu Wang, Wenxuan Yang, Yueqi Mou, Shuxian Bi, Biao Tang, Peng YanarXiv 2026 · arXiv

TL;DR

SPADE is an end-to-end generative framework designed for proactive query recommendation in local search apps. By co-designing the tokenizer, spatiotemporal encoding, preference alignment, and decoding strategy, it achieves a significant boost in relevance and geographic precision while maintaining the diversity and executability of suggested queries.

What Problem Does This Paper Address?

Proactive query recommendation—suggesting search terms the moment a user opens an app—is a high-stakes task for local service platforms like Meituan. Unlike standard recommendation systems that rank a fixed set of items, this is an open-set generation problem. The system must generate free-form phrases from a vocabulary of millions.

The authors identify four critical challenges that existing methods fail to address jointly:

  1. Long-tail Coverage: Standard tokenizers (like BPE) favor frequent terms, making rare but valuable "long-tail" queries harder for the model to generate.
  2. Fine-grained Spatiotemporal Grounding: Users in a business district at noon want different things than users in a residential area at midnight. Coarse city-level tokens aren't enough.
  3. Preference Alignment: Generic optimization doesn't capture the nuances of real-world impression-click distributions.
  4. Decoding Diversity: Standard beam search often results in "mode collapse," where all suggestions are minor variations of the same intent (e.g., "hot pot," "hot pot nearby," "best hot pot").
The proactive query recommendation task and its core challenges.

Methods

SPADE (Spatiotemporal Preference Alignment and Diversity Enhancement) tackles these issues through four novel components:

  • Objective-Aligned BPE (OA-BPE): Instead of merging subwords based solely on frequency, OA-BPE incorporates business signals (like CTR and CVR). This gives high-value long-tail queries shorter tokenizations, effectively "leveling the playing field" during generation.
  • Spatio-Temporal Adaptive Representation (STAR): This module replaces discrete location tokens with continuous, multi-scale sinusoidal encodings (based on Space2Vec). Crucially, these are injected into the Transformer via zero-initialized soft gates. This allows the language model to stabilize its text representations before gradually incorporating complex geographic signals.
  • MARS-DPO: A production-oriented version of Direct Preference Optimization. It uses a composite reward function—combining ranking position, executability (judged by an LLM), and geographic proximity—and employs adaptive hard negative sampling to sharpen the model's preferences.
  • Sigmoid Diversity Beam Search (SDBS): A position-aware decoding strategy that applies a concave, bounded diversity bonus to lower-ranked beams. Unlike standard Diverse Beam Search, it leaves the top beam untouched to preserve the highest-quality result while forcing subsequent beams to explore different intents.
The SDBS strategy compared to standard beam search, showing how it prevents intent collapse.

Datasets

The researchers evaluated SPADE using a massive production dataset from a local service platform:

  • Scale: 100,000 sampled users, 1.48 million unique queries, and over 2,600 cities.
  • Training: Stage 1 (pre-training) used 7.79M samples; Stage 2 (alignment) used 3.08M samples.
  • Evaluation: A strict chronological split was used, testing the model on data from the days immediately following the training window.

Key Insights and Ideas

  • The Tokenization Bias: A key "aha" moment is the realization that standard BPE is structurally biased against long-tail items. By shortening the token length of valuable rare queries, the model's prior probability for generating them increases without any extra training cost.
  • Soft Gating for Stability: Directly injecting GPS coordinates into a pre-trained Transformer can be disruptive. The use of zero-initialized gates (STAR) acts as a "warm-up" mechanism, letting the model learn how to use spatial data only after it has mastered the basic recommendation task.
  • Executability as a Reward: In local search, a query is useless if it returns zero results. Using an LLM-as-a-judge to provide a continuous "quality reward" for query executability during DPO training significantly improved the utility of the generated suggestions.

Key Results

SPADE was compared against several strong baselines, including AIGQ (an industrial generative model) and various retrieval-based systems.

  • Offline Performance: SPADE outperformed the strongest baseline (AIGQ) by +5.6% in Hit Rate (HR@5) and reduced the geographic distance error (GeoC@5) by a staggering 40.3%. It also improved query executability by +1.9%.
  • Slice Analysis: The gains were even more pronounced in difficult scenarios: +13.5% HR@5 for long-tail intents and -48.3% GeoC@5 in geographically sparse regions.
  • Online A/B Test: A one-week test on live traffic showed a +1.88% lift in Module CTR and a +0.177% increase in total Search Volume, proving that the offline improvements translated to real business value.

Limitations and Future Work

The authors acknowledge a few areas for improvement:

  • Reward Model Efficiency: The quality reward currently relies on batch inference from a massive 122B parameter LLM (Qwen3.5). Distilling this into a smaller, faster reward model is a logical next step.
  • Static Tokenization: OA-BPE weights are calculated once; however, query distributions evolve. Periodic re-computation of the vocabulary may be necessary.
  • Trajectory Modeling: STAR currently uses a single GPS point. Incorporating a user's recent movement trajectory could further refine the spatiotemporal grounding.

Summary updated

Abstract

Proactive query recommendation aims to suggest relevant search queries to users on the homepage of local service apps. Unlike conventional recommendation over a fixed item set, this requires open-set generation from a vocabulary of millions, where outputs must simultaneously align with user preference, match fine-grained spatiotemporal context, cover long-tail intents, and provide diverse alternatives within a few candidate slots. Existing approaches address these axes in isolation: standard tokenization suppresses long-tail queries, coarse location encoding misses fine-grained geographic demand, generic preference optimization fails to align with production impression-click distributions, and standard beam search collapses to near-duplicate outputs. We present SPADE (Spatiotemporal Preference Alignment and Diversity Enhancement), an end-to-end generative framework that jointly optimizes the generation space, contextual representation, preference distribution, and output slate quality through four components: Objective-Aligned BPE (OA-BPE) aligns subword merging with business value signals to boost long-tail query generation probability; Spatio-Temporal Adaptive Representation (STAR) replaces coarse location tokens with continuous multi-scale encodings and soft gating for precise spatiotemporal grounding; MARS-DPO (Multi-dimensional Adaptive Reward Sampling DPO) combines cross-domain pre-training with preference alignment on production impression-click data via composite rewards and adaptive hard negative sampling; and Sigmoid Diversity Beam Search (SDBS) improves intent coverage without sacrificing recall. Offline experiments on large-scale production data show that SPADE outperforms the strongest generative baseline by +5.6% HR@5, -40.3% GeoC@5, and +1.9% Exec@5. A one-week online A/B test confirms production impact: +1.88% Module CTR, +0.177% Search Volume, and +0.105% Search DAU.
BibTeX
@misc{wang2026spade,
  author = {Chenxu Wang and Wenxuan Yang and Yueqi Mou and Shuxian Bi and Biao Tang and Peng Yan},
  title = {{SPADE: Spatiotemporal Preference Alignment and Diversity Enhancement for Local Search}},
  year = {2026},
  eprint = {2611.04662},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.04662},
}
Figure