Traditional models of user behavior treat interactions—clicks, views, or searches—as a simple chronological chain. However, human intent is rarely linear. A user might click an item, return to a previous category, compare two products, and then finally redeem a voucher. When we force these complex, branching paths into a flat sequence, we lose the structural rationale behind the actions.
Researchers are increasingly moving toward representing user histories as directed graphs. By treating items or actions as nodes and transitions as edges, models can capture non-linear dependencies, recurring loops, and high-order relationships that linear architectures like RNNs or Transformers often overlook.
From Linear Chains to Behavioral Webs
The shift from sequences to graphs is driven by the realization that the order of events is often less important than the structure of the transitions. In session-based recommendation, for instance, Shoujin Wang and Longbing Cao note that graph-based representations effectively capture complex item transitions and repeat interactions that linear models fail to identify.
In a graph, a "revisit" to a previous item isn't just another step in a long chain; it is a cycle that reinforces the importance of a specific node. As Bo Huang argues in the development of UBER-GNN, this structural approach helps models distinguish between intentional navigation and stochastic session noise, providing a more robust understanding of how users compare items.
Capturing Structural Intent with GNNs
Once a session is represented as a graph, Graph Neural Networks (GNNs) can be used to extract "structural intent." Unlike a Transformer that looks at all items in a window equally, a GNN aggregates information from a node's immediate neighbors to understand its local context.
For example, the GC-SAN architecture proposed by Chengfeng Xu and Pengpeng Zhao uses GNNs to generate contextualized latent vectors for items based on their immediate transitions. This ensures that the representation of a "click" is informed by the specific path that led there. Similarly, Fengtong Xiao and colleagues demonstrated in DMBGN that modeling user-item-voucher interactions as a "satellite-like" graph captures the underlying rationale behind a purchase far better than flat sequences.
Heterogeneous Relationships and Multi-Behavior Paths
Real-world behavior involves different types of actions. A "purchase" carries more weight than a "view," yet they are inextricably linked. The "User-as-Graph" (UaG) framework by Chuhan Wu and Fangzhao Wu models users as personalized heterogeneous graphs. This allows the system to link related behaviors—like reading two different news articles—through shared semantic attributes like topics or entities, even if those actions occurred hours apart.
This multi-relational approach is also critical for predicting sparse target behaviors. Wei Zhang and Wen Wang developed MGNN-SPred, which uses a global multi-relational item graph to incorporate auxiliary behaviors (like clicks) to predict rare events (like purchases). By treating different actions as distinct edge types, the model learns how early browsing signals "flow" into final conversions.
Beyond Recommendation: UI and System Logs
The utility of graph-based behavioral modeling extends beyond e-commerce. In Human-Computer Interaction, Runsheng Zhang and Shixiao Wang have shown that representing user interactions and interface components as nodes in a directed graph allows for the capture of non-Euclidean dependencies, leading to higher accuracy in predicting user satisfaction.
Similarly, in system security, Hongyu Zhang and Yongzheng Xie use LogGD to transform linear event logs into directed graphs. This approach handles repetitive loops and branching logic in system execution more efficiently than linear models, as redundancy is encoded into edge weights rather than increasing the sequence length.
The Intuition: Why It Works
The core reason this direction succeeds is compression without information loss. A linear sequence of 100 clicks might contain only 5 unique items visited in a loop. A sequence model sees 100 steps; a graph model sees 5 nodes and a few weighted edges. By moving to a graph, we move from modeling the noise of the journey to modeling the topology of the intent. Whether predicting the next movie to watch or detecting a masquerader on a network, the structural relationships between actions prove to be more predictive than their simple chronological order.