A Causal AI Early Warning and Precision Intervention System for Drug and Substance Use Disorders in Kenya
# ZeraMatumizi 🇰🇪
> *Zera Matumizi — "Eliminate Use" in Swahili*
A longitudinal, open-science, production-grade **Causal AI Early Warning
and Precision Intervention System** for Drug and Substance Use Disorders
in Kenya — combining causal inference, Bayesian modelling, NLP, graph
neural networks, and quantum computing into a unified public health
intelligence platform.
---
## The Problem
Over **1.5 million Kenyan youths** are grappling with drug and substance
abuse. Over 90% of rehabilitation facilities are privately owned, skewed
toward urban centres, and unaffordable to the majority of Kenyans.
**No data-driven early identification system exists at the county level.**
ZeraMatumizi addresses this gap by:
1. **Predicting** which individuals and communities are at highest risk —
before clinical presentation
2. **Explaining** the causal pathways driving risk across 47 counties
3. **Optimising** allocation of Kenya's scarce treatment resources
4. **Generating** actionable intelligence for NACADA officers in both
Swahili and English
---
## System Architecture
Raw Data (KDHS 2022, NACADA, DHIS2, OSM)
│
▼
D1: ETL Pipeline ──────────────────────────────────────────────
│ loader.py → validator.py → cleaner.py
│ 4,000 respondents, 13 features, Pandera schema validation
▼
D2: Causal Inference ──────────────────────────────────────────
│ dag.py → Interactive causal DAG (26 nodes)
│ did_analysis.py → NACADA campaigns: -27% disorder rate
│ rdd_analysis.py → Age-18 threshold: +56% disorder risk
│ iv_analysis.py → Chang'aa proximity IV: β=0.557
▼
D3: Bayesian Hierarchical Model ───────────────────────────────
│ hierarchical_model.py → County risk with credible intervals
│ Nyamira 14.1% [9.7%, 20.7%] ... Homa Bay 11.7% [7.5%, 16.9%]
▼
D4: NLP & LLM Pipeline ────────────────────────────────────────
│ swahili_ner_model.py → Swahili SUD NER (5 entity types)
│ rag_pipeline.py → NACADA counsellor RAG assistant
│ topic_modelling.py → BERTopi …