Predicting where a group of people—or a team of basketball players—will move next is a balancing act. You need to capture the "multimodality" of human intent (will they turn left or right?) without producing "jittery" paths that defy the laws of physics. Most current models try to predict future positions frame-by-frame, often leaving the underlying relationship between position, velocity, and acceleration to be learned implicitly.
A new paper, SpecFlow, proposes a shift in perspective: instead of predicting positions, why not model the acceleration spectrum?
TL;DR
SpecFlow is a multi-agent trajectory forecasting framework that uses conditional flow matching to generate coefficients of the Discrete Cosine Transform (DCT) for future accelerations. By reconstructing velocity and position through fixed analytical integration, it ensures dynamical coherence and achieves state-of-the-art results on major pedestrian and sports benchmarks.
What Problem Does This Paper Address?
Traditional generative forecasters typically evolve frame-wise positions directly. This approach has a few drawbacks:
- Kinematic Inconsistency: Relationships between position, velocity, and acceleration are often implicit, leading to trajectories that might look plausible frame-to-frame but are physically unrealistic over time.
- Error Accumulation: Small errors in position prediction can compound, leading to significant "drift" in long-term forecasts.
- Destination Uncertainty: Without knowing the intended endpoint, models struggle to choose between diverse but plausible future paths.
SpecFlow tackles these by moving the generative process into a structured "phase-space" where physics is baked into the architecture.
Methods
The core innovation of SpecFlow is treating the DCT coefficients of future accelerations as the generative state.
1. The Acceleration Spectrum
The model uses a Discrete Cosine Transform (DCT-II) to represent acceleration. By retaining only the first $K$ coefficients, the model naturally focuses on low-frequency components, which correspond to smooth, intentional motion, while filtering out high-frequency noise.
2. Conditional Flow Matching (CFM)
SpecFlow learns a continuous transport from simple Gaussian noise to the distribution of these acceleration coefficients. Unlike diffusion models that require many iterative steps, flow matching regresses a continuous probability path, allowing for efficient sampling via ODE integration.
3. Fixed Kinematic Reconstruction
This is the "physics" part. Once the model generates an acceleration sample, it uses fixed, non-learnable cumulative-sum operators (double integration) to recover velocity and position. This ensures that the predicted position is mathematically consistent with the predicted acceleration and the last observed state.
4. Endpoint Conditioning & Alternating Attention
To handle destination uncertainty, an Endpoint Predictor generates candidate goals from the observed context. The best candidate then conditions the spectral denoiser. To capture interactions between multiple agents, the model uses a backbone that alternates attention between different trajectory hypotheses and the agents themselves.
Datasets
The authors evaluated SpecFlow on three diverse benchmarks:
- ETH/UCY: The standard for pedestrian trajectory forecasting in various social settings.
- NBA SportVU: High-dynamic, coordinated multi-agent motion involving 10 players and a ball.
- Stanford Drone Dataset (SDD): Heterogeneous outdoor trajectories (pedestrians, bikers, cars) captured from an aerial view.
Key Insights and Ideas
- Higher-Order Supervision Wins: The authors found that supervising the model at the highest kinematic order (acceleration) and integrating down is more effective than predicting positions and differentiating up.
- Spectral Truncation as Regularization: By limiting the number of DCT coefficients, the model is forced to learn "smooth" trajectories. The authors found a "U-shaped" pattern where using too few coefficients misses important turns, but using too many introduces high-frequency noise that hurts accuracy.
- Joint Phase-Space Objective: Training with a loss that combines position, velocity, and acceleration errors (Equation 11 in the paper) is crucial. Velocity provides a constraint on local displacement, while acceleration penalizes abrupt changes in that displacement.
Key Results
SpecFlow established new state-of-the-art (SOTA) performance across several metrics:
- ETH/UCY: Achieved an average minADE/minFDE of 0.15/0.22, significantly outperforming the previous best of 0.19/0.31. It ranked first in every single scene of the benchmark.
- NBA: At the 4-second horizon, it reached a 0.69 ADE, the lowest reported for this dataset, while tying for the best FDE (0.86).
- Efficiency: The model is surprisingly robust to sampling speed. Reducing the ODE solver from 100 steps to just 20 steps preserved accuracy to two decimal places while cutting latency by nearly 80% (down to ~3.68ms per scene on NBA).
Limitations and Future Work
While SpecFlow is a powerful motion-only forecaster, it has some clear boundaries:
- Lack of Visual Context: The model does not currently incorporate scene imagery (e.g., maps of sidewalks, walls, or curbs). This explains why its lead on the Stanford Drone Dataset (SDD) was smaller than on ETH/UCY; in complex outdoor environments, "where you can walk" is as important as "how you are moving."
- Probability Calibration: The current evaluation focuses on "best-of-20" metrics, which measure coverage but don't necessarily reflect how well the model's predicted probabilities match real-world frequencies.
The authors suggest that extending this structured generative state with scene-aware conditioning is the natural next step for the field.
Summary updated