Skip to main content

Section 7.3 Dataset Bias & The "Right-Turn Trap"

Because end-to-end models learn strictly from provided examples, they inherit every flaw, pattern, and imbalance present in the training data. Dataset Bias occurs when the training data does not evenly represent all real-world conditions the robot will encounter.
Picture a training set split into 90% Right Turns and only 10% Left Turns. From that imbalance, the robot learns "When in doubt, ALWAYS TURN RIGHT!"β€”and as a direct consequence, the robot fails and crashes whenever it encounters a left-hand curve.

Subsection 7.3.1 The "Right-Turn Trap"

A classic failure mode in behavioral cloning is the Right-Turn Trap:
  • Imagine a human operator records a training dataset by driving a robot around an oval track in a clockwise direction.
  • In this dataset, 90% of the recorded commands are Right Turns (\(\omega > 0\)), and only 10% are straight lines or left turns.
  • The Result: The neural network learns a strong mathematical bias toward turning right. When deployed on a new track requiring a sharp left turn, the robot ignores the left curve visual cues and turns right directly into a wall!
VEX AI Real-World Example: A VEX competition team trains an end-to-end model to drive toward red game rings on the right side of the field. During a match, a red ring appears on the far left. Because the training dataset contained almost no left-steering demonstrations near field walls, the robot turns right toward empty space, missing the scoring opportunity entirely.

Subsection 7.3.2 Mitigating Bias: Data Augmentation & Recovery Trajectories

To prevent dataset bias, robotics engineers use two key strategies:
  1. Data Augmentation (Flipping Images & Controls):
    Horizontally flipping a camera frame (left to right) and simultaneously negating the angular steering command (\(\omega_{\text{new}} = -\omega\)) creates a synthetic left-turn example from a right-turn example! This doubles dataset size and eliminates left/right bias.
  2. Recording Recovery Trajectories:
    If a model is trained only on perfect human driving, it never learns how to recover when it drifts near a wall. Engineers intentionally record "recovery data": placing the robot near a wall or off-center, turning on recording, and demonstrating how to steer back toward the center line.
Normal driving data pairs a centered robot with driving straight ahead; recovery driving data instead pairs a robot positioned near a wall with steering sharply away from itβ€”teaching the model a behavior it would never see if every recording started from the center of the lane.

Subsection 7.3.3 Conceptual Check: Dataset Bias Scenarios

Read each scenario below and determine the primary source of dataset bias causing the robot failure.
  1. Scenario A: A delivery robot is trained on camera data collected exclusively on bright, sunny days. When deployed during a rainy evening, it fails to recognize path boundaries.
    Bias Source: Environmental / Lighting Bias. The training set lacked low-light and wet surface visual features.
  2. Scenario B: An automated warehouse AMR is trained by a human operator who always drives at maximum speed (1.5 m/s). When navigating tight, crowded aisles, the robot fails to slow down and collides with shelving units.
    Bias Source: Action Range / Operator Bias. The dataset lacked low-speed demonstration data required for tight maneuvering.

Reading Questions 7.3.4 Reading Questions

Check your understanding

1. Exercise 7.3.1: Data Augmentation Conceptual Check.

How does horizontal image flipping combined with steering angle inversion (\(\omega_{\text{new}} = -\omega\)) help overcome dataset bias in end-to-end autonomous driving?
  • It increases the camera resolution so the robot can see further ahead.
  • Incorrect. Flipping an image does not change its resolution.
  • It creates balanced synthetic training examples (converting right turns into left turns), preventing the model from favoring one steering direction.
  • Correct! Flipping the image and negating the steering angle produces a valid, physically consistent left-turn example from every recorded right-turn example, balancing the dataset.
  • It converts supervised regression tasks into unsupervised classification tasks.
  • Incorrect. The task remains supervised regression; only the dataset’s balance changes, not the learning paradigm.
  • It reduces motor power consumption during sharp turns.
  • Incorrect. Image flipping is a data preprocessing technique and has no effect on physical motor power consumption.
You have attempted of activities on this page.