CCFM: Collision-Constrained Flow Matching for Safety-Critical Scenario Generation
Abstract
Evaluation of autonomous vehicle (AV) planners in safety-critical closed-loop simulation is essential for real-world deployment. How-ever, generating controllable safety-critical scenarios remains challeng-ing. Existing approaches use soft guidance that provides only probabilis-tic preferences and cannot guarantee the satisfaction of geometric andseverity constraints associated with specific collision types. We introduceCollision-Constrained Flow Matching (CCFM), a novel framework thatguarantees precise collision control through hard physical constraints.CCFM consists of three key components: (i) a heuristic collision selectorthat optimally identifies an adversarial agent and collision type via com-posite scoring; (ii) structured hard constraints that explicitly define fourcollision types (rear-end, side, cut-in, head-on) through contact point,heading, and severity requirements; and (iii) a collision-constrained flowmatching sampler that enforces the constraints via Gauss-Newton man-ifold projection. CCFM achieves collision rate up to 46.4% on nuScenesand 83.1% on nuPlan, significantly outperforming baselines while pre-serving realistic driving behavior. By enabling controllable collision char-acteristics in safety-critical scenario generation, CCFM provides a reli-able foundation for AV safety evaluation and sim-to-real crash data gen-eration. The code and implementation details are available at https://github.com/KELISBU/CCFM.