Skip to main content

NeuroFlex: Advanced Neural Network Framework

NeuroFlex CI/CD

NeuroFlex is a cutting-edge neural network framework built on JAX, Flax, and TensorFlow, designed to address key challenges in modern machine learning: interpretability, generalization, robustness, and fairness. This project integrates state-of-the-art techniques and methodologies for creating more transparent, reliable, and ethical AI systems.

NeuroFlex Architecture

Key Features

  • Advanced Neural Architectures: Support for CNN, RNN, LSTM, GAN, and Spiking Neural Networks.
  • Multi-Backend Integration: Seamless integration with JAX, Flax, and TensorFlow.
  • 2D and 3D Convolutions: Efficient implementation of both 2D and 3D convolutional layers.
  • Quantum Computing: Quantum Neural Network module for next-generation AI.
  • Reinforcement Learning: Advanced capabilities with enhanced self-curing algorithms.
  • Brain-Computer Interface (BCI): Cutting-edge integration for neurotechnology applications.
  • Ethical AI: Fairness constraints and bias mitigation techniques.
  • Robustness: Improved adversarial training, interpretability tools (SHAP), and adaptive learning rate adjustment.
  • Bioinformatics: AlphaFold integration for protein structure prediction and drug discovery.
  • Generative AI: Creative problem-solving and content generation.
  • Natural Language Processing: Sentence piece integration and advanced NLP tasks.
  • Neuromorphic Computing: Energy-efficient spiking neural networks.
  • Self-Healing: Advanced diagnostic and healing processes for improved model performance and stability.
  • Consciousness Simulation: Integration of Integrated Information Theory (IIT) and Global Workspace Theory (GWT) for advanced consciousness modeling.

Latest Updates (v0.1.3)

  • Consciousness Simulation: Achieved integration of Integrated Information Theory (IIT) and Global Workspace Theory (GWT) for cognitive and consciousness modeling.
  • TensorFlow Integration: Added support for TensorFlow backend alongside JAX/Flax.
  • 2D and 3D Convolutions: Implemented efficient convolutional layers for both 2D and 3D inputs.
  • Enhanced Compatibility: Improved interoperability between JAX/Flax and TensorFlow.
  • Comprehensive Testing: Developed and passed pytest tests for all components, including TensorFlow integration.
  • Enhanced self-curing mechanism with adaptive learning rate adjustment.
  • Improved model robustness against gradient explosions and local minima.
  • Advanced diagnostic checks for model performance and training issues.
  • Whisper API integration for advanced speech recognition.
  • Enhanced AlphaFold integration for protein structure prediction.
  • Support for Python 3.9, 3.10, 3.11, 3.12.
  • Resolved dependency issues and improved stability.

Installation

pip install neuroflex

Quick Start Guide

  1. Import NeuroFlex
from neuroflex import NeuroFlexNN, train_model, create_neuroflex_nn
  1. Define Your Model
model = create_neuroflex_nn(
    features=[64, 32, 10],
    input_shape=(1, 28, 28, 1),
    output_shape=(1, 10),
    use_cnn=True,
    conv_dim=2,
    backend='tensorflow'  # or 'jax' for JAX/Flax backend
)
  1. Train Your Model
trained_state, trained_model = train_model(
    model, train_data, val_data,
    num_epochs=10, batch_size=32, learning_rate=1e-3
)
  1. Make Predictions
predictions = trained_model(test_data)

Advanced Usage

TensorFlow Convolutions

from neuroflex import TensorFlowConvolutions

tf_conv = TensorFlowConvolutions(
    features=(32, 64, 128),
    input_shape=(1, 28, 28, 1),
    conv_dim=2  # Use 3 for 3D convolutions
)
model = tf_conv.create_model()

JAX/Flax and TensorFlow Compatibility

from neuroflex.utils import convert_array

jax_array = jax.random.uniform(jax.random.PRNGKey(0), shape=(1, 28, 28, 1))
tf_tensor = convert_array(jax_array, 'tensorflow')

Adversarial Training

from neuroflex import adversarial_training

perturbed_data = adversarial_training(model, params, input_data, epsilon=0.1, step_size=0.01)

Testing

We have developed comprehensive pytest tests for all components, including the TensorFlow integration. To run the tests:

pytest tests/

Key test files:

  • test_neuroflex_nn.py: Tests for the core NeuroFlexNN functionality.
  • test_tensorflow_convolutions.py: Tests for TensorFlow convolution implementations.

Environment Setup

NeuroFlex supports multiple operating systems:

  • Ubuntu
  • Windows
  • macOS

To set up your environment:

  1. Clone the repository:
    git clone https://github.com/neuroflex/neuroflex.git
    
  2. Create a virtual environment:
    python -m venv neuroflex-env
    
  3. Activate the environment:
    • Ubuntu/macOS: source neuroflex-env/bin/activate
    • Windows: neuroflex-env\Scripts\activate
  4. Install dependencies:
    pip install -r requirements.txt
    

Documentation and Project Structure

The NeuroFlex project is organized into several key directories and files, each serving a specific purpose:

  • NeuroFlex.py: Integrates various AI and neural network components, providing a unified interface for core neural networks, quantum neural networks, ethical frameworks, explainable AI, BCI integration, consciousness simulation, protein structure prediction, and more.
  • Prompt_Agent: Contains agentic behavior models and related functionalities.
  • Transformers: Includes advanced transformer models for text processing and classification.
  • Advanced Models: Contains advanced math solving, time series analysis, and multi-modal learning models.
  • AI Ethics: Implements ethical frameworks and guidelines for AI, including explainable AI and self-curing algorithms.
  • BCI Integration: Facilitates integration with brain-computer interfaces, providing tools for BCI data processing and neuroscience model integration.
  • Cognitive Architectures: Implements advanced cognitive architectures with self-healing mechanisms and adaptive algorithms.
  • Config: Contains configuration files and constants for the project.
  • Core Neural Networks: Provides core neural network models and functionalities.
  • Edge AI: Focuses on edge AI optimization and deployment.
  • Generative Models: Includes models for generative AI and creative problem-solving.
  • Main.py: Demonstrates various components of the NeuroFlex framework.
  • Model Monitoring: Contains tools for monitoring and analyzing model performance and health.
  • NeuroFlex Integration: Integrates various components of the NeuroFlex system.
  • Threat Detection: Provides methods for detecting and analyzing threats using anomaly detection, deep learning, and pattern recognition.
  • Utils: Offers utility functions for data handling, preprocessing, and analysis.

For detailed documentation, including API references and tutorials, visit our official documentation.

Contributing

We welcome contributions! Please see our contributing guidelines for more information on how to get started.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use NeuroFlex in your research, please cite:

@software{neuroflex2024,
  author = {kasinadhsarma},
  title = {NeuroFlex: Advanced Neural Network Framework},
  year = {2024},
  url = {https://github.com/VishwamAI/NeuroFlex}
}

Contact

For questions, feedback, or support, please open an issue on our GitHub repository or contact us at gmail.


Changes:

  • Added Consciousness Simulation section under Key Features and Latest Updates to reflect the integration of IIT and GWT theories.
  • Updated the version to v0.1.3.
  • General improvements and formatting to ensure clarity and consistency with the latest features.

Metadata

Release files for neuroflex 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neuroflex 0.1.4
File Size Uploaded Provenance Actions
neuroflex-0.1.4.tar.gz 226.8 kB Without provenance Details for neuroflex-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for neuroflex 0.1.4
File Interpreter ABI Platform Actions
neuroflex-0.1.4-py3-none-any.whl Python 3 none any Details for neuroflex-0.1.4-py3-none-any.whl

Total release size: 554.5 kB

Release files / neuroflex-0.1.4.tar.gz

Download URL neuroflex-0.1.4.tar.gz
Size 226.8 kB
Tags Source
SHA-256 checksum
How to use checksums
387a804a2111c41ada96726185756b68f06f16bc411543fdd38651d49032da25
BLAKE2b-256 checksum
How to use checksums
24edee798ec989ec262e552d02ee6215acab7fa829608665f83ebfe566792e27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / neuroflex-0.1.4-py3-none-any.whl

Download URL neuroflex-0.1.4-py3-none-any.whl
Size 327.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5af362a8158ae00385d796f286b10d1df32d546fd4d092cfe8be5bc9ff4cc2c1
BLAKE2b-256 checksum
How to use checksums
c9dcfddf0b5568c4a804491f83063d1eceb62876133b19a1bbc4333bd898190c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Security for neuroflex 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page