Introduction
Dynamic real-world systems, such as social networks and e-commerce platforms, are best represented as temporal graphs where interactions evolve over time. While existing temporal graph neural networks (TGNNs) attempt to capture these dynamics, they often overlook two critical aspects of temporal behavior: individual periodicity and combinatorial context.
Individual periodicity refers to the unique temporal habits of specific nodes (e.g., a user's daily coffee purchase vs. a monthly grocery trip). Combinatorial context suggests that a sequence of interactions occurring in close proximity often carries a collective semantic meaning that individual interactions do not (e.g., visiting a hot pot restaurant and a milk tea shop sequentially implies a "shopping mall" context).
The MERIT Framework
To address these limitations, we introduce MERIT (Multi-lEvel gRaph attentIon neTwork). MERIT utilizes a multi-level approach to learn node representations by integrating two novel components:
1. Personalized Time Encoding (PTE)
Traditional models often use a global, fixed mapping for time. In contrast, PTE adaptively embeds timestamps into a continuous high-dimensional space using a Fourier-series-inspired approach. Crucially, the coefficients of these periodic kernels are learned specifically for each node. This allows MERIT to capture the distinct, recurring patterns of individual entities within the network.
2. Continuous time and Context aware Attention (Coco-Attention)
Coco-Attention extends standard graph attention by incorporating both temporal information (via PTE) and the combinatorial context of a node's neighborhood. Instead of treating neighbors as independent entities, Coco-Attention employs recursive (LSTM) or convolutional aggregators to summarize the local neighborhood's recent history. This summary provides the context necessary to calculate more accurate attention weights for future link prediction.
Experimental Evaluation
MERIT was evaluated against ten state-of-the-art baselines, including TGAT, JODIE, and GAT, across four diverse datasets: Reddit, Wikipedia, MOOC, and LastFM. These datasets provide a range of interaction types and repetitive behavior rates (ARR).
The evaluation focused on two primary downstream tasks:
- Link Prediction: Predicting the likelihood of a future interaction between two nodes.
- Node Classification: Categorizing nodes based on their temporal interaction patterns.
Key Results
MERIT consistently outperformed all baselines across both transductive and inductive settings.
- Performance Gains: On the MOOC dataset, MERIT achieved a 4.52% improvement in Accuracy and a 9.02% increase in Average Precision over the strongest baseline. In node classification on Reddit, the model demonstrated a 5.91% lead in AUC.
- Efficiency and Convergence: Despite its multi-level complexity, MERIT exhibits superior training efficiency. Empirical results show that MERIT converges faster than standard models like TGAT while maintaining higher validation accuracy throughout the training process.
- Ablation Insights: Ablation studies confirmed the necessity of both PTE and Coco-Attention. Removing the personalization component or the context aggregation led to significant performance degradation, validating the multi-level representation strategy.
Conclusion
MERIT represents a significant advancement in temporal graph modeling by explicitly accounting for individual-level periodicity and group-level combinatorial context. By moving beyond "one-size-fits-all" temporal features, the model achieves state-of-the-art performance across various dynamic network tasks. Future work will explore automatic frequency learning for periodic kernels and the integration of Temporal Point Processes to further refine continuous-time modeling.
Summary updated