Forecasting how several cars or pedestrians will move together depends on a discrete question that current models leave implicit: which agents are actually negotiating with each other right now? Network science has a well-understood answer to a related question. When you want to split the nodes of a noisy graph into communities, the reliable recipe has two stages. First, a cheap global method such as a spectral embedding (the leading eigenvectors of the graph's adjacency matrix) produces a rough partition with a small fraction of errors. Second, a local discrete step reassigns each node to the community most of its neighbors belong to, and this second step drives the remaining errors toward zero. The errors only vanish if the second step uses evidence that was not already used to build the rough partition.
We propose to carry this recipe into multi-agent trajectory prediction, with one change that the driving setting makes natural. Interaction evidence between two agents is observed again at every timestep. Disjoint time windows of the observed history can therefore serve as the independent samples that the clustering theory requires. In a live stream, the previous frame's refined partition can serve as the rough first stage, so each new frame needs only a few local cleanup steps. The claim is that this gives interaction groups that are more accurate and more stable over time than learned pairwise edges or proximity rules. It also predicts in advance how much history is needed to recover the groups. Conditioning a trajectory refiner on these groups should then reduce joint prediction error and frame-to-frame flicker.
Core Claim
The idea is not to use clustering to beat quadratic attention cost. On INTERACTION and Argoverse 2 scenes, the number of agents is roughly 5 to 50. At that size, all-to-all attention is cheap. HPNet runs in about 27.62 ms (HPNet), and AutoBots exceeds 30 frames per second (AutoBots). Pitching the nearly-linear runtime of the Generalized Power Method paper as the payoff would solve a problem these benchmarks do not have.
The claim is instead about three properties of the recovered structure. The first is accuracy: a discrete partition recovered by "rough global estimate, then independent local cleanup" should match ground-truth interaction structure better than a single-pass edge classifier. The second is stability: warm-starting from the previous frame should make group labels persist unless the evidence actually changes, which targets the flickering problem that HPNet attacks with historical prediction attention. The third is predictability: the history length needed for reliable recovery should follow from a signal-to-noise calculation of the same form as SBM recovery thresholds. We treat the asymptotic SBM theory as a design guide and a source of testable predictions, not as a guarantee. The proofs assume large graphs and stationary, symmetric block models, and our graphs are small and change over time.
Mechanism
For each pair of agents and each timestep, we compute a scalar interaction affinity from the trajectories. One option is the soft closest-approach signal used by SRefiner, which models trajectories as intertwined strands and attends at their closest spatio-temporal approach. Another is a lightweight learned pairwise scorer. Either way, the affinities form a weighted graph observed $T$ times over the history window.
We split the history into two interleaved sets of timesteps, $A$ and $B$. Stage 1 runs a spectral embedding on the affinities averaged over $A$. It is warm-started from the previous frame's partition when one exists. Stage 2 adapts the "classify and clean" degree-profile step of Abbe and Sandon, together with the rounding step of the Generalized Power Method. Using only the affinities in $B$, it reassigns each agent to the group with which its summed affinity is most anomalous relative to a background level. That background level is estimated from the data rather than set as a radius. Stage 2 repeats until no agent's label changes. This answers the critique that SRefiner's radii and EvolveGraph's re-encoding gap are hand-tuned. Here, the number of groups and the within- and between-group affinity levels are fitted per scene, following the agnostic-parameter idea.
The recovered groups then gate a second-stage refiner on top of a fixed backbone. Agents attend fully to members of their own group and see only a pooled summary of other groups. Predicted futures from the refiner are fed back as extra affinity evidence for the next frame's Stage 2. This gives the closed loop that the two-layer HMM approach of Generic Probabilistic Interactive Situation Recognition lacks. That approach maps recognized discrete situations to trajectories in one direction only, and only for hand-defined two-agent merges.
The testable quantitative prediction is as follows. If per-step affinities within and between groups have means $\mu_{in}$ and $\mu_{out}$ with per-step noise $\sigma$, averaging over $|B|$ independent steps shrinks the noise as $\sigma/\sqrt{|B|}$. Stage 2 should therefore succeed once $\sqrt{|B|}\,(\mu_{in}-\mu_{out})/\sigma$ exceeds a constant. That constant should grow slowly with the number of agents, mirroring the role of log-degree in the threshold $\sqrt{\alpha}-\sqrt{\beta}>\sqrt{2}$ reported in the Generalized Power Method paper. We will check whether recovery curves collapse onto this scaling.
Relation to Prior Work
Three groups of papers play distinct roles.
The first group motivates the gap. EvolveGraph infers dynamic pairwise edge types with a recurrent unit. Its two stages are a training curriculum, and inference is a single pass. We instead do test-time discrete refinement over groups. MATE learns a flat multi-edge graph regularized by interaction-energy losses. It reports over 91% interaction-graph accuracy on PHASE and Socialnav, but it never forms groups or refines at test time. SRefiner is the closest work: a coarse-to-fine refiner over backbone proposals. Its interaction weights are continuous and dense, its radii are tuned, and nothing in it produces discrete groups or reuses independent evidence.
The second group supplies the method. Community detection in degree-corrected block models establishes the polynomial-then-exponential error picture. The Generalized Power Method paper supplies the rounding-based local step. Abbe and Sandon supply degree profiling with parameters estimated from the graph. The SBM survey and hypergraph spectral clustering supply sample splitting.
The third group constrains the design. The same theory warns that if Stage 1 misplaces too many boundary nodes, Stage 2 locks into a wrong partition. This is exactly the abrupt cut-in case, where a warm start is wrong. We therefore trigger a cold restart of Stage 1 when the Stage 2 objective on the held-out window $B$ degrades sharply. We report how often this fires.
Research Program
The work proceeds in three steps.
First, we build the two-stage group recovery as a standalone, non-learned module on top of fixed affinity scores. We test it on simulations where ground-truth interaction graphs exist: the spring systems with breaking springs used by EvolveGraph, charged particles, Socialnav, and PHASE. In each, we vary the history length and the interaction signal strength to test the scaling prediction.
Second, we attach the module to an HPNet backbone on INTERACTION and to a Forecast-MAE backbone on Argoverse 2. The module gates a refiner that is otherwise architecturally matched to SRefiner.
Third, we run the module in streaming mode over consecutive frames and measure label and trajectory stability.
Baselines
The naive reference is the backbone alone, with no refinement. On INTERACTION, HPNet reports a minJointFDE of 0.8231 (HPNet). We retrain it with identical data and preprocessing and use our reproduced number as the reference.
The strongest existing method is HPNet plus SRefiner. SRefiner reports state-of-the-art results on INTERACTION with this combination and up to 10.7% lower minJointFDE when added to AutoBots. No reported result was found on Lacuna for the absolute minJointFDE of HPNet plus SRefiner, so we will reproduce it. We give it the same backbone checkpoints, the same three refinement iterations, and the same hyperparameter search budget as our refiner. Beating it means lower minJointFDE and minJointADE on INTERACTION, and lower avgMinFDE on Argoverse 2, across three seeds with non-overlapping confidence intervals. Alternatively, if errors are equal, it means a clearly lower flicker rate.
For interaction-graph recovery on simulations, the strongest baseline is MATE's multi-edge graph inference, with its reported over-91% accuracy on PHASE and Socialnav as the target. We also include EvolveGraph's dynamic edges.
Two ablations isolate the key ingredients. The first removes sample splitting by using all timesteps in both stages. If splitting matters, this version should be measurably worse near the recovery threshold. The second removes Stage 2, leaving spectral clustering only.
Why not just…?
Why not just group agents by distance or by connected components of soft-braid contacts? This is cheap, and SRefiner itself argues that raw proximity misses converging agents in distant lanes while counting parallel neighbors who never interact. Thresholded contact graphs inherit a radius parameter and have no cleanup step. We include connected components on SRefiner's own soft-intersection signal as a baseline. If it matches our group accuracy on Socialnav and INTERACTION, the clustering machinery is not needed for grouping.
Why not just smooth learned pairwise edges over time, for example EvolveGraph-style edges with an exponential moving average or hysteresis? This is the real threat to the stability claim. Smoothing could produce the same persistence without any clustering theory. We run EvolveGraph edges with exponential moving averaging and with hysteresis thresholds, both tuned on validation data with the same budget as our method. We compare label-switch rate against delay in detecting true relational changes, using spring-break events in simulation where the change time is known. Our method must trade off these two better than smoothing does. If it does not, we will report that the gain comes from temporal smoothing, not from two-stage refinement.
Why not just use SRefiner's dense continuous attention with more iterations? Dense soft weights can in principle express groups. SRefiner reports that three iterations already balance latency and accuracy, which suggests more iterations alone saturate. The group-gated versus dense comparison on the same backbone, with matched parameters and iteration count, settles this. A null result here would mean that discrete groups help interpretability and stability but not accuracy, and we would say so.
Decisive Checks
Three outcomes determine whether the idea holds up.
The first is on simulation. Group-recovery accuracy plotted against $\sqrt{|B|}\,(\mu_{in}-\mu_{out})/\sigma$ should collapse across agent counts and show a sharp transition. Removing sample splitting should shift that transition. Absence of either effect falsifies the claim that the SBM recipe transfers.
The second is on INTERACTION. Under matched compute, the group-gated refiner should lower minJointFDE relative to reproduced HPNet plus SRefiner. In streaming evaluation, it should lower the frame-to-frame endpoint change and the group-label switch rate relative to exponentially smoothed edges.
The third concerns the restart rule. We report how often the cold restart fires at cut-ins in INTERACTION's adversarial scenes, which include time-to-conflict below one second. We also report whether accuracy without the restart collapses there, as the boundary-node theory predicts.
References
- HPNet: Dynamic Trajectory Forecasting with Historical Prediction Attention
- Latent Variable Sequential Set Transformers for Joint Multi-Agent Motion Prediction
- A Nearly-Linear Time Algorithm for Exact Community Recovery in Stochastic Block Model
- SRefiner: Soft-Braid Attention for Multi-Agent Trajectory Refinement
- Recovering Communities in the General Stochastic Block Model Without Knowing the Parameters
- Generic Probabilistic Interactive Situation Recognition and Prediction: From Virtual to Real
- EvolveGraph: Multi-Agent Trajectory Prediction with Dynamic Relational Reasoning
- Neural Interaction Energy for Multi-Agent Trajectory Prediction
- Community detection in degree-corrected block models
- Community Detection and Stochastic Block Models: Recent Developments
- Hypergraph Spectral Clustering in the Weighted Stochastic Block Model
- INTERACTION Dataset: An INTERnational, Adversarial and Cooperative moTION Dataset in Interactive Driving Scenarios with Semantic Maps
- Argoverse 2: Next Generation Datasets for Self-Driving Perception and Forecasting