Releases: He-JiYe/CentriLearn
CentriLearn v0.2.0 - Vectorized Environment Support
📋 Overview
This release builds upon the CentriLearn framework by fixing existing bugs and adding new features, primarily implementing vectorized environment support, performance optimization, and several important functional enhancements. The version has been upgraded from v0.1.0 to v0.2.0.
🚀 Major Updates
🔧 Bug Fixes
- Fixed GAT/GIN backbone network issues : Resolved undefined graph_embed errors in GAT and GIN models in algorithms/backbones/
- Fixed DQN algorithm logic errors : Solved duplicate calculation issues in double DQN and corrected incorrect usage of argmax method
✨ New Features
- More convenient random graph generation : Support parameter-based generation of BA, ER, and WS random graphs
- Timed saving functionality : Added periodic model checkpoint saving capability for DQN and PPO algorithms
- Training resumption functionality : Implemented resume functionality in the training pipeline, supporting training continuation from checkpoints
- Multi-threaded vectorized environment : New VectorizedEnv supporting multi-threaded parallel training, significantly improving training efficiency
⚡Performance Optimization
- Connected component calculation optimization : Changed from recursive to iterative implementation, significantly improving computational performance
- DQN training optimization : Added gradient clipping and target network update frequency adjustment to improve training stability
- Overall performance improvement : Optimized memory usage efficiency during training
📊 Technical Improvements
Vectorized Environment (VectorizedEnv)
- Supports running multiple environment instances simultaneously
- Provides batch interaction interface
- Compatible with all environment classes inheriting from BaseEnv
Training Pipeline Enhancements
- Automatic checkpoint saving mechanism
- Breakpoint training resumption functionality
- Improved training stability
Code Refactoring
- Moved the
_run_training_loopmethod under the algorithms module to the base class
🎯 Usage Examples
Vectorized Environment Usage
from centrilearn.utils import
build_environment
env_cfg = {
'type': 'VectorizedEnv',
'env_kwargs': {
'type':
'NetworkDismantlingEnv',
'synth_type': 'ba',
'synth_args': {'min_n': 30,
'max_n': 50, 'm': 4}
},
'env_num': 4 # 4个并行环境
}
env = build_environment(env_cfg)
Tags: v0.2.0 , vectorized-env, performance
CentriLearn v0.1.1-alpha Release
CentriLearn v0.1.1-alpha Release
🎉 First Alpha Release - Core Framework Implementation
CentriLearn is a reinforcement learning framework based on Graph Neural Networks for solving combinatorial optimization problems in complex networks, such as network dismantling.
✨ Key Features Implemented
🏗️ Core Framework
- Modular architecture with clear separation of environments, algorithms, and models
- Flexible registry mechanism for dynamic component registration
- Configuration-based training system via YAML/JSON files
- Multiple GNN backbones (GraphSAGE, GAT, GIN, DeepNet, FPNet)
- Flexible prediction head system (QHead, VHead, LogitHead, PolicyHead)
🤖 Reinforcement Learning Algorithms
- DQN (Deep Q-Network) with experience replay
- PPO (Proximal Policy Optimization) with rollout buffer
- Support for both standard and prioritized replay buffers
- Configurable training pipelines
🌐 Complex Network Environments
- Graph-Native RL Framework: Specifically designed for reinforcement learning on graph-structured data.
- Extensible by Design: Modular architecture enables easy adaptation to other graph combinatorial optimization problems.
- Currently Focused: Initial release supports the Network Dismantling task.
- Future Roadmap: Planned support for more graph-theoretic tasks.
🚀 Quick Start
Installation
git clone https://github.com/He-JiYe/CentriLearn.git
cd CentriLearn
pip install -e .Basic Usage
import yaml
from centrilearn.utils import train_from_cfg
#Load configuration and start training
with open('configs/network_dismantling/dqn.yaml') as f:
config = yaml.safe_load(f)
results, algorithm = train_from_cfg(config)Command Line Training
python tools/train.py configs/network_dismantling/dqn.yaml🔧 Technical Stack
- Python 3.11+ with modern type hints
- PyTorch 2.7.0+ for deep learning backend
- PyTorch Geometric for graph neural networks
- NetworkX for graph manipulation
- YAML-based configuration system
⚠️ Release Notes
This is an alpha release:
- ✅ Core functionality is stable and tested
⚠️ API may change in future versions- 🔄 Additional features are under active development
- 📚 Documentation is being expanded
Known Limitations:
- Vectorized environments support is upcoming
- Limited to DQN and PPO algorithms initially
- Performance optimizations in progress
🔮 What's Next?
- Vectorized environment support for parallel training
- Additional RL algorithms (A3C, SAC, TD3)
- More complex network applications
- Performance optimizations and benchmarks
📚 Resources
- Full Documentation - Comprehensive guide
- API Reference - Detailed technical docs
- Examples - Ready-to-run code samples
- Chinese Documentation - 中文文档
🤝 Contributing
We welcome contributions! Please see our contributing guidelines and feel free to open issues or pull requests.
📄 License
MIT License - see LICENSE for details.
This release represents the foundation of a powerful graph reinforcement learning framework. We're excited to see what you'll build with it!
Release Date: February 2026
Version: v0.1.1-alpha