Manuscript Offprint
arXiv:2609.10806TrajFusionNet+: Transformer-Based Prediction of Pedestrian Crossing Intention via Fusion of Trajectory Representations and Scene Graphs
François G. Landry and Moulay A. Akhloufi
Perception, Robotics and Intelligent Machines Research Group (PRIME)
Department of Computer Science, Université de Moncton, Canada
{efl7126, moulay.akhloufi}@umoncton.ca
Abstract—The pedestrian crossing intention task involves predicting whether pedestrians are likely to cross the road from the point of view of an autonomous vehicle. We introduce TrajFusionNet+, a novel transformer-based model for pedestrian crossing intention prediction. TrajFusionNet+ combines sequential and visual representations of pedestrian trajectory with a graph-based representation of the scene context in order to predict pedestrian crossing intention. The proposed architecture builds upon our previous model, TrajFusionNet, and comprises three branches: a Sequence Attention Module (SAM), which processes a sequential representation of past and predicted pedestrian trajectories; a Visual Attention Module (VAM), which utilizes a visual representation of the pedestrian trajectories by overlaying observed and predicted bounding boxes onto scene images; and a Graph Attention Module (GAM), which extracts pedestrian-centric graphs from segmented scene images and captures the relational dependencies between pedestrians and traffic elements. TrajFusionNet+ achieves improved state-of-the-art performance on the two most widely used pedestrian crossing intention datasets, PIE and JAAD. Furthermore, we introduce a new evaluation protocol in which models are trained jointly on the PIE and JAAD datasets but evaluated separately on each. Under this setting, TrajFusionNet+ demonstrates superior generalization compared to existing approaches .
Index Terms—pedestrian crossing intention, transformer, computer vision, deep learning, autonomous driving
I. INTRODUCTION
Understanding pedestrian behavior is a critical component of ensuring safety in autonomous driving systems. Although progress has been made in pedestrian detection and in recognizing when pedestrians are actively crossing, predicting future actions remains challenging. Pedestrian behavior is highly dynamic, shaped by interactions with other road users as well as the surrounding environmental context [1]. From an ego-vehicle perspective, occlusions from other pedestrians, vehicles, and infrastructure further complicate the task [2]. Despite these difficulties, predicting crossing intention is vital for enabling autonomous vehicles to brake or reroute proactively in urban environments.
Multiple recent models achieve strong results on datasets such as PIE [3] and JAAD [4]. However, many of these models have been shown to exhibit substantial overfitting in cross-dataset evaluation scenarios when trained on one dataset and evaluated on another [5]. The prevailing practice in the literature has been to report results on multiple datasets, but typically by training and testing on the same dataset. This approach can inflate reported performance and does not reflect real-world deployment scenarios in autonomous vehicles, where models are generally not retrained for each environment.
In this work, we introduce TrajFusionNet+, a novel model for pedestrian crossing intention prediction that achieves state-of-the-art performance while demonstrating improved generalizability when compared to prior models. TrajFusionNet+ builds upon our previous architecture, TrajFusionNet [6]. The proposed architecture comprises three branches: (1) a Sequence Attention Module (SAM), which processes a sequential representation of past and predicted pedestrian trajectories and vehicle speed; (2) a Visual Attention Module (VAM), which utilizes a visual representation of the pedestrian trajectories by overlaying observed and predicted bounding boxes onto scene images; and (3) a Graph Attention Module (GAM), which extracts pedestrian-centric graphs from segmented scene images and explicitly models spatial relationships between pedestrians and traffic elements.
The GAM branch is a new addition in TrajFusionNet+ and is based on the TokenGT graph transformer [7] to process pedestrian-centric graphs, which we show to outperform a graph convolutional network baseline within our model. Another enhancement over the previous TrajFusionNet model is the modeling of temporal dependencies in the VAM branch through an encoder-only transformer operating on features extracted from the visual scene context at different timesteps. TrajFusionNet+ achieves improved state-of-the-art performance on the two most widely used pedestrian crossing intention datasets, PIE and JAAD. Additionally, we propose a new evaluation protocol for pedestrian crossing intention prediction, where models are trained jointly on the PIE and JAAD datasets and evaluated separately on each. This protocol shows superior generalization of TrajFusionNet+ compared to existing state-of-the-art methods.
Many approaches in the literature address the pedestrian intention problem by modeling sequential features (such as
The source code is publicly available at: https://github.com/fglandry/TrajFusionNetPlus pose keypoints, bounding boxes, and vehicle speed) using RNN- or transformer-based architectures. Incorporating multiple modalities generally improves performance but often increases inference time. These approaches include LSOP-Net [9], a multimodal RNN with temporal attention, and PedFormer [10], which captures dependencies between modalities with early multi-head cross-attention. Vision transformers have also been applied to pedestrian intention prediction by leveraging self-attention over image patches [11].
Graph-based methods have also shown strong performance by modeling interactions through scene graphs. Most methods use graph convolutional networks (GCNs) to learn from spatial or spatiotemporal relationships [12, 13]. Other methods apply GCNs to pose keypoints [14, 15, 16]. In PedAST-GCN, Ling et al. [17] employ graph representations that integrate bounding box and vehicle speed modalities alongside pose keypoints into GCN layers, followed by attention layers.
TrajFusionNet+ builds on our earlier TrajFusionNet architecture [6], enhancing its two core components: the Sequence Attention Module (SAM) and the Visual Attention Module (VAM). In the original TrajFusionNet, the SAM branch uses an encoder–decoder transformer to predict future trajectories and vehicle speed, which are subsequently fed into an encoder-only transformer. The VAM branch processes scene images overlaid with observed and predicted bounding boxes using Visual Attention Networks (VANs) [18]. Outputs from the VAM and SAM branches are passed through projection layers and then combined via dense layers in a late-fusion fashion.
III. METHOD
A. Problem Formulation
The problem at hand consists of predicting whether each detected pedestrian in a video sequence will initiate a crossing action within a specific future window, based on a set of observation frames. The pedestrian crossing intention problem is formulated as a binary classification task at time t, where the crossing action is predicted for pedestrian i given previous observations :
We follow the benchmark parameters proposed by Kotseruba et al. [19] and predict whether the pedestrian will cross between 1 and 2 seconds after time t.
B. Input Modalities
Our model uses three input modalities: a sequence of pedestrian bounding boxes, a sequence of vehicle speeds, and a sequence of scene images. Accordingly, is composed of three tensors: , the bounding box sequence, , the vehicle speed sequence, and , the scene video sequence. Each bounding box consists of four values: the and coordinates of its top-left and bottom-right corners. Vehicle speed is treated differently depending on the dataset used. For the PIE dataset [3], we use the raw speed values directly. For the JAAD dataset [4], which provides only categorical speed labels, we encode them ordinally as follows: : stopped, 1: decelerating, 2: moving slow, 3: moving fast, 4: accelerating}.
C. Architecture
The proposed architecture is illustrated in Figure 1. It consists of three branches: a Sequence Attention Module (SAM), which learns from sequential representations of trajectories; a Visual Attention Module (VAM), which processes video data; and a Graph Attention Module (GAM), which explicitly models spatial relationships between traffic elements through pedestrian-centric graphs. The outputs of these three branches are combined using a late-fusion approach via a dense layer.
Sequence Attention Module (SAM): The SAM branch closely follows the architecture proposed in the original TrajFusionNet model [6]. Its role is to extract insights by applying an attention mechanism to the sequential representation of modalities, including past and predicted pedestrian coordinates and vehicle speed, as well as the graph encodings produced by the newly introduced GAM module. The SAM branch consists of two transformer blocks. The first is an encoder-decoder transformer that performs trajectory prediction, estimating future pedestrian bounding boxes and vehicle speed. It is implemented as a non-autoregressive encoder-decoder transformer, as in the original TrajFusionNet model [6]. It takes as input , which consists of the past observed pedestrian bounding boxes and vehicle speed, without the graph encodings produced by the GAM branch. The prediction spans the next 60 timesteps, up to 2 seconds after time t.
The resulting trajectory prediction tensor, , does not contain the graph encodings produced by the GAM branch; in order to concatenate it with the past trajectory tensor, , we simply append to the former an empty tensor, . Thus, the input tensor to the transformer encoder, , is obtained as follows:
The resulting tensor is fed to the input of an encoder-only transformer whose task is to output an encoding to be used for classification. A final projection layer is added at the end of the SAM branch.
Graph Attention Module (GAM): The role of the GAM branch, illustrated in Figure 2, is to explicitly model relationships between traffic elements through a pedestrian-centric graph representation, thereby capturing the relational structure of the scene beyond the visual representations learned by the Visual Attention Module (VAM). The GAM branch takes as input a video sequence of ego-vehicle scene images, , extracts pedestrian-centric graphs at selected timesteps, and produces graph encodings using a TokenGT graph transformer [7]. These sequential encodings, , are then passed to the encoder transformer in the SAM branch.
In the first part of the GAM branch, for selected timesteps, we extract a pedestrian-centric undirected graph (following a

Fig. 1. TrajFusionNet+ architecture. The model comprises three branches: a Sequence Attention Module (SAM), a Visual Attention Module (VAM), and a Graph Attention Module (GAM). The SAM branch uses an encoder-decoder transformer to predict future pedestrian trajectories and vehicle speed; these predictions are then passed to an encoder-only transformer along with past trajectories and GAM features. The GAM branch extracts pedestrian-centric graph encodings at four timesteps using a TokenGT transformer. The VAM branch applies Visual Attention Networks (VANs) [18] to scene images at the same timesteps, overlaid with observed and predicted bounding boxes, followed by temporal modeling using an encoder transformer. Finally, the outputs from the SAM and VAM branches are projected and fused via late fusion.
star topology) in which the central node represents the target pedestrian and the other nodes correspond to traffic elements in the scene. These nodes are obtained from segmentation maps produced by SegFormer [20]. Node features are computed using either the centroid or the closest coordinate (to the target pedestrian) of pixel blobs exceeding a size threshold. Table I lists the extracted traffic elements and describes how their features are computed.
For each node, the 2D and coordinates are extracted and normalized by the image width and height. For each edge, the distance and angle relative to the target pedestrian are computed, yielding a graph encoding tensor comprising 8 nodes, 7 edges, and 2 features per node/edge.
To learn from the generated pedestrian-centric graphs, we employ the Tokenized Graph Transformer (TokenGT) proposed by Kim et al. [7] instead of traditional graph neural networks. TokenGT is a pure Transformer architecture that represents both nodes and edges as tokens, enabling self-attention to operate directly over the graph structure. TokenGT creates token-wise embeddings composed of node identifiers and type identifiers. Unlike conventional message- passing graph neural networks, whose information exchange is typically constrained by the graph's connectivity, TokenGT also allows self-attention to model dependencies between
TABLE I NODES EXTRACTED FROM THE SCENE SEGMENTATION MAP FOR PEDESTRIAN-CENTRIC GRAPH CONSTRUCTION
| Node | Node Name | Node Description | Connected To |
|---|---|---|---|
| Target pedestrian | Centroid of pedestrian for which we predict crossing or no crossing | ||
| Pedestrian 1 | Centroid of largest non-target pedestrian detected in the scene | ||
| Pedestrian 2 | Centroid of second-largest non-target pedestrian detected in the scene | ||
| Road 1 | Centroid of road area | ||
| Road 2 | Closest coordinate of road area to target pedestrian | ||
| Sidewalk | Closest coordinate of sidewalk area to target pedestrian | ||
| Vehicle 1 | Centroid of largest vehicle detected in the scene | ||
| Vehicle 2 | Centroid of second-largest vehicle detected in the scene |

Fig. 2. Architecture of the Graph Attention Module (GAM)
arbitrary pairs of nodes and edges. This enables the model to capture potentially relevant interactions that are not explicitly represented in the pedestrian-centric graph, such as secondary interactions between non-target pedestrians.
The node identifiers are orthonormal embeddings used to represent the connectivity structure given in the input graph. For a given input graph , node-wise orthonormal vectors are produced. Node identifiers are then obtained as follows [7]:
• For each node , the node identifier is obtained by concatenating the same orthonormal vector corresponding to the node: .
• For each edge , the node identifier is obtained by concatenating the orthonormal vectors corresponding to each node forming the edge: .
Kim et al. [7] propose to obtain the orthonormal vectors by computing the Laplacian eigenvectors obtained from the eigendecomposition of the graph Laplacian matrix. For the pedestrian-centric graph structure used in TrajFusionNet+, the Laplacian eigenvectors simply become the canonical basis of .
The second component of token-wise embeddings consists of type identifiers, which are trainable embeddings that encode whether a token is a node or an edge [7]. For a given input graph , a parameter matrix is trained, allowing to obtain two embeddings and for nodes and edges respectively. Type identifiers are obtained as follows:
• For each node , the type identifier is .
• For each edge , the type identifier is .
Node identifiers P and type identifiers E are projected into the token dimension d. They are then added to token embeddings at the input of the transformer:
where is the input sequence to the transformer, corresponds to the original token embeddings, corresponds to the node identifiers and corresponds to the type identifiers. Positional encodings are not used.
In TrajFusionNet+’s GAM branch, TokenGT token-wise embeddings are fed into a standard encoder-only transformer. A single instance of this transformer is shared and applied to the graph encoding tensors ( ) obtained at selected timesteps. In our implementation, we apply the transformer to four evenly spaced timesteps during the observation period: , , , and . We observed that this reduces the number of segmentation maps generated, saving inference time without significantly affecting performance. To obtain encodings of length , we duplicate the encodings obtained at selected timesteps along the time dimension. The resulting output from the GAM branch, , is then used as input to the SAM branch.
Visual Attention Module (VAM): The role of the VAM branch is to extract insights by applying the attention mechanism to visual representations of the pedestrian trajectories as well as the surrounding contextual scene over time. It follows the architecture of the original TrajFusionNet model [6], but incorporates an additional encoder-only transformer to capture temporal dependencies between visual encodings. The VAM branch is composed of four Visual Attention Network (VAN) instances [18], applied to scene images at timesteps , , , and . As in the GAM branch, using four timesteps strikes a balance between inference time and predictive performance, as increasing the number of timesteps beyond this yields minimal improvement but increases inference time significantly. The VAN network [18] is based on large kernel attention (LKA), which combines the advantages of convolution, such as the ability to capture local structures, with the advantages of self-attention, notably the capacity to model long-range dependencies. In pedestrian crossing intention prediction, local cues such as pedestrian appearance and orientation can be important for understanding behavior, while long-range dependencies may arise from interactions between pedestrians and vehicles that are spatially distant in the ego view.
Each VAN processes a scene image augmented with the pedestrian’s observed and predicted bounding boxes, enabling the model to relate the pedestrian’s trajectory to its surrounding context. Bounding boxes are drawn only on two color channels (green and blue in the RGB image) so that the original pedestrian appearance remains available to the network. An example of a scene image augmented with trajectory bounding boxes is shown in Figure 3.
The outputs from the four sequential VAN networks are concatenated to form a tensor , where is the dimensionality of each VAN network's output. The tensor is then passed through an encoder-only transformer to capture temporal dependencies across the VANs' outputs. The transformer's output is subsequently fed into a projection

Fig. 3. Example of scene image augmented with rectangles corresponding to the observed and predicted pedestrian bounding boxes.
layer, producing the final output of the VAM branch.
Late Fusion: At the end of the TrajFusionNet+ network, the outputs from the Sequence Attention Module (SAM) and the Visual Attention Module (VAM) are merged in a late-fusion fashion using dense layers of sizes 80, 40 and 2.
D. Training and Model Settings
Modular Training: Given the modularity and relative size of our model, we adopt a staged training strategy in which each lower-level module is pretrained independently. Once trained, the weights of these lower-level modules are frozen, and subsequent modules are fine-tuned on top. During pretraining, each module is attached to a temporary classification head. This head is removed once the module is integrated into the full model.
Training Procedure and Learning Objectives: We first pretrain the trajectory prediction encoder-decoder transformer to predict bounding-box coordinates and vehicle speed for the next 60 timesteps. Training sequences are extracted using the same overlap factor as specified in the benchmark by Kotseruba et al. [19], yielding 49,527 sequences for PIE. The model is trained with a mean squared error (MSE) loss over five z-score normalized values (four bounding-box coordinates and vehicle speed).
All remaining modules are trained as binary classifiers (crossing vs. non-crossing), using the dataset splits and evaluation settings proposed by Kotseruba et al. [19]. For PIE, this results in 4,770 training sequences. We use weighted cross-entropy (WCE) as the training objective to address class imbalance.
We pretrain the TokenGT graph transformer in the GAM branch, shared across selected timesteps, using a classification head consisting of an encoder-only transformer followed by two linear layers. The SAM branch's transformer encoder is then trained with the trajectory predictor and GAM branch frozen. The VAM branch is trained modularly by first training the VAN networks individually, followed by training the VAM transformer encoder on the resulting VAN feature sequences. Finally, we train TrajFusionNet+ end-to-end while freezing all SAM, GAM, and VAM branch weights. Only the projection layers of SAM and VAM and the final dense layers are updated.
TABLE II PARAMETERS USED FOR TRAINING EACH MODULE OF TRAJFUSIONNET+ DURING MODULAR TRAINING. MSE = MEAN SQUARED ERROR; WCE = WEIGHTED CROSS-ENTROPY.
| Module | Branch | Maximum Learning Rate | Epochs | Batch Size | Loss |
|---|---|---|---|---|---|
| Trajectory prediction enc-dec TF | SAM | 5e-5 | 40 | 64 | MSE |
| Encoder TF | SAM | 5e-6 | 60 | 16 | WCE |
| TokenGT graph TF | GAM | 5e-6 | 20 | 16 | WCE |
| VAN | VAM | 1e-4 | 15 | 16 | WCE |
| Encoder TF | VAM | 5e-6 | 10 | 16 | WCE |
| Remaining TrajFusionNet+ layers | — | 5e-6 | 60 | 8 | WCE |
Implementation and Training Parameters: For all experiments, we use consistent implementation and training settings across datasets. In the SAM branch's trajectory prediction transformer, we use 8 encoder layers, 8 decoder layers, 4 attention heads, , and 512-dimensional feedforward layers. All encoder-only transformers in TrajFusionNet+ (SAM, VAM, and TokenGT) use 6 layers, 8 attention heads, , and 1024-dimensional feed-forward layers. The four VAN networks follow the authors' VAN-B2 configuration [18]. Training parameters for each module are listed in Table II. All modules use linear learning rate decay with warmup; the table reports the peak learning rate. During the final modular training stage, the VAM projection layers' learning rate is set to zero for the first 15 epochs to facilitate more effective learning in the SAM branch.
IV. EVALUATION
A. Datasets
We evaluate our model on two benchmark datasets for pedestrian crossing intention prediction: JAAD (Joint Attention for Autonomous Driving) [4] and PIE (Pedestrian Intention Estimation) [3]. These two datasets are the most popular datasets used in the literature for the prediction of pedestrian crossing intention.
JAAD: A naturalistic driving dataset with 346 video clips of pedestrians prior to crossing. Recorded across North America and Europe under diverse weather conditions, it includes pedestrian bounding boxes and behavioral tags. Vehicle driver behavior is annotated, but numerical vehicle speed is not provided.
PIE: A larger dataset containing nearly ten times more frames, longer pedestrian clips, and richer ego-vehicle information, including speed, GPS, and heading angle. PIE offers more diversity in pedestrian appearance and behavior, but all recordings were in clear weather in Toronto, Canada.
Evaluation Procedure: We adopt the evaluation protocol introduced in the benchmark by Kotseruba et al. [19]. We use 0.53 seconds for the observation length (16 frames) and predict pedestrian crossing 1 to 2 seconds (30 to 60 frames) after the observation period. We train and test our model on two datasets: PIE and JAADall, where JAADall refers to the complete JAAD dataset. The results reported for each dataset correspond to the model trained and tested on that specific dataset. We provide results using the following common
TABLE III COMPARISON OF STATE-OF-THE-ART MODELS FOR THE PREDICTION OF CROSSING INTENTION ON THE PIE AND JAAD DATASETS. VALUES IN BOLD INDICATE THE BEST PERFORMANCE, WHILE UNDERLINED VALUES REPRESENT THE SECOND-BEST PERFORMANCE.
| Model | Year | PIE | JAADall | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Acc | AUC | F1 | P | R | Acc | AUC | F1 | P | R | ||
| SF-GRU [21] | 2020 | 0.82 | 0.79 | 0.69 | 0.67 | 0.70 | 0.84 | 0.84 | 0.65 | 0.54 | 0.84 |
| PCPA [19] | 2020 | 0.86 | 0.78 | 0.69 | 0.83 | 0.77 | 0.57 | 0.50 | 0.66 | ||
| TrouSPI-Net [22] | 2021 | 0.88 | 0.88 | 0.80 | 0.73 | 0.85 | 0.73 | 0.56 | 0.57 | 0.55 | |
| Yang et al. [23] | 2022 | 0.89 | 0.86 | 0.80 | 0.79 | 0.81 | 0.83 | 0.82 | 0.63 | 0.51 | 0.81 |
| Pedestrian Graph + [14] | 2022 | 0.89 | 0.90 | 0.81 | 0.83 | 0.79 | 0.86 | 0.65 | 0.58 | 0.75 | |
| Song et al. [13] | 2022 | 0.82 | 0.87 | 0.81 | 0.65 | 0.60 | 0.71 | ||||
| Bai et al. [24] | 2022 | 0.89 | 0.88 | 0.79 | 0.74 | 0.84 | 0.86 | 0.81 | 0.81 | ||
| DPCIAN [15] | 2023 | 0.91 | 0.88 | 0.83 | 0.83 | 0.79 | 0.77 | 0.59 | 0.61 | 0.58 | |
| PIT [25] | 2023 | 0.91 | 0.90 | 0.82 | 0.85 | 0.79 | 0.87 | 0.66 | 0.54 | ||
| PedFormer [10] | 2023 | 0.90 | 0.85 | 0.76 | 0.54 | 0.65 | 0.46 | ||||
| RAIDN [12] | 2024 | 0.89 | 0.85 | 0.82 | 0.89 | 0.80 | 0.66 | 0.65 | 0.72 | ||
| PedAST-GCN [17] | 2024 | 0.91 | 0.83 | 0.79 | 0.83 | 0.68 | 0.69 | ||||
| LSOP-Net [9] | 2025 | 0.89 | 0.87 | 0.81 | 0.80 | 0.82 | 0.85 | 0.75 | 0.58 | 0.56 | 0.61 |
| GTransPDM [16] | 2025 | 0.90 | 0.85 | 0.87 | 0.87 | 0.78 | 0.64 | 0.64 | 0.64 | ||
| TrajFusionNet [6] | 2026 | 0.85 | 0.88 | 0.85 | 0.72 | 0.67 | 0.78 | ||||
| TrajFusionNet+ | 2026 | 0.86 | 0.88 | 0.86 | 0.65 | 0.82 | |||||
TABLE IV COMPARISON OF STATE-OF-THE-ART MODELS TRAINED ON THE COMBINED PIE AND JAAD DATASETS. MODELS ARE EVALUATED ON THE COMBINED DATASETS AS WELL AS SEPARATELY ON THE INDIVIDUAL PIE AND JAAD DATASETS. VALUES IN BOLD INDICATE THE BEST PERFORMANCE, WHILE UNDERLINED VALUES REPRESENT THE SECOND-BEST PERFORMANCE.
| Model | Eval on Combined | Eval on PIE | Eval on JAADall | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Acc | AUC | F1 | P | R | Acc | AUC | F1 | P | R | Acc | AUC | F1 | P | R | |
| C3D [26] | 0.71 | 0.68 | 0.49 | 0.41 | 0.62 | 0.65 | 0.62 | 0.47 | 0.41 | 0.56 | 0.77 | 0.75 | 0.52 | 0.41 | 0.72 |
| SF-GRU [21] | 0.73 | 0.77 | 0.59 | 0.45 | 0.78 | 0.57 | 0.67 | 0.74 | 0.47 | 0.33 | 0.84 | ||||
| PCPA [19] | 0.76 | 0.77 | 0.60 | 0.48 | 0.79 | 0.76 | 0.70 | 0.76 | 0.50 | 0.35 | |||||
| Yang et al. [23] | 0.41 | 0.60 | 0.43 | 0.28 | 0.61 | 0.71 | 0.57 | 0.41 | 0.20 | 0.50 | 0.33 | 0.20 | |||
| TrajFusionNet [6] | 0.72 | 0.76 | 0.65 | ||||||||||||
| TrajFusionNet+ | 0.70 | 0.74 | 0.62 | ||||||||||||
classification metrics: accuracy (Acc), area under the ROC curve (AUC), F1-score (F1), precision (P), and recall (R).
B. Results
Table III presents a comparison of state-of-the-art (SOTA) models for pedestrian crossing intention prediction. Bold values indicate the best performance across models, while underlined values denote the second-best. TrajFusionNet+ achieves state-of-the-art results, obtaining the highest accuracy and F1-score on the PIE dataset (matching PedFormer [10]), and the second-best scores in both metrics on the JAADall dataset. Compared to its predecessor, TrajFusionNet [6], TrajFusionNet+ shows small improvements across several metrics. A key strength of the TrajFusionNet family lies in their consistent performance across datasets and evaluation metrics, unlike models such as PedFormer, which, despite strong results on PIE, obtains a low F1-score on JAADall. This consistency suggests that the TrajFusionNet models are less susceptible to overfitting on specific datasets.
C. Training on Data from Combined Datasets
To further assess TrajFusionNet+’s generalizability, we propose a protocol in which the model is trained on a combination of the PIE and JAADall datasets and evaluated on each dataset individually. To our knowledge, no prior work in pedestrian crossing intention prediction uses this evaluation setup, although Gesnouin et al. [5] propose a related approach where models are trained on one dataset and evaluated on another. We argue that evaluating models with fixed weights across different datasets provides a more realistic measure of generalizability, as it mirrors deployment scenarios in autonomous vehicles where models are typically not retrained for each environment. Because the JAADall dataset does not provide numerical vehicle speed values, we compare methods without using the vehicle speed as a modality.
Table IV compares state-of-the-art models using the proposed protocol, with training on combined PIE and JAADall data. Evaluation is performed on the combined datasets as well as separately on the individual PIE and JAADall datasets. Only models with publicly available, runnable code are included.
Overall, evaluation metrics are substantially lower than those in Table III, where models were trained and tested separately on each dataset. Although this difference can be partly attributed to the removal of the speed modality, the extent of the performance drop suggests potential overfitting, which was also observed by Gesnouin et al. [5]. Some methods, such as the RNN model by Yang et al. [23], perform poorly under this protocol. TrajFusionNet+ achieves the highest performance across most metrics when evaluated on the combined datasets. It outperforms all other models by a large margin on the PIE dataset and performs comparably to the previous TrajFusionNet, but still significantly better than other methods, on the JAADall dataset.
D. Inference Time
Table V presents a comparison of the inference times of TrajFusionNet+ and several other SOTA approaches. The inference times were measured on a consumer-grade GPU (NVIDIA GeForce RTX 3060). Only methods with publicly available source code were considered. Two types of inference time are reported: model-only (M) and model with data preprocessing included (M + D). Pedestrian detection and tracking are not included in D, as they are shared across all approaches compared.
Data preprocessing includes the time required to compute the input modalities required by each model, such as pose estimation and segmentation maps. For instance, PCPA [19] uses OpenPose [27] for pose estimation, which takes 13.99 ms to run on an RTX 3060 GPU. Pedestrian Graph+ [14] and Yang et al. [23] generate pose keypoints for each observation frame. These two approaches also use DeepLabV3 [28] to compute segmentation maps (one map for Pedestrian Graph+ and one per observation frame for Yang et al.). DeepLabV3 requires 13.95 ms to execute on the RTX 3060 GPU.
For TrajFusionNet+, we provide two implementations in Table V: the proposed model, which uses SegFormer [20] as the semantic segmentation backbone in the GAM module, and a lighter-weight implementation that uses DeepLabV3 instead. As shown in Table V, TrajFusionNet+ has a relatively large number of parameters (123.16M) and a model-only inference time (M) that is higher than that of other approaches. However, its total inference time including data preprocessing (M + D) stands at 197.24 ms, which is lower than that of the other approaches considered, except for the original TrajFusionNet. Replacing SegFormer with the lighter DeepLabV3 model further reduces the total inference time (M + D) by decreasing the inference time of each of the four semantic maps generated in the GAM module from 41.16 ms to 13.95 ms on the RTX 3060 GPU.
E. Ablation Study
We conducted an ablation study to assess the contribution of individual components within TrajFusionNet+ to the overall model performance. Table VI reports results for scenarios where specific modules were removed or altered.
Starting with the GAM branch, Scenario 1 removes the entire branch, which leads to a small but consistent reduction in performance across most metrics and datasets, showing the branch's importance. Scenario 2 replaces the TokenGT graph transformer with a baseline two-layer GCN, leading to a slight performance drop that shows the advantage of the transformer-based TokenGT for pedestrian-centric graph modeling. Scenario 3 involves replacing SegFormer, the semantic segmentation backbone in the GAM module, with the lighter-weight DeepLabV3 model [28], resulting in a small decrease on PIE but little change on JAADall.
TABLE V INFERENCE TIME OBTAINED BY STATE-OF-THE-ART MODELS AND THEIR RESPECTIVE NUMBER OF PARAMETERS. M REPRESENTS THE INFERENCE TIME OF THE MODEL ALONE, WHILE M + D REPRESENTS THE INFERENCE TIME OF THE MODEL COMBINED WITH DATA PREPROCESSING.
| Model | Inference time (ms) | Params (millions) | |
|---|---|---|---|
| M | M + D | ||
| PCPA [19] | 15.51 | 239.35 | 31.17 |
| Yang et al. [23] | 2.64 | 449.68 | 2.99 |
| Pedestrian Graph + [14] | 2.67 | 240.46 | 0.07 |
| TrajFusionNet [6] | 12.04 | 12.04 | 58.28 |
| TrajFusionNet+ with DeepLabV3 segmentation | 32.59 | 88.39 | 123.16 |
| TrajFusionNet+ with SegFormer segmentation (proposed model) | 32.59 | 197.24 | 123.16 |
For the VAM branch, Scenario 4 simplifies the module to a single VAN network, yielding a minor drop on PIE and a larger one on JAADall, indicating the value of temporal modeling. Scenario 5 removes the overlay of observed and predicted bounding boxes from the scene images, causing a small decrease on PIE and a substantial drop on JAADall, demonstrating the benefit of augmenting the visual input with trajectory information.
For the SAM branch, Scenario 6 removes the predicted trajectory tensor from the transformer input, producing a significant decrease on PIE but minimal change on JAADall. Scenario 7 excludes vehicle speed from the input modalities, leading to a noticeable decrease in performance across metrics on the PIE dataset, and a small decrease on the JAADall dataset.
CONCLUSION
In this work, we introduced TrajFusionNet+, a novel model for pedestrian crossing intention prediction that extends our earlier TrajFusionNet architecture. The model integrates three branches: a Sequence Attention Module for pedestrian trajectory modeling; a Visual Attention Module that utilizes a visual representation of the pedestrian trajectories by overlaying observed and predicted bounding boxes onto scene images; and a new Graph Attention Module that uses a TokenGT graph transformer to capture the relational dependencies between pedestrians and traffic elements. TrajFusionNet+ achieves improved state-of-the-art performance on the PIE and JAAD datasets. Additionally, we proposed a new evaluation protocol for pedestrian crossing intention prediction, where models are
TABLE VI ABLATION STUDY WHERE THE PROPOSED TRAJFUSIONNET+ ARCHITECTURE IS COMPARED WITH VARIOUS ARCHITECTURAL MODIFICATIONS.
| Scenario | Branch | PIE | JAADall | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Acc | AUC | F1 | P | R | Acc | AUC | F1 | P | R | |||
| base | TrajFusionNet+ architecture | — | 0.93 | 0.91 | 0.87 | 0.86 | 0.88 | 0.89 | 0.86 | 0.73 | 0.65 | 0.82 |
| 1 | Remove GAM branch | GAM | 0.92 | 0.90 | 0.86 | 0.87 | 0.85 | 0.89 | 0.85 | 0.72 | 0.65 | 0.80 |
| 2 | Replace TokenGT TF with GCN in GAM branch | GAM | 0.92 | 0.91 | 0.86 | 0.83 | 0.89 | 0.89 | 0.85 | 0.72 | 0.65 | 0.80 |
| 3 | Replace SegFormer with DeepLabV3 for semantic segmentation | GAM | 0.92 | 0.90 | 0.86 | 0.86 | 0.86 | 0.89 | 0.86 | 0.72 | 0.65 | 0.81 |
| 4 | Use a single VAN network in VAM branch instead of applying VANs sequentially | VAM | 0.92 | 0.91 | 0.86 | 0.84 | 0.89 | 0.89 | 0.84 | 0.70 | 0.65 | 0.76 |
| 5 | Remove bounding boxes from scene images | VAM | 0.92 | 0.91 | 0.87 | 0.85 | 0.89 | 0.87 | 0.80 | 0.64 | 0.60 | 0.69 |
| 6 | Remove trajectory prediction from SAM branch | SAM | 0.91 | 0.89 | 0.84 | 0.83 | 0.85 | 0.89 | 0.86 | 0.72 | 0.64 | 0.81 |
| 7 | Remove vehicle speed from input modalities | SAM | 0.90 | 0.86 | 0.81 | 0.87 | 0.76 | 0.88 | 0.86 | 0.71 | 0.61 | 0.84 |
trained jointly on the PIE and JAAD datasets and evaluated separately on each. This protocol showed an improved generalization capability of TrajFusionNet+ compared to existing state-of-the-art methods.
ACKNOWLEDGMENTS
This research was enabled in part by support provided by the Natural Sciences and Engineering Research Council of Canada (NSERC), funding reference number RGPIN-2024-05287.
REFERENCES
[1] L. G. Galvão and M. N. Huda, “Pedestrian and vehicle behaviour prediction in autonomous vehicle system—a review,” Expert Systems with Applications, vol. 238, p. 121983, 2023.
[2] C. Zhang and C. Berger, “Pedestrian behavior prediction using deep learning methods for urban scenarios: A review,” IEEE Transactions on Intelligent Transportation Systems, vol. 24, no. 10, pp. 10279–10301, 2023.
[3] A. Rasouli, I. Kotseruba, T. Kunic, and J. K. Tsotsos, “Pie: A large-scale dataset and models for pedestrian intention estimation and trajectory prediction,” in Proceedings of the IEEE/CVF International Conference on Computer Vision, 2019, pp. 6261–6270.
[4] A. Rasouli, I. Kotseruba, and J. K. Tsotsos, “Are they going to cross? a benchmark dataset and baseline for pedestrian crosswalk behavior,” in Proceedings of the IEEE International Conference on Computer Vision Workshops, 2017, pp. 206–213.
[5] J. Gesnouin, S. Pechberti, B. Stanciulescu, and F. Moutarde, “Assessing cross-dataset generalization of pedestrian crossing predictors,” in 2022 IEEE Intelligent Vehicles Symposium (IV). IEEE, 2022, pp. 419–426.
[6] F. G. Landry and M. A. Akhloufi, “Trajfusionnet: Pedestrian crossing intention prediction via fusion of sequential and visual trajectory representations,” Computer Modeling in Engineering & Sciences, 2026.
[7] J. Kim, D. Nguyen, S. Min, S. Cho, M. Lee, H. Lee, and S. Hong, “Pure transformers are powerful graph learners,” Advances in Neural Information Processing Systems, vol. 35, pp. 14582–14595, 2022.
[8] F.-G. Landry and M. A. Akhloufi, “Predicting pedestrian crossing intention in autonomous vehicles: A review,” Neurocomputing, vol. 618, p. 129105, 2025.
[9] H. Liu, C. Liu, F. Chang, Y. Lu, and M. Liu, “Long-short observation-driven prediction network for pedestrian crossing intention prediction with momentary observation,” Neurocomputing, vol. 614, p. 128824, 2025.
[10] A. Rasouli and I. Kotseruba, “Pedformer: Pedestrian behavior prediction via cross-modal attention modulation and gated multitask learning,” arXiv preprint arXiv:2210.07886, 2022.
[11] J. Lorenzo, I. P. Alonso, R. Izquierdo, A. L. Ballardini, A. H. Saz, D. F. Llorca, and M. A. Sotelo, “Capformer: Pedestrian crossing action prediction using transformer,” Sensors, vol. 21, no. 17, p. 5694, 2021.
[12] B. Yang, Z. Wei, C. Hu, Y. Cai, H. Wang, and H. Hu, “Real-time pedestrian crossing anticipation based on an action–interaction dual-branch network,” IEEE Transactions on Intelligent Transportation Systems, 2024.
[13] X. Song, M. Kang, S. Zhou, J. Wang, Y. Mao, and N. Zheng, “Pedestrian intention prediction based on traffic-aware scene graph model,” in 2022 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2022, pp. 9851–9858.
[14] P. R. G. Cadena, Y. Qian, C. Wang, and M. Yang, “Pedestrian graph+: A fast pedestrian crossing prediction model based on graph convolutional networks,” IEEE Transactions on Intelligent Transportation Systems, vol. 23, no. 11, pp. 21 050–21 061, 2022.
[15] B. Yang, Z. Wei, H. Hu, R. Wang, C. Yang, and R. Ni, “Dpcian: A novel dual-channel pedestrian crossing intention anticipation network,” IEEE Transactions on Intelligent Transportation Systems, vol. 25, no. 6, pp. 6023–6034, 2024.
[16] C. Xie, C. Lin, X. Zheng, B. Gong, and A. M. López, “Gtranspdm: a graph-embedded transformer with positional decoupling for pedestrian crossing intention prediction,” IEEE Signal Processing Letters, 2025.
[17] Y. Ling, Z. Ma, Q. Zhang, B. Xie, and X. Weng, “Pedastgcn: Fast pedestrian crossing intention prediction using spatial-temporal attention graph convolution networks,” IEEE Transactions on Intelligent Transportation Systems, vol. 25, no. 10, pp. 13 277–13 290, 2024.
[18] M.-H. Guo, C.-Z. Lu, Z.-N. Liu, M.-M. Cheng, and S.-M. Hu, "Visual attention network," Computational Visual Media, vol. 9, no. 4, pp. 733–752, 2023.
[19] I. Kotseruba, A. Rasouli, and J. K. Tsotsos, “Benchmark for evaluating pedestrian action prediction,” in Proceedings of the IEEE/CVF Winter Conference on Applications of Computer
Vision, 2021, pp. 1258–1268.
[20] E. Xie, W. Wang, Z. Yu, A. Anandkumar, J. M. Alvarez, and P. Luo, “Segformer: Simple and efficient design for semantic segmentation with transformers,” Advances in neural information processing systems, vol. 34, pp. 12077–12090, 2021.
[21] A. Rasouli, I. Kotseruba, and J. K. Tsotsos, “Pedestrian action anticipation using contextual feature fusion in stacked rnns,” arXiv preprint arXiv:2005.06582, 2020.
[22] J. Gesnouin, S. Pechberti, B. Stanciulcscu, and F. Moutarde, "Trouspi-net: Spatio-temporal attention on parallel atrous convolutions and u-grus for skeletal pedestrian crossing prediction," in 2021 16th IEEE International Conference on Automatic Face and Gesture Recognition (FG 2021). IEEE, 2021, pp. 01–07.
[23] D. Yang, H. Zhang, E. Yurtsever, K. A. Redmill, and U. Ozguner, “Predicting pedestrian crossing intention with feature fusion and spatio-temporal attention,” IEEE Transactions on Intelligent Vehicles, vol. 7, no. 2, pp. 221–230, 2022.
[24] J. Bai, X. Fang, J. Fang, J. Xue, and C. Yuan, “Deep virtual-to-real distillation for pedestrian crossing prediction,” in 2022 IEEE 25th International Conference on Intelligent Transportation Systems (ITSC). IEEE, 2022, pp. 1586–1592.
[25] Y. Zhou, G. Tan, R. Zhong, Y. Li, and C. Gou, “Pit: Progressive interaction transformer for pedestrian crossing intention prediction,” IEEE Transactions on Intelligent Transportation Systems, vol. 24, no. 12, pp. 14213–14225, 2023.
[26] D. Tran, L. Bourdev, R. Fergus, L. Torresani, and M. Paluri, "Learning spatiotemporal features with 3d convolutional networks," in Proceedings of the IEEE international conference on computer vision, 2015, pp. 4489–4497.
[27] Z. Cao, T. Simon, S.-E. Wei, and Y. Sheikh, “Realtime multiperson 2d pose estimation using part affinity fields,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2017, pp. 7291–7299.
[28] L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille, “Rethinking atrous convolution for semantic image segmentation,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2017, pp. 7268–7277.