Why Freeze the Encoder? A Controlled Study of End-to-End Sequence-Graph Learning for User Behavior
Organizations: University of Illinois, Urbana-Champaign · Capital One · University of Maryland, College Park.
Abstract
Modeling user behavior couples two distinct signals: a per-user sequence of events and a persistent user-to-user relation graph. Standard pipelines preserve these native formats by combining them in two stages: a sequence encoder is pretrained, its per-user embeddings are frozen, and a graph model is trained on top to allow for cheap serving and cross-task reuse. We ask a simple question: does training the sequence and graph models end-to-end help, and if so, when? To isolate the impact of the training strategy, we hold a standard sequence-encoder-to-GNN pipeline fixed and vary only the optimization method; on Brightkite, a matched control that starts both pipelines from the same pretrained encoder and changes only whether it is updated attributes a 10.6-point MRR gain to end-to-end updating. Across relationship prediction and fraud detection on five real-world datasets, we find that the benefit of end-to-end training is conditional: it improves clearly over frozen two-stage pipelines on relationship prediction, where the relation graph appears to carry much of the signal, whereas gains shrink where the predictive signal is largely node-local (fraud detection), a regime in which a text-fed relational graph transformer achieves competitive results. Furthermore, recasting the data as a temporal graph yields inconsistent results compared to this native sequence-graph formulation. Ultimately, this work provides a controlled empirical account of when jointly training the two structures helps.
Figures & tables
| Dataset | # Users | # Rel. | # Events |
|---|---|---|---|
| Brightkite | 58,228 | 428,156 | 4,702,710 |
| Gowalla | 196,591 | 1,900,654 | 6,442,289 |
| A-Movies | 139,138 | 2,807,368 | 1,932,230 |
| A-Electronics | 254,064 | 657,050 | 2,281,128 |
| A-Clothing | 185,986 | 18,078 | 1,573,869 |
| Brightkite | Gowalla | Movies | Electronics | Clothing | ||||||
| Method | MRR | H@5 | MRR | H@5 | MRR | H@5 | MRR | H@5 | MRR | H@5 |
| Graph Only (Static Graph) | ||||||||||
| GCN | ||||||||||
| GAT | ||||||||||
| TFConv | ||||||||||
| Two-Stage (Static Graph + Sequence) | ||||||||||
| Amazon-Movies | Amazon-Electronics | Amazon-Clothing | ||||
| Method | Max F1 | PR AUC | Max F1 | PR AUC | Max F1 | PR AUC |
| Static Graph Methods | ||||||
| GCN | ||||||
| GAT | ||||||
| TFConv | ||||||
| Temporal Graph Methods | ||||||
| Training setup | MRR | Hits@1 | Hits@5 |
|---|---|---|---|
| MLM-pretrained frozen encoder GNN | |||
| Same checkpoint encoder fine-tuned with GNN | |||
| Random init. end-to-end ( Bridge ) |
| Cost | Pretrained + frozen | Pretrained + fine-tuned |
|---|---|---|
| MLM pretraining (one-time) | min | min |
| Embedding generation (one-time) | min | not required |
| Downstream training per epoch | min | min |
| Peak GPU memory | GiB | GiB |
Appendix figures & tables20 assets
Supplementary material from the paper’s appendix.
Appendix
| Formulation | User history | Relationship | E2E | Seq. | Best-fit setting |
|---|---|---|---|---|---|
| Temporal graph | • Timestamped edges • Per-node memory state | • Dynamic edge • E.g., A pays B | ✓ | • High-frequency peer-to-peer events • Relations form/dissolve over time | |
| RDL / Rel. graph transformer | • Neighborhood of child rows, e.g., transactions near a user | • Primary/foreign-key link • Fixed by the DB schema | ✓ | • Enterprise ML on relational DBs • Rich, multi-table schemas | |
| Sequence–graph (ours) | • Independent, ordered sequence • Per-user event tokens | • Separate static graph • Gates which sequences interact | ✓ | ✓ | • Dense histories + social structure, e.g., relationship prediction • Weaker if node-local ( Section 5.2 ) |
| Method | LR | BS |
|---|---|---|
| GAT | 0.001 | 4096 |
| GCN | 0.001 | 4096 |
| TFConv | 0.001 | 4096 |
| Method | LR | BS | Bert | Hidden |
|---|---|---|---|---|
| GAT + S | 0.001 | 4096 | 1x2 | 128 |
| GCN + S | 0.001 | 4096 | 1x2 | 128 |
| TFConv + S | 0.001 | 4096 | 1x2 | 128 |
| Method | LR | BS |
|---|---|---|
| DyRep | 0.001 | 4096 |
| TGN | 0.001 | 4096 |
| TCL | 0.001 | 1024 |
| NAT | 0.001 | 1024 |
| GraphMixer | 0.001 | 1024 |
| TPNet | 0.001 | 1024 |
| Method | Dataset | LR | BS | Bert | Hidden |
|---|---|---|---|---|---|
| Bridge -GCN | Brightkite | 0.0001 | 128 | 1x2 | 128 |
| Gowalla | 0.0001 | 32 | 1x2 | 128 | |
| Amazon’s | 0.0001 | 32 | 1x2 | 128 | |
| Bridge -GAT | Brightkite | 0.0001 | 128 | 1x2 | 128 |
| Gowalla | 0.0001 | 32 | 1x2 | 128 | |
| Amazon’s | 0.0001 | 32 | 1x2 | 128 |
| Method | LR | BS | Heads |
|---|---|---|---|
| GAT | 0.001 | 4096 | 2 |
| GCN | 0.001 | 4096 | – |
| TFConv | 0.001 | 4096 | 2 |
| Method | LR | BS | Heads |
|---|---|---|---|
| DyRep | 0.001 | 32768 | 2 |
| TGN | 0.001 | 32768 | 2 |
| TCL | 0.001 | 32768 | 2 |
| NAT | 0.001 | 32768 | 1 |
| GraphMixer | 0.001 | 32768 | 1 |
| TPNet | 0.001 | 32768 | 1 |
| Method | Dataset | LR | BS | Heads | Clf. | TF-L | TF-H | FFN | Drop. |
|---|---|---|---|---|---|---|---|---|---|
| GAT+GAT | Movies | 0.0003 | 512 | 1 | 2 | 2 | 4 | 512 | 0.2 |
| Electronics | 0.0003 | 512 | 1 | 2 | 2 | 4 | 256 | 0.2 | |
| Clothing | 0.0003 | 512 | 1 | 2 | 2 | 2 | 256 | 0.2 | |
| GCN+GCN | Movies | 0.0003 | 512 | – | 2 | 2 | 4 | 512 | 0.2 |
| Electronics | 0.0003 | 512 | – | 2 | 2 | 4 | 256 | 0.2 | |
| Clothing | 0.0003 | 512 | – | 2 | 2 | 2 | 256 | 0.15 |
| Brightkite | Gowalla | |||||||||
| Method | MRR | H@1 | H@3 | H@5 | H@10 | MRR | H@1 | H@3 | H@5 | H@10 |
| Graph Only (Static) | ||||||||||
| GCN | ||||||||||
| GAT | ||||||||||
| TFConv | ||||||||||
| Two-Stage (Static + Sequence) | ||||||||||
| Clothing | Electronics | |||||||||
| Method | MRR | H@1 | H@3 | H@5 | H@10 | MRR | H@1 | H@3 | H@5 | H@10 |
| Graph Only (Static) | ||||||||||
| GCN | ||||||||||
| GAT | ||||||||||
| TFConv | ||||||||||
| Two-Stage (Static + Sequence) | ||||||||||
| Amazon-Movies | |||||
| Method | MRR | Hits@1 | Hits@3 | Hits@5 | Hits@10 |
| Graph Only (Static) | |||||
| GCN | |||||
| GAT | |||||
| TFConv | |||||
| Two-Stage (Static + Sequence) | |||||
| Seed | Fine-tuned | Frozen | [95% CI] | |
|---|---|---|---|---|
| 0 | ||||
| 1 | ||||
| 2 | ||||
| mean std |
| Dataset | Overlap rate | MRR | Hits@1 | Hits@5 | Bridge MRR |
|---|---|---|---|---|---|
| Movies | – | ||||
| Electronics | – | ||||
| Clothing | – |
| PR-AUC gap | Max-F1 gap | |||
|---|---|---|---|---|
| Seed | [95% CI] | [95% CI] | ||
| 0 | ||||
| 1 | ||||
| 2 | ||||
| mean std | ||||
| Brightkite | Gowalla | Movies | Electronics | Clothing | ||||||
| Method | MRR | H@5 | MRR | H@5 | MRR | H@5 | MRR | H@5 | MRR | H@5 |
| Static Graph Methods | ||||||||||
| GCN | ||||||||||
| GAT | ||||||||||
| TFConv | ||||||||||
| Temporal Graph Methods After Conversion | ||||||||||
| Amazon-Movies | Amazon-Electronics | Amazon-Clothing | ||||
| Method | Max F1 | PR AUC | Max F1 | PR AUC | Max F1 | PR AUC |
| Static Graph Methods + Text Embedding | ||||||
| GAT | ||||||
| GCN | ||||||
| TFConv | ||||||
| Temporal Graph Methods After Conversion | ||||||
| # TF Layers | MRR | Epoch Time (min) | Rel. Epoch Time |
|---|---|---|---|
| 1 | 0.96 | ||
| 2 | 1.00 | ||
| 4 | 1.08 |
| # Neighbors | MRR | Time (min) | Rel. Time |
|---|---|---|---|
| 2 | 0.09 | ||
| 5 | 0.31 | ||
| 10 | 1.00 | ||
| 15 | 1.29 |
| Dataset | Variant | MRR | Time (min) | Rel. Time |
|---|---|---|---|---|
| Brightkite | With relational MP | 1.00 | ||
| No relational MP | 0.03 | |||
| Gowalla | With relational MP | – | – | |
| No relational MP | – | – |