Affectiva’s Emotion SDK now includes two new real-time behavioral metrics: Yawn and Pain. Designed for media testing, gaming, UX research, and digital experiences, these AI-powered signals objectively measure physical facial reactions with low latency, helping researchers and developers detect fatigue, discomfort, disengagement, and visceral user responses with greater precision and contextual insight.
Table of Contents
We are excited to announce that we are expanding the capabilities of the Affectiva Emotion SDK with the introduction of two new expression-based metrics: Yawn and Pain.
Both signals are designed to provide developers, researchers, and media teams with highly specific, real-time measurements of observable physical behavior, enabling deeper insight into user reactions across digital experiences.
Unlike broad emotional classifications, these new metrics focus on objectively measuring distinct facial expressions and behavioral reactions.
This makes them especially valuable for applications where precision and context matter, including media testing, gaming, e-learning, UX research, advertising, and interactive entertainment.

Introducing the Yawn Signal
The new Yawn signal is a real-time metric designed to detect and measure physical yawn expressions. While previous yawn models were primarily developed for automotive and driver-monitoring systems, this version has been optimized specifically for scalable SDK applications across commercial research and digital experiences.
Rather than attempting to infer whether a user is “bored” or “fatigued,” the model focuses exclusively on the measurable physical characteristics of a yawn, including mouth opening, jaw drop, and vertical lip distance. This provides a transparent behavioral signal that developers and researchers can interpret within the context of their own application or study.
The model was trained using extensive and diverse real-world viewing data from Affectiva’s Media Analytics platform, helping ensure strong performance across different demographics, environments, and recording conditions. This broad training foundation improves reliability in situations where lighting, movement, speaking, and occlusion can vary significantly.
Technically, the Yawn signal is powered by a causal AI architecture optimized for real-time detection. The model evaluates 29 separate inputs, including Facial Action Units, mouth geometry, speaking activity, and occlusion data, alongside additional statistical features. Because the system does not rely on future video frames, it can deliver low-latency results suitable for live and interactive applications.
To improve stability and reduce false positives, the signal also incorporates intelligent spatial and temporal filtering mechanisms that suppress accidental activations and ignore short movements under 0.5 seconds that do not represent genuine yawns.
The result is a highly focused behavioral metric that can help identify moments of reduced attention, fatigue, or disengagement in content testing, e-learning, gaming, and usability studies.

Introducing the Pain Signal
Alongside the Yawn metric, Affectiva is also introducing a new Pain signal designed to measure physical pain-related facial expressions in real time.
Traditional pain-estimation models in scientific literature are often trained on clinical datasets such as the UNBC-McMaster Shoulder Pain dataset and rely on frameworks like the Prkachin and Solomon Pain Intensity (PSPI) scale. Affectiva’s approach adapts these concepts for broader commercial SDK use cases while maintaining a strong focus on observable facial behavior.
Like the Yawn signal, the Pain metric does not attempt to make broad assumptions about emotional state or psychological distress. Instead, it objectively measures the physical facial reactions associated with pain expressions.
High activations of the signal correspond to strong physical pain responses, while lower-intensity activations can also capture reactions commonly associated with discomfort, “cringe,” or moments users perceive as difficult to watch. This makes the signal particularly valuable for testing intense, dramatic, provocative, or highly immersive content.
The model was originally trained using extensive real-world viewing data from Affectiva’s Media Analytics cloud platform and has been optimized specifically for SDK deployment. The finalized system combines causal and acausal AI approaches with advanced temporal cleaning techniques, including morphological filtering, to minimize false positives and improve overall stability.
In addition, intelligent spatial filtering helps suppress activations when conflicting facial expressions are detected, improving reliability across diverse real-world environments and user behaviors.
For developers, researchers, and media teams, the Pain signal provides a new way to identify the exact moments where users exhibit strong visceral reactions during gameplay, movie trailers, reaction content, advertising, or interactive experiences.
Expanding Behavioral Measurement
Together, the Yawn and Pain signals represent an expansion of Affectiva’s approach to behavioral measurement within the Emotion SDK. Rather than relying solely on generalized emotional classifications, these metrics provide highly specific, context-aware behavioral signals that can complement broader engagement and emotion analysis.
By offering more granular insight into physical user reactions, the new metrics help researchers and developers build more adaptive, responsive, and deeply measured digital experiences.
Free 42-page Facial Expression Analysis Guide
For Beginners and Intermediates
- Get a thorough understanding of all aspects
- Valuable facial expression analysis insights
- Learn how to take your research to the next level

