When a forecaster predicts where a crowd or a stream of cars will go, it usually draws several possible futures. If each agent's future is drawn independently, the samples are often incoherent: two friends walking together drift apart in one sample, or a platoon of cars brakes in one lane but not behind itself. A hierarchical pedestrian model, HGCN-GJS (HGCN-GJS), showed that coherence can be improved by correlating the random noise of agents in the same group. Its groups, however, come from a hand-set velocity-coherence filter and have exactly two levels: individual and group. Real scenes nest. Two people talking sit inside a family, the family sits inside a stream of commuters, and a car pair sits inside a platoon inside a lane. The noise-sharing should follow that nesting.
The proposal is to find the nesting with Markov Stability, a community-detection method that scores a partition by how long a random walker started inside a community stays trapped there (The stability of a graph partition; Random Walks, Markov Processes and the Multiscale Modular Organization of Complex Networks). The walk runs on a learned graph of who influences whom. Increasing the walk length ("Markov time") zooms from fine groups to coarse ones, and partitions that persist over long ranges of Markov time are treated as real levels. We then build the correlation between two agents' sampled futures from the levels at which they share a community. In short, the work turns the dendrogram from multiscale community detection into the covariance of a joint trajectory sampler and tests whether that beats both flat and two-level sampling on joint-forecast coherence.
Core Claim
The claim is narrow. Given a learned, directed interaction graph over the agents in a scene, the robust partitions found by sweeping Markov time define a nested group structure. Correlating sampling noise along that structure should improve joint forecast quality and reduce predicted inter-agent collisions compared with three alternatives: independent sampling, HGCN-GJS's single-level group sharing, and a dense learned noise covariance. Displacement accuracy of the best sample should stay the same or improve.
Write $\ell = 1,\dots,L$ for the stability plateaus found in a scene, ordered from fine to coarse, and $c_\ell(i)$ for agent $i$'s community at plateau $\ell$. Each agent's latent noise is
$$z_i = \sqrt{a_0}\,\epsilon_i + \sum_{\ell=1}^{L} \sqrt{a_\ell}\, u_{\ell, c_\ell(i)},$$
where $\epsilon_i$ is agent-specific standard Gaussian noise, $u_{\ell,c}$ is standard Gaussian noise shared by every member of community $c$ at level $\ell$, and $a_\ell \ge 0$ are level weights that sum to one. The covariance between agents $i$ and $j$ is then the sum of $a_\ell$ over the levels at which they share a community. This covariance is ultrametric, meaning it is fixed by the deepest level of the dendrogram the two agents share, so it is always a valid covariance and costs $O(NL)$ to sample instead of $O(N^2)$. HGCN-GJS's correlation parameter $\rho$ is the special case $L=1$.
The level weights will be set in two ways and compared. In the first, each $a_\ell$ is proportional to the plateau's length in log Markov time, so more persistent structure gets more shared variance. In the second, the weights are learned per level through the generative model's training objective.
Research Program
The graph comes first, because Markov Stability on a proximity graph would only rediscover distance clusters. We reuse the pairwise-attention, sigmoid-output edge estimator of RAIN (Learning Heterogeneous Interaction Strengths by Trajectory Prediction with Graph Neural Network). RAIN infers absolute coupling strengths $w_{ij}\in(0,1)$ from trajectory histories without interaction labels, and it recovered spring couplings with Pearson correlation 0.9117 against 0.8921 for NRI. RAIN stops at a flat matrix. Our edges are directed, recording whose motion predicts whose response. We therefore use the PageRank-based Markov Stability variant, which handles directed flow without forced symmetrization (Random Walks…).
This answers the "passive diffusion" objection only partly. The walk is still a random walk, but it now runs on edges learned from behavioral response rather than proximity. We do not claim to model reciprocal negotiation inside the clustering. That job stays with the trajectory decoder.
For optimization we use Vector Louvain (Geometric Multiscale Community Detection). It recasts Markov Stability as partitioning spectral vectors of the transition matrix, and its authors report cleaner hierarchical partitions than modularity-matrix spectra give. We sweep a log-spaced grid of Markov times and detect plateaus with Variation of Information between partitions found from repeated randomized restarts. The scaling problems flagged for this family begin at networks larger than 20,000 nodes (Random Walks…), while a driving or crowd scene has tens to a few hundred agents. An eigendecomposition at that size is cheap. Still, latency against a 10 Hz budget (WOMD) is something we will measure, not assume. To meet the budget we also test reusing the previous frame's partition as a warm start.
The forecaster backbone is HGCN-GJS's encoder and decoder, held fixed so that the sampler is the only thing that changes. We also port the sampler onto a transformer-style multi-modal predictor for the vehicle datasets. The partition is treated as discrete and non-differentiable. It is recomputed per scene from the current edge estimates, and gradients flow only into the edge estimator, the backbone, and the level weights.
Baselines
The naive reference point is the same backbone with independent per-agent noise. HGCN-GJS reports that this independent variant produces about 3.3 times more collisions on ZARA1 than its group-shared sampler. That shows the coherence gap we target is real and measurable.
The most direct competitor is HGCN-GJS itself, with its velocity-coherence grouping and single correlation parameter. It is the strongest competitor because it already attacks exactly this problem, joint sampling coherence, and reports ADE gains of 9.3% to 32.8% and FDE gains of 10.6% to 35.6% over Social GAN, SoPhie and STGAT on ETH/UCY. The file gives these only as relative gains, with no absolute per-scene values, so we will retrain it ourselves. It will use the same backbone, the same number of samples, and the same hyperparameter-search budget as our method. Its grouping threshold gets the same number of tuning trials as our Markov-time grid.
Beating it means a lower joint ADE/FDE and a lower predicted collision rate, averaged over the five leave-one-scene-out splits, with no regression in best-of-K marginal ADE.
On vehicles the strongest flat predictor in the file is MTR-A (MTR-A). It reports Soft mAP 0.4594 and Miss Rate 0.1160 on the 2022 WOMD marginal motion challenge, and MultiPath++ reports mAP 0.409 and minADE 0.556 m (MultiPath++). No reported result was found on Lacuna for the WOMD interactive (joint) split, which is the split that matters here. We therefore compare against a single-model, non-ensembled reimplementation of a transformer predictor under our compute budget, both with and without our sampler. We do not claim to beat the seven-model ensemble behind MTR-A's challenge numbers.
Three ablations isolate the key ingredient. In the first, the nested sampler stays but the hierarchy comes from average-linkage agglomerative clustering on the same learned RAIN weights. This separates "Markov time and plateaus" from "any dendrogram." In the second, the Markov-time sweep stays but runs on a fixed-radius proximity graph instead of learned edges. This separates the graph from the clustering. In the third, only the single most persistent plateau is used ($L=1$), which tests whether nesting matters beyond better group discovery.
Why not just…?
Why not just let a transformer learn joint futures end to end? Joint transformer decoders can learn correlations implicitly, and with enough data they may close the gap. The evidence against relying on them is indirect. The quadratic cost of all-to-all attention pushed MultiPath++ to gating, and HGCN-GJS documents incoherent samples from non-hierarchical models. Neither proves a large joint transformer fails. So we run it directly: the same transformer with and without the nested sampler on the WOMD interactive split. If the sampler adds nothing to a strong joint decoder, we report that the benefit is limited to lighter backbones.
Why not just learn a dense noise covariance from attention? A learned $N\times N$ covariance is strictly more expressive. It must be kept positive definite, it costs $O(N^2)$ or more per sample, and it has no inductive bias toward group structure. We include it as a baseline at matched parameters. The prediction is that it ties on large, regular scenes and loses on sparse or unusual group configurations and on cross-scene transfer, where the structured prior should generalize better. If it wins everywhere, the structured covariance is not worth its complexity.
Why not just run velocity clustering or agglomerative clustering at several thresholds? This is the real threat, since any dendrogram yields an ultrametric covariance. Markov Stability's specific advantages are two. Multi-step walks join elongated chains, such as a line of cars following one another, that direct-weight clustering fractures (Encoding dynamics for multiscale community detection). Plateau persistence also gives a principled way to choose levels and weights instead of hand-picking thresholds. The agglomerative-on-learned-weights ablation settles it. If that ablation matches us, the contribution reduces to nested sampling on learned graphs, and we will say so.
Why not just use modularity (Louvain at a single resolution)? Modularity is Markov Stability at $t=1$ and carries its resolution limit (The stability of a graph partition). The single-plateau ablation, with $t$ fixed at 1, covers this case directly.
Proposed Experiments
Pedestrian experiments use ETH/UCY under the standard leave-one-scene-out protocol, with Stanford Drone as a second crowd setting. Social-WaGDAT reports an ADE of 22.52 pixels on Stanford Drone (Social-WaGDAT) as a reference.
Vehicle experiments use the INTERACTION dataset (INTERACTION) and the WOMD interactive split. For INTERACTION, Social-WaGDAT reports only relative error reductions of 29.4% in roundabouts and 21.1% at intersections, with no absolute values.
The metrics are joint minADE and minFDE, where a single sample index must serve all agents in the scene, together with the predicted inter-agent collision rate, the joint miss rate, and marginal best-of-K ADE/FDE. On the NGSIM merge scenarios we also report the fatality-aware weighted Brier score (Towards a Fatality-Aware Benchmark), where the reported reference is IRL with $B_c = 0.2053$. This tests whether coherent group sampling reduces non-defensive predictions in merges.
A synthetic simulator with planted nested groups is used for diagnosis. In it, sub-groups inside groups inside flows share goal perturbations, so the ground-truth covariance is known. We measure hierarchy recovery with Variation of Information and the distance between true and induced covariance.
Three decisive checks follow. The first is the synthetic test: if Markov Stability on learned edges does not recover the planted levels better than agglomerative clustering on the same edges, the community-detection component is not earning its place. The second compares the nested sampler with HGCN-GJS on ZARA1 and Univ, the densest group-walking scenes. It must reduce collisions and joint FDE beyond the single-level sampler; otherwise nesting does not matter in real crowds. The third is wall-clock time for the per-scene sweep on WOMD scenes of up to 128 agents, with and without warm starts. The method must stay within the 100 ms frame budget to count as usable online, and if it does not, we will report it as an offline analysis tool.
References
- HGCN-GJS: Hierarchical Graph Convolutional Network with Groupwise Joint Sampling for Trajectory Prediction
- The stability of a graph partition: A dynamics-based framework for community detection
- Random Walks, Markov Processes and the Multiscale Modular Organization of Complex Networks
- Learning Heterogeneous Interaction Strengths by Trajectory Prediction with Graph Neural Network
- Geometric multiscale community detection: Markov stability and vector partitioning
- Large Scale Interactive Motion Forecasting for Autonomous Driving : The Waymo Open Motion Dataset
- MTR-A: 1st Place Solution for 2022 Waymo Open Dataset Challenge - Motion Prediction
- MultiPath++: Efficient Information Fusion and Trajectory Aggregation for Behavior Prediction
- Encoding dynamics for multiscale community detection: Markov time sweeping for the map equation
- Social-WaGDAT: Interaction-aware Trajectory Prediction via Wasserstein Graph Double-Attention Network
- INTERACTION Dataset: An INTERnational, Adversarial and Cooperative moTION Dataset in Interactive Driving Scenarios with Semantic Maps
- Towards a Fatality-Aware Benchmark of Probabilistic Reaction Prediction in Highly Interactive Driving Scenarios