How hhdo/tipnn works
TiPNN is a research implementation for temporal knowledge-graph reasoning. The main workflow loads timestamped triples, builds rolling history graphs, trains a temporal path neural network to score future links, and evaluates predictions with filtered ranking metrics. It also supports inductive evaluation using a model pretrained on a paired dataset, and pathview provides human-readable path interpretations. The README documents these capabilities; the supplied source excerpts are partial, so uncertain internal wiring is omitted.
Main entry points: main.py Training Runner · utils.py Graph and Ranking Utilities · inductive.py Inductive Runner · model.py TiPNN
Components 15
Training and Evaluation
- Training Runner
src/main.py - Run Configuration
src/config.py - Training and Loss
src/main.py - Filtered Evaluation
src/main.py - Model Checkpoint
src/main.py
Temporal Data
- Temporal Datasets
data - Dataset Reader
src/kgutil.py - Graph and Ranking Utilities
src/utils.py - History Graph
src/utils.py
Reasoning Model
- TiPNN
src/model.py - Temporal Aggregation
src/layers.py
Inductive and Path Analysis
- Inductive Runner
src/inductive.py - Path Interpretation
src/pathview.py - Pretrained Model
Other components
- Researcher
Connections 25
- Researcher → Training Runner: runs
- Researcher → Inductive Runner: runs
- Training Runner → Run Configuration: reads options
- Inductive Runner → Run Configuration: reads options
- Training Runner → Graph and Ranking Utilities: loads data
- Inductive Runner → Graph and Ranking Utilities: loads data
- Graph and Ranking Utilities → Dataset Reader: loads dataset
- Dataset Reader → Temporal Datasets: reads triples
- Training Runner → History Graph: builds history
- Inductive Runner → History Graph: builds history
- History Graph → Graph and Ranking Utilities: uses graph helpers
- Training Runner → Graph and Ranking Utilities: samples negatives
- Training Runner → TiPNN: scores triples
- Inductive Runner → TiPNN: scores triples
- TiPNN → Temporal Aggregation: aggregates messages
- Training Runner → Training and Loss: trains model
- Training and Loss → TiPNN: updates parameters
- Training and Loss → Graph and Ranking Utilities: synchronizes
- Training Runner → Filtered Evaluation: evaluates rankings
- Filtered Evaluation → Graph and Ranking Utilities: ranks predictions
- Training Runner → Model Checkpoint: saves and loads
- Inductive Runner → Pretrained Model: loads checkpoint
- Path Interpretation → Graph and Ranking Utilities: builds history and ranks
- Path Interpretation → TiPNN: scores and traces
- Researcher → Path Interpretation: requests interpretation