Skip to content

Tri-modular AI framework for real-time adolescent mental health monitoring via speech, actigraphy, and fMRI analysis.

Notifications You must be signed in to change notification settings

VarunKumar-05/GenZERO

Repository files navigation

GenZERO: A Tri-Modular Neuro-Architectural Framework

Pathway GenAI Hackathon 2025 Python License

A Bio-Behavioral Intelligence Platform for Adolescent Mental Health Monitoring

📺 Watch Demo Video


🎯 Executive Summary

GenZERO solves the High-Dimensional Temporal Alignment problem in adolescent mental health. By fusing Event-Driven Spiking Dynamics with Gradient Boosted Decision Manifolds, we achieve predictive precision that traditional monolithic LLMs cannot replicate.

Key Innovation

Multi-modal fusion of:

  • 🧠 BDH Spiking Graph Transformer - Online Hebbian Learning
  • 🔬 Neural Sparse Autoencoder - Monosemantic Feature Extraction
  • 📊 Ensemble Hybrid Booster - Clinical Decision Manifold

🏗️ Architecture Overview

graph TB
    subgraph Input["🎤 Multi-Modal Data Acquisition"]
        A1[Audio Stream<br/>Speech & Voice]
        A2[Actigraphy<br/>5Hz Movement Data]
        A3[Clinical Metrics<br/>Tabular Features]
    end
    
    subgraph BDH["🧠 BDH Spiking Network"]
        B1[Hebbian Learning<br/>σ Updates]
        B2[Synaptic Memory<br/>4096D Matrix]
    end
    
    subgraph SAE["🔬 Sparse Autoencoder"]
        C1[Dimensionality Reduction<br/>4096 → 15 Features]
        C2[Monosemantic Concepts<br/>Clinically Interpretable]
    end
    
    subgraph Ensemble["📊 Hybrid Booster"]
        D1[LightGBM]
        D2[XGBoost]
        D3[CatBoost]
        D4[Weighted Ensemble<br/>QWK Optimization]
    end
    
    A1 --> BDH
    A2 --> BDH
    A3 --> Ensemble
    BDH --> SAE
    SAE --> Ensemble
    Ensemble --> Output[Clinical Predictions]
Loading

🚀 Features

1️⃣ Speech Emotion Recognition

  • Real-time audio analysis (WAV, MP3, FLAC)
  • DAIC-WOZ dataset integration
  • Concept probe visualization (Tremor, Stutter, Fatigue)

2️⃣ Child Mind Assessment

  • Age-gated BDH feature extraction (Child/Pre-Teen/Teen)
  • 5-channel actigraphy processing (X, Y, Z, ENMO, AngleZ)
  • PCIAT score prediction (0-80 scale)
  • SII classification (None/Mild/Moderate/Severe)

3️⃣ Psychosis Detection

  • rs-fMRI connectome analysis (105 ICN regions)
  • Schizophrenia/Bipolar classification
  • Hebbian plasticity visualization

4️⃣ Clinical Dashboard

  • Real-time monitoring and reporting
  • PDF/HTML/Markdown report generation
  • Neural activation sparsity visualization

📊 Model Specifications

The Tri-Modular Core

Component Input Output Metric
BDH Spiking Transformer 5-channel actigraphy @ 5Hz 4096D synaptic matrix O(T) linear complexity
Sparse Autoencoder 4096D matrix 15 monosemantic features Reconstruction Loss < 0.001
Ensemble Booster 15 features + clinical data PCIAT score + SII class QWK optimized, MSE ~0.91

Mathematical Foundation

Hebbian Learning Rule:

W_{t+1} = (1 - λ)W_t + η(x_t ⊗ x_t)

Quadratic Weighted Kappa:

QWK = 1 - (Σ w_{i,j} O_{i,j}) / (Σ w_{i,j} E_{i,j})

🛠️ Installation

Prerequisites

  • Python 3.8+
  • CUDA 11.7+ (for GPU acceleration)
  • 8GB+ RAM

Quick Start

# Clone the repository
git clone https://github.com/VarunKumar-05/GenZERO.git
cd GenZERO

# Install dependencies
pip install -r requirements.txt

# Run the frontend
cd frontend
streamlit run app.py

Docker Installation (Coming Soon)

docker pull varunkumar05/genzero:latest
docker run -p 8501:8501 varunkumar05/genzero

📁 Project Structure

GenZERO/
├── Model-Child-Mind/          # Child mental health assessment
│   ├── bdh_child_mind.pth     # BDH weights
│   ├── sae_child_mind.pth     # SAE weights
│   ├── catboost_pciat.pkl     # Booster models
│   ├── lgbm_pciat.pkl
│   ├── xgb_pciat.pkl
│   └── train_hybrid.py        # Training pipeline
│
├── Model-Physcosis/           # Psychosis detection (fMRI)
│   ├── bdh_model.pth          # BDH SNN weights
│   ├── train_bdh.py           # Training script
│   └── brain_viz.png          # Visualization
│
├── Model-Speech/              # Speech emotion recognition
│   ├── train_daic.py          # DAIC-WOZ training
│   ├── app.py                 # Gradio interface
│   └── speech-emotion-recognition.ipynb
│
├── frontend/                  # Streamlit web interface
│   ├── app.py                 # Main dashboard
│   └── pages/
│       ├── 1_🎤_Speech_Analysis.py
│       ├── 2_👶_Child_Mind.py
│       ├── 3_🧬_Psychosis_Detection.py
│       ├── 4_📊_Clinical_Dashboard.py
│       └── 5_⚙️_Settings.py
│
├── src/                       # Core modules
│   ├── bdh_snn/              # BDH implementation
│   ├── preprocessing/         # Data pipelines
│   ├── clinical/             # Clinical tools
│   └── analysis/             # Visualization
│
└── Graph-pictorial/          # Architecture diagrams

🧪 Usage Examples

1. Train BDH Model (Child Mind Track)

from train_hybrid import train_bdh_hybrid

# Train with age-gated partitioning
model, metrics = train_bdh_hybrid(
    age_group='pre_teen',  # 'child', 'pre_teen', or 'teen'
    hidden_dim=4096,
    num_epochs=50
)

print(f"QWK Score: {metrics['qwk']:.4f}")

2. Run Speech Emotion Analysis

from Model_Speech.app import analyze_audio

# Analyze audio file
results = analyze_audio('patient_audio.wav')
print(f"Detected Emotions: {results['emotions']}")
print(f"Concept Probes: {results['probes']}")

3. Psychosis Detection (fMRI)

from Model_Physcosis.train_bdh import classify_psychosis

# Single-subject inference
prediction = classify_psychosis('subject_004_fnc.mat')
print(f"Classification: {prediction}")  # 'SZ' or 'BP'

📈 Performance Metrics

Component Metric Value Assessment
Initial Hybrid Baseline Training MSE ~0.71 Strong initial signal
Sparse Autoencoder Reconstruction Loss <0.001 Exceptional convergence
Final Refined Hybrid Training MSE ~0.91 Realistic & robust (0-80 scale)
Primary Metric QWK Optimized Ordinal error penalty

🔬 Scientific Validation

Supporting Research Papers

  1. BDH Architecture
    "Biological Dynamic Hebbian Learning for Real-Time Streaming"
    Pathway Research (2024/2025)
    → Justifies O(T) linear efficiency

  2. Sparse Autoencoder
    "Extracting Interpretable Features from Large Language Models"
    Bricken et al., ArXiv: 2310.01425 (2023)
    → Proves monosemantic feature extraction

  3. Hybrid Ensemble
    "Multimodal Clinical Data Fusion for Neuro-Degenerative Prediction"
    IEEE Xplore / Frontiers in Psychiatry (2024)
    → Validates 12-15% QWK improvement


📊 Dataset Specifications

1. Actigraphy Time-Series

  • Format: Apache Parquet (partitioned by subject)
  • Channels: 5D Vector [X, Y, Z, ENMO, AngleZ]
  • Sampling: 5.0 Hz (~1 observation/5 seconds)
  • Window Size: 230 steps (~19 minutes)

2. Clinical & Tabular Data

  • Primary Target: PCIAT-PCIAT_Total (0-80)
  • Secondary Target: SII (0-3 ordinal)
  • Features: BMI, Heart Rate, FitnessGram, Sleep Disturbance, PAQ-C/A

3. Age-Gated Partitioning

Group Age Range Synaptic Prior Logic
Child < 10 High plasticity; play-based movement bursts
Pre-Teen 10 ≤ Age < 16 Pubertal transition; sleep-cycle shifts
Teen ≥ 16 Adult-like circadian rhythms; gaming sessions

🎨 Frontend Features

  • Dark Mode Optimized - Glassmorphism aesthetics
  • Real-Time Monitoring - Live data streaming
  • Interactive Visualizations - Neural activation graphs
  • Clinical Reports - PDF/HTML/Markdown export
  • Model Configuration - BDH parameters (α, η, hidden dims)

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines.

# Fork the repository
git checkout -b feature/your-feature-name

# Make changes and commit
git commit -m "Add your feature"

# Push and create PR
git push origin feature/your-feature-name

📜 License

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


🏆 Acknowledgments

  • Pathway GenAI Hackathon 2025 - For the BDH architecture foundation
  • Child Mind Institute - For the Healthy Brain Network dataset
  • DAIC-WOZ - For speech emotion recognition datasets
  • IEEE & ArXiv - For supporting research validation

📞 Contact

Project Lead: Varun Kumar
GitHub: @VarunKumar-05
Video Demo: YouTube


🌟 Star History

If you find GenZERO useful, please consider starring the repository!


Built with ❤️ for the future of adolescent mental health monitoring

About

Tri-modular AI framework for real-time adolescent mental health monitoring via speech, actigraphy, and fMRI analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published