arXiv:2610.02513cs.CVOct 2026

Manuscript Offprint

arXiv:2610.02513

From Fragments to Global Maps: Learning Vectorized Map Aggregation with Large Language Models

Ziwei Li, Yi-Tang Chen, Xiaoqi Wang, Wenbin He, Han-Wei Shen, Liu Ren

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Large-scale vectorized HD maps provide structured road information that is essential for perception, localization, and planning in autonomous driving. Constructing such maps requires aggregating noisy, fragmented, and overlapping local predictions collected along a vehicle trajectory into a coherent global map. Existing aggregation methods typically rely on hand-crafted rules for fragment association and refinement. However, a fixed set of thresholds cannot effectively handle variations in road structures and prediction errors, often requiring detector-specific tuning or manual adjustment. To address this limitation, we propose MapMergeLLM, a data-driven framework that formulates vectorized map aggregation as conditional sequence generation with a large language model. Given serialized local vectorized maps, our model directly predicts the aggregated global map polylines. To reduce dependence on any particular upstream detector, we train the model on synthetic local maps generated from clean vector maps using corruptions that simulate representative prediction errors. We further introduce a coordinate tokenizer with geometry-aware pretraining to precisely represent map coordinates. In addition, we propose a line-level association loss that explicitly supervises correspondences between local observations of the same map element. Experiments on Argoverse2 and nuScenes using multiple recent upstream detectors demonstrate that MapMergeLLM substantially outperforms heuristic and optimization-based aggregation baselines without detector-specific retraining.

1 INTRODUCTION

High-definition (HD) maps provide detailed information about road structures to support autonomous driving systems (Li et al., 2022; Liao et al., 2024). In vectorized HD maps, line-shaped elements such as lane dividers and road boundaries are represented as polylines, with each polyline represented by an ordered sequence of points. Recent advances in vectorized map construction enable models to predict these map elements directly from sensor observations (Liu et al., 2023; Qiao et al., 2023a; Yuan et al., 2024; Ding et al., 2023). As onboard sensors only capture a limited region around the ego vehicle, a large-scale HD map cannot be constructed from a single observation, and instead, it must be built from local vectorized predictions collected along a driving sequence.

However, simply accumulating these predictions results in redundant, fragmented, and geometrically inconsistent map elements, as the same road structures are repeatedly observed across overlapping local regions. We refer to the process of associating, merging, and refining these local predictions into a coherent global map as vectorized map aggregation. This task is challenging because errors in local map predictions, together with overlapping observations, make it difficult to correctly associate fragments of the same map structure and accurately recover its underlying geometry.

∗^{*}Equal contribution.

†^{\dagger}Project lead.

(a) Detector Outputs

(b) Non-learning Baselines

(c) Ours

(d) Ground Truth

Figure

Figure 1: Non-learning-based aggregation presents association and smoothing trade-offs. (a) StreamMapNet (Yuan et al., 2024) predictions accumulated across frames. (b) For the heuristic-based method, a small association threshold ( τ\tau) leaves related fragments unmerged, whereas a large threshold incorrectly merges neighboring lanes. For the geometry-based method, a small fitting interval ( Δs\Delta s) fits local prediction noise, whereas a large interval over-smooths line structures. (c) MapMergeLLM learns aggregation from data and produces maps close to the (d) ground truth without hand-crafted parameter tuning.

Despite its importance, only a few studies have addressed this problem. Existing methods typically rely on hand-crafted geometric rules with fixed parameters, such as distance thresholds, overlap criteria, or sampling intervals (Chen et al., 2023; Qiao et al., 2023b), which may not generalize well across diverse road structures or prediction errors from different upstream detectors. For example, in scenes with dense parallel lanes, noisy observations of one lane may be difficult to distinguish from observations of neighboring lanes. Consider a distance-based association threshold τ\tau, where two fragments are considered for merging if their geometric discrepancy falls below τ\tau. As shown in the top zoomed-in views of Fig. 1(b), a larger τ\tau may incorrectly merge neighboring lanes, whereas a smaller threshold better preserves their distinction but leaves related fragments of the same lane unmerged. Geometric refinement presents a similar trade-off. As shown in the bottom zoomed-in views of Fig. 1(b), geometry-based methods (Cheng et al., 2021; Qiao et al., 2023b) often rely on a fixed fitting interval Δs\Delta s that controls how closely the refined line follows local observations. A smaller Δs\Delta s allows the line to capture finer geometric variations but also makes it more sensitive to prediction noise, whereas a larger Δs\Delta s provides stronger smoothing but may drop important geometric details. In the illustrated example, a larger Δs\Delta s better recovers the circular curb but over-smooths other curb structures. These examples show that no single parameter setting is suitable for all road geometry and detection error patterns. The appropriate association threshold or fitting interval depends on the local context, such as lane spacing, curvature, and detector noise patterns, and may vary even within the same scene. This motivates us to learn the aggregation process from data, enabling fragment association and geometric refinement to adapt to the observations rather than being controlled by globally fixed hand-crafted rules.

Therefore, we propose MapMergeLLM, which formulates vectorized map aggregation as a conditional sequence generation problem and uses a large language model (LLM) (Minaee et al., 2024; Qwen Team, 2026) as the sequence-modeling backbone. Given local vectorized maps from multiple frames, the model directly generates the aggregated global polylines from serialized local fragments. However, training such a model presents two key challenges. First, the model should generalize across different upstream detectors rather than overfit to the error distribution of a particular one. To achieve this, we construct synthetic training data by applying structured corruptions to clean vector maps, simulating common map detection errors such as duplication, fragmentation, and geometric perturbations. Second, as LLMs were originally designed for text generation, adapting them to map generation requires a precise representation of map coordinates. Unlike vanilla tokenization, which may split a numerical value into multiple subword units, we encode each coordinate value as a single token, allowing the model to predict a complete value in a single step. To improve map generation, we propose geometry-aware pretraining that teaches the model numerical and spatial relationships.

among the new coordinate tokens. We further introduce a line-level association loss that explicitly supervises correspondences between local fragments, helping the model associate observations of the same map element and reduce duplication. Together, these components enable accurate and reliable global map aggregation across different upstream detectors.

To demonstrate the effectiveness of MapMergeLLM, we evaluate it on local maps produced by recent vectorized map detectors on the Argoverse2 (Wilson et al., 2021) and nuScenes (Caesar et al., 2020) datasets. The experimental results show that MapMergeLLM consistently outperforms heuristic and optimization-based aggregation baselines, particularly on road boundaries, where it achieves mean relative F1 improvements of 23.1% on Argoverse2 and 21.9% on nuScenes over the strongest baseline. In summary, our main contributions include:

• We identify key limitations of existing heuristic and geometry-based map aggregation methods, showing that fixed hand-crafted merging rules struggle to generalize across diverse road structures and detector noise patterns.

• We propose MapMergeLLM, an LLM-based, data-driven framework for vectorized map aggregation, and introduce coordinate-token pretraining and line-level association loss to improve map generation, supported by detector-agnostic synthetic training data.

• We conduct comprehensive experiments on Argoverse2 and nuScenes, demonstrating that MapMergeLLM substantially improves over existing aggregation baselines across multiple recent upstream map detectors.

References (23)