## 7 Conclusions  
This study addressed the fraud detection problem by proposing an algorithm based on a Temporal Graph Neural Network (TGNN) to detect digital fraud using data from the Moneypool platform. The TGNN framework incorporates a series of interaction events representing users registering cards, devices, and bank accounts, resulting in three distinct types of edges. Using these data, seven different graph combinations were constructed; the first three represent individual interaction events (card registration, device registration, and bank account registration), as shown in Table 3. The remaining four graphs are formed from the initial graphs by the aggregations of card-device, card-bank account, device-bank account, and card-device-bank account registrations. Class weighting was applied in the cross-entropy loss to address the class imbalance. The results were evaluated using the \(F_{1}\) score and AUC metric. The values obtained for the \(F_{1}\) score were moderate (Tables 5 and 8), suggesting that the class imbalance in the data might require additional considerations when using MPTGNN for this type of problem. This is likely because the \(F_{1}\) score depends on the balance between true and false positives, and the data in question have a significantly high class imbalance. In addition, Table 9 shows another set of metrics that confirms the class imbalance's influence on the results, and at the same time, it can be noticed that graphs with more structural information improve relevant metrics as the recall. Another factor that could influence the results for the \(F_{1}\) score is the limited number of features used; this study only considered basic features related to transactions and user behavior on the platform. However, it was observed that incorporating structural and temporal context enhances fraud detection, as metrics improve with the addition of more interaction events. This is particularly evident for the AUC values, which improve when more types of interaction events are included, yielding better results than graphs with a single event type. For completeness, another set of extended graphs was considered. These extended graphs contained more information about the number of features and events (Table 6). Experiments on these graphs also showed a better performance on metrics when adding more events, as well as when increasing the number of features. For both graph configurations (original and extended), the edge-to-vertex ratio (density of the graph) was computed. There is a positive correlation between the AUC and the edge-to-vertex ratio, i.e., when the density of the graph increases, the AUC increases linearly. This suggests that aggregating more structural information is synonymous with achieving better metric results. Figure 4: AUC vs. edge-to-vertex ratio for the graphs with 43 edge features and 118 edge features. The considered features are related to user behaviors and transaction information in the online payment platform. It can be seen that if the graph density increases, the AUC increases linearly. The coefficient of determination \(R^{2}\) is also reported. This also shows that aggregating more events (structural information) helps produce better metric results. To the best of our knowledge, this is the first work to address the fraud detection problem using an ETG and a TGN-type algorithm that compares different sets of events in a graph constructed primarily with information from Latin America. In addition, since Latin America is the region with the highest fraud rate in the world ([PERSON] et al., 2018), the results presented in this work can provide valuable insights into preventing this phenomenon in the area. Additionally, according to ([PERSON] et al., 2018), most works (and research groups) on fraud prevention have used public and private data from entities outside Latin America. It is important to note that while the algorithm considers three different types of edges (interaction events), it does not explicitly account for the graph's heterogeneity.