CarFormer: Self-driving with Learned Object-Centric Representations

Shadi Hamdan, Fatma Güney

Abstract

Autonomous driving systems often struggle with the "representation gap" between high-dimensional raw sensor data and brittle, privileged object-level attributes. We present CarFormer, a novel architecture that utilizes self-supervised "slots"—learned object-centric representations—to bridge this gap. By integrating slot attention with a transformer-based world model, CarFormer achieves state-of-the-art performance on the CARLA simulator. The system demonstrates high robustness and real-time efficiency without requiring explicit labels for object dynamics, outperforming both pixel-based and traditional object-centric models.

Introduction

A fundamental challenge in autonomous driving is selecting the right scene representation. Scene-level representations, such as Bird’s Eye View (BEV) pixels, are high-dimensional and often dominated by irrelevant information. Conversely, object-level representations relying on privileged information (e.g., exact 3D coordinates and velocities) are efficient but brittle, as they depend on perfect sensor data rarely available in the real world. CarFormer addresses this by learning an object-centric representation that is as actionable as a list of coordinates but as flexible as raw pixels.

Methods

The CarFormer pipeline consists of two primary stages: slot extraction and a transformer-based world model.

Slot Extraction

The system employs SAVi (Slot Attention for Video) to process BEV sequences. This stage decomposes the scene into a fixed number of "slots," each acting as a bottleneck that binds to a specific object. Training is entirely self-supervised; the model learns to represent objects by reconstructing the original BEV scene from these slots. This approach allows the model to capture essential object features without explicit supervision.

CarFormer Architecture

The extracted slots are fed into an autoregressive transformer based on the GPT-2 architecture. A key innovation is the use of Block Attention. While standard transformers use causal attention, CarFormer allows all objects within a single timestep to interact with each other and the intended route simultaneously. This better captures the social negotiation inherent in complex driving scenarios.

Overview of the CarFormer architecture, including slot extraction and the transformer-based world model.

The transformer serves a dual purpose:

  1. Driving Policy: Predicting future waypoints for the ego-vehicle.
  2. World Model: Forecasting the future state of the slots, which encourages the model to understand scene dynamics.

Experimental Setup

The model was evaluated using the CARLA simulator (v0.9.10.1) on the Longest6 Benchmark. This benchmark includes the six longest routes across six different towns, featuring complex urban interactions. To ensure statistical significance and account for simulation variance, training data was collected three times using different random seeds.

Results

CarFormer demonstrates superior performance across key metrics:

  • Driving Score (DS): Achieved 74.89, surpassing the previous state-of-the-art object-centric model, PlanT (73.36), and significantly outperforming pixel-based models like AIM-BEV (45.06).
  • Route Completion (RC): Reached a completion rate of 92.90%, the highest among compared models.
  • Efficiency: The model maintains a real-time processing speed of over 60 FPS on a consumer-grade RTX 3090 GPU.

Discussion

Several key insights emerged from the development of CarFormer:

  • Implicit Intelligence: Slots naturally capture "hidden" variables like velocity and heading from temporal context, even without explicit labels.
  • The "Small Object" Problem: Initial models often ignored small objects (e.g., bikes) due to their low impact on reconstruction loss. "Enlarging" these vehicles in the input BEV significantly improved safety.
  • World Modeling: Training the model to forecast future slot states significantly improved its driving performance, suggesting that understanding scene dynamics is crucial for planning.
  • Robustness: CarFormer showed lower variance across multiple runs compared to models using ground-truth attributes, indicating higher reliability in complex environments.

Conclusion and Future Work

CarFormer presents a robust, efficient, and high-performing alternative to traditional autonomous driving architectures by leveraging learned object-centric representations. While the current model relies on ground-truth BEV maps, future work will explore end-to-end training from raw camera pixels to slots. Additionally, addressing multi-modality in future state prediction and scaling the number of slots for extremely crowded environments remain important areas for research.

Summary updated

BibTeX
@inproceedings{hamdan2024carformer,
  author = {Shadi Hamdan and Fatma Güney},
  title = {{CarFormer: Self-driving with Learned Object-Centric Representations}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72652-1\_11},
}
Figure