A Graph Neural Network (GNN) implementation for process mapping and optimization in logistics and supply chain management, based on the framework proposed in "Process Is All You Need" by Somesh Misra and Shashank Dixit.
Pistology-GNN leverages the power of Graph Attention Networks (GAT) to model, analyze, and optimize complex process flows in logistics and supply chain operations. The model learns to understand process dependencies, resource constraints, and flow patterns to provide insights and optimization recommendations.
- Process Flow Modeling: Captures both sequential and parallel process flows
- Resource Optimization: Models resource requirements and capacity constraints
- Flow Analysis: Analyzes and optimizes material flow rates and transportation costs
- Performance Prediction: Predicts process throughput and identifies bottlenecks
- Scalable Architecture: Handles variable-sized process networks efficiently
The model implements a multi-layer Graph Attention Network with the following components:
-
Node Embedding Layer
- Transforms process attributes into high-dimensional feature space
- Captures process-specific characteristics
-
Graph Attention Layers
- Multiple GAT layers with residual connections
- Learns process dependencies and importance weights
- Aggregates information from connected processes
-
Prediction Layers
- Process-level predictions (throughput, resource utilization)
- Edge-level predictions (flow rates, transportation costs)
- Graph-level predictions (overall system performance)
- Process Time
- Resource Requirements
- Priority Level
- Capacity
- Target Throughput
- Flow Rate
- Distance
- Transportation Cost
# Clone the repository
git clone https://github.com/nezpik/Pistology-GNN.git
cd Pistology-GNN
# Install dependencies
pip install -r requirements.txt
# Create and process data
nodes_df, edges_df = create_sample_data()
data_processor = ProcessDataProcessor()
data = data_processor.process_raw_data(nodes_df, edges_df)
# Train the model
trainer = ProcessMappingTrainer()
trainer.train(train_dataset, val_dataset, test_dataset)
ProcessData
: Custom PyG data class for process graphsProcessDataset
: Dataset class for handling multiple process graphsProcessDataProcessor
: Handles data preprocessing and graph creation
ProcessMappingGNN
: Main GNN architecture- Node embedding layer
- Multiple GAT layers
- Process and edge prediction layers
ProcessMappingLoss
: Custom loss function combining:- Node-level loss for process attributes
- Edge-level loss for flow attributes
- Flow consistency loss
ProcessMappingTrainer
: Handles model training and evaluation- Implements early stopping
- Tracks training metrics
- Generates training visualizations
-
Process Flow Optimization
- Identify optimal process sequences
- Optimize resource allocation
- Minimize transportation costs
-
Capacity Planning
- Predict required process capacities
- Identify potential bottlenecks
- Balance resource utilization
-
Performance Analysis
- Monitor process KPIs
- Track resource utilization
- Measure system efficiency
-
Risk Management
- Identify potential disruptions
- Suggest alternative routes
- Maintain service levels
This implementation is based on the framework proposed in "Process Is All You Need" by Somesh Misra and Shashank Dixit. Key concepts adapted from the paper include:
-
Graph Attention Mechanism
- Attention-based process relationship modeling
- Dynamic importance weighting
- Multi-head attention for robust feature extraction
-
Process Flow Patterns
- Sequential process modeling
- Parallel process handling
- Bypass and cross-connection support
-
Loss Function Design
- Multi-objective optimization
- Flow consistency constraints
- Resource utilization objectives
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you use this code in your research, please cite:
@software{zouiti2025pistology,
title={Pistology-GNN: A Graph Neural Network Framework for Process Mapping in Logistics},
author={Zouiti, Naji},
year={2025},
url={https://github.com/nezpik/Pistology-GNN}
}
@article{misra2024process,
title={Process Is All You Need: A Framework for Process Mapping using Graph Neural Networks},
author={Misra, Somesh and Dixit, Shashank},
journal={Proceedings of Supply Chain Analytics},
year={2024}
}
This implementation is inspired by process mapping concepts in logistics and supply chain management. The architecture utilizes Graph Neural Networks (GNNs) and Graph Attention Networks (GAT) to model complex process flows and dependencies.
Special thanks to Somesh Misra and Shashank Dixit for their groundbreaking research in process mapping using GNNs.