How erickdesturi028/network-world-model works
This repository is a predictive network-threat monitor for financial infrastructure. Its core workflow turns packet or flow telemetry into state sequences, forecasts threat risk with an LSTM, and presents results to SOC users. It also supports offline historical analysis, model training and evaluation, and live alert/report features. The live dashboard excerpt is partial, so some live scoring-to-alert wiring is documented or implied rather than fully visible; those links are marked dashed where needed.
Main entry points: app.py Historical Dashboard · train.py Model Training · evaluate.py Model Evaluation · app_live.py Live Dashboard
Components 14
Telemetry Ingestion
- Flow Parser
src/ingestion/flow_parser.py - State Builder
src/ingestion/state_builder.py - Sequence Builder
src/ingestion/sequence_builder.py - Live Packet Buffer
src/ingestion/live_stream.py
Forecasting Model
- LSTM World Model
src/models/lstm_world_model.py - Pretrained Weights
models/lstm_world_model.pth
SOC Monitoring
- Historical Dashboard
app.py - Live Dashboard
app_live.py - Alerts and Reports
app_live.py
Model Lifecycle
- Model Training
src/models/train.py - Model Evaluation
src/models/evaluate.py
Other components
- SOC Analyst
- Live Network Traffic
- Historical Flow CSV
Connections 23
- SOC Analyst → Historical Dashboard: selects history
README.md - Historical Flow CSV → Flow Parser: provides flows
README.md - Historical Dashboard → Flow Parser: parses flows
app.py - Historical Dashboard → State Builder: builds states
app.py - Historical Dashboard → Sequence Builder: builds windows
app.py - Historical Dashboard → LSTM World Model: forecasts risk
app.py - Historical Dashboard → SOC Analyst: shows risk and XAI
app.py - Live Network Traffic → Live Dashboard: supplies packets
README.md - Live Dashboard → Live Packet Buffer: processes packets
app_live.py - Live Dashboard → LSTM World Model: scores sequences
app_live.py - Live Dashboard → Alerts and Reports: updates alerts
app_live.py - Alerts and Reports → SOC Analyst: presents warnings
README.md - SOC Analyst → Live Dashboard: starts monitoring
README.md - Model Training → Flow Parser: parses flows
src/models/train.py - Model Training → State Builder: builds states
src/models/train.py - Model Training → Sequence Builder: builds windows
src/models/train.py - Model Training → LSTM World Model: trains model
src/models/train.py - Model Training → Pretrained Weights: saves weights
src/models/train.py - Model Evaluation → Flow Parser: parses flows
src/models/evaluate.py - Model Evaluation → State Builder: builds states
src/models/evaluate.py - Model Evaluation → Sequence Builder: builds windows
src/models/evaluate.py - Model Evaluation → Pretrained Weights: loads weights
src/models/evaluate.py - Model Evaluation → LSTM World Model: evaluates model
src/models/evaluate.py