Pytorch-bio-transformations

Latest version: v0.0.5

Safety actively analyzes 722460 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.8

Comprehensive documentation with tutorials and examples
Efficient implementation with minimal overhead
Installation
pip install bio-transformations
Quick Start
from bio_transformations import BioConverter

converter = BioConverter()
bio_model = converter(your_pytorch_model)
For full documentation, visit our visit our [GitHub Page](https://ceades.github.io/pytorch_bio_transformations/index.html) or
visit our [GitHub repository](https://github.com/CeadeS/pytorch_bio_transformations).

We welcome feedback and contributions from the community. Happy coding with biologically inspired neural networks!

What's Changed
* minor changes by CeadeS in https://github.com/CeadeS/pytorch_bio_transformations/pull/3
* minor changes by CeadeS in https://github.com/CeadeS/pytorch_bio_transformations/pull/4
* Minor changes to actions by CeadeS in https://github.com/CeadeS/pytorch_bio_transformations/pull/5
* minor changes by CeadeS in https://github.com/CeadeS/pytorch_bio_transformations/pull/6
* Make stable release by CeadeS in https://github.com/CeadeS/pytorch_bio_transformations/pull/7


**Full Changelog**: https://github.com/CeadeS/pytorch_bio_transformations/compare/v0.0.3...v0.0.4

0.0.5

Bio Transformations v0.0.5 Release Notes

We're excited to announce the release of Bio Transformations v0.1.0, featuring substantial improvements to the core components of the library. This release introduces several new biologically inspired mechanisms and enhances existing ones to provide a more powerful and flexible toolkit for neural network modifications.

Major New Features

New Distribution Strategies for Learning Rates

- **Multiple Distribution Types**: Added support for 10 different probability distributions for fuzzy learning rates:
- `BASELINE`: No variability (all parameters = 1.0)
- `UNIFORM`: Uniform distribution around 1.0
- `NORMAL`: Normal distribution centered at 1.0
- `LOGNORMAL`: Log-normal with mean 1.0 (skewed, all positive values)
- `GAMMA`: Gamma distribution (positive, skewed)
- `BETA`: Beta distribution scaled to [1-nu, 1+nu]
- `LAYER_ADAPTIVE`: Layer-dependent variability (decreases with depth)
- `WEIGHT_ADAPTIVE`: Weight-dependent scaling (smaller weights get more variability)
- `TEMPORAL`: Evolves over time
- `ACTIVITY`: Based on neuron activation patterns

Activity-Dependent Learning

- Added support for activity-dependent learning rates that adjust based on neuron activation patterns
- Neurons that are more active become more stable (less variable learning rates)
- Implemented activation tracking for both Linear and Conv2d layers

Dynamic Learning Rate Evolution

- Added `update_fuzzy_learning_rates` method to allow learning rates to evolve during training
- Temporal distribution gradually adapts learning rates throughout training
- Weight-adaptive distribution scales variability based on weight magnitudes

Improvements to Existing Features

Enhanced Weight Rejuvenation

- Improved numerical stability and edge case handling in weight rejuvenation
- Better handling of extreme values and NaN weights
- Preserved original implementation as `rejuvenate_weights_old` for backward compatibility

Refined Weight Splitting

- Better handling of output layers with automatic marking of the last layer
- Renamed tokens for clarity (`last_module_token` instead of `weight_splitting_skip`)
- Improved error messages for invalid configurations

Optimized Dale's Principle Implementation

- Enhanced error handling for Dale's principle enforcement
- Better compatibility with output layers

Code Quality and Documentation

- Extensively documented code with detailed explanations of biological motivations
- Added comprehensive docstrings for all methods and classes
- Improved parameter validation and error messaging throughout
- Enhanced code organization and naming conventions

Configuration Enhancements

- Added bounds for fuzzy learning rates (`fuzzy_lr_min` and `fuzzy_lr_max`)
- Added parameters for controlling temporal evolution (`fuzzy_lr_update_freq`, `fuzzy_lr_decay`)
- New parameters for activity-dependent learning
- Added layer indexing for layer-adaptive distributions

API Changes

- Added new exposed functions:
- `update_fuzzy_learning_rates`: Updates learning rates during training
- `rejuvenate_weights_old`: Legacy implementation preserved for backward compatibility
- Enhanced `BioConverter.from_dict` for easier configuration from dictionaries
- Improved `update_config` method for updating configuration parameters

Documentation Improvements

- Added advanced usage guide with comprehensive examples
- Detailed tutorials for each distribution strategy
- Performance optimization tips
- Troubleshooting common issues

---

This release represents a significant advancement in bio-inspired neural network modifications, bringing more biological realism and flexibility to artificial neural networks. We encourage users to explore the new distribution strategies and dynamic learning rate capabilities.

For detailed usage instructions, please refer to our updated documentation including the tutorials and advanced usage guides.

0.0.4

We're excited to announce the first stable release of Bio Transformations! This Python package enhances artificial neural networks with biologically inspired mechanisms, aiming to improve learning speed, prediction accuracy, and resilience.

Key Features
Synaptic Diversity: Implement diverse learning rates with fuzzy_learning_rates()
Structural Plasticity: Simulate spine turnover with rejuvenate_weights()
Multi-synaptic Connectivity: Allow multiple connections between neuron pairs
Homeostatic Plasticity: Maintain network stability with synaptic scaling
Easy Integration: Seamlessly convert existing PyTorch models
Highlights

0.0.3

We're excited to announce the first stable release of Bio Transformations! This Python package enhances artificial neural networks with biologically inspired mechanisms, aiming to improve learning speed, prediction accuracy, and resilience.

Key Features

- **Synaptic Diversity**: Implement diverse learning rates with `fuzzy_learning_rates()`
- **Structural Plasticity**: Simulate spine turnover with `rejuvenate_weights()`
- **Multi-synaptic Connectivity**: Allow multiple connections between neuron pairs
- **Homeostatic Plasticity**: Maintain network stability with synaptic scaling
- **Easy Integration**: Seamlessly convert existing PyTorch models

Highlights

- Compatible with PyTorch 1.8+
- Comprehensive documentation with tutorials and examples
- Efficient implementation with minimal overhead

Installation

bash
pip install bio-transformations


Quick Start

python
from bio_transformations import BioConverter

converter = BioConverter()
bio_model = converter(your_pytorch_model)


For full documentation, visit our visit our [GitHub Page](https://ceades.github.io/pytorch_bio_transformations/index.html) or
visit our [GitHub repository](https://github.com/CeadeS/pytorch_bio_transformations).

We welcome feedback and contributions from the community. Happy coding with biologically inspired neural networks!

0.0.3a

We're excited to announce the first stable release of Bio Transformations! This Python package enhances artificial neural networks with biologically inspired mechanisms, aiming to improve learning speed, prediction accuracy, and resilience.

Key Features

- **Synaptic Diversity**: Implement diverse learning rates with `fuzzy_learning_rates()`
- **Structural Plasticity**: Simulate spine turnover with `rejuvenate_weights()`
- **Multi-synaptic Connectivity**: Allow multiple connections between neuron pairs
- **Homeostatic Plasticity**: Maintain network stability with synaptic scaling
- **Easy Integration**: Seamlessly convert existing PyTorch models

Highlights

- Compatible with PyTorch 1.8+
- Comprehensive documentation with tutorials and examples
- Efficient implementation with minimal overhead

Installation

bash
pip install bio-transformations


Quick Start

python
from bio_transformations import BioConverter

converter = BioConverter()
bio_model = converter(your_pytorch_model)


For full documentation, visit our visit our [GitHub Page](https://ceades.github.io/pytorch_bio_transformations/index.html) or
visit our [GitHub repository](https://github.com/CeadeS/pytorch_bio_transformations).

We welcome feedback and contributions from the community. Happy coding with biologically inspired neural networks!

What's Changed
* minor changes by CeadeS in https://github.com/CeadeS/pytorch_bio_transformations/pull/3
* minor changes by CeadeS in https://github.com/CeadeS/pytorch_bio_transformations/pull/4
* Minor changes to actions by CeadeS in https://github.com/CeadeS/pytorch_bio_transformations/pull/5


**Full Changelog**: https://github.com/CeadeS/pytorch_bio_transformations/compare/v0.0.3...v0.0.3a

Links

Releases

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.