Manuscript Offprint
arXiv:2611.00497Where Does EEG Help Wearable Freezing of Gait Detection?
Chuntian Chi*, Lifang He†, Huajie Shao*, Gang Zhou*
*Department of Computer Science, William & Mary, Williamsburg, VA, USA
†Department of Computer Science, Lehigh University, Bethlehem, PA, USA
Email: {cchi05, hshao, gzhou}@wm.edu, lih319@lehigh.edu
Abstract—Freezing of gait (FoG) detectors built on inertial measurement units (IMUs) are accurate while the legs move, but they become unreliable when the legs are nearly still, which is exactly when akinetic freezing, voluntary stopping, and standing must be told apart. Electroencephalography (EEG) captures motor-planning activity that leg sensors cannot, but EEG is impractical for daily use. We ask where EEG helps: as an input at inference time, or only during pretraining, so that the deployed detector still needs only IMUs. We assemble a pretraining corpus of synchronized EEG and IMU recordings (5 datasets, 184 people, about 94 hours) and compare six settings that differ only in the modalities used for pretraining and as model input, each with tuned hyperparameters and five independent pretraining runs. On the BXHC FoG dataset (leave-one-patient-out, 10 patients with FoG), adding EEG as input raises FoG F1 from 0.663 to 0.740 (9 of 10 patients improve), and the gain in ranking performance is confined to the quartile of windows with the least leg movement (AUROC +0.063). Pretraining the IMU encoder jointly with EEG improves an IMU-only detector both within the cohort (FoG F1 0.663 to 0.705) and when it is trained on a small cohort and tested on another (FoG F1 +0.083, all 10 test patients improve). Repeating the study with PD-only and healthy-only pretraining corpora, each with its own hyperparameter search, shows that IMU-based detection is robust to the corpus, whereas the benefit of aligning EEG with IMU requires both. Cross-cohort analysis further shows that detectors trained without annotated voluntary stops classify nearly all stops as freezing. Finally, on PD versus non-PD classification in three external datasets, joint EEG+IMU pretraining improves PD detection from walking EEG over EEG-only pretraining (AUROC 0.750 vs. 0.683), while IMU-based detection does not depend on the pretraining.
I. INTRODUCTION
Freezing of gait is a brief, episodic absence of effective stepping despite the intention to walk [1]. It causes falls and loss of independence in people with Parkinson's disease (PD), and real-time cueing can shorten episodes, provided that a detector recognizes them reliably [2], [3]. Most detectors use IMUs on the legs or trunk [2], [4], [5], [3], [6]. They work well when freezing changes leg movement, for example the 3–8 Hz trembling of the legs captured by the freezing index [2]. They work less well when the legs are nearly still: akinetic freezing, a voluntary stop, standing, and a slow pivot turn produce similar leg signals, and misclassified turns are a main source of false alarms [3].
EEG adds information that leg sensors lack. Freezing is preceded and accompanied by changes in cortical activity [7], and EEG-based detectors perform well in the laboratory [8]. However, EEG needs a cap and skin contact, which makes
it impractical for daily monitoring [3]. This raises a practical question: if EEG is available only in the laboratory, can it still improve a detector that uses IMUs alone? One route is to use EEG only during pretraining, as privileged information [9], [10]: the IMU encoder learns representations that agree with the simultaneous EEG, and the deployed model needs only IMUs.
In this paper, we compare the two routes under controlled conditions. We study six settings that differ only in which modalities are used for pretraining and which are given to the detector (Table II), using the same data, folds, and evaluation for all of them. Our contributions are:
-
A pretraining corpus of synchronized EEG and IMU recordings from five public datasets (184 people, two PD cohorts with labeled FoG), and a controlled comparison of six pretraining and input settings with tuned hyperparameters and five independent pretraining runs per setting.
-
We show that EEG as model input improves FoG detection mainly in windows with little leg movement, and that this pattern holds when the detector is trained on both PD cohorts.
-
We show that EEG used only during pretraining improves an IMU-only detector, most strongly when it is trained on a small cohort and applied to a different one.
-
We repeat the comparison with PD-only and healthy-only pretraining corpora and show which effects depend on the corpus.
-
We extend the comparison to PD versus non-PD classification on three external datasets with IMU or EEG.
-
We analyze why detectors fail across cohorts: annotated voluntary stops, freezing subtypes, and label conventions differ between datasets.
BXHC [8], recorded at Xuanwu Hospital in Beijing, contains 12 patients with PD (mean age 69.1 years, mean disease duration 9.3 years) recorded off medication during tasks designed to provoke freezing: rising from a chair, walking a narrow corridor with obstacles, and 180° turns, including turns inside a 0.6 m square. Two physicians labeled every freezing episode from video (334 episodes, 88 minutes). The dataset includes 25-channel EEG, released after artifact removal with
TABLE I
DATASETS WITH SYNCHRONIZED EEG AND IMU USED FOR PRETRAINING. ONLY BXHC AND SENSEFOG HAVE FOG LABELS.
| Dataset | Population | People | EEG ch. | IMU sites | Hours |
|---|---|---|---|---|---|
| BXHC [8] | PD | 12 | 25 | shanks, L5 | 3.7 |
| SenseFOG [11] | PD, STN-DBS | 12 | 48 | ankles, L5 | 2.9 |
| PhysioNet gait [12] | healthy, young | 57 | 19 | pelvis, shanks, feet | 2.8 |
| MiM young [13] | healthy, young | 32 | 120 | back | 27.0 |
| MiM older [14] | healthy, older | 71 | 120 | back | 57.6 |
| Total | 184 | 94.0 |
L5 sensor available for 6 of 12 patients. MiM: Mind in Motion.
independent component analysis, and IMUs on both shanks, the lower back (L5), and the arm. Following the dataset authors, we evaluate on the 10 patients who froze during the recordings.
SenseFOG [11] contains 12 patients with PD and bilateral subthalamic deep brain stimulation (mean disease duration 12.8 years), recorded after overnight medication withdrawal with stimulation switched off 20 minutes before the session. Patients walked a hallway narrowed to provoke freezing, including a condition with instructed voluntary stops. Freezing labels cover straight-line walking only (episodes of at least 1 s; freezing during turns and gait initiation was excluded), and almost all labeled freezes are of the trembling-in-place type. IMUs were worn at both ankles and L5, together with 48-channel EEG. Freezing occurred in 5 patients; we report FoG metrics on the 4 patients with at least 10 freezing windows. Because labels exist only for annotated segments, we use only windows that lie entirely inside a labeled segment.
The three healthy datasets [12], [13], [14] contribute unlabeled walking at several speeds and on uneven terrain. All IMU data are expressed in a body-fixed frame (acceleration in g including gravity, angular velocity in rad/s) and resampled to 100 Hz. BXHC EEG is used as released; all other EEG is high-pass filtered at 0.5 Hz and notch-filtered at the local mains frequency. All EEG is resampled to 200 Hz and z-scored per channel and recording. We cut all recordings into 1.28 s windows (stride 0.64 s), the window length used in prior real-time FoG detection [3]. A window is labeled FoG if freezing occurs in its last 30% [3].
III. METHOD
A. Encoders
The IMU encoder is a masked autoencoder [15] (5.2M parameters; 0.1 s patches; 6 transformer layers) previously pretrained on 1,682 hours of IMU data from 11 public datasets (Appendix A). It accepts any set of sensors and encodes each sensor's body location. The EEG encoder is REVE [16], a pretrained EEG foundation model that accepts arbitrary electrode montages through electrode positions; we use its token for the most recent 1 s of each window.
B. Pretraining
Starting from these two encoders, we continue pretraining on the corpus in Table I (all windows, no FoG labels). Each training batch contains windows from one recording, and half of the batches come from the two PD cohorts.
-
IMU pretraining continues the IMU encoder with its masked reconstruction loss.
-
EEG pretraining continues the top transformer blocks of the EEG encoder with masked reconstruction of whole channels.
-
EEG+IMU pretraining continues one encoder with its own reconstruction loss plus a contrastive loss [17], [18] that matches its representation of a 1 s segment to the representation of the simultaneous 1 s segment from the other modality, computed by that modality's frozen encoder. Negatives are other moments of the same recording at least 1 s apart. Applied to the IMU encoder, this yields an IMU encoder whose representation is shaped by EEG; applied to the EEG encoder, it yields an EEG encoder shaped by IMU.
We refer to a setting by the modalities used in pretraining and the modalities given to the detector, written pretraining input. For example, “EEG+IMU IMU” uses the IMU encoder from EEG+IMU pretraining and receives only IMU data, both during training and at test time.
C. Settings and detection model
Table II lists the six settings. S1, S2, and S6 form the comparisons of interest: S2–S1 isolates the effect of EEG during pretraining with IMU-only input, and S6–S2 isolates the effect of adding EEG as input. S5 combines the separately pretrained encoders, and R1 and R2 are the encoders before continued pretraining. Encoders are frozen. For each window, a small head is trained on the encoder outputs: a two-layer perceptron on the pooled IMU embedding, attention pooling over EEG channels followed by a perceptron, and, for EEG+IMU input, a gated fusion of both that randomly drops the EEG input during training.
D. Evaluation
We use leave-one-patient-out cross-validation. In each fold, two other patients serve as inner validation for early stopping and for choosing the decision threshold (the threshold that maximizes mean FoG F1 over these patients). All hyperparameters (learning rate, training length, share of PD batches, and replay of the original IMU corpus for IMU pretraining; trainable blocks and mask ratio for EEG pretraining; contrastive weight, temperature, and whether alignment uses all data or only PD data; and the head) were selected by mean inner-validation AUPRC on BXHC, with the same budget for every setting (Appendix B, Fig. 4). Test patients were never used for selection, and SenseFOG was never used for selection. Each selected setting was then pretrained five times with independent random seeds. We report the mean and standard deviation (SD) across patients of replicate-averaged results. Paired comparisons use per-patient differences with 95% bootstrap confidence intervals and two-sided Wilcoxon signed-rank tests. Pretraining used unlabeled windows of all patients, including the test patient of each fold; labels of the test patient were never used.
To locate where EEG helps, we split windows into quartiles by leg movement, measured as the standard deviation of the acceleration magnitude within the window (cut-points computed per cohort), and compute AUROC within each quartile.
IV. RESULTS
A. EEG as input improves detection on BXHC
Table II shows the results on BXHC. With IMU input, continued pretraining on the new corpus (S1) improves over the base encoder (R1): FoG F1 rises from 0.622 to 0.663 (7 of 10 patients improve; p = 0.049) and AUROC from 0.897 to 0.906 (9 of 10; p = 0.004). Adding EEG as input raises FoG F1 to 0.740 (S6 vs. S1: +0.077, 95% CI [+0.022, +0.149], 9 of 10 patients improve, p = 0.020). Both sensitivity and specificity increase, and the SD across patients falls from 0.235 to 0.177, so the gain is largest for patients on whom the IMU-only detector performs worst. AUROC improves only slightly (+0.006; 9 of 10; p = 0.037), which indicates that EEG mainly helps the decision threshold transfer to an unseen patient. EEG alone performs close to chance (S3, AUROC 0.575). Per-patient results and the variation across pretraining runs are shown in Appendix C (Fig. 5).
EEG+IMU pretraining of the IMU encoder also improves IMU-only detection (S2 vs. S1): FoG F1 rises from 0.663 to 0.705, AUROC from 0.906 to 0.912, and both sensitivity (0.675 to 0.730) and specificity (0.812 to 0.835) increase. The difference between S6 and S5, which uses the same inputs with separately pretrained encoders, is also small (FoG F1 +0.015, p = 0.13).
B. EEG helps when the legs are still
Figure 1a shows that all IMU-based settings perform well when the legs move (AUROC 0.85–0.93) and poorly in the stiltest quartile (S1: 0.692). This is the only quartile in which EEG input changes the ranking: S6 improves the stiltest quartile by +0.063 (95% CI [+0.014, +0.112]; 9 of 10 patients; p = 0.037), while the other three quartiles change by less than 0.002 (Figure 1b). About one third of this gain comes from EEG+IMU pretraining and two thirds from EEG input. For FoG F1, the gain is spread across quartiles (Figure 1c), consistent with a better decision threshold.
The EEG encoder shaped by IMU (S4) shows the opposite pattern. It improves EEG-only detection overall (AUROC 0.575 to 0.666; 9 of 10 patients; p = 0.004), but the gains appear in the three quartiles with leg movement (+0.08 to +0.10; 10 of 10 patients for the low and mid quartiles; p = 0.002) and not in the stiltest quartile (+0.03; p = 0.49). The same pattern holds in all five evaluation settings (Appendix D, Fig. 6). EEG recorded during walking contains movement-related signals [19], and aligning EEG with IMU appears to teach the EEG encoder to read them. The benefit of EEG as an additional input, in contrast, appears only where leg movement and therefore movement-related EEG signals are smallest.
C. Generalization across cohorts
Table III and Figure 2 repeat the comparison on SenseFOG, on both cohorts combined, and across cohorts, with the settings and hyperparameters selected on BXHC.
SenseFOG and combined training. Within SenseFOG, IMU input alone is already strong (S1 AUROC 0.902), and the stiltest quartile is again the weak spot (AUROC 0.457). EEG input raises it by 0.42 in all 4 patients with FoG. In the combined setting, with both cohorts in training, the IMU-only detector improves on SenseFOG (stiltest-quartile AUROC 0.839), and the gain from EEG input becomes smaller. Pooled over all 14 patients, EEG input still improves the stiltest quartile (+0.059; 95% CI [+0.030, +0.092]; 11 of 14 patients; p = 0.003) and leaves the other quartiles unchanged ( ). The large gain within SenseFOG alone therefore partly compensates for the small number of patients with FoG available for training.
Transfer from SenseFOG to BXHC. Here the detector is trained on SenseFOG alone and tested on BXHC. With IMU input, the IMU encoder from EEG+IMU pretraining outperforms the one from IMU pretraining in every test patient: FoG F1 0.731 vs. 0.648 (+0.083; 95% CI [+0.055, +0.114]; 10 of 10; p = 0.002) and AUROC 0.891 vs. 0.843 (9 of 10; p = 0.006). The gain is concentrated in the stiltest quartile (+0.152; 10 of 10; p = 0.002), and results are far more stable across pretraining runs (FoG F1 SD 0.004 vs. 0.110). SenseFOG's labeled freezes are almost all of the trembling-in-place type, while BXHC also contains freezing during turns and gait initiation, where the legs are nearly still. EEG+IMU pretraining thus helps exactly where the training data lack examples. Adding EEG as input in this direction adds little beyond S2 (S6–S2 near zero; Fig. 2).
Transfer from BXHC to SenseFOG. Trained on BXHC, the IMU-only detector ranks SenseFOG windows well (AUROC 0.973), but its specificity drops to 0.61. The false alarms come mostly from voluntary stops: 99.7% of SenseFOG's stop windows are classified as freezing, compared with 32% of its walking windows. BXHC contains no annotated voluntary stops, while its freezing labels include episodes during turns and gait initiation with little leg movement, so the detector learns to associate still legs with freezing. With a threshold chosen per patient, the same model reaches FoG F1 0.89, so the representation transfers and the threshold does not. EEG input reduces false alarms during walking to the in-cohort level (15%), but not during stops (84%), and EEG does not improve ranking in this direction (Fig. 2). Within SenseFOG, settings that use EEG during pretraining or as input also separate freezing from voluntary stops better than IMU pretraining alone (pooled AUROC 0.70–0.76 vs. 0.42; Appendix E, Fig. 7).
D. Pretraining corpus
To test what the pretraining data contribute, we repeated the procedure, including the full hyperparameter search, with two reduced corpora: PD data only (BXHC and SenseFOG) and healthy data only (PhysioNet and Mind in Motion). The
TABLE II
BXHC, LEAVE-ONE-PATIENT-OUT (10 PATIENTS WITH FOG). MEAN ± SD ACROSS PATIENTS; ACROSS THE FIVE PRETRAINING RUNS, THE SD OF EVERY METRIC IS AT MOST 0.033. BEST RESULT PER COLUMN IN BOLD (TIES BOTH IN BOLD).
| Pretraining | Input | Encoder(s) | FoG F1 | Weighted F1 | Sensitivity | Specificity | AUROC | |
|---|---|---|---|---|---|---|---|---|
| R1 | none (base) | IMU | base IMU encoder | |||||
| S1 | IMU | IMU | IMU-pretrained | |||||
| S2 | EEG+IMU | IMU | EEG+IMU-pretrained IMU | |||||
| R2 | none (base) | EEG | general REVE | |||||
| S3 | EEG | EEG | EEG-pretrained | |||||
| S4 | EEG+IMU | EEG | EEG+IMU-pretrained EEG | |||||
| S5 | IMU; EEG (separate) | EEG+IMU | S1 + S3 encoders | |||||
| S6 | EEG+IMU | EEG+IMU | S2 + S4 encoders |

(b) EEG effect on AUROC
(c) EEG effect on FoG F1
S1 (IMU → IMU) S6 (EEG+IMU → EEG+IMU) S2 (EEG+IMU → IMU) S4 (EEG+IMU → EEG)
total EEG effect (S6 - S1)
from EEG+IMU pretraining (S2 - S1)
from EEG input (S6 - S2)
Fig. 1. BXHC by leg-movement quartile ("still" = least movement). (a) AUROC per quartile, mean ± SD across the five pretraining runs. (b, c) The total effect of EEG (S6–S1) split into the part from EEG+IMU pretraining (S2–S1) and the part from EEG input (S6–S2); mean over patients with 95% bootstrap confidence intervals.
search omitted options without meaning within one cohort (the share of PD batches, the alignment data, and replay of the original IMU corpus). Figure 3 shows every combination of pretraining, corpus, and inference input; the gray bars include the base encoders with EEG+IMU input, which needs no continued pretraining.
Three results stand out. First, EEG at inference helps without any continued pretraining: fusing the two base encoders raises FoG F1 on BXHC from 0.622 to 0.696 and stiltest-quartile AUROC from 0.657 to 0.719. Second, on BXHC, settings with IMU input are insensitive to the corpus (AUROC within 0.01), whereas the EEG encoder shaped by IMU needs the full corpus: its AUROC falls from 0.666 to 0.593 (PD only) and 0.596 (healthy only), with all 10 patients lower in both cases (p = 0.002), to the level of EEG-only pretraining. Third, under transfer from SenseFOG, joint EEG+IMU pretraining on the full corpus gives the best IMU-only detector (FoG F1 0.731, AUROC 0.891). IMU-only pretraining on healthy data comes close (FoG F1 0.708, AUROC 0.866), and the jointly pretrained encoder keeps a small but consistent AUROC advantage over it (+0.026; 95% CI [+0.006, +0.045]; 7 of 10; p = 0.049). With the reduced corpora, adding EEG to pretraining does not improve the IMU-only detector under
transfer.
V. PD VERSUS NON-PD CLASSIFICATION
To test whether the encoders support tasks beyond FoG, we classified people with PD versus people without PD in three external datasets, none of which was used for pretraining. We used only datasets in which both groups were recorded at the same site with the same protocol, because pooling a PD cohort with a separately recorded control cohort lets a model separate the datasets instead of the groups. No public dataset provides synchronized EEG and IMU for both groups, so each dataset tests one inference modality. WearGait-PD [20] (version 1, cross-sectional) contains 100 people with PD and 85 controls with 13 body-worn IMUs; we used the self-paced and hurried walks and the sensors at the lower back, both shanks, and both ankles. PADS [21] contains wrist IMUs from 276 people with PD, 79 healthy people, and 114 people with other movement disorders during 11 seated tasks; we report PD versus healthy and PD versus other disorders. PD-EEG [22] contains 60-channel EEG from 116 people with PD and 28 controls, recorded during treadmill walking (133 people) and at rest. Preprocessing matches the pretraining data.
TABLE III
GENERALIZATION. SENSEFOG: LEAVE-ONE-PATIENT-OUT WITHIN SENSEFOG (4 PATIENTS WITH FOG). COMBINED: LEAVE-ONE-PATIENT-OUT OVER BOTH COHORTS (14 PATIENTS WITH FOG). TRANSFER: TRAINED ON ONE COHORT, THRESHOLD CHOSEN ON THAT COHORT, TESTED ON ALL PATIENTS OF THE OTHER. MEAN ± SD ACROSS PATIENTS; BEST PER COLUMN IN BOLD.
| Pretraining | Input | SenseFOG | Combined | BXHC→SenseFOG | SenseFOG→BXHC | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| FoG F1 | AUROC | FoG F1 | AUROC | FoG F1 | AUROC | FoG F1 | AUROC | |||
| R1 | none | IMU | 0.735±0.295 | 0.924±0.042 | 0.645±0.256 | 0.918±0.058 | 0.615±0.170 | 0.974±0.020 | 0.630±0.190 | 0.856±0.035 |
| S1 | IMU | IMU | 0.746±0.260 | 0.902±0.076 | 0.693±0.227 | 0.926±0.052 | 0.733±0.131 | 0.973±0.018 | 0.648±0.168 | 0.843±0.051 |
| S2 | EEG+IMU | IMU | 0.730±0.285 | 0.945±0.047 | 0.694±0.227 | 0.924±0.053 | 0.685±0.148 | 0.971±0.018 | 0.731±0.155 | 0.891±0.042 |
| R2 | none | EEG | 0.453±0.180 | 0.489±0.073 | 0.516±0.191 | 0.565±0.077 | 0.416±0.173 | 0.498±0.089 | 0.444±0.118 | 0.506±0.032 |
| S3 | EEG | EEG | 0.461±0.189 | 0.459±0.050 | 0.525±0.196 | 0.555±0.068 | 0.437±0.201 | 0.526±0.092 | 0.265±0.070 | 0.485±0.024 |
| S4 | EEG+IMU | EEG | 0.461±0.199 | 0.553±0.049 | 0.539±0.177 | 0.646±0.094 | 0.364±0.173 | 0.575±0.086 | 0.554±0.141 | 0.641±0.094 |
| S5 | separate | EEG+IMU | 0.770±0.217 | 0.970±0.019 | 0.705±0.180 | 0.927±0.052 | 0.810±0.117 | 0.964±0.021 | 0.702±0.151 | 0.878±0.050 |
| S6 | EEG+IMU | EEG+IMU | 0.757±0.171 | 0.974±0.017 | 0.732±0.164 | 0.930±0.048 | 0.749±0.154 | 0.960±0.023 | 0.705±0.166 | 0.885±0.043 |
TABLE IV
PD VERSUS NON-PD, SUBJECT-LEVEL AUROC (MEAN ± SD OVER FIVE RUNS; 5-FOLD CROSS-VALIDATION BY SUBJECT; HEADS TUNED PER SETTING). EVERY COLUMN IS A DATASET IN WHICH BOTH GROUPS WERE RECORDED AT THE SAME SITE WITH THE SAME PROTOCOL. EEG+IMU INFERENCE IS NOT POSSIBLE: NO DATASET PROVIDES BOTH. AGE-MATCHED: AUROC OF THE RUN-AVERAGED PREDICTIONS IN AN AGE-MATCHED SUBSET. BEST PER COLUMN IN BOLD.
| Pretraining | Corpus | WearGait-PD | IMU inference (R1 / S1 / S2) | EEG inference (R2 / S3 / S4) | ||
|---|---|---|---|---|---|---|
| PADS: PD vs. healthy | PADS: PD vs. other | PD-EEG, walking | PD-EEG, rest | |||
| none (R1 / R2) | - | 0.725±0.013 | 0.763±0.013 | 0.632±0.005 | 0.752±0.032 | 0.711±0.017 |
| separate (S1 / S3) | PD + healthy | 0.724±0.014 | 0.749±0.009 | 0.621±0.017 | 0.683±0.021 | 0.710±0.029 |
| PD only | 0.728±0.015 | 0.752±0.011 | 0.613±0.014 | 0.782±0.017 | 0.719±0.024 | |
| healthy only | 0.720±0.013 | 0.771±0.017 | 0.630±0.014 | 0.647±0.006 | 0.678±0.020 | |
| joint (S2 / S4) | PD + healthy | 0.731±0.011 | 0.761±0.011 | 0.613±0.020 | 0.750±0.026 | 0.703±0.017 |
| PD only | 0.735±0.020 | 0.750±0.020 | 0.614±0.009 | 0.791±0.019 | 0.710±0.018 | |
| healthy only | 0.729±0.012 | 0.772±0.013 | 0.619±0.015 | 0.764±0.038 | 0.699±0.030 | |
| age only (baseline) | 0.730 | 0.558 | 0.560 | 0.649 | 0.688 | |
| best setting (bold), age-matched subset | 0.709 | 0.806 | 0.614 | 0.815 | 0.557 | |
| age only, age-matched subset | 0.484 | 0.497 | 0.486 | 0.478 | 0.497 | |
The label belongs to the person, so the evaluation is at the subject level: 5-fold cross-validation by subject, stratified by group and identical for all settings, with 20% of each training fold held out for early stopping and the decision threshold. A small head pools a segment of consecutive window embeddings with attention, and the subject's probability is the mean over its segments. For every setting, 16 head configurations, including the segment length (4, 6, or 10 s), were searched on the inner validation sets; the selected head was then trained with each of the five pretraining runs (base encoders: five seeds). Because age differs between groups in all three datasets (WearGait-PD: controls 74.1 vs. PD 67.0 years; PD-EEG: PD 66.1 vs. controls 60.8), we report an age-only baseline (logistic regression on age, same folds) and AUROC in an age-matched subset (nearest-age pairs within 3 years).
Table IV shows the results. With IMU inference, all settings perform alike (WearGait-PD 0.720–0.735, PADS PD vs. healthy 0.749–0.772), and continued pretraining does not improve over the base encoder. In WearGait-PD, age alone reaches the same AUROC (0.730), but the models keep their AUROC in the age-matched subset (0.70–0.73) while age alone falls to chance, so the models capture group differences beyond age. Separating PD from other movement disorders is harder (AUROC 0.61–0.63). Walking EEG separates the groups best, and here pretraining matters: joint EEG+IMU pretraining outperforms EEG-only pretraining (S4 vs. S3: 0.750 vs. 0.683; ΔAUROC +0.082, 95% bootstrap CI [+0.004, +0.169]; with the healthy-only corpus, +0.132 [+0.037, +0.236]), mirroring its effect on EEG-only FoG detection. EEG-only pretraining on the full corpus lowers AUROC below the base REVE encoder (0.683 vs. 0.752), and PD-only pretraining gives the best results (S4: 0.791, S3: 0.782), which hold in the age-matched subset (0.815–0.820). Resting EEG separates the groups mainly through age: AUROC is close to the age-only baseline and drops to 0.52–0.61 in the age-matched subset. The control groups are small (PD-EEG: 23 controls with walking EEG), so these differences are indicative.
VI. DISCUSSION AND LIMITATIONS
EEG helped in two different ways depending on the situation. When labeled data from the same cohort were available, EEG as an additional input improved detection, and its effect on ranking was confined to windows with little leg movement. When the detector had to be trained on a small cohort and applied to another, EEG used only during pretraining produced an IMU-only detector that generalized better, mainly in the same still windows. Both results point to the period in which leg signals are least informative, which is also where false alarms from stops and turns arise [3].

BXHC→SenseFOG

SenseFOG→BXHC
total EEG effect (S6 – S1) from EEG+IMU pretraining (S2 – S1) from EEG input (S6 – S2)
Fig. 2. The AUROC decomposition of Fig. 1b in the four other evaluation settings (shared y-axis; the total effect in the stillest quartile is printed above each panel's bar). Mean over patients with 95% bootstrap confidence intervals.
Our study has several limitations. The labeled cohorts are small (10 and 4 patients with FoG), so the SenseFOG results show direction rather than significance; with 4 patients, the smallest possible Wilcoxon p is 0.125. The analysis of leg-movement quartiles was motivated by preliminary analyses on BXHC; SenseFOG and the combined setting provide independent support. Whether the gain from EEG input in still windows reflects cortical activity, muscle activity, or residual motion requires artifact-controlled analyses. Finally, the cohorts differ in freezing subtypes, voluntary stops, medication and stimulation state, and EEG preprocessing, so cross-cohort results reflect all of these differences at once. We suggest that FoG datasets report freezing subtypes, task context, and the handling of voluntary stops along with sensor placement.
VII. RELATED WORK
IMU-based FoG detection ranges from frequency thresholds [2] and feature-based classifiers [4] to neural networks deployed on phones [5], [3] and single-sensor models [6]; reducing false alarms during turns and stops remains a central challenge [3]. EEG features predict and detect freezing [7], and combining EEG with IMU, EMG, and skin conductance improves laboratory detection [8]. Using a modality only during training has been studied as learning using privileged information [9] and cross-modal distillation [10]; our EEG+IMU pretraining follows the contrastive alignment used in multimodal pretraining [17], [18], applied to time-matched physiological signals.
VIII. CONCLUSION
We compared EEG as model input and EEG used only in pretraining for wearable FoG detection, under identical data, folds, and tuning. EEG as input improved FoG F1 on BXHC from 0.663 to 0.740, with its ranking gain confined to windows with little leg movement, a pattern that held when training on both cohorts and without continued pretraining. EEG used only in pretraining improved an IMU-only detector within the cohort (FoG F1 0.663 to 0.705) and, most clearly, when it was trained on one cohort and tested on another (FoG F1 +0.083 in all 10 test patients). With PD-only or healthy-only pretraining corpora, IMU-based detection was unchanged, whereas the benefit of aligning EEG with IMU required both. In PD versus non-PD classification, joint EEG+IMU pretraining improved PD detection from walking EEG over EEG-only pretraining. These results suggest that laboratory EEG can improve deployable IMU-only detectors when labeled data are scarce,

SenseFOG → BXHC

SenseFOG → BXHC
Fig. 3. FoG F1 and AUROC by pretraining, pretraining corpus and inference input (BXHC: leave-one-patient-out; SenseFOG→BXHC: trained on SenseFOG, tested on BXHC). Bars: mean across the 10 BXHC patients with FoG (five pretraining runs; base encoders: five head seeds); error bars: standard error across patients. Every corpus has its own hyperparameter search.
and that FoG benchmarks should account for voluntary stops and freezing subtypes.
REFERENCES
[1] J. G. Nutt, B. R. Bloem, N. Giladi, M. Hallett, F. B. Horak, and A. Nieuwober, “Freezing of gait: moving forward on a mysterious clinical phenomenon,” The Lancet Neurology, vol. 10, no. 8, pp. 734–744, 2011.
[2] M. Bächlin, M. Plotnik, D. Roggen, I. Maidan, J. M. Hausdorff, N. Giladi, and G. Tröster, “Wearable assistant for Parkinson's disease patients with the freezing of gait symptom,” IEEE Transactions on Information Technology in Biomedicine, vol. 14, no. 2, pp. 436–446, 2010.
[3] K. Koltermann, J. Clapham, G. M. Blackwell, W. Jung, E. N. Burnet, Y. Gao, H.-J. Shao, L. Cloud, I. Pretzer-Aboff, and G. Zhou, "Gait-guard: Turn-aware freezing of gait detection for non-intrusive intervention systems," ...IEEE...International Conference on Connected Health: Applications, Systems and Engineering Technologies. IEEE International Conference on Connected Health: Applications, Systems and Engineering Technologies, vol. 2024, pp. 61 – 72, 2024. [Online]. Available: https://api.semanticscholar.org/CorpusID:271723540
[4] S. Mazilu, M. Hardegger, Z. Zhu, D. Roggen, G. Tröster, M. Plotnik, and J. M. Hausdorff, “Online detection of freezing of gait with smartphones and machine learning techniques,” in Proc. Int. Conf. Pervasive Computing Technologies for Healthcare (PervasiveHealth), 2012, pp. 123–130.
[5] K. Koltermann et al., “FoG-Finder: Real-time freezing of gait detection and treatment,” in Proc. IEEE/ACM Conf. Connected Health: Applications, Systems and Engineering Technologies (CHASE), 2023, pp. 22–33.
[6] L. Borzi, L. Sigcha, D. Rodríguez-Martín, and G. Olmo, “Real-time detection of freezing of gait in Parkinson's disease using multi-head convolutional neural networks and a single inertial sensor,” Artificial Intelligence in Medicine, vol. 135, p. 102459, 2023.
[7] A. M. A. Handojoseno, J. M. Shine, T. N. Nguyen, Y. Tran, S. J. G. Lewis, and H. T. Nguyen, “Analysis and prediction of the freezing of gait using EEG brain dynamics,” IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 23, no. 5, pp. 887–896, 2015.
[8] W. Zhang, Z. Yang, H. Li, D. Huang, L. Wang, Y. Wei, L. Zhang, L. Ma, H. Feng, J. Pan, Y. Guo, and P. Chan, “Multimodal data for the detection of freezing of gait in Parkinson's disease,” Scientific Data, vol. 9, p. 606, 2022.
[9] V. Vapnik and A. Vashist, “A new learning paradigm: Learning using privileged information,” Neural Networks, vol. 22, no. 5–6, pp. 544–557, 2009.
[10] S. Gupta, J. Hoffman, and J. Malik, “Cross modal distillation for supervision transfer,” in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), 2016, pp. 2827–2836.
[11] P. Klocke, M. A. Loeffler, H. Muessler, M.-S. Breu, A. Gharabaghi, and D. Weiss, “Supraspinal contributions to defective antagonistic inhibition and freezing of gait in Parkinson's disease,” Brain, vol. 147, no. 12, pp. 4056–4071, 2024.
[12] R. Katmah, A. AlShehhi, D. Kosaji, N. Al-Rahmani, M. Abdullah, A. A. V. Hulleck, and K. Khalaf, “A multimodal gait dataset of brain activity, muscle activity, kinematics and ground forces in young adults,” PhysioNet, Apr. 2026, version 1.0.0. [Online]. Available: https://doi.org/10.13026/r0ea-7161
[13] C. Liu, R. J. Downey, J. S. Salminen, S. A. Rojas, E. M. Pliner, N. Richer, J. Hwang, Y. Cruz-Almeida, T. M. Manini, C. J. Hass, R. D. Seidler, D. J. Clark, and D. P. Ferris, “Mind in motion young adults walking over uneven terrain,” OpenNeuro, dataset ds004625, version
1.0.2, 2023.
[14] C. Liu, E. M. Pliner, J. S. Salminen, R. Downey, J. Hwang, A. Roy, R. Swearinger, N. Richer, C. J. Hass, D. J. Clark, T. M. Manini, Y. Cruz-Almeida, R. D. Seidler, and D. P. Ferris, "Mind in motion older adults walking over uneven terrain," OpenNeuro, dataset ds006095, version 1.0.0, 2025.
[15] K. He, X. Chen, S. Xie, Y. Li, P. Dollár, and R. Girshick, "Masked autoencoders are scalable vision learners," in Proc. IEEE/CVF Conf. Computer Vision and Pattern Recognition (CVPR), 2022, pp. 16:000–16:009.
[16] Y. E. Ouahidi, J. Lys, P. Thölke, N. Farrugia, B. Pasdeloup, V. Gripon, K. Jerbi, and G. Lioi, "Reve: A foundation model for eeg – adapting to any setup with large-scale pretraining on 25,000 subjects," 2025. [Online]. Available: https://arxiv.org/abs/2510.21585
[17] A. van den Oord, Y. Li, and O. Vinyals, “Representation learning with contrastive predictive coding,” arXiv preprint arXiv:1807.03748, 2018.
[18] A. Radford, J. W. Kim, C. Hallacy, A. Ramesh, G. Goh, S. Agarwal, G. Sastry, A. Askell, P. Mishkin, J. Clark, G. Krueger, and I. Sutskever, "Learning transferable visual models from natural language supervision," in Proc. Int. Conf. Machine Learning (ICML), 2021, pp. 8748–8763.
[19] J. T. Gwin, K. Gramann, S. Makeig, and D. P. Ferris, “Removal of movement artifact from high-density EEG recorded during walking and running,” Journal of Neurophysiology, vol. 103, no. 6, pp. 3526–3534, 2010.
[20] A. J. Anderson, D. Eguren, M. A. Gonzalez, N. Khan, S. Watkinson, M. Caiola, S. S. Hirczy, C. P. Zabetian, K. Mills, E. Moukheiber, L. Moro-Velazquez, N. Dehak, C. Motely, B. C. Muir, A. Butala, and K. Kontson, “Weargait-pd: An open-access wearables dataset for gait in parkinson's disease and age-matched controls,” medRxiv, 2024. [Online]. Available: https://www.medrxiv.org/content/early/2024/09/12/2024.09.11.24313476
[21] J. Varghese, A. Brenner, L. Plagwitz, C. van Alen, M. Fujarski, and T. Warnecke, “PADS - Parkinsons Disease Smartwatch dataset,” PhysioNet, Mar. 2024, version 1.0.0. [Online]. Available: https://doi.org/10.13026/m0w9-zx22
[22] Z. Katzir, D. Vered, and I. Maidan, “PD-EEG: Resting-state & walking EEG in Parkinson's disease,” NEMAR, dataset on007526 (OpenNeuro ds007526), version 1.0.0, 2026. [Online]. Available: https://doi.org/10.82901/nemar.on007526
[23] A. Salomon, E. Gazit, P. Ginis et al., “A machine learning contest enhances automated freezing of gait detection and reveals time-of-day effects,” Nature Communications, vol. 15, p. 4853, 2024.
[24] A. Reiss and D. Stricker, “Introducing a new benchmarked dataset for activity monitoring,” in Proc. Int. Symp. Wearable Computers (ISWC), 2012, pp. 108–109.
[25] M. Malekzadeh, R. G. Clegg, A. Cavallaro, and H. Haddadi, “Mobile sensor data anonymization,” in Proc. Int. Conf. Internet of Things Design and Implementation (IoTDI), 2019, pp. 49–58.
[26] J.-L. Reyes-Ortiz, L. Oneto, A. Samà, X. Parra, and D. Anguita, “Transition-aware human activity recognition using smartphones,” Neurocomputing, vol. 171, pp. 754–767, 2016.
[27] L. Borzi, F. Demrozi, R. A. Bacchin, C. Turetta, M. Tebaldi, L. Sigcha, S. Zolfaghari et al., “A multi-level annotated sensor dataset of gait freezing manifestations and severity in Parkinson’s disease,” Scientific Data, vol. 13, p. 305, 2026.
[28] J. O'Day, M. Lee, K. Seagers et al., “Assessing inertial measurement unit locations for freezing of gait detection and patient preference,” Journal of NeuroEngineering and Rehabilitation, vol. 19, p. 20, 2022.
APPENDIX
A. IMU pretraining corpus
The base IMU encoder (R1) was pretrained on 1,682 hours from 11 public IMU datasets (309 people; Table V).
B. Hyperparameter search
Each encoder family was given eight random configurations, and each head sixteen, all scored by mean inner-validation AUPRC over the 12 BXHC folds. Figure 4 shows the score of every configuration. The IMU encoder was insensitive to
TABLE V
IMU-ONLY CORPUS USED TO PRETRAIN THE BASE IMU ENCODER (R1).
| Dataset | Group | Subjects | Sensor locations used | Hz | Hours |
|---|---|---|---|---|---|
| DeFoG, daily living [23] | PD | 65 | lower back | 100 | 1,560.0 |
| DeFoG [23] | PD | 45 | lower back | 100 | 66.8 |
| iDCS-FoG [23] | PD | 62 | lower back | 128 | 15.1 |
| PAMAP2 [24] | healthy | 9 | wrist, chest, ankle | 100 | 10.7 |
| MotionSense [25] | healthy | 24 | front pocket (phone) | 50 | 7.7 |
| HAPT [26] | healthy | 30 | waist (phone) | 50 | 6.2 |
| Daphne [2] | PD | 10 | shank, thigh, lower back | 64 | 4.9 |
| VCU [5] | PD | 23 | left and right ankle | 100 | 3.9 |
| BXHC, unlabeled [8] | PD | 12 | left and right shank | 100 | 3.4 |
| FoG-STAR [27] | PD | 22 | ankles, lower back, wrist | 60 | 1.5 |
| Stanford IMU-FoG [28] | PD | 7 | 11 body sites | 128 | 1.4 |
| Total | 309 | 1,681.6 |
its settings: all IMU pretraining configurations scored between 0.832 and 0.838, and all EEG+IMU configurations of the IMU encoder between 0.822 and 0.838. The EEG encoder shaped by IMU was the exception: configurations that aligned on PD data only with a contrastive weight of 0.3–1.0 scored 0.57–0.58, while configurations that aligned on all data scored 0.50–0.53, close to EEG pretraining alone (0.50). Selected settings: IMU pretraining, learning rate , 6k steps, 70% PD batches, no replay; EEG pretraining, learning rate , top 8 blocks trainable, mask ratio 0.4, 12k steps; EEG+IMU pretraining of the IMU encoder, contrastive weight 0.1, temperature 0.5, alignment on all data; EEG+IMU pretraining of the EEG encoder, weight 1.0, temperature 0.5, alignment on PD data only.

Fig. 4. Hyperparameter search: inner-validation AUPRC on BXHC of each configuration (selected in green).
C. Per-patient results on BXHC
Figure 5 shows FoG F1 and AUROC for every setting on BXHC, with the mean over the five pretraining runs, the SD across runs, and each patient's replicate-averaged result. Run-to-run variation is small (SD at most 0.033 for every metric) compared with the variation between patients (SD 0.16–0.27 for FoG F1), so differences between settings are not driven by individual pretraining runs. With EEG+IMU input, the between-patient SD of FoG F1 decreases from 0.235 (S1) to 0.177 (S6). All three EEG-only settings (R2, S3, S4) reach high sensitivity at low specificity, i.e., they label most windows as FoG.

Fig. 5. BXHC results per setting. Bars: mean over five pretraining runs; error bars: SD across runs; dots: patients.
D. EEG encoder shaped by IMU, by leg movement
Figure 6 compares the EEG encoder from EEG+IMU pretraining with the EEG-pretrained encoder, both with EEG-only input (S4–S3), per leg-movement quartile in all five evaluation settings. In every setting, the gains are concentrated in the three quartiles with leg movement (for example +0.08 to +0.10 on BXHC and +0.10 to +0.12 in the combined setting), while the stildest quartile changes little or decreases (-0.09 to +0.04). The one exception is the high-movement quartile under transfer from BXHC to SenseFOG (-0.09, three patients). Aligning EEG with IMU therefore improves EEG-only detection mainly where the legs move, which is where EEG is most affected by movement-related signals [19].

Fig. 6. AUROC change of S4 over S3 (EEG-only input) per leg-movement quartile, in all five evaluation settings. Mean over patients with 95% bootstrap confidence intervals.

Fig. 7. SenseFOG: AUROC of the predicted FoG probability for freezing versus voluntary-stop windows. Bars: pooled over windows (dominated by the patient with the most freezing windows); dots: patients.
E. Freezing versus voluntary stops on SenseFOG
SenseFOG is the only dataset with annotated voluntary stops, which resemble freezing in that the legs are still. Figure 7 reports, for each setting trained within SenseFOG, how well the predicted FoG probability separates freezing windows from stop windows (AUROC; 489 freezing and 182 stop windows). The IMU-pretrained encoder separates them worse than chance (0.42) and worse than the base encoder (0.61); its hyperparameters were selected on BXHC, which contains no annotated stops. The IMU encoder from EEG+IMU pretraining (0.70) and both EEG+IMU-input settings (0.76 and 0.75) separate them best, while the EEG-only settings stay near chance (0.38–0.53). With four patients, the per-patient values vary widely, so these results show direction only.