Image-feedback path following
A PID expert tracks the center line at a conservative speed. Both methods reach 50 laps; CAIL does so in fewer training epochs.
IROS 2025 / Safe imitation learning
Learn from imperfect demonstrations.
Learn to stay on track.
Safety supervision during training. A learned policy that acts directly at deployment, without an additional safety filter.

01 / LearnImperfect expert demonstrations
02 / GuideLearned safety supervision
03 / DeployPolicy-only action generation
The idea
At the handling limits, a small deviation from an expert’s action can send a vehicle off track. Expert demonstrations can also be unreliable or partially unsafe. Minimizing imitation error alone may leave a policy brittle.
CAIL adds a learned safety penalty to behavior cloning. Motivated by a differentiable approximation of a predictive safety filter, it trains the policy to account for constraint satisfaction alongside imitation accuracy.
This is safety-filter-guided imitation through a joint training objective. The deployed policy does not run a separate safety filter.
Watch the project
See the autonomous racing experiments and the method in the project video.
Watch on YouTubeCARLA-based simulation with customized vehicle dynamics.
The method
Full-state information supplies privileged safety supervision during training, including when the policy learns from images and velocity measurements.
Match expert actions with a mean-squared imitation loss.
Use learned dynamics and safe-set membership to penalize predicted unsafe behavior.
Training: the expert and learned safety models provide supervision. Rollouts and expert labels are collected iteratively.
Conceptual overview of the architecture. At deployment, the expert, learned dynamics, and safety model are not needed to generate policy actions.
The learning objective
LCA = Lclone + λ · ℓsafety
The safety term is a negative log-likelihood penalty. The weight λ controls its contribution relative to imitation. Here ℓsafety denotes the unweighted penalty; Equation 14 in the paper includes λ in Lsafety.
Learning from outcomes
Safety auto-labeling uses successful and failed trajectories. Local convex-hull comparisons remove likely safe states from candidate negative examples, reducing false negatives in the surrogate labels.
Read Section IV and Algorithm 1
The evidence
Three simulation experiments compare CAIL against behavior cloning with DAgger, using the same policy architecture within each experiment.
Image-feedback racing, Experiment V-C / Figure 7. These values describe the reported rollout and selected checkpoint, not an average across random seeds. The expert’s average lap time is 4.805 s.

Muted top-down spectator recordings from the full-state racing experiment (V-B). Both clips are silent CARLA captures; the BC baseline is real time, the CAIL clip is an excerpt from the ~4.7-minute rollout, sped up ~5×.
A PID expert tracks the center line at a conservative speed. Both methods reach 50 laps; CAIL does so in fewer training epochs.
An MPCC expert supplies high-speed demonstrations. CAIL recovers a consistently completing policy in fewer epochs, despite slower convergence of imitation loss.
The policy receives a front-facing RGB image and velocity measurements. CAIL reaches 50 consecutive laps; training variability makes checkpoint selection important.
Explore & reproduce
Read the derivation, inspect the implementation, or cite the published work.
Open-access manuscript, derivation, and experimental protocol.
02 / ImplementationTraining code, configurations, simulator integration, and setup.
03 / PublicationArchival publication, pages 9830–9837, and DOI.
A Simple Approach to Constraint-Aware Imitation Learning with Application to Autonomous Racing
Shengfan Cao, Eunhyek Joa, and Francesco Borrelli · IROS 2025
@inproceedings{cao2025cail,
author = {Cao, Shengfan and Joa, Eunhyek and Borrelli, Francesco},
title = {A Simple Approach to Constraint-Aware Imitation Learning
with Application to Autonomous Racing},
booktitle = {2025 IEEE/RSJ International Conference on Intelligent
Robots and Systems (IROS)},
year = {2025},
pages = {9830--9837},
doi = {10.1109/IROS60139.2025.11247769}
}