Length-Adaptive Hybrid GNN-Transformer Sequential Recommendation Architecture
About This Architecture
Length-adaptive hybrid architecture fuses Graph Convolutional Networks (GCN) and BERT4Rec Transformer for sequential recommendation. User sequences up to 200 items flow through shared 64-dimensional item embeddings into parallel paths: a 2-layer LightGCN encoder processing co-occurrence graphs (window=5, threshold=2) and a 2-block bidirectional Transformer with cloze masking. Adaptive fusion layer dynamically blends GCN and Transformer signals based on user history length—short sequences (≤10 items) weight GCN 70%, medium (10-30) blend equally, long (>30) favor Transformer 70%—before inner-product scoring against all items for top-K ranking. This architecture solves the cold-start versus long-tail problem by routing short-history users to graph structure and long-history users to sequential patterns, optimizing HR@K, NDCG@K, and MRR@K metrics. Fork this diagram on Diagrams.so to customize fusion thresholds, embedding dimensions, or propagation layers for your recommendation pipeline.
People also ask
How do you combine graph neural networks and transformers for sequential recommendation with varying user history lengths?
Use a length-adaptive fusion layer that dynamically blends LightGCN co-occurrence graph embeddings and BERT4Rec Transformer sequence embeddings based on user history length—short histories weight GCN 70%, long histories favor Transformer 70%—before inner-product scoring for top-K ranking.
- Domain:
- Ml Pipeline
- Audience:
- machine learning engineers building recommendation systems
Generated by Diagrams.so — AI architecture diagram generator with native Draw.io output. Fork this diagram, remix it, or download as .drawio, PNG, or SVG.