Artificial Intelligence 18 min read

BASM: A Bottom‑up Adaptive Spatiotemporal Model for Online Food Ordering Service

BASM is a bottom‑up adaptive spatiotemporal model for online food ordering that uses hierarchical embedding, semantic transformation, and adaptive bias layers to dynamically modulate parameters according to time and location, thereby capturing multiple data distributions and achieving superior offline metrics and online A/B test performance.

Ele.me Technology
Ele.me Technology
Ele.me Technology
BASM: A Bottom‑up Adaptive Spatiotemporal Model for Online Food Ordering Service

The paper BASM: A Bottom‑up Adaptive Spatiotemporal Model for Online Food Ordering Service was accepted by the ICDE 2023 Industry and Applications Track (arXiv:2211.12033).

Background. In local‑life scenarios (e.g., food delivery), user demand varies dramatically across time and space. Traditional approaches model spatiotemporal dependencies from a local perspective (periodicity, commonality) and treat the problem as a data‑distribution mismatch caused by spatiotemporal changes.

Problem. Different spatiotemporal contexts lead to distinct user interests ("千时空千兴趣") and thus to multiple data distributions ("千时空千分布"). A static‑parameter model tends to be dominated by the strongest distribution (e.g., lunch/dinner) and ignores weaker ones (e.g., late‑night snacks). The goal is to adaptively fit these complex, heterogeneous spatiotemporal distributions.

Related Work. Existing methods can be divided into static‑parameter and dynamic‑parameter families. Static‑parameter methods (e.g., ST‑PIL, TRISAN, ST‑AN) use a single set of parameters and fail to capture multi‑distribution patterns. Dynamic‑parameter methods (e.g., meta‑learning, adaptive parameter generation, star‑topology adaptive recommender) adjust parameters according to scenario‑sensitive factors such as time, location, and user behavior.

Proposed Model (BASM). BASM consists of three hierarchical modules:

Bottom Layer – Spatiotemporal‑Aware Embedding Layer. Each feature field (user, item, behavior, etc.) receives a context‑aware embedding. Weight modulation is performed via a learned gate (sigmoid) that amplifies or attenuates a field’s contribution depending on the current spatiotemporal context. The modulation formula is illustrated in the following image:

Middle Layer – Spatiotemporal Semantic Transform Layer. Context‑aware embeddings are concatenated and passed through a meta‑network that generates two sets of transformation parameters (personalized and shared). These parameters map the raw semantic features into a personalized semantic space. The transformation is expressed by the following equation (image):

Top Layer – Spatiotemporal Adaptive Bias Tower. Both the fully‑connected (FC) and batch‑normalization (BN) components are equipped with dynamic parameters. For FC, specific (per‑context) and shared weights are fused via Hadamard product; bias terms are summed. For BN, context‑aware inputs are modulated before normalization. The modulation formulas are shown in the images below:

Model Architecture Overview. The overall network structure is depicted in the following diagram:

Experiments. Two datasets were used: a public benchmark and an industrial dataset from a food‑ordering platform. Evaluation metrics include traditional AUC as well as two novel spatiotemporal‑aware metrics, TAUC (time‑weighted AUC) and CAUC (city‑weighted AUC). Results show that BASM consistently outperforms both static and other dynamic baselines across all metrics. Visualizations of learned field weights across time slots and cities demonstrate that the model allocates appropriate emphasis to user‑side or item‑side features depending on the context. t‑SNE plots further illustrate that BASM’s representations separate spatiotemporal clusters far better than the baseline.

Online A/B Test. Deploying BASM in production yielded higher CTR and exposure ratios, especially in low‑traffic time slots and cities, confirming its effectiveness in real‑world traffic.

Conclusion. BASM addresses the multi‑distribution challenge of spatiotemporal data by introducing dynamic, context‑aware parameters at every stage of the model. Experiments on both offline benchmarks and online traffic validate its superiority. Ongoing work continues to explore finer‑grained spatiotemporal modeling and extensions to other local‑life recommendation tasks.

machine learningCTR predictionRecommendation systemsadaptive parametersonline food orderingspatiotemporal modeling
Ele.me Technology
Written by

Ele.me Technology

Creating a better life through technology

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.