Introduction
In dynamic systems such as social networks, e-commerce platforms, and academic collaborations, predicting future interactions—the "link prediction" problem—is a critical task. Traditional state-of-the-art models have increasingly relied on complex architectures featuring memory modules to store node history and aggregation modules to summarize local neighborhoods. However, a new approach called CRAFT (CRoss-Attention based Future Link Predictor on Temporal Graphs) challenges this paradigm by demonstrating that a minimalist architecture can outperform these heavyweights.
The Problem with Current Approaches
Most existing temporal graph learning models, such as TGN or DyGFormer, rely on two primary components:
- Memory Modules: These use RNNs or GRUs to compress a node's entire interaction history into a single vector.
- Aggregation Modules: These gather information from a node’s neighbors to create a representative embedding.
The authors of CRAFT identify two major flaws in these methods. First, many models lack unique node identifiers, making it difficult to distinguish between nodes with similar interaction patterns but different identities. Second, they often model source and target nodes in isolation, failing to account for the specific compatibility between a source's recent behavior and a candidate destination.
The CRAFT Architecture
CRAFT strips away the complexity of memory and aggregation modules, focusing instead on a streamlined pipeline built around two core concepts: unique identifiers and target-aware matching.
The model consists of several key components:
- Learnable Node Embeddings: CRAFT employs trainable embeddings that serve as unique IDs for every node. This provides the expressiveness needed to distinguish entities even when their structural patterns are identical.
- Target-Aware Cross-Attention: Instead of a static summary of history, CRAFT uses the candidate destination node as a query in a cross-attention mechanism. The source node’s $k$ most recent neighbors act as keys and values, allowing the model to directly evaluate the fit between the target and the source's recent activity.
- Temporal Encodings: To incorporate the temporal dimension, the model uses positional encodings for interaction order, elapsed time encodings (time since last activity), and repeat time encodings for recurring habits.
- Minimalist Predictor: The cross-attention output is processed by a simple Multi-Layer Perceptron (MLP) to determine link likelihood.
Key Insights and Ideas
A central contribution of this work is the shift toward target-conditioned modeling. While most models ask what a source node is likely to do next in general, CRAFT asks how well a specific target fits the source's current trajectory.
By using learnable embeddings as unique identifiers, CRAFT overcomes the "identity crisis" that limits models relying solely on structural features. Furthermore, by removing the hard-to-parallelize memory modules and computationally expensive aggregation steps, the authors achieved higher accuracy with a significantly smaller computational footprint.
Evaluation and Results
CRAFT was evaluated across 17 datasets, including the TGB-Seq and TGB benchmarks, as well as classic datasets like Wikipedia and Reddit.
- Superior Accuracy: CRAFT achieved state-of-the-art results on 10 out of 17 datasets. Notably, on the ML-20M dataset, it showed a 49% relative improvement over the best baseline.
- Efficiency: The model is remarkably fast. On the WikiLink dataset (34M edges), CRAFT was 1.5x faster than JODIE, the previous efficiency leader.
- Generalization: The target-aware matching mechanism allows CRAFT to generalize effectively to both recurring interactions and novel "unseen" edges.
Limitations and Future Work
While highly effective for link prediction, CRAFT is currently specialized for this task and does not support dynamic node classification, which typically requires persistent node states. Additionally, because it relies on learnable embeddings, it is primarily suited for transductive settings. Future research may explore continuous embedding updates via gradient descent to support inductive scenarios and a broader range of temporal graph tasks.
Summary updated