Length-Adaptive Hybrid GNN-Transformer Sequential Recommendation Architecture

general · sequence diagram.

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.

Length-Adaptive Hybrid GNN-Transformer Sequential Recommendation Architecture

Autoadvancedmachine-learningrecommendation-systemsgraph-neural-networkstransformersequential-modelinghybrid-architecture
Domain: Ml PipelineAudience: machine learning engineers building recommendation systems
0 views0 favoritesPublic

Created by

February 28, 2026

Updated

February 28, 2026 at 1:09 PM

Type

sequence

Need a custom architecture diagram?

Describe your architecture in plain English and get a production-ready Draw.io diagram in seconds. Works for AWS, Azure, GCP, Kubernetes, and more.

Generate with AI