---
title: 'SRefiner: Soft-Braid Trajectory Refinement'
url: https://www.emergentmind.com/topics/soft-braid-refiner-srefiner
type: topic
---

# SRefiner: Soft-Braid Trajectory Refinement

to=arxiv_search.search ุ้นบาท json
{"query":"arXiv:2507.04263 OR \"SRefiner: Soft-Braid Attention for Multi-Agent Trajectory Refinement\"", "max_results": 5, "sort_by": "submittedDate", "sort_order": "descending"}
to=arxiv_search.search 】【。】【”】【json
{"query":"\"BeTop\" trajectory prediction braid topology arXiv QCNet SmartRefine DCMS R-Pred MTR++", "max_results": 10, "sort_by": "relevance", "sort_order": "descending"}
Soft-Braid Refiner, or SRefiner, is a topology-aware, multi-iteration refinement framework for multi-agent trajectory prediction in autonomous driving. It takes initially predicted multi-agent futures and refines them into more accurate joint trajectories by explicitly modeling spatio-temporal relationships among agents and between agents and lanes. The method is inspired by braid theory, but replaces hard crossings with continuous, state-conditioned “soft intersections,” and uses these structures to guide attention through Soft-Braid Attention. In the reported formulation, SRefiner operates as a residual refiner,
$$
Y = Y_0 + \mathcal{R}(Y_0, L),
$$
where $Y_0 \in \mathbb{R}^{K \times N \times T_+ \times 2}$ denotes baseline multi-modal futures and $L$ denotes vectorized HD map lanes [2507.04263].

## 1. Problem setting and motivation

SRefiner is defined in the setting of multi-agent trajectory prediction and refinement. Historical agent states are given as $X \in \mathbb{R}^{N \times T_- \times 2}$ together with vectorized HD map lanes $L$. A baseline predictor first produces $K$-mode futures $Y_0 \in \mathbb{R}^{K \times N \times T_+ \times 2}$, and the refinement stage then seeks a more accurate joint prediction by exploiting structured interactions among agents and between agents and lanes [2507.04263].

The stated motivation is that purely latent feature interactions often fail to respect structured traffic constraints such as yielding and lane-keeping, and can fail to distinguish logically correlated but non-crossing motions. Prior refinement approaches listed in the formulation—DCMS, QCNet, R-Pred, SmartRefine, and MTR++—primarily learn implicit interactions, while braid-inspired methods such as BeTop are described as focusing only on hard crossings and ignoring temporal dynamics and non-crossing interactions [2507.04263].

Within that framing, SRefiner makes three explicit contributions. It introduces soft-braid topology, which encodes spatio-temporal relationships at “soft intersection points” derived from proximity over time and motion states. It designs Soft-Braid Attention for both trajectory–trajectory and trajectory–lane interactions by injecting topology features into cross-attention keys and values while restricting neighborhoods by distance. It also builds a multi-iteration refiner that progressively updates topology from refined trajectories and reports state-of-the-art improvements across baselines and datasets with favorable latency [2507.04263].

A common misconception is that topology-aware refinement in traffic must be tied to binary intersection logic. In SRefiner, topology is continuous rather than binary, and it remains operative in non-crossing but logically coupled cases such as yielding without geometric intersection. This suggests that the method treats topology less as a combinatorial crossing label and more as a state-conditioned relational descriptor over future motion.

## 2. Soft-braid topology

The method draws inspiration from braid theory. A braid is given as a tuple $f=(f_1,\dots,f_n)$ with strands $f_i: I \to \mathbb{R}^2 \times I$, $I=[0,1]$, embedded in $(x,y,t)$ and monotonically increasing in $t$. In the traffic interpretation, trajectories $y_i(t)$ become strands over $t \in [0,T_+]$ [2507.04263].

For context, the paper presents a hard-crossing indicator,
$$
\sigma_{i \leftarrow j}=
\begin{cases}
1 & \exists\, 0<t_i<t_j<T_+:\ \|y_i(t_i)-y_j(t_j)\|<\varepsilon\\
0 & \text{otherwise},
\end{cases}
$$
where $\varepsilon$ is a vehicle-width threshold. This binary relation permits attention only between crossing agents, but, as described in the source, ignores how they interact and any non-crossing yet correlated behaviors [2507.04263].

SRefiner replaces this with a soft-braid topological structure. For trajectories $i$ and $j$, the soft intersection is defined by the closest points at the same time:
$$
t_{ij}=\arg\min_t \|y_i(t)-y_j(t)\|, \quad P_{i_j}=y_i(t_{ij}),\ \ P_{j_i}=y_j(t_{ij}).
$$
From these points it derives spatial features
$$
d_{ij}=\|P_{j_i}-P_{i_j}\|, \quad \theta_{ij}=\arctan(P_{j_i}-P_{i_j}).
$$
The construction is then expressed in per-agent local frames. For agent $i$, the origin $O_i$ is the end of its history in the global frame and heading $\theta_i$ is its orientation there. A global trajectory $y$ is transformed to the local frame of $i$ as
$$
y^{(i)} = (y-O_i)
\begin{bmatrix}
\cos\theta_i & -\sin\theta_i\\
\sin\theta_i & \cos\theta_i
\end{bmatrix}.
$$

The resulting trajectory–trajectory soft-braid topology features are
$$
\tilde{\sigma}_{i \leftarrow j} = \Big[
\dot{y}^{(i)}_i(t_{ij}),\
\dot{y}^{(i)}_j(t_{ij}),\
\ddot{y}^{(i)}_i(t_{ij}),\
\ddot{y}^{(i)}_j(t_{ij}),\
d_{ij},\
\theta_{ij}^{(i)}
\Big],
$$
with the symmetric counterpart
$$
\tilde{\sigma}_{j \leftarrow i} = \Big[
\dot{y}^{(j)}_j(t_{ij}),\
\dot{y}^{(j)}_i(t_{ij}),\
\ddot{y}^{(j)}_j(t_{ij}),\
\ddot{y}^{(j)}_i(t_{ij}),\
d_{ij},\
-\theta_{ij}^{(j)}
\Big].
$$

SRefiner extends the same logic to trajectory–lane interactions. For a lane centerline polyline $L_k$, the closest waypoint on $y_i(t)$ to $L_k$ occurs at
$$
t_{ik}=\arg\min_t \|y_i(t)-L_k\|,\quad C_{i_k}=y_i(t_{ik}),
$$
with
$$
d_{ik}=\|L_k-C_{i_k}\|,\quad \theta_{ik}=\arctan(L_k-C_{i_k}),
$$
and the soft-braid lane feature
$$
\tilde{\lambda}_{i \leftarrow k} = \Big[
\dot{y}^{(i)}_i(t_{ik}),\
\ddot{y}^{(i)}_i(t_{ik}),\
d_{ik},\
\theta_{ik}^{(i)}
\Big].
$$

Interactions are restricted to local neighborhoods:
$$
\Omega(i)=\{j\ |\ d_{ij}\le \tau_a\},\quad \tau_a=50\ \mathrm{m},
$$
and
$$
\Omega(i)=\{k\ |\ d_{ik}\le \tau_l\},\quad \tau_l=10\ \mathrm{m}.
$$
The source characterizes these soft-braid features as capturing “how” agents relate through relative positions, headings, and motion states, including non-crossing but logically coupled scenarios such as yielding without intersection [2507.04263].

## 3. Soft-Braid Attention

Soft-Braid Attention is the core mechanism that injects topology into attention. Let $F \in \mathbb{R}^{K \times N \times D}$ denote per-agent embeddings for each mode, with $F_i \in \mathbb{R}^D$ for agent $i$. Trajectory–trajectory Soft-Braid Attention uses multi-head cross-attention with topology-aware keys and values:
$$
F_i \leftarrow MHCA\Big(
Q: F_i,\ 
K: \{F_j+\varphi(\tilde{\sigma}_{i \leftarrow j})\}_{j\in\Omega(i)},\
V: \{F_j+\varphi(\tilde{\sigma}_{i \leftarrow j})\}_{j\in\Omega(i)}
\Big),
$$
where $\varphi(\cdot)$ is a 3-layer MLP mapping topology features to $D$-dimensional embeddings [2507.04263].

Trajectory–lane Soft-Braid Attention uses an analogous construction:
$$
F_i \leftarrow MHCA\Big(
Q: F_i,\ 
K: \{\varphi(L_k^{(i)}+\tilde{\lambda}_{i \leftarrow k})\}_{k\in\Omega(i)},\
V: \{\varphi(L_k^{(i)}+\tilde{\lambda}_{i \leftarrow k})\}_{k\in\Omega(i)}
\Big),
$$
where $L_k^{(i)}$ denotes lane features expressed in the local frame of agent $i$.

The attention mechanism itself is standard scaled dot-product attention over spatially masked neighborhoods. For head $h$ with projections $W_Q^h$, $W_K^h$, and $W_V^h$, the score and weight are
$$
e_{ij}^{(h)}=\frac{(W_Q^h F_i)^\top \big[W_K^h(F_j+\varphi(\tilde{\sigma}_{i \leftarrow j}))\big]}{\sqrt{d_h}},
\quad
\alpha_{ij}^{(h)}=\frac{
\exp(e_{ij}^{(h)})\cdot \mathbb{I}[j\in\Omega(i)]
}{
\sum_{m\in\Omega(i)}\exp(e_{im}^{(h)})
},
$$
with per-head output
$$
Z_i^{(h)}=\sum_{j\in\Omega(i)}\alpha_{ij}^{(h)}\cdot W_V^h\big(F_j+\varphi(\tilde{\sigma}_{i \leftarrow j})\big).
$$
Heads are concatenated and linearly projected to update $F_i$. The lane counterpart replaces $(F_j, \tilde{\sigma}_{i \leftarrow j})$ by $(L_k^{(i)}, \tilde{\lambda}_{i \leftarrow k})$ and masks by $k\in\Omega(i)$ [2507.04263].

The paper distinguishes this mechanism from standard attention in three ways. First, it is topology-aware because keys and values are augmented with soft-braid features derived at soft intersections. Second, it is proximity-masked because only agents or lanes within $\tau_a$ or $\tau_l$ contribute. Third, it is spatio-temporally coupled because the soft intersections select $t_{ij}$ or $t_{ik}$ by minimizing distance over time. A further distinction is progressive topology update: soft-braid features are recomputed after each refinement iteration, so attention is guided by the latest refined topology rather than by a fixed prior [2507.04263].

The trajectory–lane component is not an auxiliary add-on but a second topology-aware interaction channel. Lane centerlines are vectorized and expressed in agent-local coordinates, then concatenated with $\tilde{\lambda}_{i \leftarrow k}$. The final per-agent embedding integrates both trajectory–trajectory and trajectory–lane outputs.

## 4. Iterative refinement architecture and optimization

SRefiner is explicitly multi-iteration. Initialization is
$$
F_0=\varphi\big([O,\ \theta,\ PE(Y_0)]\big),
$$
where $PE(\cdot)$ is the position encoding of $Y_0$ across time and $[O,\theta]$ are per-agent local-frame anchors. At iteration $l$, soft-braid topology is first recomputed from the most recent trajectories,
$$
\widetilde{B}_{l-1},\ \widetilde{B}'_{l-1}=\mathcal{S}(Y_{l-1}, L),
$$
where $\widetilde{B}$ collects $\tilde{\sigma}_{i\leftarrow j}$ and $\widetilde{B}'$ collects $\tilde{\lambda}_{i\leftarrow k}$. Soft-Braid Attention is then applied:
$$
F_l=SoftBraidAttn(F_{l-1}, L, \widetilde{B}_{l-1}, \widetilde{B}'_{l-1}),
$$
followed by residual trajectory update,
$$
Y_l=\varphi(F_l)+Y_{l-1}.
$$
The default number of iterations is $I=3$; increasing beyond $3$ is reported to yield negligible gains but higher cost, and refinement is stated to converge within $I=3$ under the reported settings [2507.04263].

The model architecture comprises a trajectory encoder, topology encoders, a lane encoder, two attention blocks, and a refinement head. The trajectory encoder maps $\varphi([O,\theta,PE(Y_0)])$ to $F_0 \in \mathbb{R}^{K \times N \times D}$. Separate MLPs encode $\tilde{\sigma}$ and $\tilde{\lambda}$ to $D$ dimensions. The refinement head is an MLP producing trajectory offsets whose residual sum with $Y_{l-1}$ yields $Y_l$. The outputs are refined $K$-mode trajectories $Y_I \in \mathbb{R}^{K \times N \times T_+ \times 2}$. Reported hyperparameters are embedding dimension $D=64$, iterations $I=3$, neighborhood radii $\tau_a=50\ \mathrm{m}$ and $\tau_l=10\ \mathrm{m}$, with standard transformer-style projections for MHCA and no explicit specification of the number of heads [2507.04263].

Training uses joint winner-takes-all across modes for multi-agent worlds:
$$
k_l=\arg\min_{k\in[1,K]}\frac{1}{N}\sum_{i=1}^N\|Y_{l,i,k}-Y_{\mathrm{gt},i}\|.
$$
A Huber loss is applied on the selected mode at each iteration,
$$
\mathcal{L}_l=\frac{1}{N}\sum_{i=1}^N \mathcal{L}_{\mathrm{Huber}(Y_{l,i,k_l}-Y_{\mathrm{gt},i})},
$$
and the final objective averages over iterations:
$$
\mathcal{L}=\frac{1}{I}\sum_{l=1}^I \mathcal{L}_l.
$$
Optimization details are specified as 64 epochs on RTX 3090, batch size 16, AdamW, cosine LR schedule, and weight decay $1\mathrm{e}{-4}$. The initial learning rate is $1\mathrm{e}{-4}$ for Argoverse v2 and $3\mathrm{e}{-4}$ for INTERACTION [2507.04263].

## 5. Empirical performance and ablation results

The evaluation is conducted on Argoverse v2 and INTERACTION. Argoverse v2 is used at 10 Hz for long-term forecasting with $T_-=50$ and $T_+=60$, and metrics are avgMinFDE, avgMinADE, and actorMR. INTERACTION is used at 10 Hz for short-term forecasting with $T_-=10$ and $T_+=30$, and metrics are minJointFDE, minJointADE, and minJointMR. Evaluated baselines are AutoBots, FJMP, Forecast-MAE, and HPNet [2507.04263].

| Dataset | Temporal setup | Metrics |
|---|---|---|
| Argoverse v2 | 10 Hz; $T_-=50$, $T_+=60$ | avgMinFDE, avgMinADE, actorMR |
| INTERACTION | 10 Hz; $T_-=10$, $T_+=30$ | minJointFDE, minJointADE, minJointMR |

Selected test-set improvements are reported directly. On Argoverse v2, FJMP improves from avgMinFDE $1.890$ to $1.719$ ($-9.1\%$), avgMinADE $0.810$ to $0.747$ ($-7.8\%$), and actorMR $0.230$ to $0.213$ ($-7.4\%$). Forecast-MAE improves from avgMinFDE $1.679$ to $1.521$ ($-9.4\%$), avgMinADE $0.735$ to $0.678$ ($-7.8\%$), and actorMR $0.197$ to $0.186$ ($-5.6\%$). On INTERACTION, AutoBots improves from minJointFDE $1.015$ to $0.906$ ($-10.7\%$), minJointADE $0.312$ to $0.271$ ($-13.2\%$), and minJointMR $0.211$ to $0.175$ ($-17.0\%$). FJMP improves from minJointFDE $0.945$ to $0.867$ ($-8.3\%$), minJointADE $0.283$ to $0.257$ ($-9.2\%$), and minJointMR $0.186$ to $0.163$ ($-12.4\%$). HPNet improves from minJointFDE $0.823$ to $0.797$ ($-3.2\%$), minJointADE $0.255$ to $0.247$ ($-3.2\%$), and minJointMR $0.159$ to $0.152$ ($-4.5\%$). HPNet+SRefiner is reported to attain SOTA on INTERACTION [2507.04263].

Validation comparisons to existing refinement methods are also specified. With the Forecast-MAE baseline on Argoverse v2, avgMinFDE is reduced from $1.642$ to $1.477$ by SRefiner, outperforming DCMS ($1.601$), R-Pred ($1.554$), QCNet ($1.520$), SmartRefine ($1.512$), and MTR++ ($1.495$). With the FJMP baseline on INTERACTION, minJointFDE is reduced from $0.630$ to $0.579$, outperforming DCMS ($0.615$), R-Pred ($0.603$), QCNet ($0.588$), SmartRefine ($0.592$), and MTR++ ($0.585$). Reported latency per scenario on RTX 3090 is $28$ ms for Argoverse v2 with Forecast-MAE and $18$ ms for INTERACTION with FJMP [2507.04263].

The ablation study attributes the best result on Argoverse v2 with Forecast-MAE to the full configuration. Starting from a baseline avgMinFDE of $1.642$, using Traj–Lane Soft-Braid plus topology update yields $1.514$, using Traj–Traj Soft-Braid plus topology update yields $1.497$, using both Soft-Braid modules without topology update yields $1.522$, and the full SRefiner yields $1.477$. A separate topology ablation reports: no topology, $1.530$; braid topology (BeTop), $1.512$; Soft-Braid (Traj–Traj only), $1.497$; and Soft-Braid (Traj–Traj + Traj–Lane), $1.477$ [2507.04263].

Sensitivity analyses for neighborhood radii indicate modest but nonzero dependence. For $\tau_a \in \{10,30,50,100\}$ m, avgMinFDE is $\{1.489,1.482,1.477,1.480\}$, leading to the default $\tau_a=50$ m. For $\tau_l \in \{2,5,10,20\}$ m, avgMinFDE is $\{1.484,1.482,1.477,1.477\}$, leading to the default $\tau_l=10$ m. The iteration study reports the best result at $I=3$, with diminishing returns and higher latency beyond that point [2507.04263].

## 6. Complexity, robustness, and reproducibility

Per iteration, the complexity is characterized in terms of $K$ modes, $N$ agents, average trajectory neighborhood size $|\Omega_a(i)| \approx M_a$, lane neighborhood size $|\Omega_l(i)| \approx M_l$, and embedding dimension $D$. Trajectory–trajectory MHCA has complexity $O(K \cdot N \cdot M_a \cdot D)$, trajectory–lane MHCA has complexity $O(K \cdot N \cdot M_l \cdot D)$, and the overall per-iteration complexity is
$$
O(I \cdot K \cdot N \cdot (M_a+M_l) \cdot D)
$$
over $I$ iterations. Memory is described as linear in $K \cdot N$ and neighborhood sizes, and the soft-braid features are described as lightweight because they contain velocities, accelerations, distances, and angles. Reported runtime is $28$ ms per scenario on Argoverse v2 and $18$ ms on INTERACTION on RTX 3090, with scaling aided by local masking [2507.04263].

The reported strengths are tied to the soft-intersection formalism. The method handles non-crossing logical interactions through soft intersections and motion-state conditioning; it reduces collisions and drivable-area violations by integrating lane topology; and qualitative visualizations are said to show correction of off-lane deviations and reduction of inter-trajectory conflicts. Progressive topology update is described as improving attention guidance iteratively [2507.04263].

The limitations are also explicit. Sensitivity to neighborhood thresholds $\tau_a$ and $\tau_l$ is low but nonzero, so extreme values can under-connect or over-connect interactions. The method relies on accurate maps and baseline trajectories, meaning map errors or poor initial predictions can misplace soft intersections. It also incurs computational overhead relative to simple local attention because of topology computation and dual attention modules, although this is mitigated by small $I$ and local masking. For edge cases such as occlusions and sudden maneuvers, soft intersections still reflect proximity at $t_{ij}$, but abrupt changes can shift soft intersection times; iterative updates help but do not guarantee perfect adaptation. Lane changes are modeled through trajectory–lane soft intersections, with quality depending on lane topology representation and neighborhood radius [2507.04263].

Reproducibility details are comparatively concrete. The codebase is released at the repository linked by the authors. The implementation is organized around a baseline wrapper that computes $Y_0$ from $X$ and $L$, a SoftBraidTopology module $\mathcal{S}(\cdot)$ that computes $\tilde{\sigma}_{i\leftarrow j}$ and $\tilde{\lambda}_{i\leftarrow k}$ together with neighborhoods $\Omega(i)$, trajectory–trajectory and trajectory–lane Soft-Braid MHCA blocks, a refinement head producing offsets, and a training loop with joint WTA selection and Huber loss. Key settings for reproduction are 10 Hz sampling on both datasets; horizons $T_-=50$, $T_+=60$ for Argoverse v2 and $T_-=10$, $T_+=30$ for INTERACTION; $D=64$; $I=3$; $\tau_a=50$ m; $\tau_l=10$ m; AdamW with cosine learning rate schedule and weight decay $1\mathrm{e}{-4}$; 64 epochs; batch size 16; and per-agent local frames anchored at the end of history with heading $\theta_i$ [2507.04263].

Taken together, these properties locate SRefiner as a refinement layer that substitutes brittle binary crossing logic with continuous, interpretable soft-braid topology. The principal implication is that trajectory refinement can be guided by explicit distances, angles, and motion states at dynamically selected soft intersections, rather than by latent interaction alone. In the reported experiments, that design yields consistent improvements across datasets and baselines while preserving practical latency for autonomous driving use.

Source: https://www.emergentmind.com/topics/soft-braid-refiner-srefiner