## 4 Discussion  
This study examined the dynamic handwriting features across nine cognitive and drawing tasks to assess cognitive function in IDD patients. The SVM model using eight features achieved an AUC = 0.910, and the five-feature variant maintained a comparable performance (AUC = 0.921) while reducing the assessment time by 35%. These results suggest that digital handwriting metrics may complement the standard screening by capturing temporal and motor characteristics not assessed in conventional testing.  
Our findings relate to prior studies of handwriting kinematics in neurological disorders [21, 22]. Previous work has shown altered movement patterns in MS patients during writing tasks. Our multi-task approach captured additional information beyond single-task assessments, though direct performance comparisons are limited by different study populations and methodologies. The differences in the prevalence of cognitive impairment observed between the MS (23.4%) and NMOSD (57.1%) patients align with emerging clinical observations of varying cognitive vulnerabilities across IDD subtypes.  
These findings provide valuable insights into the potential utility of digital handwriting analyses in cognitive assessments of IDD patients. The simplified five-feature model we developed demonstrates the feasibility of integrating select handwriting metrics with the traditional cognitive screening measures to create efficient, multimodal assessment protocols. The inclusion of features from different drawing tasks highlights the complementary nature of various cognitive-motor challenges in revealing subtle impairments.  
Our cross-sectional design with 93 patients (90 with complete data) limits the causal inference and statistical power for subgroup analyses (MS: \(n=45\); NMOSD: \(n=34\)), although this cohort size is comparable to that in other exploratory digital handwriting studies in neurological populations. The narrow 95% confidence interval for our SVM model's AUC (0.853-0.967) and the stable cross-validation performance indicate reliable discrimination, yet validation in larger, multi-center cohorts is needed before its clinical implementation.  
The absence of healthy controls prevents an assessment of whether the observed features reflect disease-specific pathophysiology versus age-related changes in motor-cognitive integration. This limits our ability to establish normative handwriting baselines and distinguish IDD-specific cognitive-motor patterns from the variability in the general population. Additionally, our binary MoCA classification (<26) may lose information that continuous cognitive modeling could preserve by treating all scores below the threshold as equivalent regardless of severity.  
We collected the patients' medication histories but did not model the effects of specific drugs on their handwriting parameters. IDD treatments may influence fine motor control, representing a potential confounding factor. Furthermore, while we applied the EDSS inclusion criteria (<6.5), we did not analyze the full disability distribution within our cohort, limiting an examination of the motor versus cognitive contributions to the handwriting features.  
Our sample was relatively young and highly educated, which may limit the generalizability. The temporal stability of these handwriting metrics and their performance in remote settings remain unknown, affecting potential clinical implementation.  
Future research should examine the longitudinal changes in handwriting features, include healthy control groups, and incorporate the effects of medication into its analyses. Validation in larger, more diverse populations is needed to confirm clinical utility and establish the optimal implementation strategies for digital handwriting assessments in IDD care.