When robots and people stop expecting the same thing
A background study of how a robot working near people could read their reactions and notice that something has gone wrong.
A background study, not finished research. This site summarises what I've read and the ideas it led me to. The PDV and HEV methods described here are my own working ideas, and they haven't been validated.
The problem
Safety standards such as ISO/TS 15066 limit a collaborative robot's speed, separation and force. They don't consider what the person is thinking. Yet people often show distraction, confusion or surprise in their face, gaze, head and voice seconds before anything physical happens.
The idea: two directions
PDV: Personal Deviation Violation
The robot notices that the person has left their own normal behaviour, or hasn't given a response it expected.
HEV: Human Expectation Violation
The person reacts to something the robot did as unexpected.
What I found in the literature
Most work I read looks at one direction. This table shows how each one touches the main ideas, as I understood them. A half circle means partly.
Work
Both directions
Attribution
Face, gaze, voice and speech
No labels for the person's side
Safety-linked response
Stiber 2025
◐
Ngo 2026
◐
◐
Kontogiorgos 2022
◐
Wachowiak 2026
◐
◐
Bajcsy 2022
◐
◐
ERR@HRI 2.0
◐
◐
◐
Moving to new test data is hard. In Jiang 2025, robot-mistake detection fell from an F1 of 0.71 in validation to 0.26 on the hidden test set. False alarms are another common obstacle.
Public datasets of how people react to robots and their errors.
Dataset
What it contains
Form
Useful for
REFLEX
55 people; robot failures
Features only
HEV
HRI-confusion
28 people with a Pepper robot; 789 clips
Raw video and speech
PDV, speech and tone, HEV
BAD (Bystander Affect Detection)
54 people; 2,452 webcam reactions to failure videos
Raw video
HEV
Social Responses to Errors
Three physical-HRI studies: assembly, cooking and programming by demonstration
Action Units
HEV
ERR@HRI 2024 and 2.0
A robot coach, and LLM-powered conversations
Features only
HEV, spoken corrections
UE-HRI
54 conversations with Pepper, 4 to 15 minutes each
Raw video
PDV drift over long sessions
ERR@HRI 3.0
Bystander videos of reactions to robot failures (2026)
Access requested
HEV, anticipating failures
Splits in ERR@HRI 3.0
Nobody in the test set appears in training, which measures how well a model works on new people. This challenge lists BAD with fewer people and clips than the full dataset above.
Numbers are from my reading notes, so please check each dataset's own paper before relying on them.
Architecture
How these ideas could fit together, from a person's signals to a robot's response.
A concept, not a built and tested system. It shows how I've organised what I learned.
1. From signals to two methods
Ready-made tools turn face and voice into signals, which then feed the PDV and HEV methods.
2. Who did the mismatch come from?
Timing and signal shape could help separate the two. A sudden reaction right after a robot action points to HEV, while a slow drift with no robot action points to PDV.
3. A graded response
The robot wouldn't simply stop or continue. It could respond in steps, according to the risk.
4. Above the physical safety layer
This layer could only make the robot more careful. It would never relax a certified safety limit, and it wouldn't be a safety function by itself.
OpenFace
An open-source toolkit that reads a face from ordinary video. It appears in much of the HRI work I read.
What it gives you
A schematic drawing, not real OpenFace output.
How it works
It works frame by frame and can run in real time from a standard webcam. Its output is a table with one row per frame, which is easy to turn into a time series.
Action Units, in plain words
An Action Unit (AU) is a basic facial movement from the Facial Action Coding System (FACS). A frown or a smile can be described as a mix of AUs, without guessing an emotion. OpenFace reports an AU's presence (0 or 1) and intensity (0 to 5).
AU
Movement
AU
Movement
AU
Movement
1
Inner brow raiser
9
Nose wrinkler
17
Chin raiser
2
Outer brow raiser
10
Upper lip raiser
20
Lip stretcher
4
Brow lowerer
12
Lip corner puller
23
Lip tightener
5
Upper lid raiser
14
Dimpler
25
Lips part
6
Cheek raiser
15
Lip corner depressor
26
Jaw drop
7
Lid tightener
28
Lip suck (presence only)
45
Blink
Why it matters for HRI
Common ground: all four main theses and all four main papers use facial Action Units, usually from OpenFace.
Sharing data: numbers can be shared without faces. REFLEX and ERR@HRI 2.0 are released as features, so they work directly with this kind of pipeline.
Head turns and speech: accuracy can fall when the head turns far, when the face is hidden, and when talking moves the mouth. That's why a confidence check and a speech mask on mouth AUs are useful.
Not emotion: AUs describe movement. A raised brow doesn't by itself mean surprise.
People differ: some people are far less expressive, so comparing someone with their own baseline can help.
Source and licence
T. Baltrušaitis, A. Zadeh, Y. C. Lim and L.-P. Morency, "OpenFace 2.0: Facial Behavior Analysis Toolkit," IEEE FG, 2018. Code on GitHub and Action Unit guide.
Commercial use needs a licence from Carnegie Mellon University, so please check the repository's terms.
FLAME
Faces Learned with an Articulated Model and Expressions: a 3D face model that describes any face with a small set of numbers.
How a face is built
A schematic drawing made for this site, not output from the real FLAME model.
Start with an average head, then change it with three separate groups of numbers:
Part
Symbol
Size
What it controls
Changes over time?
Shape
β
Up to 300
Who the person is: the shape of their head and face
No, it's fixed for a person
Expression
ψ
Up to 100
Smiles, frowns and other movements
Yes, in every frame
Pose
θ
Neck, jaw and eyeball joints, plus global rotation
Head turns, jaw opening and eye direction
Yes, in every frame
Together, these numbers give the position of all 5,023 points of the mesh: M(β, θ, ψ). The model was learned from over 33,000 3D scans.
From video to measures
FLAME doesn't read video by itself. Fitting tools estimate its numbers from images, such as MICA for offline use or SMIRK for near real-time use.
Why it could help when heads turn
Also a schematic drawing. Whether this helps in practice is an open question for me, as I haven't tested it.
In a camera image, turning your head changes how your face looks. FLAME keeps pose and expression separate, so measures can be taken in a front-facing view, on the same mesh points each time. These can stand in for Action Units, as the HEV page shows.
OpenFace or FLAME?
OpenFace
FLAME with a fitting tool
Gives you
Landmarks, pose, gaze and AUs, directly
A 3D mesh and its numbers, from which you measure
Input
Video, and many datasets already share its outputs
Raw video is needed
Action Units
Direct estimates
Geometric stand-ins, not official AU scores
Head turns
Accuracy can fall
Pose is modelled separately, which may help
Extra use
Reading behaviour
Also drives avatars for synthetic data, as in PDV Pipeline B
Limits to keep in mind
Fit quality: measures are only as good as the fit, and fitting adds jitter, so they usually need smoothing.
Face only: FLAME models the head's surface. Hair and fine detail, such as wrinkles, aren't part of the basic model.
Privacy: shape numbers and avatars relate to a real person's identity, so they need consent and care.
Source and licence
T. Li, T. Bolkart, M. J. Black, H. Li and J. Romero, "Learning a model of facial shape and expression from 4D scans," ACM Transactions on Graphics (SIGGRAPH Asia), 36(6), 2017. FLAME website and paper.
The website says FLAME 2023 Open is released under CC-BY-4.0, and that earlier versions are for non-commercial research. Please check the terms for the version you use.
PDV: Personal Deviation Violation
Is the person departing from their own normal behaviour, or missing a response the robot expects?
A proposed idea, not validated. Example charts below are for explanation only.
Two pipelines
Pipeline A would notice that a person has left their normal, with no labels. Pipeline B would also try to name the likely state, such as confusion, startle or distress.
Pipeline A: statistics, no labels
From one capture of deliberate expressions, so the deviation stays high on purpose.
A learned forecaster could ignore normal, predictable behaviour. A missing glance after a robot action would signal that the person may be unaware.
Pipeline B: a personal avatar for synthetic data
Capture: a consented two-minute video of the person.
Model: fit a FLAME 3D face model to each frame, and train a FlashAvatar head avatar.
Generate: drive the avatar with other people's real reactions, scaled to this person's own range.
Classify: train MiniRocket + Hydra + Ridge on these videos, for classes such as neutral, startle, surprise, confusion and distress.
Test: only on the person's real recordings.
Avatars would be consented, kept locally and never released.
HEV: Human Expectation Violation
Is the person reacting to what the robot just did?
A proposed idea, not validated. It would use real HRI datasets only, with no synthetic data.
Two pipelines
The two pipelines would differ only in how they read the face. A works with any dataset, including those that share only features, while B needs raw video.
The shared reaction
An illustration, not measured data. The assumption is that reactions vary in size and timing but share a shape across people.
The classifier
Pipeline B: reading the face with FLAME
A fitted 3D face model could separate expression from head rotation, so measures might hold up when people turn their heads.
Measure on the 3D face
Action Units
Inner and outer brow height
AU1, AU2
Brow-to-eye distance
AU4
Eyelid opening
AU5, AU7, AU45
Lip-corner raise and stretch
AU12, AU20
Lip-corner depression
AU15
Lip press
AU23, AU24
Mouth and jaw opening
AU25, AU26
Classification
How a window of face, gaze, head and voice signals becomes a decision: statistical methods first, then neural networks.
How to read the charts. They run each formula on made-up data, to show how the method behaves. They are not results. Using these methods for PDV and HEV remains unvalidated.
MiniRocket and Hydra are not purely statistical: they use convolution to make features, and a statistical linear model then decides. They are grouped here because no deep network is trained.
The idea: don't learn the filters. Pass the signal through thousands of fixed filters, record how each one responds, and train one simple linear model on those numbers.
The window size of 70 steps comes from the HEV design on this site. The chart is an illustration.
Kernels: each has 9 weights, three of them 2 and six of them −1. There are exactly 84 ways to place the three 2s, so there are 84 kernels.
Dilation: gaps between the weights let one kernel see short and long patterns.
Bias: a cut-off taken from quantiles of the kernel's output on training data. It is read from the data, not learned by gradient descent.
PPV: the proportion of positive values, meaning the share of time points above the bias. Each kernel, dilation and bias gives one number.
Ridge: a linear model with a penalty on large weights, which matters when there are far more features than examples. α controls the penalty and is usually chosen by cross-validation.
The original method was described for one signal at a time. Libraries extend it to many signals, and how they do so varies.
2. MiniRocket + Hydra + Ridge
The idea: add a second kind of feature. Hydra organises random kernels into groups, and the kernels in each group compete at every time step.
The chart is an illustration with one group of four kernels. Hydra's default is 64 groups of 8 kernels, at each dilation.
Kernels: 9 random weights, drawn from a normal distribution and then normalised. They are never trained.
Winner: at each time step, the strongest response in the group adds its value to that kernel's total.
Loser: the weakest response adds one to that kernel's count.
Input: by default, half of the groups read the signal's step-to-step differences, not the signal itself.
Together: the Hydra paper joins the two sets of features, and reports that this improves on MiniRocket alone on a standard benchmark. That benchmark is general time-series data, not HRI data.
On this site: this combination is the classifier proposed for HEV. It is trained once on data pooled from many people, and only the alarm threshold would shift for each person.
3. Mahalanobis distance + CUSUM
The idea: no classes are needed. Learn what is normal for this person, measure how far each moment is from normal, and raise an alarm when the difference keeps building up.
Why Mahalanobis, not ordinary distance?
Both signals usually rise together. A follows that pattern, and B breaks it, which ordinary distance cannot see.
Why CUSUM?
An illustration. The onset is the last moment the sum was zero, so the method also estimates when the change began.
Step
Formula
In plain words
Robust z-score
z = (x − median) / (1.4826 · MAD)
How far is this signal from the person's typical value? Median and MAD (median absolute deviation) resist outliers, and 1.4826 scales MAD to match a standard deviation for normally distributed data.
Mahalanobis
D(t) = √( zᵀ Σ⁻¹ z )
Turns all signals into one number. Σ is the covariance from the person's baseline.
CUSUM
S(t) = max(0, S(t−1) + D(t) − k)
Adds up whatever exceeds the slack k, and never falls below zero.
Alarm
S(t) > h
A higher h gives fewer false alarms, but slower detection.
This follows statistical process control. Phase I calibrates on a baseline: median, spread and covariance. Phase II watches live data. On this site it is PDV Pipeline A.
The classifier in part 2 and this detector are separate methods with different jobs. The classifier asks "is this a reaction, and of which kind?", and needs labels. The detector asks "has this person left their normal, and when?", and needs none.
4. Neural: from CNN to TCN
The idea: a Temporal Convolutional Network (TCN) is a CNN adapted to time series. In contrast to MiniRocket, it learns all of its filters from data. It takes four changes to get there.
Filled circles show exactly which inputs reach the newest output. These counts are computed from the wiring: 4 steps without dilation, and 8 with it.Residual block as in Bai et al. 2018. In the right-hand chart, a simple linear forecaster with eight past inputs stands in for a trained TCN, on made-up data. The lower chart shows the size of the residual.
Change to the CNN
Why
1. One dimension
The filter slides along time. Each signal is an input channel. Padding, in place of pooling, keeps one output for each time step.
2. Causal filters
The output at time t uses only t and earlier, so it can run live.
3. Dilation
A filter's taps are spaced d steps apart: F(s) = Σᵢ f(i) · x(s − d·i). Doubling d per layer reaches far back with few layers.
4. Residual blocks
Each block learns a change to its input, which helps deeper networks train. A 1 × 1 convolution matches the widths on the shortcut when needed.
How far back can it see? With one convolution per dilation, the reach is 1 + (k − 1) · Σd. So k = 2 and d = 1, 2, 4 gives 8 steps, which matches the inputs x(t−7) to x(t) in the PDV forecaster. A residual block has two convolutions at each dilation, so its reach is 1 + 2(k − 1) · Σd.
Two ways to use a TCN
As a forecaster, with no labels
Train it on normal behaviour to predict the next step. The error, e(t) = x(t) − x̂(t), replaces z in D(t), and CUSUM follows. Predictable behaviour should then stop causing alarms. This is the PDV design.
As a classifier, with labels
Train it directly to predict an event from past signals. Kontogiorgos 2026 compared this with MiniRocket + Ridge. The best result was a 5 s TCN, with AUROC 0.72 and AUPRC 0.20 (prior 0.04).
LSTM and GRU are the other common neural choice. They carry a memory from step to step, and do not use convolution. Liu's best binary result used an LSTM, and Patamia found MiniRocket + Ridge ahead of an LSTM on event F1 (0.80 against 0.56).
5. Comparison
Method
What is trained
Labels
Answers
Used in
MiniRocket + Ridge
Linear model only
Yes
Which class?
Patamia, Jiang, Wachowiak, Kontogiorgos 2026
MiniRocket + Hydra + Ridge
Linear model only
Yes
Which class?
Proposed here for HEV and PDV Pipeline B
Mahalanobis + CUSUM
Nothing: only a personal baseline is calibrated
No
Has it changed, and when?
Proposed here for PDV Pipeline A
TCN classifier
All filters
Yes
Is an event coming?
Kontogiorgos 2026
TCN forecaster + CUSUM
All filters
No
Is this unpredicted?
Proposed here for PDV
LSTM, GRU
All weights
Yes
Which class?
Liu, Patamia
Results across these studies use different data and measures, so they can't be ranked against one another directly.