## 1 Introduction  
Inflammatory demyelilating diseases (IDDs), including multiple sclerosis (MS) and neuromyleitis optica spectrum disorder (NMOSD), affect the central nervous system (CNS) through myelin damage [1]. Beyond motor and sensory symptoms, cognitive dysfunction affects approximately 40-65% of MS patients and 30-54% of NMOSD patients, manifesting as impaired processing speed, attention, executive function, and memory [2, 3]. This cognitive decline progresses independently of physical disability and significantly impacts quality of life [4]. Neuropsychological evaluation is essential for assessing cognitive function in IDDs, but no consensus exists on the instruments to use. The available tools range from brief screeners such as the Montreal Cognitive Assessment (MoCA) and Mini-Mental State Examination (MMSE) to disease-specific batteries--the Brief International Cognitive Assessment for MS (BICAMS), Minimal Assessment of Cognitive Function in MS (MACFIMS), and Brief Repeatable Battery-Neuropsychology (BRB-N)--and individual tests such as the Symbol Digit Modalities Test (SDMT) and the Paced Auditory Serial Addition Test (PASAT) [5; 6]. The MoCA detects mild impairments with a higher sensitivity than that of the MMSE (90% vs. 18%) but exhibits 1-2-point practice effects, ceiling effects in educated participants, and up to 1.4-point differences between in-person and telehealth administration [7; 8; 9; 10]; the SDMT is often cited as the single most sensitive test in MS [11], but its performance also depends on memory, lexical access, and visual-motor speed, and scores improve upon repeat testing [12; 13]; and the PASAT provokes stress, limiting its routine use [14]. Comprehensive batteries require 45-90 min with trained personnel [15], and paper-based scoring is subject to inter-rater variability [16]. These limitations--time burden, rater-dependent scoring, practice effects, and patient stress--motivate automated digital alternatives such as handwriting analytics, with a millisecond resolution and automatic scoring. From a computational standpoint, IDD handwriting presents unique challenges--subtle motor-cognitive deficits manifest in fragmented-velocity (MS) or variable-acceleration (NMOSD) signatures--requiring high-precision temporal features and algorithms capable of modeling non-linear, high-dimensional, small-sample data. Digital handwriting analyses offer unique advantages for cognitive assessments in neurological disorders by capturing millisecond-precision temporal, spatial, and kinematic parameters unavailable in the traditional assessments [17]. Because handwriting engages the frontoparietal and cerebellar circuits, frequently affected by demyelination, it is particularly relevant for IDD patients [18]. Digital versions of the SDMT show high test-retest reliability (with an intraclass correlation coefficient (ICC) > 0.85) when completed unsupervised [19], while kinematic features distinguish mild cognitive impairments from normal aging with >90% accuracy [20]. MS patients exhibit distinctive handwriting patterns--longer movement durations and fragmented velocity profiles--that correlate with cognitive impairment even in minimally disabled individuals [21; 22]. Deep learning models have achieved > 0.90 accuracy on digital clock drawings, and the thinking time between strokes can track executive performance when the final drawings appear normal [23; 24]. These findings suggest that digital handwriting metrics can detect subtle cognitive-motor changes that escape traditional observation. Despite these advances, most studies have examined a single drawing task rather than integrating information across multiple cognitive demands [25]. NMOSD, where up to 70% of patients show a slowed processing speed and which may present distinct cognitive-motor patterns compared to those in MS, has been largely ignored in digital handwriting research [26].