Neural Forecasting

Predicting Habitual Relapse with AI

Using Artificial Intelligence to interpret Electroencephalography (EEG) signals, enabling proactive interventions for substance and non-substance habitual behaviors before a lapse occurs.

Bidirectional Intelligence

The Dual Nature of Habit Prediction

Mindfully operates on two fronts simultaneously — disrupting the neural circuits that drive bad habits while reinforcing the ones that build good ones.

Intercepting Bad Habits

When neural signatures indicate an impending lapse — elevated Theta waves, rising High Beta activity — Mindfully delivers a targeted micro-intervention before the conscious urge surfaces.

Nudging Good Habits

When the brain enters optimal states — calm Alpha rhythms, focused Low Beta — Mindfully reinforces positive behavior with gentle encouragement, building new neural pathways over time.

Hardware Design

Minimalist Hardware: The 1–4 Node Paradigm

Clinical EEG uses 64–256 electrodes. Mindfully achieves high predictive accuracy with just 1–4 carefully placed nodes — making wearable, everyday use genuinely possible.

Fz
C3
C4
Pz
Fz
Frontal Midline

Tracks executive function and impulse control — the first region to show craving-related disruption in prefrontal activity.

C3 / C4
Left & Right Central

Motor cortex activity reflecting behavioral readiness and the unconscious urge to act on a habit.

Pz
Parietal Midline

Integrates sensory information and attention, revealing the characteristic shift toward habit-seeking focus.

Neural Signatures: Decoding Brain States

Different brain states leave distinct fingerprints across EEG frequency bands. A Vulnerability State shows elevated Theta and High Beta activity — the neural signature of active craving. A Readiness State shows strong Alpha and Low Beta, indicating calm, focused resilience.

Predictive Accuracy by Behavior

CNNs trained on EEG time-series data show varying accuracy depending on the habit. Substance-induced neural pathways leave more pronounced, detectable signatures than purely behavioral addictions — though both are highly predictable.

The Proactive Intervention Window

The AI identifies anomalies in Theta/Beta ratios long before the conscious decision to engage in the habit — creating a critical window for automated behavioral therapies or support network alerts.

Intervention Framework

JITAI Timeline

Just-In-Time Adaptive Interventions (JITAIs) operate across multiple timescales — from millisecond neural events to weeks of behavioral learning.

01
Micro
0 – 5 sec

Immediate Signal

EEG detects an acute neural spike. The device logs the event silently — no intervention yet.

02
Meso-Craving
~5 min

Sustained Urge

If the signal persists, the AI classifies it as a genuine craving window rather than background noise.

03
Meso-Nudge
10 – 30 min

Intervention

A tailored micro-prompt — haptic, audio, or in-app — fires at the optimal moment of vulnerability.

04
Macro
Weeks

Pattern Learning

The model adapts to your personal neural fingerprint, improving accuracy and relevance over time.

Prediction Accuracy Decay

EEG-based prediction accuracy is highest in the immediate window and decays as the forecast horizon extends. This is why Mindfully focuses on short-range prediction — detecting vulnerability in the seconds and minutes before a decision, not hours in advance.

Pipeline

System Architecture

This pipeline moves raw brainwave data into real-time preventative action using existing open-source models and platforms.

01
Hardware
OpenBCI / Muse
Wearable EEG Headset
02
Preprocessing
MNE-Python / EEGLAB
Artifact removal, filtering
03
AI Inference
TensorFlow / PyTorch
LSTM/CNN predicting lapse
04
Intervention
React Native App
CBT Prompts, Alerts
Open Source Stack

Building It Out: Existing Resources

Data Acquisition & Processing

  • BrainFlow: A library intended to obtain, parse and analyze EEG data from various boards (OpenBCI, Muse, Ganglion). Perfect for standardizing input.
  • MNE-Python: The gold standard open-source Python software for exploring, visualizing, and analyzing human neurophysiological data. Use this for Independent Component Analysis (ICA) to remove eye-blinks from the data.

Machine Learning Models

  • EEGNet: A compact Convolutional Neural Network specifically designed for EEG signals. It works across various BCI paradigms and is highly adaptable to classification tasks like "craving" vs "non-craving".
  • Hugging Face Time Series: Utilize existing Transformer models adapted for time-series forecasting to predict the trajectory of the Theta/Beta ratio over the next 60 minutes.

Be part of the clinical research.

Sign up to be part of Mindfully's research journey as we build toward clinical validation.

Join Waitlist