From Pen Strokes to Sleep States: Detecting Low-Recovery Days Using Sigma-Lognormal Handwriting Features
Authors: Chisa Tanaka, Andrew Vargo, Anna Scius-Bertrand, Andreas Fischer, Koichi Kise
Organizations: Osaka Metropolitan University, Osaka, Japan · University of Applied Sciences and Arts Western Switzerland, Fribourg, Switzerland · University of Fribourg, Fribourg, Switzerland · German Research Center for Artificial Intelligence, Japan Laboratory, Osaka, Japan
While handwriting has traditionally been studied for character recognition and disease classification, its potential to reflect day-to-day physiological fluctuations in healthy individuals remains unexplored. This study examines whether daily variations in sleep-related recovery states can be inferred from online handwriting dynamics. % We propose a personalized binary classification framework that detects low-recovery days using features derived from the Sigma-Lognormal model, which captures the neuromotor generation process of pen strokes. In a 28-day in-the-wild study involving 13 university students, handwriting was recorded three times daily, and nocturnal cardiac indicators were measured using a wearable ring. For each participant, the lowest (or highest) quartile of four sleep-related metrics -- HRV, lowest heart rate, average heart rate, and total sleep duration -- defined the positive class. Leave-One-Day-Out cross-validation showed that PR-AUC significantly exceeded the baseline (0.25) for all four variables after FDR correction, with the strongest performance observed for cardiac-related variables. Importantly, classification performance did not differ significantly across task types or recording timings, indicating that recovery-related signals are embedded in general movement dynamics. These results demonstrate that subtle within-person autonomic recovery fluctuations can be detected from everyday handwriting, opening a new direction for non-invasive, device-independent health monitoring.
Figures & tables
Feature
Description
Type
D
Amplitude of motor command
Model parameter
t0
Onset time of motor command
Model parameter
nblog
Number of lognormal distributions
Reconstruction index
SNR
Signal-to-noise ratio
Reconstruction index
SNR/nblog
Reconstruction accuracy per distribution
Reconstruction index
Table 1: Five basic features extracted from the Sigma-Lognormal model. The mean and standard deviation of each feature are computed, yielding ten features in total.
Figure 1: Illustration of the Sigma-Lognormal model. The velocity profile (black line) is described as a sum of lognormal distributions (yellow lines).
Figure 3: Devices used for data collection
Figure 4: Visualization of writing speed for three participants (P1, P7, P13). Each row represents one participant, and each column shows data from days 1, 14, and 28 of the experiment. Color indicates stroke speed (0–300 mm/s).
Figure 5: Stroke order instructions for handwriting tasks
Figure 6: Distribution of target variables for each participant. Box plots show the median (red line), interquartile range (box), and minimum to maximum (whiskers). Blue dots represent individual daily data. Participants are ordered by ascending median of Total Sleep (P1–P13).
Figure 7: Classification performance by task (each target variable). Each point represents one user’s result. The red dashed line indicates the baseline (0.25).
Figure 8: Classification performance by timing (each target variable). Each point represents one user’s result. The red dashed line indicates the baseline (0.25).
PR-AUC
Recall@25%
Target variable
mean ± SD
p
q
sig.
mean ± SD
p
q
sig.
Avg HRV
0.391±0.131
0.0023
0.0046
**
0.416±0.139
0.0023
0.0046
**
Lowest HR
0.438±0.164
0.0001
0.0008
0.350±0.174
0.0327
0.0374
Avg HR
0.365±0.146
0.0031
0.0050
**
0.344±0.185
0.0471
0.0471
Total Sleep
0.352±0.125
0.0023
0.0046
**
0.322±0.108
0.0199
0.0265
Table 2: PR-AUC and Recall@25% for each target variable (user mean ± SD) with Wilcoxon test results. p : raw p-value; q : FDR-corrected p-value (Benjamini-Hochberg, 8 comparisons). The baseline (random classifier) is 0.25 for both metrics.
Task effect
Timing effect
PR-AUC
R@25%
PR-AUC
R@25%
Target
χ2
p
q
χ2
p
q
χ2
p
q
χ2
p
q
Avg HRV
2.40
0.663
0.847
2.26
0.688
0.847
0.46
0.794
0.907
6.84
0.033
0.344
Lowest HR
6.09
0.192
0.680
3.31
0.507
0.847
4.31
0.116
0.619
1.10
0.576
0.847
Avg HR
9.85
0.043
0.344
0.40
0.982
0.982
2.92
0.232
0.680
0.91
0.633
0.847
Total Sleep
2.65
0.619
0.847
0.82
0.935
0.982
1.08
0.584
0.847
2.73
0.255
0.680
Table 3: Results of Friedman tests. Tests were conducted for task effect (5 levels) and timing effect (3 levels) on PR-AUC and Recall@25% respectively (16 tests in total). q : FDR-corrected p-value (Benjamini-Hochberg, 16 comparisons). None remained significant after correction.
Osaka Metropolitan University, Osaka, Japan · University of Applied Sciences and Arts Western Switzerland, Fribourg, Switzerland · University of Fribourg, Fribourg, Switzerland +1