MemoryMate - Early Dementia Detection Through AI-Powered Conversations
đź’ˇ Inspiration
Watching a teammate's grandmother struggle with undiagnosed dementia was heartbreaking. Her family noticed small changes—forgetting words, repeating questions—but didn't know these were warning signs until it was too late. By the time she was diagnosed, critical intervention windows had closed.
We learned that early detection can improve dementia outcomes by up to 40%, yet seniors rarely get screened. Current methods require expensive clinical visits, and by the time symptoms are obvious to families, years of subtle decline have already occurred.
The gap: Over 55 million people worldwide live with dementia, but existing AI solutions either provide unexplainable "black box" scores or focus only on text analysis. None give families the transparent, actionable insights they need to advocate for their loved ones.
We built MemoryMate to bridge this gap—an AI companion that detects cognitive decline early through natural daily conversations and gives families explainable, clinically-meaningful insights.
🎯 What It Does
MemoryMate monitors cognitive health through simple daily check-ins via SMS or voice calls. Unlike existing solutions, it provides:
Multi-Modal Analysis
- Analyzes both what seniors say and how they say it
- Tracks voice patterns (hesitation, word-finding pauses, speech rate)
- Monitors text patterns (grammar, vocabulary complexity, repetition)
- Detects behavioral changes (response times, engagement levels)
Explainable AI
Instead of cryptic scores, families see specific evidence:
- "Used generic words like 'thing' instead of nouns 4 times this week (baseline: 0.5x/week)"
- "Average pause before answering increased from 1.2s to 3.8s"
- Direct links to concerning conversation snippets
Clinical-Grade Output
- Doctor-ready PDF reports with decline trajectory graphs
- Multi-dimensional scoring: memory, language fluency, executive function
- Exportable data formatted for healthcare providers
- Predictive modeling: "At current rate, clinical symptoms likely in 8-12 months"
Actionable Family Support
- Plain-language explanations of what changes mean
- Specific next steps: when to schedule appointments, what to ask doctors
- Local resource finder for memory clinics and specialists
- Educational content about dementia stages
🛠️ How We Built It
Architecture
- Backend: Node.js + Express REST API
- Database: PostgreSQL with time-series optimization for longitudinal tracking
- Frontend: React dashboard with Recharts for data visualization
- Communication: Twilio API for SMS/voice calls
- AI Analysis: Anthropic's Claude API for conversation analysis
- Voice Processing: Deepgram for speech-to-text with diarization
- Report Generation: Puppeteer for PDF export
Technical Implementation
1. Conversation Engine
// Daily automated check-ins with contextual follow-ups
const questions = generateContextualQuestions(userHistory);
await twilioClient.messages.create({
body: questions[0],
to: seniorPhoneNumber,
from: twilioNumber
});
2. Cognitive Marker Detection We implemented multi-dimensional analysis:
- Lexical Diversity: $\text{TTR} = \frac{\text{unique words}}{\text{total words}}$ (Type-Token Ratio)
- Semantic Coherence: Embedding similarity between responses
- Temporal Patterns: Response latency, time-of-day engagement
3. Baseline Comparison
// Compare current metrics to rolling 30-day baseline
const decline_score = (current_metric - baseline_mean) / baseline_std;
if (decline_score < -2.0) {
generateExplainableAlert(conversation_id, metric_type);
}
4. Explainable Alerts We built a custom evidence extraction system:
- Flags specific responses that deviate from baseline
- Highlights linguistic patterns (word substitutions, repetitions)
- Generates human-readable explanations using Claude API
5. Predictive Modeling Linear regression on time-series data: $$\hat{y}_t = \beta_0 + \beta_1 t + \epsilon_t$$ Where $y_t$ represents cognitive score at time $t$, projecting future trajectory.
đź§— Challenges We Faced
1. Balancing Sensitivity vs. False Positives
- Challenge: Too sensitive = anxious families, too lenient = missed cases
- Solution: Implemented confidence thresholds and trend-based alerts (requires 3+ weeks of decline)
2. Privacy & Ethics
- Challenge: Handling sensitive health data, avoiding surveillance concerns
- Solution: End-to-end encryption, explicit consent flows, data deletion options, transparent AI explanations
3. Natural Conversation Flow
- Challenge: Making daily check-ins feel like friendly chat, not interrogation
- Solution: Claude API with memory of past conversations, contextual questions ("How's your garden doing?"), varied question patterns
4. Explainability Without Overwhelming Users
- Challenge: Technical metrics mean nothing to families
- Solution: Two-tier reporting: simple alerts for families, detailed reports for doctors
5. Time Constraints
- Challenge: Building multi-modal analysis in 12 hours
- Solution: Started with SMS (simpler), voice analysis as stretch goal, focused on MVP with real clinical value
🎓 What We Learned
Technical Skills
- Time-series database optimization for longitudinal health tracking
- Prompt engineering for healthcare-grade AI analysis
- Building explainable AI systems (not just black-box predictions)
- Real-time voice processing pipelines
Domain Knowledge
- Clinical markers of early dementia (from research papers)
- Ethical considerations in health monitoring AI
- The difference between correlation and clinical significance
- How families actually interact with aging parents (user research)
Hackathon Lessons
- Scope ruthlessly: We cut video analysis and focused on SMS/voice
- Demo-driven development: Built the most compelling features first
- Real problem validation: Talked to 3 families during the event—all said they'd use this
🏆 What's Next for MemoryMate
Immediate Improvements
- Integration with wearable devices (sleep, activity patterns)
- Multi-language support for immigrant families
- Caregiver burnout detection (monitor the family too)
Clinical Validation
- Partner with memory clinics for pilot study
- Validate against Montreal Cognitive Assessment (MoCA)
- Collect IRB approval for research dataset
Long-Term Vision
- FDA clearance as a medical device
- Insurance reimbursement for remote monitoring
- Open-source the explainability framework for other health AI tools
- Expand to other neurodegenerative conditions (Parkinson's, ALS)
📊 Impact Potential
- 55 million people worldwide living with dementia
- 63 million family caregivers in the US who need support
- $3.4 billion lost annually to financial scams targeting seniors with cognitive decline
- 40% improvement in outcomes with early detection
MemoryMate isn't just a monitoring tool—it's a lifeline for families navigating one of the hardest journeys they'll ever face.
🙏 Acknowledgments
- McMaster AI Society for organizing MacHacks 2026
- Research papers on linguistic markers of dementia (cited in documentation)
- Families who shared their stories during user research
- Open-source libraries: Twilio, Anthropic Claude, Deepgram, PostgreSQL
Built with ❤️ in 6 hours at MacHacks 2026
Built With
- axios
- javascript
- node.js
- postgresql
- react
- vite
- webspeechapi
Log in or sign up for Devpost to join the conversation.