How melifluos/subgraph-sketching works
subgraph-sketching is a graph link-prediction research package: it prepares graph data and supervision edges, builds either hashed link features or SEAL enclosing-subgraph examples, trains prediction models, and evaluates link scores. It also includes a separate heuristic-scoring experiment path and documents ELPH and scalable BUDDY as core approaches. The graph follows documented workflow and source-index references; unsampled internals are not treated as inspected, so uncertain connections are omitted.
Main entry points: run.py Experiment runner · data.py Dataset and splits · run_heuristics.py Heuristic experiments · inference.py Batch inference
Components 19
Experiment workflow
- Experiment runner
src/runners/run.py - Dataset and splits
src/data.py - Training loop
src/runners/train.py - Batch inference
src/runners/inference.py - Shared utilities
src/utils.py
Graph features
- Hashed link data
src/datasets/elph.py - Subgraph sketches
src/hashing.py - Link heuristics
src/heuristics.py - SEAL subgraphs
src/datasets/seal.py - Subgraph labeling
src/labelling_tricks.py - Largest component
src/lcc.py
Prediction models
- ELPH and BUDDY
src/models/elph.py - GNN layers
src/models/gnn.py - SEAL GNNs
src/models/seal.py - TransX model
src/models/transx.py
Scoring and tracking
- LP metrics
src/evaluation.py - Heuristic experiments
src/runners/run_heuristics.py - Experiment tracking setup
src/wandb_setup.py
Other components
- Researcher
Connections 22
- Researcher → Experiment runner: configures and starts
README.md - Experiment runner → Dataset and splits: loads splits
src/runners/run.py - Experiment runner → Training loop: runs training
src/runners/run.py - Experiment runner → Batch inference: runs inference
src/runners/run.py - Experiment runner → ELPH and BUDDY: selects model
src/runners/run.py - Experiment runner → SEAL GNNs: selects model
src/runners/run.py - Dataset and splits → SEAL subgraphs: uses SEAL datasets
src/data.py - Dataset and splits → Hashed link data: uses hashed datasets
src/data.py - Dataset and splits → Largest component: uses component utility
src/data.py - Hashed link data → Subgraph sketches: computes sketches
src/datasets/elph.py - Hashed link data → Link heuristics: uses heuristic features
src/datasets/elph.py - SEAL subgraphs → Subgraph labeling: constructs labels
src/datasets/seal.py - ELPH and BUDDY → GNN layers: uses layers
src/models/elph.py - ELPH and BUDDY → Subgraph sketches: computes hashes
src/models/elph.py - SEAL GNNs → Subgraph labeling: uses label encodings
src/models/seal.py - Batch inference → LP metrics: evaluates predictions
src/runners/inference.py - Heuristic experiments → Dataset and splits: loads graph splits
src/runners/run_heuristics.py - Heuristic experiments → Link heuristics: scores candidate links
src/runners/run_heuristics.py - Heuristic experiments → LP metrics: evaluates scores
src/runners/run_heuristics.py - Experiment runner → Experiment tracking setup: configures tracking
src/runners/run.py - Experiment runner → Shared utilities: uses shared helpers
src/runners/run.py - Batch inference → Shared utilities: uses shared helpers
src/runners/inference.py