CogDriftFormer
CogDriftFormer is a novel multimodal transformer architecture purpose-built for real-time cognitive safety monitoring in human-AI interaction systems. It fuses behavioral event sequences with natural language signals to detect three critical safety states: cognitive overload, emotional drift, and manipulation exposure — enabling AI systems to proactively protect users before harm occurs.
The Problem
Current AI safety monitoring focuses on output filtering but ignores the cognitive state of the user. Extended LLM interactions can induce cognitive overload, emotional drift, and vulnerability to manipulation. No existing model architecture could simultaneously monitor all three states in real time from passively observable signals without intrusive sensor equipment.
The Solution
CogDriftFormer introduces two novel architectural contributions: DriftAware Positional Encoding (DAPE), which embeds cognitive trajectory as a temporal bias in the attention mechanism, and Cross-Modal Dual Attention (CMDA), which enables asymmetric cross-attention between behavioral and linguistic modalities. The 21.77M parameter model is trained on a custom synthetic dataset with clinically grounded labeling criteria.
Key Features
Challenges & Learnings
The primary challenge was dataset construction: no labeled dataset existed for the intersection of cognitive load, emotional drift, and manipulation exposure in LLM interaction contexts. A synthetic data generation pipeline was designed using clinically validated cognitive load scales (NASA-TLX, SWAT) as ground truth proxies. Balancing the three tasks in a single model without catastrophic forgetting required careful multi-task loss weighting and task-specific head architecture.
Research Contributions
First transformer architecture to simultaneously model cognitive overload, emotional drift, and manipulation exposure from passively observable behavioral + linguistic signals. DAPE and CMDA are novel contributions to the multimodal attention literature. Full paper submitted to IEEE.
Business Impact
Enables AI platforms to detect user cognitive danger states in real time and trigger protective interventions — muting notifications, simplifying interface, or escalating to human support. Applicable to enterprise AI copilots, mental health platforms, and educational AI systems.
Future Direction
Real-time deployment as a lightweight monitoring sidecar for LLM API calls. Integration with browser extension to monitor production LLM interactions. Extension to detect adversarial prompt injection targeting user cognition.
Tech Stack
Quick Links
Want to see more of my work?
Back to Projects