~ / projects /

SAC Policy for Autonomous Vehicles

Deep networks carry autonomous-driving perception, and deep networks are reliably fooled by inputs crafted to fool them. This project took both sides of that problem in turn: first break a perception system deliberately, then train a driving policy that survives the conditions the attack creates.

Part A: breaking perception

The target was the stop sign, chosen because misreading one has consequences that need no explanation. We built adversarial patches using both straightforward occlusion and the scratchai package, implementing several attack vectors: random perturbation, the fast gradient method and projected gradient descent.

Three panels: a clean stop sign, the adversarial noise pattern, and the perturbed stop sign, which looks unchanged but is classified as street sign or doormat.
An FGM attack: the perturbation (middle) is nearly invisible on the sign (right), but it makes ResNet misclassify the stop sign.

The perturbations that work are small enough to look like weathering or graffiti to a person, which is the uncomfortable part: the defense cannot be “notice the attack.”

Under attack, the vehicle classifies a stop sign as a pedestrian until it is too late to stop.

Part B: driving anyway

The second half trained a Soft Actor-Critic policy to drive through adverse conditions in CARLA: jaywalking pedestrians, pedestrians occluded until late, a lead car braking without warning, and turns taken across traffic.

SAC suits this better than a PID controller for a specific reason. A PID loop is tuned around an operating point and has no notion of what happens next; driving is nonlinear, high-dimensional, and full of situations where the right action now is the one that pays off several seconds later. SAC’s entropy term also keeps the policy exploring instead of committing early to a single brittle behavior.

The SAC agent driving while tracking surrounding traffic: bird's-eye view (left) and forward camera (right).

The agent drives competently within the scenarios it was trained on, and clearly outperforms the PID baseline where the dynamics turn nonlinear. That is a narrower claim than it might look: the comparison holds on these scenarios in this simulator, and the policy’s ceiling is set by the training distribution it saw. Generalizing beyond it is the open problem.

Takeaway (24-784, Trustworthy AI Autonomy). SAC handled the nonlinear, multi-agent hazards that a hand-tuned PID controller cannot anticipate. But a learned policy is only as trustworthy as the distribution it was trained on, and perception it depends on can be attacked with perturbations a person would never notice.

  • Reinforcement Learning
  • Computer Vision
  • Simulation