CoolFace
Apppublic

avtak/depression-detection

sourceHugging Facemitupdated 9mo agoView on Hugging Face
0likes
App README

๐Ÿง  Early Depression Detection MCP Agent

Hackathon: MCP 1st Birthday - Track 2: MCP in Action (Consumer) Author: Hassan Hassanzadeh Aliabadi | LinkedIn

๐Ÿ“น Demo Video

YOUTUBE LINK

๐ŸŽฏ Project Description

This MCP-enabled agent detects depression risk from social media text by orchestrating specialized tools and LLM reasoning. It is built on Master's thesis research and is rigorously validated, achieving an F1-score of 0.7668 on the eRisk 2025 test data.

๐Ÿค– Multi-Provider Agent Architecture (MCP in Action)

The agent operates in a two-tier structure:

  1. 1.Tool Layer (The "Eyes"):
  2. 2.Tool: detect_depression_risk (My Longformer model).
  3. 3.Capability: 4,096-token context window for long user timelines.
  4. 4.Core Logic: Implements thesis-derived thresholds (0.4 / 0.6) and classification based on behavioral patterns.
  1. 1.Reasoning Layer (The "Brain"):
  2. 2.Purpose: Provides empathetic, research-backed interpretation.
  3. 3.Providers: Uses SambaNova (Meta-Llama-3.3) and Nebius (Kimi K2) via the same OpenAI client for enhanced robustness and sponsor stacking.

๐Ÿงช Thesis Findings Integrated

The agent doesn't just output a probability; it looks for and reports on specific linguistic biomarkers identified in my Master's Thesis:

  • โ€”"Nocturnal Posting" & "High-Effort, Low-Frequency": The primary behavioral signature of high-risk users.
  • โ€”"Echo Chamber Interaction": The signature of moderate-risk, supportive users engaging with high-risk topics (11.7x higher interaction rate).

๐Ÿ† Research Background

Built on Master's thesis research at University of Malaya:

  • โ€”Model: avtak/erisk-longformer-depression-v1.
  • โ€”Validation: Rigorous 5-fold cross-validation.
  • โ€”Data Augmentation: Used Gemini 2.5 Flash Lite to balance the depressed class.

โš ๏ธ Ethical Considerations

This is a research tool, not a medical diagnostic instrument. Crisis Resources:

  • โ€”๐Ÿ†˜ Crisis Text Line: Text HOME to 741741 (US)
  • โ€”๐ŸŒ International: befrienders.org