A study of auxiliary screening for Alzheimer’s disease based on handwriting characteristics

Background and objectives Alzheimer’s disease (AD) has an insidious onset, the early stages are easily overlooked, and there are no reliable, rapid, and inexpensive ancillary detection methods. This study analyzes the differences in handwriting kinematic characteristics between AD patients and normal elderly people to model handwriting characteristics. The aim is to investigate whether handwriting analysis has a promising future in AD auxiliary screening or even auxiliary diagnosis and to provide a basis for developing a handwriting-based diagnostic tool. Materials and methods Thirty-four AD patients (15 males, 77.15 ± 1.796 years) and 45 healthy controls (20 males, 74.78 ± 2.193 years) were recruited. Participants performed four writing tasks with digital dot-matrix pens which simultaneously captured their handwriting as they wrote. The writing tasks consisted of two graphics tasks and two textual tasks. The two graphics tasks are connecting fixed dots (task 1) and copying intersecting pentagons (task 2), and the two textual tasks are dictating three words (task 3) and copying a sentence (task 4). The data were analyzed by using Student’s t-test and Mann–Whitney U test to obtain statistically significant handwriting characteristics. Moreover, seven classification algorithms, such as eXtreme Gradient Boosting (XGB) and Logistic Regression (LR) were used to build classification models. Finally, the Receiver Operating Characteristic (ROC) curve, accuracy, sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), and Area Under Curve (AUC) were used to assess whether writing scores and kinematics parameters are diagnostic. Results Kinematic analysis showed statistically significant differences between the AD and controlled groups for most parameters (p < 0.05, p < 0.01). The results found that patients with AD showed slower writing speed, tremendous writing pressure, and poorer writing stability. We built statistically significant features into a classification model, among which the model built by XGB was the most effective with a maximum accuracy of 96.55%. The handwriting characteristics also achieved good diagnostic value in the ROC analysis. Task 2 had a better classification effect than task 1. ROC curve analysis showed that the best threshold value was 0.084, accuracy = 96.30%, sensitivity = 100%, specificity = 93.41%, PPV = 92.21%, NPV = 100%, and AUC = 0.991. Task 4 had a better classification effect than task 3. ROC curve analysis showed that the best threshold value was 0.597, accuracy = 96.55%, sensitivity = 94.20%, specificity = 98.37%, PPV = 97.81%, NPV = 95.63%, and AUC = 0.994. Conclusion This study’s results prove that handwriting characteristic analysis is promising in auxiliary AD screening or AD diagnosis.


Introduction
According to the World Health Organization (WHO), the elderly population is growing rapidly and will reach nearly 1.4 billion by 2030 and increase to nearly 2.1 billion by 2050 (Ammal and Manoharan, 2023). Population aging has promoted researches on age-related diseases and mental diseases (Gaugler et al., 2022). Alzheimer's disease is the most common form of dementia and is becoming increasingly common (Thies and Bleiler, 2012;White et al., 2019). According to the latest statistics from the Centers for Disease Control and Prevention (CDC), the number of people with AD doubles every 5 years. According to the World Health Organization, it is estimated that the number of people with AD will reach almost 152 million by 2050 (Lei et al., 2021). It is characterized by a gradual onset of symptoms and an irreversible decline to a near vegetative state, with an average survival period of about 10 years (Small et al., 1997;Edition, 2013). After Alzheimer's disease reaches the dementia stage, it is currently medically incurable, and the only available pharmacological treatment is to slow the progression (Kverno, 2022), making early screening of AD particularly important.
Writing is a complex human activity that requires a complex mixture of cognitive, kinesthetic, and perceptual-motor components (Hunter,1974;Kverno, 2022), which includes visual and kinesthetic perception, motor planning, eye-hand coordination, visuomotor integration, dexterity, and manual skills (Tseng and Cermak, 1993). Also, writing is one of the abilities affected by Alzheimer's disease (Platel, 1993;Tseng and Cermak, 1993;Hughes et al., 1997;Forbes et al., 2004;Caterina Silveri et al., 2007;Cilia et al., 2019). Indeed, when signs of the disease become apparent, the impairment may already have been significant and irreversible. In this context, it is widely accepted that writing is one of the first skills affected by cognitive impairment (Pereira et al., 2018). There is evidence that a healthy or unhealthy person can be distinguished by his or her ability to perform simple writing activities (Kawa et al., 2017), so some differences in writing handwriting affected by cognitive disorders may provide some basis for diagnosing these disorders.
So far, most of the studies on handwriting in AD have been conducted in the field of medicine and psychology, which typically use statistically relevant methods to find some statistically significant features of the patient's handwriting (Stefano et al., 2018). It is also concluded that handwriting is a good alternative biomarker for assessing AD, and that handwriting analysis research is considered promising . In addition, with the popularization and development of computers, computers, and artificial intelligence have been carried out in corresponding fields, mainly using various algorithms to screen features and build the classification model (Stefano et al., 2018;Dentamaro et al., 2021). Some researchers use dynamic features in combination with images and find that dynamic information can improve the performance of binary images (Cilia et al., 2021). And have achieved good results by using machine learning algorithms (Cilia et al., 2022). These studies have detected AD patients with mild motor dysfunction (Ghilardi et al., 2000;Smits et al., 2014), with the most common abnormalities being micro writing, slower movement, and other (Smits et al., 2014).
The purpose of this study is to conduct an exploratory study on the value of AD-assisted diagnosis based on the kinematic characteristics of different tasks. This study considers a variety of handwriting tasks that examine cognitive states. Four handwriting tasks were finally designed to construct a set of writing characteristics applicable to distinguish the handwriting of the AD group from that of healthy controls. In order to better reproduce handwriting, a dot-matrix pen and paper were used to replace the digitizing tablet device commonly used to capture handwriting in the past. Using the "Huzhou Normal University Handwriting characteristic Analysis System (huSaS)" based on dot matrix paper and pen developed by this team, the handwriting characteristics of 34 AD patients and 45 healthy controls were automatically and quantified by pattern recognition technology, and the differences in handwriting characteristics between AD group and healthy control group were analyzed according to the obtained data. The resulting data were used to analyze the differences between the handwriting characteristics of the AD group and the healthy controls.

Participants
The recruitment period is from September 2021 to January 2022. Seventy-nine outpatients were recruited from the geriatric psychiatric outpatient clinic of the Third People's Hospital of Huzhou City, China. Of these, 34 with probable AD, and 45 healthy seniors, took part in this experiment. The diagnosis of AD was based on medical records, psychometric testing, neuroimaging, and follow-up investigations. All fulfilled the criteria specified for probable AD (McKhann et al., 2011). All of them were mild AD patients. All participants performed the Mini-Mental State Examination (MMSE; Folstein et al., 1975) and the Montreal Cognitive Assessment Basic (MoCA-BC; Chen et al., 2016) at the same day as the assessment of handwriting.
Obtaining permission is shown in Supplementary Figure S1. All participants used right hands as their dominant hands, and their native language was Chinese. And the exclusion criteria are as follows: psychiatric disorders (e.g., depression, manic-depressive psychosis, etc.), history of substance abuse (e.g., alcoholism), head injury including loss of consciousness, or any other additional sensory condition that may adversely affect the mental status or motor function (e.g., visual impairment unless normalized with spectacle correction), developmental learning disabilities. A summary of the demographic characteristics of the participants is given in Table 1 In order to make handwriting acquisition more convenient, considering that writing with paper and pen is more suitable for the writing habits of the elderly and controlling irrelevant variables, the dot-matrix digital pen was selected as the handwriting acquisition tool in this study. After careful consideration and screening, the dot-matrix pen (TSTUDY, China) was finally selected as the writing tool in this study, which mainly consists of a pressure sensor, a high-speed camera, a processor, a battery, data memory, and a Bluetooth or USB communication module. The pressure sensor (pressure sensing level 1,024) is triggered when the pen tip is pressed down. The built-in high-speed camera is activated to take pictures of the dots passed by the pen tip at 100 frames per second. The information such as dots coordinates, handwriting order, pressure data, and movement speed are transmitted to the built-in processor, which is finally output to the outside via Bluetooth or USB communication unit. The "dot-matrix" is composed of some tiny dots arranged according to special algorithm rules, which can provide the digital pen with a piece of coordinate parameter information to accurately record the digital pen writing on the digital handwriting by printing on ordinary paper (through ordinary laser printers, professional printing) on a layer of dot-matrix pattern, you can make paper becomes intelligent. Furthermore, the dot-matrix pen supports secondary application development after obtaining authorization, providing the possibility of obtaining more writing characteristics. Figure 1A shows a picture of the dot-matrix pen, and Figure 1B shows the dot-matrix data unit.

Selection of handwriting acquisition tools
According to the characteristics of writing tasks selected by previous authors (Luzzatti et al., 2003;Schrter et al., 2003;Werner et al., 2006;Evyapan Akku, 2015;Garre-Olmo et al., 2017;Kawa et al., 2017;Kahindo et al., 2018), combined with the needs of this study, after repeated demonstrations by our team, the selection criteria of the writing tasks were finally determined: the investigation is comprehensive, moderate difficult, easy to understand, and emotionally neutral. After pre-experimentation, the following four handwriting tasks (two graphic and two textual tasks) were finally selected: (1) Connection of fixed points. Four dots were connected as required, and the shapes of the two groups were "十" and "X" respectively. This task examines the participants' fine control and execution of the wrists. (2) Copying the intersecting pentagon. This task required drawing the two intersecting pentagons given. This task examined the ability to copy geometric figures and to perform two-dimensional visual space. (3) Dictate three Chinese words: "儿 子, " "女儿, " "大米, " which means: "son, " "daughter, " and "rice, " pronounced "Er Zi, " "Nu Er, " and "Da Mi. " This task was designed to examine the participants' short-term memories and executive abilities.
(4) Copy a phrase. The participants were asked to copy a Chinese sentence: "开心每一秒，快乐每一天, " which means: "Happy every second, pleasure every day. " This task was designed to examine spatial organization and execution skills. The writing task is shown in Supplementary Figure S1.

Screening of handwriting characteristic
This study was based on the handwriting characteristics extracted from previous studies and finally screened 33 objective handwriting characteristics: two items in the time category (time in the air, single stroke time); seven items in the length category [single stroke length, horizontal/vertical stroke length, horizontal/vertical stroke length (variance, standard deviation)]; four items in the pressure category (average mean, variance, standard deviation, and entropy value); 17 items in the speed category (velocity entropy value, average velocity, and horizontal/vertical average velocity, velocity maximum value, minimum value, variance, and standard deviation); the number of times the velocity slowed down, horizontal/vertical velocity (maximum value, minimum value, variance, and standard deviation); three items in the acceleration category (acceleration entropy value, number of times the acceleration slowed down); and two other items (number of strokes, tilt). The writing was also assessed for each handwriting by task using specific scoring criteria. The scoring criteria for task 1 were connecting orientation, and accurate angle, which satisfied counting one point for two groups and two points in total; the scoring criteria for task two was a pentagon, closed intersection, and roughly the same side length, which satisfied one point for one item and three points in total; the rest of the tasks were scored according to the correctness of each word, and one point for writing one word correctly. A total of 35 subjective handwriting characteristics and objective handwriting characteristics were finally obtained (Table 2).

Development of handwriting analysis system
In order to facilitate the collection, a handwriting collection APP is written in Android language to realize the visualization of the collection, in which the handwriting reproduction is convenient for the preliminary test to observe whether the handwriting is successfully collected and to delete the incorrect data in a single line or in a batch in time. Transmitting to the database SQLite on the computer side via Bluetooth, and the collected writing information can be automatically transformed into characteristic handwriting data.

Handwriting acquisition procedure and data processing
Participants were invited to a quiet room and sat on a chair in front of a table. Dot-matrix pens and dot-matrix papers (210 mm × 297 mm) printed with four tasks were placed on the table, and the lower edge of the paper was aligned with the edge of the table where the participants were sitting. The participants' forearms are placed at an angle of about 30 degrees to the lower edge of the paper. The experimenter read the instructions and demonstrated the writing process. The participants performed a 5-min breathing exercise (fine and deep long) before writing to ensure that the writing was done calmly, at a self-paced and comfortable speed.
Extract handwriting information in stroke units. Since Chinese characters are composed of multiple strokes, this study divides the  writing handwriting into single strokes. The standard for splitting a single stroke is that the pen tip touches the paper until the pen is written again before the next stroke (A corresponding induction device inside the dot-matrix pen can record the contact state of the pen tip and the paper). Based on the handwriting acquisition system developed by the research group, using the code written for each feature, the collected basic position, time and pressure information are converted into the required handwriting feature values. Because each stroke was taken as an independent sample, the characteristics of each stroke were not averaged over the strokes. Data preprocessing was first performed for the extracted data to fill in the missing data with the average mean. Then the obtained data are analyzed and selected for handwriting characteristics. And independent sample Student's t-test and Mann-Whitney U-test were performed using SPSS26.0, respectively, according to whether the normality test and ANOVA were satisfied, and differences were considered statistically significant at p < 0.05. The above process obtains a handwriting characteristic database. PyCharm Community Edition 2020.3.2 ×64 was used for programming, using Logistic Regression (LR), K-Nearest Neighbors (KNN), Support Vector Machine (SVM), GaussianNB (GNB), Random Forest (RF), eXtreme Gradient Boosting (XGB), and Adaptive Boosting (Adaboost) to build classification models. For each ROC curve, we used Youden's method to find the optimal threshold values as well as the Sensitivity (Se.), Specificity (Sp.), Positive Predictive Value (PPV), Negative Predictive Value (NPV), Accuracy (Acc.), and Area Under the Curve (AUC). The overall design scheme diagram is shown in Figure 2.

Results
In the general information of the patients and control groups (Table 1), the Mann-Whitney test showed significant differences between the two groups in MMSE (p < 0.001) and MoCA-BC (p < 0.001). In terms of gender (p = 0.977, Chi-square test), age (p = 0.457), years of education (p = 0.064), nature of work (p = 0.454, Chi-square test), residence status (p = 0.239, Chi-square test), area of residence (p = 0.967, Chi-square test), and monthly income (p = 0.624, Kruskal-Wallis test) were not significantly different.
Kinematic analysis showed significant differences between the AD and control groups on most parameters (Tables 3, 4). In task 1, there were statistically significant differences between AD patients and controls on 14 handwriting characteristics such as pressure variance (p < 0.05, p < 0.01); in task 2, there were statistically significant differences between AD patients and controls on 19 handwriting characteristics such as pressure average mean (p < 0.05,p < 0.01); in task 3, there were statistically significant differences between AD patients and controls on In task 3, there were statistically significant differences between AD patients and controls in 17 handwriting characteristics, including time in the air and single stroke time (p < 0.05, p < 0.01); in task 4, there were statistically significant differences between AD patients and controls in 14 handwriting characteristics, including the number of strokes and single stroke length (p < 0.05, p < 0.01).
Through observation, we found that each task's AD group and the control degree had some characteristics in common. For example, in each task, the maximum speed per stroke, the maximum velocity in the horizontal and vertical directions, and the standard deviation of the velocity in the AD group were smaller than that in the control group.
In addition to the common characteristics, we found that the handwriting characteristics of the two groups showed some subtle differences in different tasks. In Task 1, the variance and standard deviation of pressure in the AD group were higher than those in the control group, indicating that AD patients had poor stability of pressure when performing Task 1; the number of strokes did not differ between the two groups; the remaining variables showed smaller values in the AD group. In task 2, the AD group's task score was not lower than that of the control group; the average mean, standard deviation, and variance of pressure in the AD

FIGURE 2
Experimental design scheme diagram.
Frontiers in Aging Neuroscience 06 frontiersin.org group were higher than those of the control group, indicating that in task 2, the AD patients wrote with more pressure and were more unstable. In tasks 3 and 4, the pressure entropy value, velocity entropy value, acceleration entropy value, number of slowed-down velocities, number of strokes, and number of slowed-down accelerations were all higher than those of the control group, indicating that AD patients were less stable in writing; the average mean value of pressure, single stroke time, and time in the air were all higher than those of the control group, indicating that AD patients were more pressured and acted less responsively when writing, requiring more writing time and time for reflection and recall. There were no differences in task scores in task 3; the remaining variables showed smaller values for the AD group. In task 4, the single stroke length was longer in the AD group, indicating a larger writing font; the remaining variables showed smaller values in the AD group. Several characteristics showed statistically significant (p < 0.05), primarily negative, correlation with the reference MoCA-BC results: results marked bold in Tables 3, 4.
Entering all features into the classifier, the classification is not satisfactory. So, the statistically significant features (all features are included in Tables 3, 4 without further optimization) were used as inputs in seven classifiers to test the effectiveness of the classification. These seven classifiers are Logistic Regression (LR), K-Nearest Neighbors (KNN), Support Vector Machine (SVM), GaussianNB (GNB), Random Forest (RF), eXtreme Gradient Boosting (XGB), and Adaptive Boosting (Adaboost). Tables 5-8 show each classifier's accuracy, specificity, sensitivity, positive predictive amount, negative predictive amount, and AUC values. The results show that the accuracy of each model, except the KNN classifier in task 3, all ranged from 71.5 to 96.55%. The AUC values ranged from approximately 0.75-0.99, which achieved good results, indicating that the written assessment and kinematic parameters were diagnostic aids in distinguishing the AD group from the control group. Figures 3, 4 show that XGB performs the best in accuracy and AUC on each task among the seven classifiers. Among the two graphics class tasks, task 2 (copying intersecting pentagons) had better discrimination. Acc. = 96.30%, ROC curve analysis showed the best threshold of 0.084, sensitivity = 100%, specificity = 93.41%, PPV = 92.21%, NPV = 100%, and AUC = 0.991 (Table 6; Figure 4B). Among the two text-based tasks, task 4 (transcribing a sentence) showed better distinction with the highest accuracy. Acc. = 96.55%, ROC curve analysis showed the best threshold value of 0.597, sensitivity = 94.20%, specificity = 98.37%, PPV = 97.81%, NPV = 95.63%, and AUC = 0.994 (Table 8; Figure 4D).

Discussion
In this study, two graphic tasks and two text tasks were set. A significant correlation was found in a Spearman analysis between the patient group's MoCA-BC scores and kinematic measures. This result was the same as in a previous study (Kawa et al., 2017). A significant correlation was found between cognitive level and kinematic writing parameters, indicating poorer motor coordination in patients with cognitive impairment.
The present study found that the average mean value of pressure would be higher in the AD group, even though the pressure of task 1 did not reflect a significant correlation, but still, the average mean value of pressure was somewhat higher in the AD group. This was entirely consistent with previous observational results that writing pressure became higher when writing in AD patients (Zhào et al., 2021). In contrast, some reports suggest that writing pressure in AD participants decrease rather than increase at (Werner et al., 2006). The increase in time in the air reflects the need for more thinking and reaction time during writing in the AD group (Yu and Chang, 2018). The higher number of slower speeds and slower accelerations in the AD group, as well as the higher entropy values for speeds and accelerations, indicate that the AD group has less stability in speed and acceleration during the writing and a decreased ability to keep writing speed stable (Schrter et al., 2003;Yan et al., 2008;Yu and Chang, 2018;Delazer et al., 2021). Although the handwriting characteristics of the two groups differed in the two types of tasks with different levels of difficulty, overall, the AD group would have higher writing pressure, slower writing speed, and reduced writing stability.
This study also observed an increase in the number of strokes in the AD group in the text task. This phenomenon may occur because some AD patients have a reduced ability to control hand movements, resulting in miswritten writing. Also, because some AD patients are unsure if they are writing correctly, they repeatedly trace text that has already been completed.
The present study found that not every task produced the same handwriting characteristics, and the classification efficacy of handwriting characteristics changed with different tasks. It was found that copying intersecting pentagons was more effective than connecting fixed points in the graphical task, probably because the task of copying pentagons was more complex and required more thinking and conceptualization by the participants. In the text task, transcribing a paragraph was more effective than dictating three simple words, probably because transcribing a paragraph was more complex and required more handwriting movements and thinking time, so it was hypothesized that increasing the number of words in the text task would help distinguish the AD group from the control  group, but increasing the number of words would increase the participants' burden, so the appropriate number of words in the text transcription task also needs further study. Overall complex and demanding writing tasks help to detect early AD, which had the same findings as previous studies (Schrter et al., 2003;Yan et al., 2008;Ghaderyan et al., 2018;Yu and Chang, 2018;Delazer et al., 2021).
Handwriting and drawing performance may be early indicators of brain dysfunction (Schrter et al., 2003;Garre-Olmo et al., 2017). Therefore, using kinematic parameters to assess fine motor function during handwriting and drawing may be helpful in clinical settings (Garre-Olmo et al., 2017). In situations where specialized physicians and specialized equipment are in short supply, such as community hospitals, handwriting analysis can assist general practitioners in performing rapid initial screening to ensure rapid referral of newly identified patients with possible AD to specialist clinics. Changes in handwriting characteristics or abnormal performance of AD patients reflect their physiological dysfunction to varying degrees, and the analysis and study of handwriting characteristics of AD patients to establish valid quantitative evaluation indicators. The analysis of handwriting characteristics of AD patients can provide an effective Statistically significative correlation to MMSE results marked bold in columns (9-10). No., characteristic number; AD, Alzheimer's disease; HC, healthy control participants; MoCA-BC, montreal cognitive assessment basic; and IQR, inter quartile range. Bold indicates that the results were significant. Units: A-pressure sensation (1,024 levels), B-bit, C-ms, D-°, E-mm, E-mm, F-m/s, G-bit, H-score, and I-#. technical tool for clinical diagnosis, evaluation of the extent of the disease, and assessment of the efficacy of AD, and is also valuable for clinical research on AD movement disorders. However, this study has certain limitations: the sample size is small, and the sample size can continue to be increased in the future. However, the current analysis was performed by splitting the writing task into single strokes with a small sample size and achieved the highest accuracy rate of 96.55%. However, it is believed that a higher accuracy rate will be obtained when the sample size is increased. Due to the differences in individual writing habits and abilities, this study only controlled for education level, habitual hand use, etc. No differences were found, and each individual's writing habits and abilities can be divided in detail to improve the accuracy of the sample in the future. This study mainly collected cross-sectional data from patients with early AD, and it would be helpful to collect longitudinal data in the future to study the handwriting of AD    Receiver operating characteristic (ROC) curves were calculated to differentiate AD patients and healthy controls. patients. Although the differences in handwriting characteristics between AD patients and healthy patients were explored and analyzed, and a better classification model was constructed. This is not a substitute for professional diagnosis but only serves as an early warning or aid in diagnosis in the absence of professional doctors and equipment.

Conclusion
In this study, the handwriting characteristics of 34 AD patients and 45 healthy controls were collected and quantitatively analyzed using the self-developed "Handwriting characteristic analysis system of Huzhou University (huSaS), " which improves the efficiency of handwriting collection and analysis and provides the possibility of large-scale handwriting analysis. The study demonstrated that analyzing the differences in handwriting characteristics between the AD and control groups is promising in AD-assisted screening or assisted diagnosis.
The study found that there was a significant correlation between cognitive level and kinematic writing parameters in the AD and control groups, and the AD group had greater writing pressure, slower writing speed, and decreased writing stability. In the handwriting task with high complexity, the classifier classified better results, with the Frontiers in Aging Neuroscience 11 frontiersin.org highest accuracy of 96.55%. These conclusions all support the hypothesis that handwriting analysis can assist in screening for AD. Writing pressure is a controversial point. We found that the writing pressure would be greater in the AD group, which is similar to some previous studies, but this part needs further research. In terms of speed and writing stability, we conclude that AD patients will have slower writing speed, decreased writing stability, and poorer motor coordination, which is the same view as other researchers. At the same time, in terms of the effect of handwriting task difficulty on the classification effect, we draw a new view that the more difficult handwriting task is easier to distinguish between the two groups of people. In the future, we will try more complex writing tasks or combine handwriting features with graphics to expect better results.
This study provides new adjuvant screening modalities for early Alzheimer's disease. The auxiliary diagnostic model can effectively screen for early Alzheimer's disease and maintain high accuracy. Meanwhile, handwriting analysis also provides new ideas for early screening of other related diseases.

Data availability statement
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

Ethics statement
The studies involving human participants were reviewed and approved by the Medical Ethics Committee of the Third People's Hospital of Huzhou, China (review number: 2022-049). The patients/ participants provided their written informed consent to participate in this study.

Author contributions
HQ, LW, and QL contributed to conception and design of the study. XT, KZ, ZW, and RZ organized the database. RZ and CZ performed the statistical analysis. HQ and RZ wrote the first draft of the manuscript. QL and CZ wrote sections of the manuscript. QL and HQ provided funding. All authors contributed to the article and approved the submitted version.