Latent Space Reinforcement Learning for Steering Angle Prediction

Qadeer Khan, Torsten Schön, Patrick WenzelarXiv 2019

TL;DR

This paper proposes a modular reinforcement learning (RL) framework for autonomous driving that decouples perception from control. By training a Deep Q-Network (DQN) on a low-dimensional latent semantic representation rather than raw pixels, the authors achieve a control policy that is robust to weather changes and significantly more efficient to train.

What Problem Does This Paper Address?

Training end-to-end autonomous driving policies using reinforcement learning is notoriously difficult. Raw sensor data (like RGB images) is high-dimensional and contains vast amounts of redundant information. Furthermore, RL models trained directly on pixels often fail to generalize; a model trained on a sunny day might fail in the rain because the visual features change drastically, even if the underlying road geometry remains the same.

The authors aim to bridge this gap by creating a system that is agnostic to environmental conditions (lighting, weather, climate) and computationally efficient enough to learn complex maneuvers without human-labeled steering data.

Methods

The authors introduce a two-stage modular architecture:

  1. Perception Module: An encoder-decoder network (a modified version of the VAE-like architecture by Larsen et al.) is trained to perform semantic segmentation.
  2. The Encoder compresses a $128 \times 128$ RGB image into a 64-dimensional latent vector.
  3. The Decoder attempts to reconstruct the semantic scene (13 classes like road, vehicles, traffic signs) from this vector.
  4. Crucially, once trained, only the 64D latent vector is passed to the controller. This acts as a "distilled" version of the scene, capturing essential geometry while discarding visual noise like raindrops or shadows.
Fig. 1. The perception model is trained as an encoder-decoder architecture without any skip connections. The encoder sub-module first embeds the raw image into a low-dimensional latent representation. The decoder sub-module reconstructs the semantic scene from this latent vector. We directly feed the semantic latent embedding as an input to the control module instead of the semantic labels.
  1. Control Module: A Deep Q-Network (DQN) is trained using the 64D latent vector as its state input.
  2. Action Space: To simplify training, the steering angle is quantized into three discrete values: $-0.4$ (left), $0$ (straight), and $0.4$ (right).
  3. Reward Function: The agent receives a reward of $+1$ for staying in the lane. Penalties (down to $-5$) are applied based on the percentage of the car that is off-road or in the wrong lane.
Fig. 5. This figure shows the outline of training an agent using reinforcement learning. The CARLA [1] environment yields the state (RGB image) from the color camera placed at the front of the vehicle. The perception model of the agent converts the RGB image into the semantics of the scene. The dotted blue arrow shows that a low-dimensional representation of the semantic map is fed to the control model which decides on the appropriate action to be taken based on the current state. The agent interacts with the CARLA environment by executing the relevant action. This action changes the state of the car in the environment and hence a new state is generated and the cycle is repeated. Note, that there is no human supervision in the entire loop. The control model is therefore, trained from the reward signals that are dependent on the utility function formulated only once at the start of the training. The orange arrow to the control model indicates that its weights are updated based on these reward signals.

Datasets

The study utilizes the CARLA simulator, a high-fidelity environment for autonomous driving research.

  • Training Data: The perception model was trained on data collected via random exploration in CARLA, pairing RGB images with ground-truth semantic labels.
  • Semantic Labels: The authors used 13 classes, applying weighted categorical cross-entropy to account for class imbalance (e.g., "road" pixels are far more common than "traffic light" pixels).

Key Insights and Ideas

  • Semantic Invariance: By using a semantic latent space, the controller sees the same "state" whether it is noon or raining. As shown in the paper's examples, the semantic labels for a curve remain identical across weather conditions, allowing the control policy to generalize effortlessly.
  • Dimensionality Reduction: Moving from raw pixels to a 64D vector reduces the number of parameters in the control model, leading to faster convergence.
  • Class Weighting: The authors highlight that for perception to be useful for control, rare but critical objects (like traffic signs) must be weighted more heavily during training.
Fig. 4. Relative weights of the semantic labels with their sum normalized to 1. The weights are inversely proportional to the frequency of occurrence of the corresponding label.

Key Results

  • Successful Maneuvering: The agent successfully learned to navigate and execute turns (specifically right turns) without any human-provided steering labels.
  • Efficiency: While standard RL on CARLA can take up to 12 days to train on raw pixels, the authors' approach leverages the compressed state space to expedite the process.
  • Exploration Strategy: The authors used an $\epsilon$-greedy strategy, starting with 90% exploration and reducing it to 5% over $10^5$ steps to ensure the agent thoroughly mapped the latent space.

Limitations and Future Work

  • Jerky Control: Because the action space is limited to three discrete steering angles, the resulting driving behavior is "jerky." The authors suggest that a larger action space could smooth this out, albeit at the cost of longer training times.
  • The Left-Turn Problem: The authors discovered a fascinating failure mode regarding reward discontinuities. In their specific environment setup, right turns had a "buffer" zone (the opposite lane) where rewards decreased smoothly. However, left turns often featured immediate barriers. This created a sharp jump in reward (from $+1$ to $-5$) that made the DQN struggle to converge for left turns.
Fig. 7. This figure shows the problem associated with executing a left turn using the current reward function. Green shows the trajectory of the car in the driving lane while receiving a reward of 1. Orange represents the trajectory of the car while in the opposite lane, wherein a reward between 1 and −5 is received as a continuous function. The exact reward is inverse relation to the percentage of the car in the other lane. The purple curve along the road edge, depicts the presence of a barrier/fence. The red crossed marking shows the point of impact of the car with the barrier in which scenario, a −5 reward is received. Note that in the case of a right turn the reward smoothly transitions as a continuous function from 1 to −5 at time of impact with the barrier. On the contrary for the left turn, there is a discontinuity in the reward where it suddenly transitions from 1 just one state before the impact to −5 at the time of impact. Such discontinuities in the reward function between similar states make the deep q-learning either slow to converge or even diverge.
  • Sim-to-Real: The current work is confined to simulation. The authors identify transferring these latent-space policies to real-world vehicles as a primary goal for future research.

Summary updated

BibTeX
@misc{khan2019latent,
  author = {Qadeer Khan and Torsten Schön and Patrick Wenzel},
  title = {{Latent Space Reinforcement Learning for Steering Angle Prediction}},
  year = {2019},
  eprint = {1902.03765},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1902.03765},
}
Figure