  The planning problem constitutes a fundamental aspect of the autonomous
driving framework. Recent strides in representation learning have empowered
vehicles to comprehend their surrounding environments, thereby facilitating the
integration of learning-based planning strategies. Among these approaches,
Imitation Learning stands out due to its notable training efficiency. However,
traditional Imitation Learning methodologies encounter challenges associated
with the co-variate shift phenomenon. We propose Learn from Mistakes (LfM) as a
remedy to address this issue. The essence of LfM lies in deploying a
pre-trained planner across diverse scenarios. Instances where the planner
deviates from its immediate objectives, such as maintaining a safe distance
from obstacles or adhering to traffic rules, are flagged as mistakes. The
environments corresponding to these mistakes are categorized as
out-of-distribution states and compiled into a new dataset termed closed-loop
mistakes dataset. Notably, the absence of expert annotations for the
closed-loop data precludes the applicability of standard imitation learning
approaches. To facilitate learning from the closed-loop mistakes, we introduce
Validity Learning, a weakly supervised method, which aims to discern valid
trajectories within the current environmental context. Experimental evaluations
conducted on the InD and Nuplan datasets reveal substantial enhancements in
closed-loop metrics such as Progress and Collision Rate, underscoring the
effectiveness of the proposed methodology.
