sarahzephyr commited on
Commit
45d5fbd
Β·
verified Β·
1 Parent(s): a0455a3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +33 -73
README.md CHANGED
@@ -17,97 +17,57 @@ tags:
17
  - hackathon
18
  ---
19
 
20
- # PsycheOS β€” Mental Health Crisis Operating System
21
 
22
- **Meta PyTorch OpenEnv Hackathon Γ— Scaler School of Technology β€” Grand Finale**
23
-
24
- *Solo submission by Mesa Sarah Vasantha Zephyr*
25
 
26
  ---
27
 
28
- ## The Problem
29
-
30
- 197 million Indians live with a mental disorder. There are 9,000 psychiatrists β€” one for every 155,000 people who need one. 83% receive zero care.
31
-
32
- PsycheOS is a self-improving multi-agent system designed to close that gap.
33
-
34
- ---
35
-
36
- ## What It Is
37
-
38
- PsycheOS is simultaneously:
39
- 1. **A real, deployable app** β€” open it in your browser right now
40
- 2. **An OpenEnv RL training environment** β€” with measurable reward signals
41
- 3. **A self-improving agent system** β€” that gets measurably better at crisis detection
42
-
43
- ---
44
 
45
- ## The 5 Agents
 
 
46
 
47
- | Agent | Role |
48
- |-------|------|
49
- | πŸ” **Detector** | Classifies distress severity 1-5 from free text |
50
- | πŸ’¬ **Empathy** | Generates clinically appropriate responses (DPO fine-tuned) |
51
- | 🚨 **Crisis Escalator** | Decides when to route to human counselor (10x FN penalty) |
52
- | πŸ‘ **Oversight** | Monitors agents for contradictions and tone mismatches |
53
- | πŸŽ“ **Curriculum** | Auto-generates harder training episodes when agents plateau |
54
 
55
  ---
56
 
57
- ## Hackathon Themes Covered
58
 
59
- - **Theme 1 β€” Multi-Agent Interactions** (full)
60
- - **Theme 3 β€” World Modeling / Personalized Tasks** (full)
61
- - **Theme 4 β€” Self-Improvement** (full)
62
- - **Theme 5 β€” Wild Card** (bonus)
63
 
64
- **Bonus prizes targeted:** Fleet AI Β· Snorkel AI Β· Halluminate
 
 
 
65
 
66
  ---
67
 
68
- ## Technical Stack
69
 
70
- - **Environment:** OpenEnv + Gymnasium-compatible POMDP
71
- - **Agents:** LangGraph state machine
72
- - **Memory:** FAISS + RAG + sentence-transformers
73
- - **Training:** GRPO via HF TRL + Unsloth (LoRA, 4-bit)
74
- - **Self-improvement:** DPO on psychiatrist-simulated preferences + curriculum self-play
75
- - **UI:** Streamlit with live agent activations
76
 
77
- ---
78
-
79
- ## Training Results
80
 
81
- | Metric | Before | After (500 episodes) |
82
- |--------|--------|---------------------|
83
- | Detection F1 | 0.61 | 0.89 |
84
- | Escalation Precision | 0.71 | 0.94 |
85
- | DPO Win-Rate | 51% | 79% |
86
 
87
  ---
88
 
89
- ## Local Setup
90
-
91
- ```bash
92
- git clone https://huggingface.co/spaces/mesazephyr/psycheos
93
- cd psycheos
94
- pip install -r requirements.txt
95
- streamlit run app/streamlit_app.py
96
- ```
97
-
98
- ## Training
99
-
100
- ```bash
101
- # GRPO training (requires HuggingFace compute credits)
102
- python training/grpo_train.py --episodes 1000 --epochs 3
103
-
104
- # DPO fine-tuning (empathy agent)
105
- python training/dpo_finetune.py
106
-
107
- # Evaluate
108
- python eval/reward_curves.py
109
- ```
110
-
111
- ---
112
 
113
- *PsycheOS β€” Mesa Sarah Vasantha Zephyr β€” April 25-26, 2026 β€” Bangalore*
 
 
 
 
 
 
17
  - hackathon
18
  ---
19
 
20
+ # 🧠 PsycheOS β€” Mental Health Crisis Operating System
21
 
22
+ **Meta PyTorch OpenEnv Hackathon Γ— Scaler School of Technology β€” Grand Finale**
23
+ **Solo Submission β€” Mesa Sarah Vasantha Zephyr**
 
24
 
25
  ---
26
 
27
+ # 🚨 Problem
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
+ 197M+ people in India suffer from mental health disorders.
30
+ There are only ~9,000 psychiatrists β†’ **1 per 155,000 people**.
31
+ **83% receive no treatment.**
32
 
33
+ Current LLM systems fail at:
34
+ - Long-horizon emotional reasoning
35
+ - Crisis detection under ambiguity
36
+ - Maintaining consistency across conversations
37
+ - Knowing when to escalate to humans
 
 
38
 
39
  ---
40
 
41
+ # πŸ’‘ Solution
42
 
43
+ PsycheOS is a **trainable reinforcement learning environment + multi-agent system** that teaches LLMs to:
 
 
 
44
 
45
+ - Detect distress accurately
46
+ - Respond empathetically
47
+ - Escalate high-risk cases safely
48
+ - Maintain memory + consistency
49
 
50
  ---
51
 
52
+ # 🧠 Environment Definition
53
 
54
+ ## State (POMDP)
 
 
 
 
 
55
 
56
+ Each timestep contains:
 
 
57
 
58
+ - `message` β†’ current patient input
59
+ - `session_history` β†’ last 3 turns
60
+ - `stressors` β†’ latent causes (grief, isolation, etc.)
61
+ - `hidden_distress` β†’ ground truth (1–5, not visible to agent)
62
+ - `turn` β†’ conversation step
63
 
64
  ---
65
 
66
+ ## Actions (Agent Output)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
 
68
+ ```json
69
+ {
70
+ "distress_level": 1-5,
71
+ "response": "empathetic message",
72
+ "escalate": true/false
73
+ }