Trajectory Consistency Functions (TCF)
- Trajectory Consistency Functions (TCF) are self-supervised, physics-based scoring functions that enforce coherent kinematics by linking positions, velocities, and accelerations via finite differences.
- TCF integrate intra-stream and cross-stream consistency losses within a three-stream Transformer architecture, ensuring predictions align with historical motion trends.
- TCF guide multimodal future selection by evaluating directional consistency and acceleration similarity, which improves trajectory prediction accuracy on benchmarks like ETH-UCY and SDD.
Trajectory Consistency Functions (TCF) are the physics-based scoring functions and losses introduced in the self-supervised pedestrian trajectory prediction framework of “Learning Velocity and Acceleration: Self-Supervised Motion Consistency for Pedestrian Trajectory Prediction” (Huang et al., 31 Mar 2025). In that formulation, TCF ensure coherent relationships among predicted positions, velocities, and accelerations by combining finite-difference kinematics, pseudo-label-based self-supervision, and a motion-consistency evaluation strategy grounded in physical continuity. Their operational role is twofold: to select a motion trend that is most consistent with observed history, and to constrain predicted position trajectories so that their implied dynamics agree with that selected trend.
1. Definition and kinematic formulation
In this framework, the trajectory state of agent at discrete time is represented by position , velocity , and acceleration . Positions are arranged as a sequence for history and for predictions. The coordinates are in meters for ETH-UCY and pixels for SDD (Huang et al., 31 Mar 2025).
Velocity and acceleration are defined through first-order and second-order discrete differences, without explicit normalization by . Historical dynamics are computed as
For predicted streams, pseudo-velocity and pseudo-acceleration are derived either from predicted positions,
or, for intra-stream supervision, directly from a predicted velocity stream,
0
A further historical summary is the “global” velocity
1
computed from the first and last historical frames. This quantity is used in the directional-consistency component of TCF. The resulting construction makes continuity in motion explicit: positions determine velocities, velocities determine accelerations, and the consistency machinery evaluates whether predicted futures preserve that linkage.
2. Self-supervised consistency losses
The model predicts 2 multimodal futures for each of three streams: positions 3, velocities 4, and accelerations 5. TCF are enforced through two complementary losses (Huang et al., 31 Mar 2025).
The first component, 6, imposes intra-stream velocity–acceleration consistency. Pseudo-acceleration is computed from each predicted velocity trajectory and matched to the predicted acceleration with mean squared error: 7 This term enforces that the acceleration stream is not an unconstrained auxiliary output but the discrete derivative of the velocity stream.
The second component, 8, imposes cross-stream position–dynamics consistency. For each predicted position sequence 9, pseudo-velocity 0 and pseudo-acceleration 1 are computed by finite differences. These pseudo-dynamics are then aligned to a single selected velocity–acceleration pair 2, chosen by a separate physics-based scoring procedure. For velocity,
3
and
4
An analogous construction is used for acceleration: 5
6
The combined cross-stream loss is
7
The pseudo-labels used by TCF are computed directly from model predictions; no extra smoothing beyond finite differences is mentioned. This arrangement is the paper’s self-supervised motion consistency mechanism: dynamics inferred from positions supervise dynamics streams, and selected dynamics supervise all position candidates.
3. Physics-grounded motion-trend selection
A central part of TCF is the motion consistency evaluation strategy used to identify the “most reasonable” predicted motion trend. This strategy compares predicted dynamics with historical dynamics using two physics-inspired criteria (Huang et al., 31 Mar 2025).
The first is directional consistency (DC), defined as the cosine similarity between the predicted initial future velocity and the global historical velocity: 8 This expresses directional continuity: near-future motion should align with the overall direction inferred from the observation window.
The second is acceleration similarity, denoted 9, based on distribution statistics of acceleration. Let
0
and for each candidate future,
1
Then
2
This captures smoothness and bounded variability by preferring future acceleration statistics resembling historical ones.
The two criteria are normalized across 3 candidates through softmax and combined with learnable scalars 4 and 5: 6 The selected index is
7
and the selected motion trend is
8
Algorithmically, the procedure is: compute 9, evaluate 0 and 1 for all 2, compute 3, select 4, and then use 5 as the reference trend in 6. In the paper’s synthesis, these components are the formal TCF elements: directional consistency, acceleration similarity, combined score-and-selection, intra-stream consistency, and cross-stream consistency.
4. Architectural realization
TCF are embedded within a three-stream Transformer architecture in which position, velocity, and acceleration are encoded separately and then fused hierarchically (Huang et al., 31 Mar 2025). The position, velocity, and acceleration encoders produce features 7, 8, and 9, and social decoders output 0 multimodal futures per stream.
Hierarchical feature injection is realized via cross-attention. Velocity features are injected into the position stream as
1
Acceleration features are injected into the velocity stream as
2
The attention operator is standard scaled dot-product attention: 3
The decoders consume the fused features to output 4, 5, and 6, while a social attention mechanism models inter-agent interactions. The architectural significance of TCF is therefore not limited to a loss term. The dynamics streams are injected into the positional stream and are simultaneously regularized by finite-difference constraints, so the model learns position, velocity, and acceleration jointly rather than treating dynamics as post hoc derivatives.
5. Training objective and trajectory generation
The total loss combines positional regression, dynamics fitting, and self-supervised consistency (Huang et al., 31 Mar 2025). The position loss is
7
with 8 and 9. The term 0 implements a tolerance interval, or dead-zone, of radius 1 around the ground truth, while 2 discourages excessive spread across the 3 modes.
Velocity and acceleration are fitted with a Huber loss on the selected trend: 4 The final objective is
5
where 6 controls the strength of cross-stream self-supervision.
During training, the selected motion trend 7 guides the position decoder by penalizing any position-generated pseudo-velocity or pseudo-acceleration inconsistent with that trend through 8. This induces the decoder to produce positions whose finite differences match the chosen dynamic pattern. At inference, the decoder still produces 9 multimodal futures, and the same 0 machinery can either select a single “most reasonable” motion-consistent sample or rank and filter candidates before downstream use. In that sense, TCF act as soft physics priors: alignment in direction and acceleration statistics, continuity in kinematics via finite differences, and social consistency via attention.
6. Empirical behavior, assumptions, and limitations
On ETH-UCY, evaluated with ADE/FDE and best-of-20, the method reports an average of ADE 1 and FDE 2, with sub-scene values of HOTEL 3, UNIV 4, ZARA1 5, ZARA2 6, and ETH 7. On SDD, it reports ADE 8 and FDE 9, described as best among compared methods (Huang et al., 31 Mar 2025). Ablations isolate the role of TCF components. Removing 0 yields 1 on ETH-UCY and 2 on SDD; removing 3 yields 4 and 5; removing 6 yields 7 and 8, the largest drop; removing feature injection yields 9 and 0. Replacement experiments also show drops when substituting 1 with standard MSE or removing the motion-consistency selection in 2.
The method assumes piecewise-smooth pedestrian motion, directional continuity between observed history and short-term future, and comparable acceleration patterns between history and near future. Its limitations follow directly from those assumptions. Velocities and accelerations are unnormalized by 3, so scale depends on dataset units and cross-scene calibration may be needed for deployment. Directional consistency relies on a global historical direction and may be suboptimal for highly nonstationary cases such as abrupt U-turns immediately after the observation window. Acceleration similarity uses only mean and variance, so complex multimodal or non-Gaussian acceleration patterns may not be fully captured. Extreme, rare behaviors or interaction-dominated maneuvers can still challenge the priors, although the paper states that the self-supervised mechanism mitigates long-tail issues by focusing on physically plausible trends rather than purely regressing positions.
Within the paper’s own synthesis, TCF are “physics-informed consistency losses akin to kinematic continuity constraints widely used in trajectory forecasting,” but they differ from pure supervised position regression by adding self-supervised structure through internal consistency between states (Huang et al., 31 Mar 2025). A plausible broader implication is that the label “trajectory consistency function” has become a cross-domain design pattern rather than a single fixed object: in diffusion distillation, it denotes solver-composed mappings that preserve PF-ODE trajectories segmentwise (Ren et al., 2024), and in generalized consistency trajectory models it denotes a learned time-agnostic mapping 4 that remains invariant along ODE trajectories (Kim et al., 2024). In the pedestrian-forecasting setting, however, TCF are specifically the coupled scoring rules and losses that connect position, velocity, and acceleration through finite-difference kinematics, physics-based trend selection, and cross-stream self-supervision.