Comparisons / LightGCN vs GraphSAGE Recommender
LightGCN vs GraphSAGE Recommender
A stripped graph convolution against a sampled one.
GraphSAGE Recommender has 70M fewer parameters than LightGCN: 8 layers added, 12 removed, 1 changed.
GraphSAGE Recommender
- Layers
- 8
- Parameters
- 263K
- Input
- 128
- Output
- 128 × 64
- Forward-passes
- yes
- Est. train cost
- $0.042
The deltas
Every number is GraphSAGE Recommender relative to LightGCN.
Which GPUs each one fits
Each side is measured at its own declared input (1 against 128). Both columns are right about their own model; the difference between them is not a fact about the designs.
| GPU | LightGCN | GraphSAGE Recommender |
|---|---|---|
| T4 16GB | fits | fits |
| A100 40GB | fits | fits |
| H100 80GB | fits | fits |
Layer by layer
Aligned in topological order. 1 of 22 rows are the same layer with the same parameters.
Hide all 22 rows
| LightGCN | GraphSAGE Recommender | ||||||
|---|---|---|---|---|---|---|---|
| Layer | Params | Output | Layer | Params | Output | ||
| 1 | removed | User ID Input | 1 | — | |||
| 2 | changed shape | Item ID Input | 1 | Node Features Input | 128 | ||
| 3 | removed | E_user(0) Embedding | 6.4M | 1 × 64 | — | ||
| 4 | removed | E_item(0) Embedding | 64M | 1 × 64 | — | ||
| 5 | removed | GraphConv(1) Graph Conv | 4.2K | 1 × 64 | — | ||
| 6 | removed | GraphConv(1) Graph Conv | 4.2K | 1 × 64 | — | ||
| 7 | removed | GraphConv(2) Graph Conv | 4.2K | 1 × 64 | — | ||
| 8 | removed | GraphConv(2) Graph Conv | 4.2K | 1 × 64 | — | ||
| 9 | removed | GraphConv(3) Graph Conv | 4.2K | 1 × 64 | — | ||
| 10 | removed | GraphConv(3) Graph Conv | 4.2K | 1 × 64 | — | ||
| 11 | removed | Layer Combine (mean) Mean | 64 | — | |||
| 12 | removed | Layer Combine (mean) Mean | 64 | — | |||
| 13 | removed | Dot Score Matmul | 64 | — | |||
| 14 | added | — | SAGE Layer 1 Graph SAGE | 66K | 128 × 64 | ||
| 15 | added | — | ReLU Relu | 128 × 64 | |||
| 16 | added | — | Dropout Dropout | 128 × 64 | |||
| 17 | added | — | SAGE Layer 2 Graph SAGE | 131K | 128 × 64 | ||
| 18 | added | — | ReLU Relu | 128 × 64 | |||
| 19 | added | — | Dropout Dropout | 128 × 64 | |||
| 20 | added | — | SAGE Layer 3 Graph SAGE | 66K | 128 × 64 | ||
| 21 | added | — | LayerNorm Layer Norm | 256 | 128 × 64 | ||
| 22 | same | Score Output | 64 | Node Embedding Output | 128 × 64 | ||
What this is not
- The two are priced at different declared inputs (1 against 128), so memory, cost and GPU fit are each right about their own model and are not a comparison between them. The layer and parameter deltas are unaffected.
- Parameter counts are derived from the graph, not read from a checkpoint. They are exact for a graph that is fully specified and approximate for one that is not.
- Cost and GPU fit are estimates from the graph under one set of assumptions, not measurements of a run.
Take it further
Open either graph in the editor, change it, and check it again: LightGCN · GraphSAGE Recommender
Compare any two models of your own, including anything on Hugging Face: the comparison tool.
Machine-readable: this page as markdown ·
the pair index ·
POST https://www.neurarch.com/api/v1/plan for a graph of your own.