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.
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.
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.
Tracks executive function and impulse control — the first region to show craving-related disruption in prefrontal activity.
Motor cortex activity reflecting behavioral readiness and the unconscious urge to act on a habit.
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.
JITAI Timeline
Just-In-Time Adaptive Interventions (JITAIs) operate across multiple timescales — from millisecond neural events to weeks of behavioral learning.
Immediate Signal
EEG detects an acute neural spike. The device logs the event silently — no intervention yet.
Sustained Urge
If the signal persists, the AI classifies it as a genuine craving window rather than background noise.
Intervention
A tailored micro-prompt — haptic, audio, or in-app — fires at the optimal moment of vulnerability.
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.
System Architecture
This pipeline moves raw brainwave data into real-time preventative action using existing open-source models and platforms.
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