Older adults who become delirious after surgery often arrive with a brain that is already quietly inflamed or neurodegenerating. The only reliable way to measure that state today is cerebrospinal fluid taken by lumbar puncture, which is possible only when surgery happens under spinal anesthesia. Blood tests do not substitute for it: plasma lipocalin-2 rose in every patient after surgery and did not separate those who later became delirious from those who did not (Kang et al.). Meanwhile, nearly every elective surgical patient already completes an online preoperative questionnaire. Web trackers have shown that how a person moves a pointer, types, and pauses can be recorded from an ordinary browser without installing anything (Detecting and Analyzing Mouse Tracking in the Wild). Timing of this kind is a plausible, zero-burden readout of processing speed and motor control.
The obvious version of this idea, "use mouse dynamics to predict delirium," has a serious flaw that the fingerprinting literature exposes and the clinical literature has not noticed. The device itself leaves strong traces in the same signals, and device characteristics track age and income (How Unique is Whose Web Browser?). An older, lower-income patient on an aging laptop with a slow trackpad will look "cognitively slow" for reasons unrelated to their brain. We propose to estimate that device effect directly and remove it. The patient's own browser configuration, the very attributes trackers use for identification, becomes the variable that describes the device. Each patient also completes a short within-person device swap. The claim is that interaction timing captured while patients fill in their own self-report forms, once corrected for device in this way, tracks central biomarkers (CSF total tau, phosphorylated tau, amyloid-β42, lipocalin-2) and adds to delirium prediction beyond age and comorbidity. The same correction should be applied to any browser-based cognitive measure used on older patients.
Core Claim
We have three testable claims. First, raw browser interaction features in older surgical candidates carry substantial device-attributable variance that is itself associated with income and age. Second, a device effect estimated from within-person device swaps, and indexed by browser configuration attributes, can be subtracted without removing the true association with age-related brain pathology. Third, the corrected features correlate with preoperative CSF markers and improve prediction of postoperative delirium over a clinical baseline, and they do so with smaller disparities across income groups than uncorrected features.
Each research direction has a distinct role here. Stateless tracking supplies both the instrument (first-party capture of pointer, keystroke, and response timing) and the confound model (configuration attributes that describe the device). Pathophysiological uncertainty supplies the regime and the ground truth: spinal-anesthesia arthroplasty patients, in whom CSF can be sampled, are the one population where a behavioral proxy can be checked against central biology. Self-report bias supplies the carrier. The questionnaire's answers are recall-biased, but the process of answering it is a behavioral measurement. We also test whether that process can flag the answers least likely to be accurate.
Research Program
The instrument is a first-party script embedded in the hospital's preoperative web questionnaire. It records pointer trajectories, click and scroll timing, keystroke intervals, item response latencies, and answer revisions. The technique is the event-listener capture that Urpí-Bricollé et al. found on over 900 of the top 80,000 domains. Unlike those deployments, ours runs with explicit consent, never links across sites, and stores no persistent identifier. It also reads a small set of configuration attributes of the kind Berke et al. and FP-Rainbow show characterize a browser setup: pointer type, touch support, screen size and pixel ratio, hardware concurrency, device memory, browser engine and version, and event-timestamp resolution. These attributes are coarsened into device descriptors and are used only as covariates.
The central methodological step is estimating the device effect without absorbing cognition into it. Fitting "features as a function of device" on patients would fail, because in patients device correlates with age, and age correlates with pathology. Regressing on device would then erase real signal. Instead, each patient completes the same two-minute form segment twice: once on their own device at home, and once on a standardized clinic tablet at the preoperative visit. A reference sample of accompanying relatives and staff does the same across many devices. For person $i$ with feature vector $x_{i,a}$ on device $a$ and $x_{i,b}$ on device $b$, we fit
$$x_{i,a} - x_{i,b} = h(d_a) - h(d_b) + \varepsilon_i,$$
where $d$ is the device descriptor, $h$ is the device effect to be learned (a regularized additive model), and $\varepsilon_i$ is residual noise. Differencing within a person cancels that person's cognitive state, so $h$ is identified from device differences alone. The corrected feature is $\tilde{x}_i = x_{i,\text{home}} - \hat{h}(d_{i,\text{home}})$. A known threat is that same-day repetition introduces practice effects. We counterbalance order and include order as a term.
The secondary aim addresses self-report bias directly. Kong et al. found that self-reported physical activity was protective against delirium (odds ratio 0.336) and was partly mediated through CSF amyloid and tau. They flagged recall bias in the interview as a core limitation. A subsample wears a wrist accelerometer for the week before surgery. We test whether process signals on the physical-activity items (latency, revision count, deviation from the patient's own typical response speed) identify the reports that disagree with measured activity. We then test whether down-weighting those reports sharpens the activity–delirium association.
The study would be embedded in a prospective elective knee/hip arthroplasty cohort modeled on PNDABLE, which already collects preoperative CSF Aβ42, T-tau, and P-tau under spinal anesthesia and assesses delirium with the Confusion Assessment Method (Wang et al.). CSF lipocalin-2 would be added following Kang et al.. No dataset in the file links browser telemetry to CSF or delirium, so this requires new collection. With delirium incidence near 17.5% in PNDABLE, roughly 600 patients yield about 100 cases. That is enough for incremental-discrimination analysis, though not for elaborate models, which is why $h$ is kept low-dimensional. Consent is itself an outcome. Berke et al. found that people shown what their browsers leak were less willing to share it. We will record who declines telemetry, compare them with consenting patients on age, income, and clinical risk, and report that as a selection bias on any conclusion.
Baselines
The naive reference is a logistic model on the variables already known to predict delirium in this population: age, baseline MMSE, age-adjusted Charlson index, and cardiometabolic multimorbidity. Multimorbidity alone carried an odds ratio of 5.062 in Wang et al.. Every behavioral model must add discrimination over this model to be of any use. It is fit on the same folds with the same nested cross-validation budget as every other model.
The strongest existing single predictor is preoperative CSF lipocalin-2, which reached an AUC of 0.713 for delirium in Kang et al. in a hip fracture cohort. We re-measure it in our own cohort rather than borrowing that figure, because population and surgery differ. The target is not to beat CSF, which is invasive. The target is for corrected kinetics plus the clinical baseline to reach a discrimination whose confidence interval overlaps that of CSF plus the clinical baseline. Such a result would mean a non-invasive signal recovers most of what the lumbar puncture adds. The machine-learning delirium predictors in the file (TRAPOD, AUROC 0.774 from 30 intraoperative minutes with a nursing-screen label, and Zheng et al., AUROC 0.743 on full perioperative data) use later time windows and different labels. We report them for orientation only and do not treat them as head-to-head competitors for a preoperative, pre-admission signal.
The most important competitor is a structured browser cognitive task, such as a timed digital trail-making test administered in the same session. I found no reported result on Lacuna for a browser-based cognitive test predicting postoperative delirium or CSF markers. We run it with and without the same device correction.
The key ablation removes the device correction: raw kinetic features versus $\tilde{x}$, with identical models and tuning. A second ablation replaces the swap-based $\hat{h}$ with simple covariate adjustment for age and income, which isolates whether the within-person design matters. A third compares answers-only, process-only, and combined inputs from the questionnaire. Corrected kinetics "win" if they satisfy three conditions. They must raise AUROC over the clinical baseline with a bootstrap interval excluding zero. They must show a larger partial correlation with CSF T-tau (adjusted for age) than raw kinetics. And they must reduce the gap in calibration error between the lowest and highest income tertiles.
Why not just…?
Why not just give a bedside cognitive screen or a structured digital test? This is the real threat for the prediction claim, and the design confronts it rather than avoiding it. A structured timed task may well predict delirium as well as passive form kinetics. If it does, the passive channel's only advantage is zero added burden, and we will say so. But the structured task runs on the same heterogeneous home devices and inherits the same confound. The device-correction contribution therefore stands or falls independently: the experiment asks whether the correction improves both channels. Bedside screens avoid the device problem but sample one moment. They are also administered face to face, which invites the demand effects documented in trial settings (Leong Bin Abdullah et al.).
Why not just use a wearable? Wearables measure activity and sleep well, and we use one as ground truth in the physical-activity subsample. As a routine preoperative tool, however, they require distribution, charging, and syncing. NeCamp et al. reported substantial missingness from exactly these failures even among young medical interns, and an elderly surgical population is unlikely to comply better. Wearables also do not directly measure the processing-speed component that the form captures.
Why not just draw blood? The only direct test in the file is negative. Preoperative plasma lipocalin-2 did not distinguish future delirium cases, while CSF did (Kang et al.). We will include preoperative plasma lipocalin-2 as an additional comparator so this is checked in our cohort rather than assumed.
Why not just adjust for age and income instead of modeling the device? This is the subtlest alternative. Age is a cause of the pathology we want to detect, so adjusting for it removes true signal along with the artifact. Income is related to both device quality and health, so adjusting for it removes true signal as well. The device swap targets only the path from hardware to features. The second ablation settles the question empirically. If age-and-income adjustment matches swap-based correction on CSF partial correlation and on income-tertile calibration, the swap is unnecessary, and we would drop it from the deployable protocol.
Proposed Experiments and Decisive Checks
The first check is the swap itself. Across within-person device pairs, raw features should differ systematically by device descriptor, and corrected features should not. We will quantify this by how well a classifier can tell home from clinic device from $\tilde{x}$, with AUROC near 0.5 as the goal. In held-out people, correction should shrink within-person between-device variance without shrinking between-person variance in the clinic-tablet measurements, where device is held fixed.
The second check is the confound Berke et al. predicts. Before correction, kinetic features should associate with income tertile beyond MMSE. After correction, that association should vanish while the association with age partly remains, since age genuinely carries pathology.
The third, and the decisive biological test, is whether corrected features correlate with CSF T-tau, P-tau, Aβ42, and lipocalin-2 after adjusting for age. We fix the falsification line in advance: if the age-adjusted partial Spearman correlation with every CSF marker has a confidence interval containing zero, the functional-proxy claim fails, whatever the delirium AUROC. A delirium signal without a biomarker link would suggest the features capture frailty or digital literacy rather than brain state.
The fourth is incremental delirium discrimination, measured by AUROC and AUPRC over the clinical baseline, with the comparisons described under Baselines.
The fifth, in the accelerometer subsample, tests whether process-flagged physical-activity reports are the discordant ones. It also tests whether reweighting moves the activity–delirium odds ratio toward the value estimated from measured activity.
A positive result would mean that a form patients already fill in can serve as a non-invasive window on the "fragile brain" state. It would also give every browser-based cognitive measure used in older adults a principled way to stop mistaking old laptops for failing minds.
References
- Lipocalin-2 in preoperative cerebrospinal fluid is a biomarker for postoperative delirium after hip fracture surgery in older adults: a prospective cohort study
- Detecting and Analyzing Mouse Tracking in the Wild
- How Unique is Whose Web Browser? The role of demographics in browser fingerprinting among US users
- FP-Rainbow : Fingerprint-based Browser Configuration Identification
- Physical activity may a probably protective factor for postoperative delirium: the PNDABLE study
- Association of cardiometabolic multimorbidity with postoperative delirium and three-year mortality in patients undergoing knee/hip arthroplasty: a prospective cohort study
- Applying a transformer architecture to intraoperative temporal dynamics improves the prediction of postoperative delirium
- Clustering of Disease Trajectories with Explainable Machine Learning: A Case Study on Postoperative Delirium Phenotypes
- Acceptance and commitment therapy versus mindfulness-based stress reduction for newly diagnosed head and neck cancer patients: A randomized controlled trial assessing efficacy for positive psychology, depression, anxiety, and quality of life
- Assessing Real-Time Moderation for Developing Adaptive Mobile Health Interventions for Medical Interns: Micro-Randomized Trial