Integrating Object Detection Modality into Visual Language Model for Enhanced Autonomous Driving Agent

Linfeng He, Yiming Sun, Sihao Wu, Jiaxu Liu, Xiaowei Huang

TL;DR

While Vision-Language Models (VLMs) excel at general scene reasoning, their standard visual encoders (like CLIP) struggle with precise spatial localization and multi-camera coordination. This paper augments the LLaMA-Adapter architecture with a dedicated YOLOS object-detection branch and camera ID-separator tokens, significantly improving spatial awareness and coordinate prediction for autonomous driving QA.

What Problem Does This Paper Address?

Autonomous driving systems increasingly rely on Vision-Language Models (VLMs) to handle complex, long-tail corner cases and provide human-interpretable reasoning. However, mainstream multimodal LLMs typically use CLIP-based encoders for vision. While CLIP captures broad contextual and semantic information, it was trained on text-image pairs rather than bounding boxes, making it notoriously poor at precise spatial localization and fine-grained object detection.

Furthermore, autonomous vehicles rely on multi-camera surround-view setups (e.g., 6 cameras in standard sensor suites). Simply concatenating visual embeddings from different angles often causes the model to lose track of which object belongs to which viewpoint.

Methods

The authors introduce an architectural extension to LLaMA-Adapter v2 (7B) that incorporates object-level representations alongside global scene features:

  • Dual-Branch Visual Perception: The model maintains the pre-trained CLIP branch for holistic scene context but adds a dedicated detection branch using a pre-trained YOLOS (You Only Look at One Sequence) transformer encoder.
  • Trainable Camera ID-Separators: To process multi-camera views without confusing perspective boundaries, the outputs of the 6 surrounding cameras are prefixed with unique, trainable camera ID-separator tokens before concatenation.
  • Gated Adapter Integration: Detector queries ($Q_{\text{detect}}$) and perceptual queries ($Q_{\text{percept}}$) are projected through cross-attention blocks and merged into the frozen LLaMA decoder layers using trainable zero-initialized gating factors ($g_{\text{detect}}$ and $g_{\text{percept}}$).
  • Parameter-Efficient Fine-Tuning: The base LLM, CLIP, and YOLOS backbones remain frozen. The model only trains the detector projection network, the ID tokens, and the adapter bias parameters.
Multi-Cam BEV Views ──► [Pretrained YOLOS] ──► [+ Camera ID Tokens] ──► Detector Query
                                                                             │
Multi-Cam BEV Views ──► [Pretrained CLIP]  ──────────────────────────► Perceptual Query
                                                                             │
                                                                   [Gated LLaMA Decoder]

Datasets

The authors train and evaluate their approach using the DriveLM dataset format built atop nuScenes:

  • Training Set: 2,896 multi-view question-and-answer (QA) pairs across 6 surround cameras.
  • Evaluation Sets: Evaluated on a 66-sample QA test split, a 2,987 QA test split, and a 15,480 QA validation set. DriveLM covers perception, prediction, planning, behavior, and motion questions.

Key Insights and Ideas

  • Detection Tokens Ground Spatial Reasoning: Explicitly feeding object-level tokens (which encode bounding boxes and category slots) provides a strong inductive bias that CLIP embeddings lack. This directly boosts the model's ability to output accurate 2D/3D coordinates.
  • ID Tokens Prevent Multi-Camera Crosstalk: Treating camera identities as learned prompt prefixes prevents tokens from different camera angles from blurring together after concatenation.
  • Defense Against Backdoor Attacks: Incorporating explicit coordinate data provides a potential safety benefit against visual backdoor attacks (e.g., trigger objects that force high acceleration). Grounding a trigger to an explicit location (e.g., "red balloon at <20.0, 40.0>") makes universal poisoned triggers harder to activate.

Key Results

  • Superior Localization (Match Score): The model consistently outperforms both DriveLM-Agent and standard LLaMA-Adapter in Match score (measuring how accurately predicted coordinates match ground truth within an $L^1$ threshold):
  • 2,987 Test Split: Reaches 21.15% Match score vs. 18.59% for baseline LLaMA-Adapter, alongside an accuracy jump to 29.66% (vs. 0.0% exact match).
  • 15,480 Validation Split: Reaches 21.19% Match score (vs. 15.56% for LLaMA-Adapter and 18.83% for DriveLM-Agent).
  • Overall Driving Performance: On the 2,987 test benchmark, the proposed YOLOS-integrated method achieved an aggregate Final Score of 0.3548, substantially beating baseline LLaMA-Adapter (0.3057).

Limitations and Future Work

  • Captioning Degradation (CIDEr Drop): On larger datasets, the model experienced a drop in CIDEr scores. The authors hypothesize that YOLOS (trained on COCO's 92 classes) simplified descriptions (e.g., predicting a generic "car" instead of a detailed "black Nissan"), occasionally degrading CLIP's descriptive nuances.
  • Restricted Dataset Scope: Evaluation is limited to nuScenes; behavior in unseen edge cases or different geographic domains remains untested.
  • Inference Overhead: Adding separate detection transformer passes scales linearly with the number of visual modalities and cameras.
  • Future Directions: Tighter fusion between detection and dense captioning representations, expanding to 3D LiDAR point cloud modalities, and formal red-teaming against physical backdoor attacks.

Summary updated

BibTeX
@inproceedings{he2024integrating,
  author = {Linfeng He and Yiming Sun and Sihao Wu and Jiaxu Liu and Xiaowei Huang},
  title = {{Integrating Object Detection Modality into Visual Language Model for Enhanced Autonomous Driving Agent}},
  booktitle = {SafeGenAi @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=v8fYRyerUS},
}
Figure