How ml-on-structures/graph-lstm works
Graph-LSTM is a small Python machine-learning library, not a graph database or end-to-end graph ingestion service. Its documented prediction workflow unfolds a target node’s neighborhood into a tree, summarizes child sequences with level-specific LSTMs, and combines the root summary with target features in a DNN. It also provides standalone DNN and LSTM implementations and JSON serialization helpers. The README documents neighborhood unfolding, but the sampled code does not show a separate graph-unfolding implementation; the wrapper operates on tree instances.
Main entry points: multi_level_lstm.py Multi-level LSTM · mlslnn.py MLSLNN wrapper · json_plus.py JSON serialization · lstm.py Sequence LSTM
Components 8
Graph prediction
- Unfolded tree
multi_level_lstm.py - Multi-level LSTM
multi_level_lstm.py - MLSLNN wrapper
mlslnn.py - Node prediction
mlslnn.py
Neural models
- Sequence LSTM
lstm.py - Deep neural network
dnn.py
Serialization support
- JSON serialization
json_plus.py
Other components
- Prediction caller
Connections 10
- Prediction caller → Unfolded tree: unfolds neighborhood
README.md - Unfolded tree → Multi-level LSTM: provides tree
README.md - Multi-level LSTM → Sequence LSTM: uses per-level
multi_level_lstm.py - Multi-level LSTM → MLSLNN wrapper: supplies summary
mlslnn.py - MLSLNN wrapper → Multi-level LSTM: forwards tree
mlslnn.py - MLSLNN wrapper → Deep neural network: forwards features
mlslnn.py - MLSLNN wrapper → Node prediction: returns output
mlslnn.py - Deep neural network → JSON serialization: imports
dnn.py - Sequence LSTM → JSON serialization: imports
lstm.py - Multi-level LSTM → JSON serialization: uses storage
multi_level_lstm.py