MapDiffusion: Generative HD Map Construction
- MapDiffusion is a generative diffusion framework that constructs online vectorized HD maps from multi-sensor BEV inputs, modeling spatial uncertainty in autonomous driving.
- It employs a BEV encoder and a DETR-style graph diffusion decoder that refines polyline queries over several diffusion steps using deformable cross-attention.
- The system aggregates multiple map samples to quantify uncertainty, enhancing downstream planning by addressing challenges like occlusions and ambiguous lane markings.
MapDiffusion is a generative diffusion framework for online vectorized HD map construction in autonomous driving. It addresses the task of inferring a local, instance-level map around the ego vehicle in real time from multi-sensor inputs, primarily six monocular cameras, represented in bird’s-eye view (BEV). Rather than producing a single deterministic vector map, it models the conditional distribution over plausible vectorized maps, enabling multiple samples, sample aggregation, and a spatial uncertainty estimator that reflects ambiguity induced by occlusions, missing lane markings, lane-width ambiguities, and temporally inconsistent construction zones (Monninger et al., 29 Jul 2025).
1. Task definition and problem setting
Online vectorized HD map construction seeks a local map expressed as a set of vector primitives in the ego-centric BEV frame. In MapDiffusion, the scene map is
where the primitives are lane dividers, lane boundaries, and pedestrian crossings. Each primitive is parameterized as a polyline,
that is, a sequence of 2D control points. The learning objective is to infer a map estimate from camera frames , while simultaneously providing an uncertainty estimator over BEV locations.
The motivating distinction from prior online map construction systems is that earlier vector decoders such as VectorMapNet, MapTR, and StreamMapNet produce a single point estimate. In the setting described by MapDiffusion, that determinism is a structural limitation rather than merely an implementation choice: real scenes may admit several plausible interpretations because parts of the static environment are invisible, partially erased, or geometrically ambiguous. A single decoded polyline set can therefore be both inaccurate and unsafe for downstream planning. Distributional modeling, by contrast, permits multiple plausible samples, aggregation for improved robustness, and spatially resolved uncertainty derived from sample disagreement (Monninger et al., 29 Jul 2025).
2. Representation and architecture
The model combines a learned BEV encoder with a diffusion-based vector decoder. Multi-camera inputs are fused into a latent BEV grid using a learned encoder with temporal aggregation in BEV space, following the policy used in StreamMapNet. This preserves online operation while introducing temporal context at the encoder level.
The decoder operates on a fixed set of DETR-style queries. During training, ground-truth polylines are perturbed by a forward diffusion process 0 to create noisy query inputs, while unused query slots are padded with Gaussian noise because the number of ground-truth instances is variable and may be smaller than 1. During inference, all queries are initialized randomly. The denoising network is a graph diffusion decoder that iteratively refines the query set over 2 steps. Conditioning on the BEV latent 3 is implemented through deformable cross-attention, and the decoder also receives a time-step embedding 4.
A notable architectural decision is that classification scores are predicted only at the final step. The diffusion process itself therefore remains in vector space, acting on polyline coordinates rather than on joint coordinate-class states. The decoder regresses control-point coordinates and predicts one class score per query, yielding a sampled map as a set of denoised polylines with class assignments. Topology is not explicitly modeled as a separate constraint during diffusion; instead, topology is treated as emerging from consistent geometry and class prediction. The temporal policy is similarly asymmetric: temporal aggregation is used in the encoder, but previously refined queries are not injected into the decoder for the next frame, so each frame’s samples are generated purely from random noise, preserving diversity in generative sampling (Monninger et al., 29 Jul 2025).
3. Diffusion formulation in vector space
MapDiffusion applies DDPM-style noising directly to the tokenized vector map representation. Let 5 denote the concatenated polyline coordinates across queries, and let 6, 7, and 8. The forward process is
9
0
The reverse process is conditioned on the BEV latent grid 1, written as 2, and parameterized by the denoising network: 3 In practice, conditioning enters through deformable cross-attention from the diffusion queries into the BEV latent grid.
Training uses a cosine noise schedule with 4 steps and a standard 5-prediction objective,
6
Final-step classification and coordinate regression are optimized jointly but remain outside the diffusion trajectory so that denoising remains a coordinate-space process. This design makes the method a diffusion decoder for vectorized geometry rather than a raster denoiser or a class-conditional token generator. A plausible implication is that the model’s expressivity is concentrated on geometric ambiguity, which is precisely the source of uncertainty emphasized in the task formulation (Monninger et al., 29 Jul 2025).
4. Sampling, aggregation, and uncertainty estimation
Inference begins by computing the BEV latent grid 7 once from the camera inputs. A set of 8 queries is then initialized with clipped Gaussian noise, and DDIM sampling is run for 9 denoising steps; the default configuration uses 0 and 1. After each intermediate step, low-confidence queries are filtered using a score threshold 2; the best setting reported is 3. Queries that fall below threshold before the final step are reinitialized randomly rather than discarded, which is intended to avoid poor local minima while preserving sample diversity. Repeating the process with different random seeds yields multiple map samples, with the BEV encoding shared across all samples and therefore parallelizable.
Aggregation is performed in raster space. For each sample 4 and class 5, predicted polylines are rasterized and weighted by their confidence scores, then Gaussian-smoothed and clipped to produce a class-specific raster probability map 6. The mean prediction over 7 samples is
8
and the spatial uncertainty map is obtained by summing per-class sample variances,
9
The paper also defines per-class empirical mean and variance explicitly as
0
This uncertainty measure is intended to quantify disagreement across plausible map samples rather than epistemic uncertainty from model ensembles. In the reported experiments, invisible or occluded areas exhibit higher uncertainty than visible areas, with mean 1 versus 2, corresponding to 3, and a one-sided 4-test yields 5 at 6. ROC-based evaluation of the rasterized aggregated prediction shows that increasing the number of samples from 7 to 8 improves AUC from 9 to 0, indicating that explicit distribution modeling is beneficial not only for uncertainty visualization but also for prediction quality after aggregation (Monninger et al., 29 Jul 2025).
5. Training regime, inference configuration, and empirical performance
The reported experiments use nuScenes at 1, with six monocular cameras as input and vectorized ground-truth labels for lane dividers, lane boundaries, and pedestrian crossings. The StreamMapNet training and validation split without geospatial overlap is used. Camera features are fused into a BEV latent grid of size 2, covering 3 around the ego vehicle, and temporal aggregation is performed in BEV space.
The encoder is StreamMapNet-style, while the decoder is a DETR-style transformer with deformable cross-attention and diffusion time-step embeddings. Training runs for 24 epochs with batch size 1, AdamW, cosine learning-rate scheduling, initial learning rate 4, and 8 NVIDIA V100 GPUs. Diffusion training uses the cosine noise scheduler with 5. At inference, the default settings are DDIM sampling with 6, 7 diffusion steps, 8 samples for aggregation, and 9 for query filtering. Rasterization uses pixel width 1 for polylines with score 0, Gaussian kernel size 1 (approximately 2), and 3 (approximately 4).
Under vector decoding metrics, MapDiffusion reaches single-sample mAP of 5, compared with 6 for the StreamMapNet baseline, a 7 relative gain. Under rasterized evaluation, aggregation improves AUC from 8 at 9 to 0 at 1, a 2 relative gain. Latency is governed mainly by the denoising loop because the encoder is executed only once: on an NVIDIA A10 GPU, each extra denoising step adds approximately 3; 4 yields 5 FPS, while 6 yields 7 FPS. The qualitative trend reported in the paper is that samples agree strongly in visible regions and diverge in occluded regions, aligning the sample-variance map with scene ambiguity (Monninger et al., 29 Jul 2025).
6. Comparative position, ablations, limitations, and downstream use
MapDiffusion is positioned against two groups of baselines. Relative to deterministic vector decoders such as VectorMapNet, MapTR, MapTRv2, and StreamMapNet, it adds explicit distribution modeling and uncertainty estimation. Relative to diffusion systems that operate on raster semantics, such as DiffMap and DifFUSER, it generates vectorized polylines directly. The paper also distinguishes it from diffusion methods for other structured outputs, including DiffBEV, DiffusionDet, and HouseDiffusion, and from PolyDiffuse, which is described as using diffusion only for refining coarse predictions rather than sampling diverse map configurations.
The ablation study attributes performance gains to several specific design choices. Increasing the number of diffusion steps improves accuracy but saturates around 8. The DDIM stochasticity parameter 9 has a minor effect, with the best result at 0. Query thresholding is sensitive: 1 is best, while 2 and 3 reduce mAP to 4 and 5, respectively. BEV encoder pretraining accelerates early optimization but reduces final mAP to 6, whereas training from scratch reaches 7. For padding unused query slots during training, Gaussian noise performs best, while repeating existing polylines performs worst because it confuses the decoder.
The stated limitations are also specific. Under heavy occlusion or sparse sensing, uncertainty increases; this is useful for planning but may require more samples for robust aggregation. The decoder deliberately omits temporal query carryover, which preserves generative diversity but may reduce temporal consistency. Aggregation is currently performed in raster space; the paper suggests that direct set aggregation in vector space could improve geometry fidelity. These limitations imply that the method trades some temporal determinism and vector-set exactness for explicit multimodal sampling and uncertainty quantification.
In an autonomy stack, the uncertainty map 8 can be used for risk-aware planning, including cost-map modulation, slow-down policies, or requesting additional sensor evidence in uncertain regions. Multiple sampled maps 9 can support hypothesis testing for maneuver evaluation under ambiguous map geometry. The refined raster distributions 0 are also compatible with downstream modules that already consume occupancy-style grids, while the sampled polylines and associated confidences remain available for HD-map-aware motion planning. This suggests a perception-planning interface in which vectorized map construction is no longer treated as a deterministic preprocessing stage but as a probabilistic component with explicit spatial uncertainty (Monninger et al., 29 Jul 2025).