Machine Learning Practices in DiDi's Network Positioning: From Unsupervised Probabilistic Models to End‑to‑End CNN
DiDi’s network‑positioning system, which serves billions of daily location requests using Wi‑Fi and cellular signals, has evolved from an unsupervised probabilistic fingerprint matcher through a supervised GBDT‑DeepFM regression model to a fully end‑to‑end CNN that directly predicts coordinates, delivering markedly higher accuracy.
Location is the foundation of all LBS services. In DiDi’s ecosystem, positioning covers smartphones, shared bikes, dashcams, in‑vehicle terminals, etc., and the platform provides about 70 billion positioning requests per day.
What is network positioning? GPS offers high accuracy but suffers from long cold‑start time, high power consumption, and failure in obstructed environments (e.g., indoors, under overpasses). In such cases DiDi relies on network positioning, which uses Wi‑Fi APs and cellular base stations (collectively referred to as APs) detected by the device.
Network positioning is typically implemented as a fingerprint‑based system consisting of two stages: an offline fingerprint‑building phase (using GPS‑qualified data) and an online matching phase (query‑to‑fingerprint matching).
Algorithm evolution – DiDi’s online positioning has undergone three major iterations:
Unsupervised probabilistic model
Supervised regression model
End‑to‑End CNN model
The first two stages share a three‑step pipeline: grid recall → grid ranking → grid smoothing. The CNN model removes ranking and smoothing, directly regressing coordinates from a single recalled center point.
2.1 Unsupervised probabilistic model – The online query (e.g., AP1: RSSI=1, AP3: RSSI=0) is matched against the offline fingerprint library using joint probability. The process includes:
Grid recall: retrieve candidate grids based on observed APs.
Grid ranking: compute grid weights via Bayes’ rule assuming independence of AP observations.
Grid smoothing: select top‑K grids and apply a hill‑climbing algorithm to obtain the final coordinate.
2.2 Supervised regression model – To overcome the limitations of the probabilistic approach, DiDi introduced a regression model with richer features (hundreds of dimensions covering AP, grid, and contextual information). Model development proceeded in three phases:
Phase 1: GBDT model deployed.
Phase 2: Compared GBDT, FM, DeepFM, FM+GBDT; the best‑performing ensemble combined GBDT‑generated leaf indices with DeepFM embeddings.
Phase 3: Final online model (illustrated below) merges the dense GBDT‑derived features with sparse high‑dimensional embeddings, followed by fully‑connected layers to predict the offset (dx, dy) between the true location and the recalled center.
2.3 End‑to‑End CNN model – The CNN architecture treats the candidate grids as an image, leveraging spatial locality with multi‑scale convolutions. The pipeline:
Wide features (≈10 dimensions) encode the query.
CNN feature map: select C channels, center the map on the median latitude/longitude of the top‑N recalled grids, and construct an M×M resolution map.
Two conv‑pool blocks flatten the map; the wide features are embedded and concatenated with the flattened CNN output.
Fully‑connected layers output the offset (dx, dy). The loss was changed from L2 on latitude/longitude to spherical distance, yielding stable gains.
2.4 Online performance – AB tests on three key metrics for base‑station positioning show consistent improvements across all three model generations. The CNN model achieved the largest lift and has been fully rolled out.
Summary & Outlook – DiDi’s positioning team has progressed from unsupervised probability models to supervised regression and finally to an end‑to‑end CNN, significantly boosting accuracy. Future work includes:
Further model optimization (better recall, richer features).
Performance engineering (model distillation, pruning).
Leveraging 5G’s high‑frequency, high‑density signals for higher precision.
Handling complex scenarios such as indoor and underground parking lots.
The team continues to explore these directions and welcomes collaboration.
Didi Tech
Official Didi technology account
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.