Joint estimation and prediction of city-wide delivery demand: A large language model empowered graph-based learning approach

Tong Nie, Junlin He, Yuewen Mei, Guoyang Qin, Guilong Li, Jian Sun, Wei Ma

This paper, recently published by researchers from The Hong Kong Polytechnic University and Tongji University, introduces a novel framework called IMPEL (Inductive Message-Passing Neural Network with Encoding from LLMs). It tackles one of the most persistent headaches in urban logistics: predicting delivery demand in "cold-start" scenarios, such as when a company expands into a new city or opens a warehouse in a previously unserved neighborhood.

TL;DR

IMPEL leverages Large Language Models (LLMs) to transform raw map data into rich geospatial embeddings, allowing it to "understand" the functional nature of urban regions. By combining these embeddings with a graph-based spatiotemporal model, the framework can accurately estimate and predict delivery demand for new regions and cities without requiring historical data for those areas.

What Problem Does This Paper Address?

Predicting urban delivery demand is notoriously difficult because it is highly sensitive to the specific "flavor" of a neighborhood—is it a residential suburb, a bustling business district, or an industrial zone? Traditional models rely heavily on long-term historical data, which creates a massive barrier for expansion.

When a logistics provider enters a new city or "activates" a new region, they face a joint estimation and prediction problem: they must simultaneously estimate what the demand would have been (historical reconstruction) and predict what it will be (forecasting). Existing methods often struggle to transfer knowledge between cities because the spatial features (like coordinates or simple distance metrics) don't capture the underlying functional similarities between, say, a tech hub in Shanghai and one in Los Angeles.

Methods

The authors propose a three-pronged solution:

  1. LLM-based Geolocation Knowledge Extraction: Instead of using an LLM to predict numbers directly, they use it as a "geospatial encoder." They feed text descriptions from OpenStreetMap (addresses, nearby POIs like schools or hospitals) into a pre-trained LLM (Llama). The resulting high-dimensional embeddings serve as a proxy for the region's functional identity.
  2. LLM-Enhanced Spatiotemporal Graph Forecasting: These embeddings are integrated into a Spatio-Temporal Graph Neural Network (STGNN). Crucially, the model builds a "functional graph" where edges represent similarities in LLM-derived knowledge rather than just physical proximity.
  3. Inductive Masking-Reconstruction: To ensure the model can handle missing data, it is trained using an inductive scheme. During training, certain regions are randomly "masked" (hidden), forcing the model to reconstruct their demand based on the patterns of their neighbors and their LLM-encoded features.

Datasets

The model was rigorously tested on two distinct real-world datasets:

  • Package Delivery: Six months of data from five Chinese cities (Shanghai, Hangzhou, Chongqing, Jilin, and Yantai) provided by the Cainiao Network.
  • Food Delivery: Data from three major US cities (Los Angeles, New York, and San Francisco) spanning 2021 to 2024. These datasets provide a diverse testing ground across different cultures, urban layouts, and delivery types.

Key Insights and Ideas

  • LLMs as Urban Experts: The most striking insight is that LLMs possess "intrinsic geospatial knowledge." A text description of a neighborhood contains more predictive power for delivery demand than raw GPS coordinates because the LLM understands the context of those locations.
  • Functional vs. Physical Proximity: The research demonstrates that "functional similarity" (captured by LLM embeddings) is a better predictor of demand patterns than "physical proximity." Two industrial parks 20km apart likely share more demand characteristics than an industrial park and a nearby luxury apartment complex.
  • The RLHF Paradox: Interestingly, the authors found that using LLMs fine-tuned with Reinforcement Learning from Human Feedback (RLHF) actually degraded performance. They hypothesize that RLHF distorts the "natural" alignment between the LLM’s internal feature space and the downstream GNN’s needs.

Key Results

IMPEL consistently outperformed state-of-the-art baselines (like DCRNN, Graph WaveNet, and IGNNK) across all metrics:

  • Accuracy: In single-city tests, IMPEL improved Mean Absolute Error (MAE) by 20.8% in Shanghai and a staggering 27.2% in Los Angeles.
  • Zero-Shot Transfer: When trained on one city and tested on a completely new one (zero-shot), IMPEL maintained high accuracy while traditional models saw significant performance drops.
  • Efficiency: Because the LLM embeddings are pre-computed and fixed, the model remains computationally efficient for real-time inference.

Limitations and Future Work

The authors acknowledge a few areas for growth:

  • Interpretability: While the LLM embeddings improve performance, the "black-box" nature of deep learning makes it hard to explain exactly why a specific prediction was made to stakeholders.
  • Error Propagation: The joint estimation-prediction task is inherently risky; if the initial estimation of a new region's state is wrong, that error can propagate into future forecasts.
  • Advanced Prompting: Future work could explore more sophisticated LLM techniques, such as Chain-of-Thought (CoT) prompting or Retrieval-Augmented Generation (RAG), to further refine the geospatial knowledge extraction.

Summary updated

BibTeX
@inproceedings{nie2025joint,
  author = {Tong Nie and Junlin He and Yuewen Mei and Guoyang Qin and Guilong Li and Jian Sun and Wei Ma},
  title = {{Joint estimation and prediction of city-wide delivery demand: A large language model empowered graph-based learning approach}},
  booktitle = {Transportation},
  year = {2025},
  doi = {10.1016/j.tre.2025.104075},
}
Figure