Skip to content

NeuroBM is a research and educational platform for cognitive modeling using Boltzmann machines. It provides a framework for exploring cognitive dynamics, hypothesis generation, and understanding human-technology interaction patterns. It is only to be used to study how the Human Brain works as technology is all around us in 2025 and onwards.

License

Notifications You must be signed in to change notification settings

ai-in-pm/NeuroBM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NeuroBM: Neural Boltzmann Machines for Cognitive Modeling

A research platform for cognitive modeling using energy-based neural networks

img.png

Python 3.8+ License: Apache 2.0 Code Style: Black

Owner: Darrell Mesa (darrell.mesa@pm-ss.org)

GitHub: https://github.com/ai-in-pm

Repository: https://github.com/ai-in-pm/NeuroBM

NeuroBM is a research and educational platform for cognitive modeling using Boltzmann machines. It provides a framework for exploring cognitive dynamics, hypothesis generation, and understanding human-technology interaction patterns. It is only to be used to study how the Human Brain works as technology is all around us in 2025 and onwards.

⚠️ IMPORTANT: This is for educational and hypothesis-generation purposes only. No diagnosis, risk prediction, or treatment advice.

Special Thank You to Steven Bartlett

Your video gave me the opportunity to build my own Neuro Boltzmann Machine as a way to study how my brain works living with PTSD, while also exploring how my seven-year-old sonβ€”who has autismβ€”experiences and processes the world. As a Professional Project Manager, I see technology not only reshaping how we manage complex projects but also how it integrates into our personal lives.

This video was more than just contentβ€”it became a catalyst for innovation, reflection, and a deeply personal project. Grateful that you continue to share ideas that ripple far beyond the screen.

Video: "Brain Experts WARNING: Watch This Before Using ChatGPT Again! (Shocking New Discovery)" Link: https://www.youtube.com/watch?v=5wXlmlIXJOI


🧠 What is NeuroBM?

NeuroBM is a research framework for exploring cognitive dynamics using Boltzmann machines. It provides:

  • Statistical Foundations: Energy functions, partition function estimation, and likelihood computation
  • Educational Focus: Clear documentation, ethical guidelines, and interpretability tools
  • Research Scenarios: Pre-configured setups for studying general cognition, PTSD, autism, and technology-reliance patterns
  • Production-Ready Code: Testing, automated scaffolding, and modular design

🎯 Core Features

πŸ”¬ Model Types

  • Restricted Boltzmann Machines (RBM): Binary and Gaussian visible units
  • Deep Boltzmann Machines (DBM): Multi-layer architectures with pre-training
  • Conditional RBMs (CRBM): Time-series and conditional modeling

🎯 Training Infrastructure

  • Algorithms: Contrastive Divergence (CD-k), Persistent CD (PCD)
  • Likelihood Estimation: Annealed Importance Sampling (AIS) with diagnostic tools
  • Training Loops: Callbacks, early stopping, checkpointing, mixed precision

πŸ” Interpretability Tools

  • Saliency Analysis: Weight importance, feature attribution, connection strength
  • Mutual Information: Information flow analysis between layers
  • Latent Traversals: Direction discovery, counterfactual analysis
  • Visualization Tools: Weight matrices, feature importance, traversal paths

πŸ“Š Data & Scenarios

  • Synthetic Data Generation: Realistic correlations and population heterogeneity
  • Research Regimes:
    • Base: General cognitive features (attention, working memory, stress)
    • PTSD: Hyperarousal, avoidance, intrusive thoughts, sleep disruption
    • Autism: Sensory sensitivity, routine adherence, focused interests
    • Technology-Reliance: Effort avoidance, automation expectation, frustration tolerance
    • PTSD-PM: PTSD-affected project managers with technology integration dynamics
  • Data Transformations: Normalization, binarization, noise injection

πŸ€– Automation System

  • Research Monitoring: Weekly scanning of research developments
  • Integration Pipeline: Automated evaluation and integration of relevant updates
  • Version Management: Semantic versioning with automated releases
  • Deployment: Multi-stage deployment with quality gates

πŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/ai-in-pm/NeuroBM.git
cd NeuroBM

# Install dependencies
pip install -e .

# Verify installation
python test_neurobm_core.py

Basic Usage

from neurobm.models.rbm import RestrictedBoltzmannMachine
from neurobm.data.synth import SyntheticDataGenerator

# Generate synthetic cognitive data
generator = SyntheticDataGenerator("base", random_seed=42)
data = generator.generate(n_samples=1000)

# Train RBM
rbm = RestrictedBoltzmannMachine(n_visible=5, n_hidden=128)
rbm.fit(data, epochs=100)

# Analyze results
from neurobm.interpret.saliency import SaliencyAnalyzer
analyzer = SaliencyAnalyzer(rbm)
importance = analyzer.feature_importance(data)
print("Feature importance:", importance)

Command Line Interface

# Train a model
python scripts/train.py --regime=base --model=rbm --epochs=100

# Generate samples
python scripts/sample.py --checkpoint=runs/base/best.ckpt --n_samples=100

# Run interpretability analysis
python scripts/analyze.py --checkpoint=runs/base/best.ckpt --data=test_data.pt

# Launch interactive dashboards
python dashboards/launch_dashboards.py

πŸ“ Project Structure

NeuroBM/
β”œβ”€β”€ neurobm/                    # Core package
β”‚   β”œβ”€β”€ models/                 # Model implementations
β”‚   β”‚   β”œβ”€β”€ rbm.py             # Restricted Boltzmann Machine
β”‚   β”‚   β”œβ”€β”€ dbm.py             # Deep Boltzmann Machine
β”‚   β”‚   └── crbm.py            # Conditional RBM
β”‚   β”œβ”€β”€ data/                  # Data handling
β”‚   β”‚   β”œβ”€β”€ synth.py           # Synthetic data generation
β”‚   β”‚   └── schema.py          # Data schemas and validation
β”‚   β”œβ”€β”€ training/              # Training infrastructure
β”‚   β”‚   β”œβ”€β”€ trainer.py         # Training loops
β”‚   β”‚   β”œβ”€β”€ callbacks.py       # Training callbacks
β”‚   β”‚   └── evaluation.py      # Model evaluation
β”‚   └── interpret/             # Interpretability tools
β”‚       β”œβ”€β”€ saliency.py        # Saliency analysis
β”‚       β”œβ”€β”€ mutual_info.py     # Mutual information
β”‚       └── latent.py          # Latent space analysis
β”œβ”€β”€ experiments/               # Experiment configurations
β”‚   β”œβ”€β”€ base.yaml             # Base cognitive regime
β”‚   β”œβ”€β”€ ptsd.yaml             # PTSD-related patterns
β”‚   β”œβ”€β”€ autism.yaml           # Autism spectrum features
β”‚   └── ptsd_pm.yaml          # PTSD project manager scenario
β”œβ”€β”€ dashboards/               # Interactive dashboards
β”‚   β”œβ”€β”€ training_monitor.py   # Real-time training monitoring
β”‚   β”œβ”€β”€ model_explorer.py     # Model exploration interface
β”‚   └── results_analyzer.py   # Results analysis dashboard
β”œβ”€β”€ automation/               # Automation system
β”‚   β”œβ”€β”€ research_monitor.py   # Research development tracking
β”‚   β”œβ”€β”€ integration_pipeline.py # Automated integration
β”‚   β”œβ”€β”€ version_manager.py    # Version and release management
β”‚   └── deployment_manager.py # Deployment automation
β”œβ”€β”€ notebooks/                # Educational notebooks
β”‚   β”œβ”€β”€ 01_theory_primer.ipynb # Boltzmann machine theory
β”‚   β”œβ”€β”€ 02_base_latents.ipynb # Base cognitive modeling
β”‚   └── 07_comprehensive_tutorial.ipynb # Complete tutorial
β”œβ”€β”€ scripts/                  # Command-line tools
β”‚   β”œβ”€β”€ train.py              # Training script
β”‚   β”œβ”€β”€ sample.py             # Sampling script
β”‚   └── eval_ais.py           # AIS evaluation
β”œβ”€β”€ docs/                     # Documentation
β”‚   β”œβ”€β”€ ethics_guidelines.md  # Ethical guidelines
β”‚   β”œβ”€β”€ model_cards/          # Model documentation
β”‚   └── data_cards/           # Data documentation
└── tests/                    # Test suite
    β”œβ”€β”€ test_models.py        # Model tests
    └── test_data.py          # Data generation tests

🧬 Cognitive Scenarios

Base Cognitive Features

  • Attention Span: Sustained attention capacity
  • Working Memory: Temporary information storage
  • Novelty Seeking: Openness to new experiences
  • Sleep Quality: Sleep patterns and quality
  • Stress Index: General stress levels

PTSD-Related Patterns

  • Hyperarousal: Heightened alertness and reactivity
  • Avoidance: Tendency to avoid triggers
  • Intrusive Thoughts: Unwanted recurring thoughts
  • Sleep Disruption: Sleep quality and patterns
  • Emotional Numbing: Reduced emotional responsiveness

Autism Spectrum Features

  • Sensory Sensitivity: Response to sensory input
  • Routine Adherence: Preference for predictable patterns
  • Focused Interests: Intensity of special interests
  • Social Communication: Communication preferences
  • Change Tolerance: Adaptability to changes

Technology-Reliance Dynamics

  • Effort Cost: Perceived mental effort cost
  • Ambiguity Tolerance: Tolerance for uncertainty
  • Reward Sensitivity: Sensitivity to timing delays
  • Automation Expectation: Expectation of automated assistance
  • Frustration Tolerance: Tolerance for setbacks

PTSD-PM Technology Integration

  • Hypervigilance: Heightened alertness and scanning
  • Cognitive Load: Mental effort and processing capacity
  • Tech Tool Mandate: Organizational pressure to use technology tools
  • Frustration Tolerance: Tolerance for technology limitations
  • Avoidance Behavior: Tendency to avoid challenging tasks
  • Tech Tool Adoption Resistance: Resistance to new technology tools in workflow
  • Tech Tool Acceptance: Comfort with technology tool integration

This scenario models the intersection of PTSD symptoms with project management cognitive demands, exploring how technology tools (from 2025 onwards) impact work performance, stress responses, and decision-making processes in certified Project Management Professionals.

Research Context:

  • Synthetic data only - no real patient information
  • Educational purpose - to understand potential technology impacts and inform supportive tool design
  • Hypothesis generation - for future research directions

πŸ§ͺ Testing

Run the test suite:

# Core functionality tests
python test_neurobm_core.py

# Model-specific tests
python test_neurobm_models.py

# Data generation tests
python test_neurobm_data.py

# Full test suite
python test_neurobm_comprehensive.py

# Automation system tests
python automation/test_automation_system.py

βš–οΈ Ethics & Responsible Use

βœ… Designed For:

  • Educational exploration of cognitive dynamics
  • Hypothesis generation and testing
  • Research into human-technology interaction patterns
  • Understanding statistical relationships in synthetic data

❌ NOT For:

  • Clinical diagnosis or assessment
  • Risk prediction or screening
  • Treatment recommendations
  • Real-world decision making about individuals

πŸ”’ Safety Measures:

  • Synthetic Data Only: No real patient or personal data
  • Educational Focus: Clear documentation of limitations
  • Ethical Guidelines: Built-in responsible use framework
  • Transparency: Open source with full documentation

πŸ“‹ Compliance:

  • Research ethics guidelines
  • Data protection principles
  • Educational use standards
  • Responsible technology development

🀝 Contributing

We welcome contributions! Please see our contributing guidelines and code of conduct.

Development Setup

# Clone and install in development mode
git clone https://github.com/ai-in-pm/NeuroBM.git
cd NeuroBM
pip install -e ".[dev]"

# Run tests
python -m pytest tests/

# Format code
black neurobm/ tests/

πŸ“š Documentation

  • Getting Started: See notebooks/07_comprehensive_tutorial.ipynb
  • API Reference: Generated from docstrings
  • Model Cards: docs/model_cards/
  • Ethics Guidelines: docs/ethics_guidelines.md
  • Research Framework: docs/responsible_ai_framework.md

πŸ™ Acknowledgments

This framework builds upon decades of research in:

  • Boltzmann machines and energy-based models
  • Cognitive science and computational neuroscience
  • Model interpretability and analysis
  • Responsible technology development

This project was inspired by Steven Bartlett's video on brain experts and technology interaction. The personal journey of understanding PTSD and autism through computational modeling reflects the intersection of technology, neuroscience, and human experience.

About

NeuroBM is a research and educational platform for cognitive modeling using Boltzmann machines. It provides a framework for exploring cognitive dynamics, hypothesis generation, and understanding human-technology interaction patterns. It is only to be used to study how the Human Brain works as technology is all around us in 2025 and onwards.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published