TwinFlux: One-Step Discrete-Continuous Flow for End-to-End Autonomous Driving

Ziming Zhu, Zheng Shen, Qin Guo, Yujia Zhang, Yu ZhuNeurIPS 2026

TL;DR

Autonomous driving planners usually face a frustrating trilemma: fast deterministic models collapse complex traffic choices into a single bland average, pre-built trajectory "vocabularies" lack flexibility, and generative diffusion models are too slow for split-second decisions. TwinFlux solves this by adapting flow-matching into a one-step, parallel architecture that predicts coarse spatial probabilities alongside fine geometric nudges. The result is an end-to-end planner that captures diverse driving behaviors with state-of-the-art safety and accuracy—all at a snappy 37 frames per second.

What Problem Does This Paper Address?

End-to-end autonomous driving feeds raw sensor data (cameras, LiDAR) directly into a neural network to output a driving path. The catch is that city driving is inherently multimodal—at an intersection, going straight, yielding, or changing lanes might all be valid, distinct futures.

Figure 1: Paradigm comparison for end-to-end trajectory planning. (a) Deterministic regression predicts one trajectory directly. (b) Trajectory-vocabulary methods score predefined anchors. (c) Iterative generative planners refine samples over multiple steps. (d) TwinFlux performs one-step heatmap-offset refinement from prototypes, with training-only consistency supervision.

Existing approaches struggle to balance diversity, road compliance, and speed:

  • Deterministic regression predicts one path directly—it's fast, but tends to average out distinct options into a single, potentially unsafe trajectory.
  • Vocabulary/anchor methods score a fixed menu of pre-drawn paths, meaning you're out of luck if the exact maneuver you need isn't on the menu.
  • Iterative generative planners (like diffusion models) sculpt great, flexible paths out of noise, but require multiple denoising steps that eat up precious milliseconds.

Recent one-step "flow" models offer a fast generative shortcut. However, predicting raw $(x, y)$ coordinates directly in one jump lacks road-topology awareness and suffers from scale imbalance—waypoints four seconds ahead have much larger coordinate values than waypoints half a second ahead, skewing how the network learns.

Methods

TwinFlux reimagines trajectory generation by pairing SplitMeanFlow (a mathematical framework for learning average velocity fields in a single step) with a novel dual-representation architecture.

Instead of starting from random Gaussian noise, TwinFlux starts from $K=10$ fixed, data-driven trajectory prototypes (obtained via K-means clustering on expert human driving). It then refines all 10 prototypes in parallel in a single forward pass using three core innovations:

  1. Trajectory Decoupling and Reconstruction (TDR): Rather than working in raw $(x, y)$ coordinates, TDR translates physical paths onto a $32 \times 32$ Bird’s-Eye-View (BEV) grid. A trajectory becomes two things: a discrete heatmap (a probability distribution over grid cells for coarse, topology-aware localization) and a continuous offset field (exact grid-relative $x, y$ residuals plus absolute heading angles). This translation is exact, differentiable, and completely reversible.
  2. Parallel Discrete-Continuous Generator: Conditioned on camera, LiDAR, and vehicle state features—fused via Hierarchical Conditional Cross-Attention (HCC) and Dual-Timestep Affine Modulation (DAM)—two parallel branches predict one-step flow updates for the heatmap and offsets simultaneously. A lightweight score head ranks the 10 resulting trajectories so the car can pick the best one.
  3. Training-Only Consistency (Path A vs. Path B): At test time, TwinFlux only runs the fast one-step Path A. During training, it introduces Path B, which breaks the flow bridge from prototype to expert trajectory into smaller sub-steps and accumulates them. A consistency loss forces the one-step prediction to match the multi-step accumulation directly in reconstructed physical space—requiring zero extra compute at inference and avoiding expensive Jacobian-vector products during training.
Figure 2: Overall architecture of TwinFlux. Path A performs one-step direct generation and is used during inference, while Path B is introduced only during training to enforce accumulated-flow consistency in reconstructed trajectory space.

Datasets

No new benchmarks are introduced; the authors evaluate on three established autonomous driving suites:

  • NAVSIMv1 & NAVSIMv2: Real-world, non-reactive simulation benchmarks (using navtest splits) that evaluate 4-second future trajectories on safety, rule compliance, ego progress, and comfort.
  • Bench2Drive: A reactive closed-loop benchmark built on the CARLA simulator to test interactive driving skills like overtaking, merging, and emergency braking.

Key Insights and Ideas

  • Representations aren't plug-and-play—they co-evolve with the objective: In a clever matched ablation, swapping raw coordinates for the heatmap+offset (TDR) representation actually hurt standard MLP and Diffusion baselines (-1.4 and -1.1 PDMS, respectively). Yet under SplitMeanFlow, TDR boosted performance by +1.4 PDMS. Average-flow transport specifically thrives when coarse spatial probabilities are separated from local geometric nudges.
  • Ditch the noise; start from prototypes: Generative models usually worship stochasticity, but here, deterministic K-means prototypes beat random noise and Gaussian-jittered sources. Anchoring each flow component to a distinct driving mode lets the network focus purely on scene-conditioned refinement rather than mode discovery.
  • Predict headings directly: Instead of inferring which way the car is pointing from finite differences between $(x, y)$ points—which gets jittery—predicting absolute heading angles in the offset branch stabilizes lane-keeping and comfort.

Key Results

TwinFlux achieves top marks across benchmarks while maintaining real-time speed on a single NVIDIA RTX 3090:

  • NAVSIMv1: Achieves a state-of-the-art 90.1 PDMS, edging out recent diffusion and flow competitors like DiffE2E (89.8), VADv2 (89.3), and MeanFuser (89.0).
  • NAVSIMv2: Reaches 90.5 EPDMS, beating MeanFuser by +1.0 and DiffusionDrive by +2.2 points, while leading in no-collision rate, time-to-collision, and lane keeping.
  • Bench2Drive (Closed-Loop): Scores an 81.3 driving score and 56.1% success rate, ranking first in emergency braking, giving way, and traffic-sign handling.
  • Real-Time Speed: With 58.1M parameters, the full camera+LiDAR pipeline runs at 37 FPS (27.38 ms total latency, with the planning head itself taking just 2.98 ms)—roughly 37% faster than DiffusionDrive (27 FPS) and over 3$\times$ faster than Hydra-MDP (12 FPS).

Limitations and Future Work

The authors note that TwinFlux is trained specifically for each benchmark rather than tested zero-shot across domains. Because multimodal generation starts from $K=10$ fixed prototypes and relies on a learned score head to pick the winner, performance is still bounded by how well those prototypes cover rare, long-tail maneuvers and how accurately the scorer ranks candidates. Future work aims to tackle these candidate-ranking bottlenecks and test generalization across shifting sensors, maps, and rare interactive traffic scenarios.

Summary updated

Abstract

End-to-end autonomous driving planning requires trajectories that are multimodal, scene-compliant, and efficient to generate. Deterministic regression is fast but often collapses to a single future, while trajectory-vocabulary methods depend on predefined candidate coverage and iterative generative planners incur multi-step inference cost. We propose TwinFlux, a one-step discrete-continuous trajectory generation framework based on SplitMeanFlow. TwinFlux starts from data-driven trajectory prototypes and refines them through parallel heatmap and offset branches. The heatmap branch is designed to provide topology-aware coarse localization on a BEV grid, while the offset branch predicts grid-relative geometric refinement. A differentiable trajectory decoupling-and-reconstruction module connects this representation with physical trajectories. During training, TwinFlux enforces piecewise displacement consistency in reconstructed trajectory space, aligning direct one-step prediction with accumulated sub-interval evolution without Jacobian-vector-product computation or inference overhead. Experiments on NAVSIMv1 and NAVSIMv2 show that TwinFlux outperforms recent end-to-end planning baselines while maintaining real-time inference. Project repository: https://github.com/ECUST-MMAI/TwinFlux.
BibTeX
@inproceedings{zhu2026twinflux,
  author = {Ziming Zhu and Zheng Shen and Qin Guo and Yujia Zhang and Yu Zhu},
  title = {{TwinFlux: One-Step Discrete-Continuous Flow for End-to-End Autonomous Driving}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=41ua72BZf8},
}
Figure