Skip to main content
Back

Alibaba's PAMR Teaches Self-Driving Maps to Remember Traffic Rules After Signs Disappear

A new framework co-constructs HD maps and traffic rules autoregressively, keeping bus lane and speed limit signs valid long after they leave the frame.

Pro

  • PAMR jointly generates HD lane vectors and traffic rules autoregressively from front-view video using an MLLM.
  • A Map-Rule Cache propagates rules across segments so signs stay valid after leaving the camera frame.
  • Removing the cache drops joint mapping F1 from 70.37 to 39.93, showing persistence is essential.
  • New MapDRv2 dataset re-annotates MapDR with continuous lanes: 10k scenes, 18k rules, 400k images.
  • Built on Qwen2-VL-2B, trained 20 epochs on 32 H20 GPUs with 224x224 spatial segments.
  • Beats RuleVLM and VLE-MEE on joint vector-rule HMA benchmark, though slightly worse on isolated rule extraction.

Self-driving stacks have gotten good at drawing lane lines from camera feeds, but they tend to forget the sign they just drove past. A team from Xi'an Jiaotong University and Alibaba's Amap group is trying to fix that with PAMR, a framework that treats HD map construction and traffic rule understanding as a single autoregressive generation problem, and keeps rules alive across segments even after their source sign has scrolled off camera.

The forgetful map problem

Traditional vector-only methods generate geometric vectors but remain "semantically blind" to traffic rules. Systems that do incorporate rules usually treat them as one-off classifications tied to a visible sign. That works for a single frame but breaks down over a driving sequence: a bus-lane sign is only in view for a second or two, yet the restriction it imposes stretches for hundreds of meters.

Diagram showing a bus lane scenario with and without rule persistence across two timesteps

The authors call this persistent rule effectiveness. Without caching, at time t a bus lane sign is observed, but at t+1 the vehicle attempts an illegal lane change because it no longer remembers the rule. Prior work like MapDR touched on rule understanding, but it relies on pre-constructed vectorized maps, breaking the end-to-end paradigm, so geometry and semantics never actually learn together.

Narrating the road instead of detecting it

PAMR reframes mapping as sequence generation with a multimodal LLM. Instead of running a detector for lanes and a separate classifier for signs, the model ingests front-view images plus the ego-vehicle trajectory and emits a single interleaved token stream where each lane polyline is immediately followed by its associated rule. The MLLM is trained to generate a single, coherent sequence where each lane vector is immediately followed by its associated traffic rule. The generation of a single lane vector begins with a start token, continues with quantized 2D coordinate tokens representing its polyline, and terminates with an end token.

Rules use the same key-value token grammar, and lanes without rules get a special [\none] token. A deterministic parser then de-quantizes the coordinates back into metric polylines and hangs the rule attributes off the right lane.

PAMR architecture showing tokenization, caching, and segment processing across three temporal segments

The cache that remembers

The persistence trick is a Map-Rule Cache. Rather than trying to feed an entire drive into one context window, PAMR chops the trajectory into fixed spatial segments (each segment set to 224x224, corresponding to a 22.4m x 22.4m real-world area, with an overlap ratio of 10%). After processing a segment, boundary vector points and their attached rules are extracted, projected into the next segment's coordinate frame, and injected as initialization tokens for the next generation step.

The mechanism does two things at once:

  • Geometric continuity: overlapping regions let successive segments stitch into smooth lane vectors instead of fragmenting at boundaries.
  • Semantic persistence: a rule observed in segment 2 rides along in the cache through segments 3, 4, 5, even when the sign itself is long gone.

To point the model at a specific sign for evaluation, PAMR also supports three interactive prompt modes: raw pixel coordinates, a drawn bounding box, or an encoded ROI feature crop. The results demonstrate that directly incorporating visual ROI features achieves optimal performance.

A new benchmark, because the old one was too fragmented

The original MapDR dataset couldn't fairly evaluate this kind of continuous generation. Its geometric annotations suffer from significant fragmentation, frequently exhibiting discontinuities in scenarios involving occlusion or complex topologies. Consequently, this geometric fragmentation renders the dataset unsuitable for training or evaluating models whose primary objective is to generate a single, coherent representation of the road network.

So the team built MapDRv2, re-annotating lanes with a human-in-the-loop pipeline that projects clips into a unified BEV space so annotators can extrapolate through occlusions. The dataset comprises over 10k traffic scene segments, 18k driving rules, and 400k images at 1960x1240 resolution. They also propose a Holistic Mapping Accuracy (HMA) F1 metric that only counts a prediction as correct if the lane matches, the rule matches, AND the association between them is valid.

Numbers on the board

Trained on Qwen2-VL-2B with a batch size of 256, learning rate 2e-5, 20 epochs on 32 NVIDIA H20 GPUs, PAMR posts an HMA F1 of 70.37 against 65.29 for VLE-MEE and 64.20 for the older RuleVLM baseline. Interestingly, PAMR loses to RuleVLM on isolated rule extraction (83.39 vs 89.30 F1) because RuleVLM processes PV images containing only target rules, whereas PAMR needs to identify and evaluate specific signs from multiple traffic rules. The joint task is where the co-construction approach pulls ahead.

Ablations are the more interesting story:

  • No cache: HMA F1 collapses from 70.37 to 39.93, roughly a 43% relative drop, confirming that persistence isn't a nice-to-have.
  • Segment size: Medium 224x224 wins. Smaller segments preserve lane detail but lose rule context; bigger segments blur the geometry.
  • Frame count: Ten sampled PV frames is the sweet spot. Fifteen frames actually degrades performance, suggesting the MLLM starts drowning in redundant context.
  • Overlap ratio: 10% overlap between segments outperforms both 5% and 15%.

What it is and isn't good for

PAMR is a useful pattern for anyone building online HD map stacks that need to reason about signage over time: lane-level speed limits, bus/HOV lanes, turn restrictions, time-of-day rules. The interactive prompting API also makes it a plausible fit for map QA pipelines where a human or downstream planner wants to interrogate a specific sign.

The obvious caveats: this is a 2B-parameter Qwen2-VL autoregressive decoder generating token-by-token, so latency for real-time planning is a real question the paper doesn't address. Evaluation is also confined to a single benchmark. The authors envision PAMR as a universal plug-and-play solution for rule-aware HD mapping, but its broader applicability requires validation. Future research will focus on extending PAMR to diverse mapping scenarios and benchmarks. Code and the MapDRv2 dataset are promised through the project page, though release status will need to be checked there.